/* HostGraber SolusVM 2 Portal UI layer */
:root {
  --app-bg: #eef3f8;
  --app-bg-accent: #f8fbff;
  --app-surface: rgba(255, 255, 255, .92);
  --app-surface-solid: #ffffff;
  --app-border: rgba(15, 23, 42, .08);
  --app-border-strong: rgba(15, 23, 42, .14);
  --app-text: #172033;
  --app-muted: #687386;
  --app-shadow-sm: 0 10px 28px rgba(15, 23, 42, .06);
  --app-shadow-md: 0 18px 48px rgba(15, 23, 42, .10);
  --app-radius: 18px;
  --app-radius-sm: 12px;
}

html { background: var(--app-bg); }
body {
  color: var(--app-text);
  
  min-height: 100vh;
  font-family: Aptos, "Segoe UI Variable", "SF Pro Display", "Helvetica Neue", sans-serif;
}

a { transition: color .16s ease, opacity .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease; }
.text-muted { color: var(--app-muted) !important; }

#sidebar {
  
  border-right: 1px solid rgba(255,255,255,.07);
  box-shadow: 18px 0 44px rgba(2, 6, 23, .16);
}

.sidebar-brand {
  min-height: 68px;
  background: rgba(255,255,255,.035);
  backdrop-filter: blur(14px);
}

.sidebar-brand img {
  max-width: 150px;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,.22));
}

.sidebar-brand .brand-text,
.sidebar-brand .b-name,
#sidebar .sidebar-brand span {
  line-height: 1.15;
  letter-spacing: -.02em;
}

#sidebar .nav-section {
  margin-top: 6px;
  color: rgba(255,255,255,.38) !important;
  font-weight: 800;
}

#sidebar .nav-link {
  margin: 2px 12px;
  border-radius: 14px;
  border-left: 0 !important;
  position: relative;
}

#sidebar .nav-link i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px !important;
  height: 28px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
}

#sidebar .nav-link:hover {
  background: rgba(255,255,255,.08) !important;
  transform: translateX(2px);
}

#sidebar .nav-link.active {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}

#sidebar .nav-link.active i { background: rgba(255,255,255,.18); }

#main-content,
#main { position: relative; }

.topbar {
  height: 64px !important;
  background: rgba(255,255,255,.78) !important;
  border-bottom: 1px solid var(--app-border) !important;
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(15,23,42,.045);
}

.page-content {
  padding: clamp(18px, 2.4vw, 34px) !important;
}

.card,
.modal-content,
.dropdown-menu {
  border: 1px solid var(--app-border) !important;
  border-radius: var(--app-radius) !important;
  box-shadow: var(--app-shadow-sm) !important;
}

.card {
  background: var(--app-surface);
  backdrop-filter: blur(12px);
}

.card-header {
  border-bottom: 1px solid var(--app-border) !important;
  border-radius: var(--app-radius) var(--app-radius) 0 0 !important;
}

.stat-card {
  border-radius: var(--app-radius) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(255,255,255,.78)) !important;
  box-shadow: var(--app-shadow-sm) !important;
  border: 1px solid rgba(255,255,255,.68) !important;
  transition: transform .18s ease, box-shadow .18s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--app-shadow-md) !important;
}

.stat-icon {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 12px 24px rgba(15,23,42,.08);
}

.btn {
  border-radius: 12px;
  font-weight: 700;
}

.btn-primary,
.btn-success {
  color: #fff !important;
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 22px rgba(0,0,0,.22) !important;
}

.btn-primary {
  background: var(--brand-primary) !important;
}

.btn-outline-primary {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.btn-outline-primary:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.form-control,
.form-select {
  border-radius: 12px;
  border-color: var(--app-border-strong);
  min-height: 40px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 .24rem rgba(0,0,0,.12);
}

.table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: rgba(0,0,0,.04);
  margin-bottom: 0;
}

.table-responsive {
  border-radius: var(--app-radius);
}

.table th {
  background: rgba(248,250,252,.78);
  border-bottom: 1px solid var(--app-border) !important;
  color: #5b6678 !important;
  font-weight: 800;
}

.table td {
  border-color: rgba(15,23,42,.065);
  vertical-align: middle;
}

.badge {
  border-radius: 999px;
  padding: .62rem .62rem;
  font-weight: 800;
}

.progress {
  background: rgba(15, 23, 42, .08);
  overflow: visible;
}

.progress-bar {
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(15,23,42,.14);
}

.alert {
  border: 0;
  border-radius: var(--app-radius-sm);
  box-shadow: var(--app-shadow-sm);
}

.modal-backdrop.show { opacity: .36; }

.modal-content { overflow: hidden; }

.dropdown-menu {
  padding: 8px;
}

.dropdown-item {
  border-radius: 10px;
  font-weight: 650;
}

.font-monospace {
  font-family: "SF Mono", "Cascadia Code", "Roboto Mono", monospace !important;
}

@media (max-width: 991px) {
  #sidebar.show {
    box-shadow: 0 0 0 999px rgba(2,6,23,.42), 22px 0 50px rgba(2,6,23,.22);
  }
  .topbar { height: 58px !important; }
  .page-content { padding: 16px !important; }
  .card-body { padding: 1rem; }
}

/* Responsive shell fixes */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

#sidebar {
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.28) transparent;
}

#sidebar::-webkit-scrollbar { width: 8px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.22);
  border-radius: 999px;
}
#sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.36); }

.sidebar-brand {
  position: sticky;
  top: 0;
  z-index: 2;
}

#main-content,
#main {
  min-width: 0;
}

.topbar {
  gap: .75rem;
  min-width: 0;
}

.topbar .dropdown,
.topbar .btn,
.topbar span {
  min-width: 0;
}

.card,
.table-responsive,
.modal-content {
  max-width: 100%;
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}



.modal-dialog {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1199px) and (min-width: 992px) {
  :root { --sidebar-width: 232px; }
  #sidebar .nav-link { padding-left: 14px !important; padding-right: 14px !important; }
  #sidebar .nav-section { padding-left: 16px !important; padding-right: 16px !important; }
  .page-content { padding: 20px !important; }
}

@media (max-width: 991px) {
  body.nav-open { overflow: hidden; }
  #sidebar {
    width: min(86vw, 310px) !important;
    transform: translateX(-105%);
    will-change: transform;
  }
  #sidebar.show {
    transform: translateX(0) !important;
    box-shadow: 0 0 0 9999px rgba(2,6,23,.48), 22px 0 54px rgba(2,6,23,.24) !important;
  }
  #main-content,
  #main {
    margin-left: 0 !important;
    width: 100% !important;
  }
  .topbar {
    height: auto !important;
    min-height: 58px;
    padding: 10px 12px !important;
    flex-wrap: nowrap;
  }
  .topbar > .fw-semibold,
  .topbar > span.fw-semibold {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar .dropdown-toggle {
    max-width: 44vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .page-content {
    padding: 14px !important;
  }
  .row.g-4,
  .row.g-3,
  .row.g-2 {
    --bs-gutter-x: .85rem;
    --bs-gutter-y: .85rem;
  }
  .card-body,
  .wizard-body {
    padding: 1rem !important;
  }
  .d-flex.justify-content-between.align-items-center.mb-4,
  .d-flex.justify-content-between.align-items-center.mb-3 {
    align-items: flex-start !important;
    flex-direction: column;
    gap: .75rem;
  }
  .d-flex.gap-2,
  .btn-group {
    flex-wrap: wrap;
  }
  .btn,
  .form-control,
  .form-select {
    min-height: 42px;
  }
  .modal-dialog {
    margin: .75rem;
  }
}

@media (max-width: 575px) {
  body { font-size: .94rem; }
  h1, .h1 { font-size: 1.55rem; }
  h2, .h2 { font-size: 1.35rem; }
  h3, .h3 { font-size: 1.2rem; }
  h4, .h4 { font-size: 1.08rem; }
  h5, .h5 { font-size: 1rem; }
  .page-content { padding: 12px !important; }
  .card,
  .modal-content,
  .dropdown-menu,
  .table-responsive {
    border-radius: 14px !important;
  }
  .stat-card,
  .card .card-body {
    padding: .9rem !important;
  }
  .table {
    min-width: 680px;
    font-size: .84rem;
  }
  .table th,
  .table td {
    padding: .62rem .65rem;
  }
  .input-group {
    flex-wrap: nowrap;
  }
  .dropdown-menu {
    max-width: calc(100vw - 24px);
  }
}

/* 2026 responsive polish pass: keep all panels usable on desktop, laptop, tablet, and phone. */
:root {
  --app-content-max: 1680px;
  --app-focus-ring: 0 0 0 .22rem rgba(0,0,0,.12);
  --app-compact-shadow: 0 8px 24px rgba(15,23,42,.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

#main-content,
#main {
  isolation: auto;
}

.page-content {
  width: min(100%, var(--app-content-max));
  margin-inline: auto;
}

.page-content > .d-flex.justify-content-between:first-child,
.page-content > .d-flex.justify-content-between.align-items-start:first-child,
.page-content > .d-flex.justify-content-between.align-items-center:first-child {
  padding: clamp(14px, 1.6vw, 22px);
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,255,255,.62)),
    radial-gradient(circle at 8% 10%, rgba(0,0,0,.06), transparent 18rem);
  box-shadow: var(--app-shadow-sm);
}

.page-content > .d-flex.justify-content-between:first-child h5,
.page-content > .d-flex.justify-content-between.align-items-start:first-child h5,
.page-content > .d-flex.justify-content-between.align-items-center:first-child h5 {
  letter-spacing: -.025em;
}

#sidebar {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

#sidebar .sidebar-brand {
  flex: 0 0 auto;
}

#sidebar .nav-link {
  min-height: 42px;
  overflow-wrap: anywhere;
}

#sidebar .nav-link.text-danger {
  margin-top: auto !important;
}

.topbar {
  width: 100%;
}

.topbar > .fw-semibold,
.topbar > span.fw-semibold {
  letter-spacing: -.015em;
}

.topbar .btn-light {
  border: 1px solid var(--app-border);
  background: rgba(255,255,255,.72);
}

.card,
.stat-card {
  overflow: clip;
}

.card-header {
  background: rgba(255,255,255,.72) !important;
}

.card-body.p-0 > .table-responsive,
.card > .table-responsive {
  border-radius: 0 0 var(--app-radius) var(--app-radius));
}

.card .list-group-item {
  border-color: var(--app-border);
}

.list-group-item.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  white-space: nowrap;
}

.btn-sm {
  min-height: 34px;
}

.btn-lg {
  min-height: 48px;
}

.btn-light {
  --bs-btn-hover-bg: #f8fafc;
}

.btn-group {
  max-width: 100%;
}

.btn-group > .btn {
  min-width: 0;
}

.dropdown-menu {
  border: 1px solid var(--app-border);
  max-height: min(420px, calc(100vh - 80px));
  overflow-y: auto;
}

.dropdown-item {
  white-space: normal;
}

.form-label {
  color: #ffffff;
  font-size: .84rem;
  font-weight: 750;
}

.form-text,
small.text-muted {
  line-height: 1.45;
}

textarea.form-control {
  min-height: 96px;
}

select[multiple].form-select,
.overflow-auto {
  scrollbar-width: thin;
  scrollbar-color: rgba(15,23,42,.24) transparent;
}

.table-responsive {
  border: 1px solid var(--app-border);
  background: rgba(255,255,255,.54);
}

.table {
  width: 100%;
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.table td,
.table th {
  white-space: nowrap;
}

.table td:first-child,
.table th:first-child {
  padding-left: 1rem;
}

.table td:last-child,
.table th:last-child {
  padding-right: 1rem;
}

.table .text-muted,
.table small {
  white-space: normal;
}

.font-monospace,
code {
  overflow-wrap: anywhere;
}

.modal {
  --bs-modal-margin: 1rem;
}

.modal-dialog {
  max-width: min(var(--bs-modal-width, 500px), calc(100vw - 1.5rem));
}

.modal-dialog.modal-lg {
  --bs-modal-width: 920px;
}

.modal-dialog.modal-xl {
  --bs-modal-width: 1180px;
}

.modal-body {
  max-height: calc(100dvh - 180px);
  overflow-y: auto;
}

.modal-footer {
  background: rgba(248,250,252,.72);
  border-top: 1px solid var(--app-border);
}

.alert {
  overflow-wrap: anywhere;
}

.toast-stack {
  width: min(420px, calc(100vw - 24px));
}

.plan-card {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
  background: rgba(255,255,255,.75);
}

.plan-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--app-compact-shadow);
}

.badge-status-cancelled,
.badge-status-hidden,
.badge-status-inactive {
  background: #e5e7eb;
  color: #374151;
}

@media (min-width: 992px) {
  #sidebar {
    transform: none !important;
  }

  #main-content,
  #main {
    width: calc(100% - var(--sidebar-width));
  }
}

@media (max-width: 991px) {
  #sidebar {
    border-radius: 0 22px 22px 0;
  }

  .page-content > .d-flex.justify-content-between:first-child,
  .page-content > .d-flex.justify-content-between.align-items-start:first-child,
  .page-content > .d-flex.justify-content-between.align-items-center:first-child {
    border-radius: 18px;
  }

  .page-content > .d-flex.justify-content-between:first-child > .d-flex,
  .page-content > .d-flex.justify-content-between.align-items-start:first-child > .d-flex,
  .page-content > .d-flex.justify-content-between.align-items-center:first-child > .d-flex {
    width: 100%;
  }

  .page-content > .d-flex.justify-content-between:first-child .btn,
  .page-content > .d-flex.justify-content-between.align-items-start:first-child .btn,
  .page-content > .d-flex.justify-content-between.align-items-center:first-child .btn {
    flex: 1 1 auto;
  }

  .topbar {
    position: sticky;
    top: 0;
  }

  .card-header.d-flex,
  .card-body.d-flex,
  .modal-footer,
  form .d-flex.gap-2,
  .page-content .d-flex.gap-2 {
    flex-wrap: wrap;
  }

  .card-header.d-flex > *,
  .card-body.d-flex > *,
  .modal-footer > *,
  form .d-flex.gap-2 > *,
  .page-content .d-flex.gap-2 > * {
    min-width: 0;
  }

  .table-responsive::after {
    content: "Swipe horizontally to view more";
    display: block;
    padding: .55rem .75rem;
    color: var(--app-muted);
    font-size: .75rem;
    text-align: center;
    border-top: 1px solid var(--app-border);
  }

  .modal-body {
    max-height: calc(100dvh - 150px);
  }
}

@media (max-width: 767px) {
  .row > [class*="col-md-"],
  .row > [class*="col-lg-"],
  .row > [class*="col-xl-"] {
    min-width: 100%;
  }

  .stat-card,
  .card.border-0.shadow-sm.p-3 {
    min-height: 100%;
  }

  .btn:not(.dropdown-toggle):not(.btn-close) {
    white-space: normal;
  }

  .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
  }

  .btn-group > .btn,
  .btn-group > .btn:not(:last-child),
  .btn-group > .btn:not(:first-child) {
    border-radius: 10px !important;
  }

  .input-group {
    flex-wrap: wrap;
    gap: .4rem;
  }

  .input-group > .form-control,
  .input-group > .form-select,
  .input-group > .btn {
    width: 100%;
    border-radius: 12px !important;
  }
}

@media (max-width: 575px) {
  :root {
    --app-radius: 15px;
    --app-radius-sm: 11px;
  }

  #sidebar {
    width: min(88vw, 300px) !important;
  }

  #sidebar .nav-link {
    min-height: 44px;
    font-size: .9rem;
  }

  .topbar .dropdown-toggle {
    max-width: 40vw;
  }

  .page-content > .d-flex.justify-content-between:first-child,
  .page-content > .d-flex.justify-content-between.align-items-start:first-child,
  .page-content > .d-flex.justify-content-between.align-items-center:first-child {
    padding: 12px;
  }

  .page-content > .d-flex.justify-content-between:first-child .btn,
  .page-content > .d-flex.justify-content-between.align-items-start:first-child .btn,
  .page-content > .d-flex.justify-content-between.align-items-center:first-child .btn,
  .modal-footer .btn {
    width: 100%;
  }

  .card-header {
    padding: .9rem 1rem .55rem !important;
  }

  .form-control,
  .form-select {
    font-size: 16px;
  }

  .table {
    min-width: 720px;
  }

  .modal-dialog {
    max-width: calc(100vw - 1rem);
    margin: .5rem auto;
  }

  .modal-body {
    padding: 1rem;
  }

  .modal-footer {
    padding: .8rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* HostGraber black/neon-green theme */
:root {
  --brand-primary: #00921A;
  --brand-secondary: #00921A;
  --sidebar-width: 260px;
  --topbar-height: 62px;
  --app-bg: #030603;
  --app-bg-accent: #071007;
  --app-surface: rgba(9, 16, 10, .94);
  --app-surface-solid: #09100a;
  --app-surface-raised: #0d170e;
  --app-border: rgba(0, 146, 26, .24);
  --app-border-strong: rgba(0, 146, 26, .42);
  --app-text: #eef8ef;
  --app-muted: #8aa08d;
  --app-shadow-sm: 0 14px 38px rgba(0, 0, 0, .34), 0 0 0 1px rgba(0, 146, 26, .08);
  --app-shadow-md: 0 22px 62px rgba(0, 0, 0, .48), 0 0 32px rgba(0, 146, 26, .12);
  --app-radius: 18px;
  --app-radius-sm: 12px;
}

html,
body {
  background: var(--app-bg) !important;
}

body {
  color: var(--app-text);
}

a {
  color: #29d84a;
}

a:hover {
  color: #5af571;
}

.text-dark,
.text-body,
.fw-semibold.text-dark {
  color: var(--app-text) !important;
}

.text-muted,
.text-secondary {
  color: var(--app-muted) !important;
}

#sidebar {
  
  border-right: 1px solid var(--app-border);
}

.sidebar-brand {
  min-height: 70px;
  padding: 16.5px 20px;
  border-bottom: 1px solid var(--app-border);
  background: rgba(0, 146, 26, .08);
}

.sidebar-brand img {
  max-height: 38px;
  max-width: 150px;
  object-fit: contain;
}

.sidebar-brand span,
.sidebar-brand .brand-text,
.sidebar-brand .b-name {
  color: #ffffff;
  font-weight: 800;
}

#sidebar .nav-section,
.nav-section {
  padding: 14px 20px 5px;
  color: rgba(138, 160, 141, .86) !important;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

#sidebar .nav-link {
  color: #b7c9ba;
  padding: 9px 18px;
  margin: 3px 12px;
  border: 1px solid transparent !important;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#sidebar .nav-link i {
  color: #7df58c;
  background: rgba(0, 146, 26, .13);
}

#sidebar .nav-link:hover {
  color: #fff;
  background: rgba(0, 146, 26, .13) !important;
  border-color: rgba(0, 146, 26, .22) !important;
}

#sidebar .nav-link.active {
  color: #ffffff;
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

#main-content,
#main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  min-width: 0;
}

.topbar {
  min-height: var(--topbar-height);
  height: auto !important;
  background: rgba(5, 10, 5, .88) !important;
  border-bottom: 1px solid var(--app-border) !important;
  color: var(--app-text);
  backdrop-filter: blur(18px);
}

.page-content {
  max-width: var(--app-content-max, 1640px);
  margin: 0 auto;
}

.card,
.modal-content,
.dropdown-menu,
.list-group-item {
  background: var(--app-surface) !important;
  color: var(--app-text);
  border-color: var(--app-border) !important;
}

.card-header,
.modal-header,
.modal-footer,
.bg-white,
.bg-light {
  background: var(--app-surface-raised) !important;
  border-color: var(--app-border) !important;
  color: var(--app-text) !important;
}

.card,
.modal-content,
.dropdown-menu {
  box-shadow: var(--app-shadow-sm) !important;
}

.stat-card {
  background: linear-gradient(145deg, rgba(13, 23, 14, .98), rgba(5, 10, 5, .94)) !important;
  border: 1px solid var(--app-border) !important;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #dfffe4;
  background: rgba(0, 146, 26, .16);
  box-shadow: inset 0 0 0 1px rgba(0, 146, 26, .28), 0 0 24px rgba(0, 146, 26, .18);
  font-size: 1.3rem;
}

.stat-tone-primary,
.stat-tone-success {
  color: #bfffc8;
  background: rgba(0, 146, 26, .2);
}

.stat-tone-info {
  color: #bdfed0;
  background: rgba(0, 146, 26, .14);
}

.stat-tone-warning {
  color: #ffe7a3;
  background: rgba(245, 158, 11, .18);
}

.stat-tone-danger {
  color: #ffc4c4;
  background: rgba(239, 68, 68, .16);
}

.stat-tone-muted {
  color: #cbd5cb;
  background: rgba(148, 163, 148, .13);
}

.stat-label,
.template-subject,
.provider-code,
.provider-tip {
  font-size: .74rem;
}

.provider-tip {
  margin-top: 2px;
}

.provider-use-btn {
  white-space: nowrap;
  font-size: .72rem;
}

.btn {
  border-radius: 12px;
}

.btn-primary,
.btn-success {
  color: #fff !important;
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 24px rgba(0, 0, 0, .18);
}

.btn-primary:hover,
.btn-success:hover {
  background: var(--brand-secondary) !important;
  border-color: var(--brand-secondary) !important;
  opacity: .9;
}

.btn-light,
.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning {
  color: #d9f5dc;
  background: rgba(0, 146, 26, .08);
  border-color: var(--app-border-strong);
}

.btn-light:hover,
.btn-outline-secondary:hover,
.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-danger:hover,
.btn-outline-warning:hover {
  color: #fff;
  background: rgba(0, 146, 26, .22);
  border-color: var(--brand-primary);
}

.form-control,
.form-select,
.input-group-text {
  color: var(--app-text);
  background-color: #050905;
  border-color: var(--app-border-strong);
}

.form-control:focus,
.form-select:focus {
  color: #ffffff;
  background-color: #070d07;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 .24rem rgba(0, 0, 0, .15);
}

.form-control::placeholder {
  color: #6d806f;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--app-text);
  --bs-table-hover-bg: rgba(0, 146, 26, .08);
  color: var(--app-text);
}

.table th {
  background: rgba(0, 146, 26, .09) !important;
  color: #a8d8ae !important;
  border-color: var(--app-border) !important;
}

.table td {
  color: var(--app-text);
  border-color: rgba(0, 146, 26, .15);
}

code,
pre,
.font-monospace {
  color: #9af7a6;
}

code {
  background: rgba(0, 146, 26, .12);
  border: 1px solid rgba(0, 146, 26, .18);
}

.badge.bg-primary,
.badge-status-active,
.badge-on {
  background: rgba(0, 146, 26, .22) !important;
  color: #adffb9 !important;
  border: 1px solid rgba(0, 146, 26, .34);
}

.progress,
.progress-thin,
.progress-preview {
  height: 7px;
  border-radius: 999px;
  background: rgba(138, 160, 141, .18);
}

.progress-preview {
  height: 8px;
}

.progress-bar {
  width: 0;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary)) !important;
}

.alert-info,
.alert-primary,
.alert-success {
  color: #dfffe4;
  background: rgba(0, 146, 26, .14);
  border: 1px solid rgba(0, 146, 26, .28);
}

.alert-warning {
  color: #ffe7a3;
  background: rgba(245, 158, 11, .12);
  border: 1px solid rgba(245, 158, 11, .25);
}

.alert-danger {
  color: #ffd0d0;
  background: rgba(239, 68, 68, .13);
  border: 1px solid rgba(239, 68, 68, .25);
}

.dropdown-item {
  color: var(--app-text);
}

.dropdown-item:hover {
  color: #ffffff;
  background: rgba(0, 146, 26, .16);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 0, 0, .2), transparent 24rem),
    linear-gradient(135deg, #010201, #071107) !important;
}

.installer-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 146, 26, .28), transparent 26rem),
    linear-gradient(135deg, #010201, #071107) !important;
}

.installer-page > .container {
  max-width: 960px;
}

.installer-locked-page {
  justify-content: center;
  padding: 16px;
}

.auth-container {
  max-width: 420px;
}

.card-header-brand {
  padding: 28px 32px;
  text-align: center;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
}

.card-body-form {
  padding: 32px;
  background: var(--app-surface) !important;
}

.auth-logo {
  max-height: 44px;
  display: block;
  margin: 0 auto 10px;
}

.auth-success-icon {
  font-size: 3rem;
}

.btn-signin {
  font-weight: 800;
}

.wizard-card {
  max-width: 800px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--app-shadow-md);
}

.wizard-header {
  padding: 28px 32px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
}

.step-bar {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--app-border);
  background: var(--app-surface-raised);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .78rem;
  flex-shrink: 0;
  background: rgba(138, 160, 141, .2);
  color: var(--app-muted);
}

.step-item.is-active .step-dot,
.step-item.is-done .step-dot,
.step-line.is-done {
  color: #fff;
  background: var(--brand-primary);
}

.step-line {
  flex: 1;
  height: 2px;
  min-width: 20px;
  background: rgba(138, 160, 141, .25);
}

.wizard-body {
  padding: 32px;
  background: var(--app-surface) !important;
}

.wizard-body .d-flex.gap-2,
.wizard-body .d-flex.gap-3 {
  flex-wrap: wrap;
}

.wizard-body .btn-lg {
  min-width: 190px;
}

.install-locked-card {
  max-width: 460px;
  border-radius: 16px;
}

.install-complete-icon {
  color: #7dff8e;
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.console-page {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.console-shell {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
}

.console-topbar {
  min-height: 58px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #071107, #020302);
  border-bottom: 1px solid var(--app-border);
}

.console-logo {
  max-height: 32px;
  max-width: 160px;
  object-fit: contain;
}

.console-brand {
  color: #ffffff;
  font-weight: 900;
}

.console-meta {
  color: var(--app-muted);
  font-size: .84rem;
}

.console-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  background: #010201;
}

#screen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#screen canvas {
  max-width: 100%;
  max-height: 100%;
}

#proxyFrame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #010201;
}

.console-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.status-pill {
  border: 1px solid var(--app-border-strong);
  color: #d1f8d5;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .78rem;
}

.btn-console {
  --bs-btn-color: #fff;
  --bs-btn-border-color: rgba(0, 146, 26, .36);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(0, 146, 26, .18);
}

.sticky-preview {
  top: 80px;
}

.brand-preview-bar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
}

.brand-preview-logo {
  max-height: 30px;
  display: block;
}

.brand-preview-name {
  font-weight: 800;
  font-size: 1rem;
  color: #ffffff;
}

.brand-preview-button {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 8px;
  color: #fff;
  font-size: .85rem;
  cursor: pointer;
  background: var(--brand-primary);
}

.current-logo-preview {
  max-height: 40px;
}

.current-favicon-preview {
  max-height: 24px;
}

.color-preset {
  min-width: 70px;
  min-height: 28px;
  border: 1px solid var(--app-border-strong);
  border-radius: 8px;
  background: rgba(0, 146, 26, .12);
  color: #dfffe4;
  font-size: .7rem;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  font-size: 2rem;
  color: #77ff88;
}

.deploy-spinner {
  width: 3rem;
  height: 3rem;
}

.token-input-group {
  max-width: 220px;
}

.os-assignment-list {
  max-height: 320px;
}

.col-id {
  width: 72px;
}

.col-id-wide {
  width: 80px;
}

.col-version,
.col-virt-wide {
  width: 140px;
}

.col-virt {
  width: 120px;
}

.col-cloud-init {
  width: 130px;
}

.col-cloud-init-wide {
  width: 150px;
}

.col-visible {
  width: 80px;
}

.col-visible-wide {
  width: 110px;
}

.os-id-label {
  min-width: 56px;
}

.fit-select {
  width: auto;
}

.cursor-pointer,
.plan-card {
  cursor: pointer;
}

.code-snippet {
  font-size: .8rem;
}

.debug-output,
.api-output {
  font-size: .75rem;
  max-height: 300px;
  overflow: auto;
  background: #020502 !important;
  color: #9af7a6 !important;
}

.debug-output-sm {
  max-height: 200px;
}

.api-output {
  max-height: 400px;
  margin: 0;
  padding: 12px;
  border-radius: 0 0 8px 8px;
}

.api-endpoint-path {
  font-size: .75rem;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.method-select {
  width: 100px;
}

.status-dot {
  font-size: .45rem;
}

.code-editor {
  font-size: .82rem;
}

.template-preview {
  font-size: .85rem;
}

.toast-stack {
  z-index: 1080;
}

.visually-hidden-copy {
  position: fixed;
  opacity: 0;
}

.progress-w-0 { width: 0%; }
.progress-w-1 { width: 1%; }
.progress-w-2 { width: 2%; }
.progress-w-3 { width: 3%; }
.progress-w-4 { width: 4%; }
.progress-w-5 { width: 5%; }
.progress-w-6 { width: 6%; }
.progress-w-7 { width: 7%; }
.progress-w-8 { width: 8%; }
.progress-w-9 { width: 9%; }
.progress-w-10 { width: 10%; }
.progress-w-11 { width: 11%; }
.progress-w-12 { width: 12%; }
.progress-w-13 { width: 13%; }
.progress-w-14 { width: 14%; }
.progress-w-15 { width: 15%; }
.progress-w-16 { width: 16%; }
.progress-w-17 { width: 17%; }
.progress-w-18 { width: 18%; }
.progress-w-19 { width: 19%; }
.progress-w-20 { width: 20%; }
.progress-w-21 { width: 21%; }
.progress-w-22 { width: 22%; }
.progress-w-23 { width: 23%; }
.progress-w-24 { width: 24%; }
.progress-w-25 { width: 25%; }
.progress-w-26 { width: 26%; }
.progress-w-27 { width: 27%; }
.progress-w-28 { width: 28%; }
.progress-w-29 { width: 29%; }
.progress-w-30 { width: 30%; }
.progress-w-31 { width: 31%; }
.progress-w-32 { width: 32%; }
.progress-w-33 { width: 33%; }
.progress-w-34 { width: 34%; }
.progress-w-35 { width: 35%; }
.progress-w-36 { width: 36%; }
.progress-w-37 { width: 37%; }
.progress-w-38 { width: 38%; }
.progress-w-39 { width: 39%; }
.progress-w-40 { width: 40%; }
.progress-w-41 { width: 41%; }
.progress-w-42 { width: 42%; }
.progress-w-43 { width: 43%; }
.progress-w-44 { width: 44%; }
.progress-w-45 { width: 45%; }
.progress-w-46 { width: 46%; }
.progress-w-47 { width: 47%; }
.progress-w-48 { width: 48%; }
.progress-w-49 { width: 49%; }
.progress-w-50 { width: 50%; }
.progress-w-51 { width: 51%; }
.progress-w-52 { width: 52%; }
.progress-w-53 { width: 53%; }
.progress-w-54 { width: 54%; }
.progress-w-55 { width: 55%; }
.progress-w-56 { width: 56%; }
.progress-w-57 { width: 57%; }
.progress-w-58 { width: 58%; }
.progress-w-59 { width: 59%; }
.progress-w-60 { width: 60%; }
.progress-w-61 { width: 61%; }
.progress-w-62 { width: 62%; }
.progress-w-63 { width: 63%; }
.progress-w-64 { width: 64%; }
.progress-w-65 { width: 65%; }
.progress-w-66 { width: 66%; }
.progress-w-67 { width: 67%; }
.progress-w-68 { width: 68%; }
.progress-w-69 { width: 69%; }
.progress-w-70 { width: 70%; }
.progress-w-71 { width: 71%; }
.progress-w-72 { width: 72%; }
.progress-w-73 { width: 73%; }
.progress-w-74 { width: 74%; }
.progress-w-75 { width: 75%; }
.progress-w-76 { width: 76%; }
.progress-w-77 { width: 77%; }
.progress-w-78 { width: 78%; }
.progress-w-79 { width: 79%; }
.progress-w-80 { width: 80%; }
.progress-w-81 { width: 81%; }
.progress-w-82 { width: 82%; }
.progress-w-83 { width: 83%; }
.progress-w-84 { width: 84%; }
.progress-w-85 { width: 85%; }
.progress-w-86 { width: 86%; }
.progress-w-87 { width: 87%; }
.progress-w-88 { width: 88%; }
.progress-w-89 { width: 89%; }
.progress-w-90 { width: 90%; }
.progress-w-91 { width: 91%; }
.progress-w-92 { width: 92%; }
.progress-w-93 { width: 93%; }
.progress-w-94 { width: 94%; }
.progress-w-95 { width: 95%; }
.progress-w-96 { width: 96%; }
.progress-w-97 { width: 97%; }
.progress-w-98 { width: 98%; }
.progress-w-99 { width: 99%; }
.progress-w-100 { width: 100%; }

@media (max-width: 991px) {
  #main-content,
  #main {
    margin-left: 0 !important;
    width: 100% !important;
  }

  .topbar {
    min-height: 58px;
    padding: 10px 12px !important;
  }
}

@media (max-width: 767px) {
  body.py-4 {
    padding: 0 !important;
  }

  .wizard-card {
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  .wizard-header {
    padding: 22px 18px;
  }

  .step-bar {
    align-items: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 14px;
  }

  .step-item {
    flex: 0 0 auto;
  }

  .step-line {
    flex: 0 0 22px;
    margin-top: 14px;
  }

  .wizard-body {
    padding: 18px 14px;
  }

  .wizard-body .btn-lg,
  .wizard-body .btn-link {
    width: 100%;
  }

  .console-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

/* Final shell lock: keep the sidebar as a rail on desktop, drawer on mobile. */
@media (min-width: 992px) {
  body:not(.auth-page):not(.installer-page):not(.installer-locked-page):not(.console-page) {
    overflow-x: hidden;
  }

  #sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: var(--sidebar-width) !important;
    max-width: var(--sidebar-width) !important;
    height: 100vh !important;
    height: 100dvh !important;
    transform: none !important;
    z-index: 1040;
  }

  #main-content,
  #main {
    position: relative;
    margin-left: var(--sidebar-width) !important;
    width: calc(100% - var(--sidebar-width)) !important;
    min-height: 100vh;
  }
}

@media (max-width: 991px) {
  #sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(86vw, 310px) !important;
    max-width: min(86vw, 310px) !important;
    height: 100vh !important;
    height: 100dvh !important;
    transform: translateX(-105%) !important;
    z-index: 1040;
    background: #060d06 !important;
}

  #sidebar.show {
    transform: translateX(0) !important;
    background: #060d06 !important;
   }

  #main-content,
  #main {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* Final modal/form lock: keep Bootstrap dialogs above the shell and inputs usable. */
body.modal-open {
  overflow: hidden !important;
  padding-right: 0 !important;
}

.modal-backdrop {
  z-index: 2050 !important;
  background: rgba(0, 0, 0, .82) !important;
}

.modal-backdrop.show {
  opacity: 1 !important;
}

.modal {
  z-index: 2060 !important;
  pointer-events: none;
}

.modal.show {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto;
}

.modal-dialog {
  position: relative;
  z-index: 2061 !important;
  pointer-events: auto;
}

.modal-content {
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 146, 26, .16), transparent 18rem),
    linear-gradient(145deg, #0d170e, #050905) !important;
  color: var(--app-text) !important;
  border: 1px solid var(--app-border-strong) !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.82), 0 0 0 1px rgba(0,146,26,.22) !important;
}

.modal-header,
.modal-footer {
  background: rgba(0, 146, 26, .08) !important;
  border-color: var(--app-border) !important;
}

.modal-title,
.modal label,
.modal .form-label {
  color: #f2fff4 !important;
}

.modal .btn-close {
  filter: invert(1) grayscale(1);
  opacity: .86;
}

.form-control,
.form-select,
textarea.form-control,
select.form-select,
.modal .form-control,
.modal .form-select,
.modal textarea.form-control,
.modal select.form-select {
  color: #f2fff4 !important;
  background-color: #060c06 !important;
  border-color: rgba(0, 146, 26, .48) !important;
  caret-color: #5cff73;
}

.form-control:focus,
.form-select:focus,
.modal .form-control:focus,
.modal .form-select:focus {
  color: #ffffff !important;
  background-color: #081108 !important;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 .24rem rgba(0, 0, 0, .2) !important;
}

.form-control::placeholder,
textarea.form-control::placeholder {
  color: rgba(196, 220, 199, .55) !important;
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
  color: rgba(242, 255, 244, .72) !important;
  background-color: rgba(12, 22, 13, .88) !important;
  border-color: rgba(0, 146, 26, .28) !important;
}

select.form-select option {
  color: #f2fff4;
  background: #071107;
}

.input-group-text {
  color: #bfffc8 !important;
  background: rgba(0, 146, 26, .13) !important;
  border-color: rgba(0, 146, 26, .48) !important;
}

.modal .row {
  row-gap: .95rem;
}

.modal .modal-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 146, 26, .48) transparent;
}

.modal .modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal .modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 146, 26, .48);
  border-radius: 999px;
}

/* Final dark-neon polish: remove pale Bootstrap surfaces and sharpen the portal UI. */
:root {
  --neon-green: #00921A;
  --neon-green-soft: rgba(0, 146, 26, .18);
  --neon-green-line: rgba(0, 146, 26, .34);
  --neon-green-bright: #58ff70;
  --deep-black: #010301;
  --deep-panel: #071007;
  --deep-panel-2: #0b160c;
  --deep-panel-3: #102012;
  --deep-text: #eaffed;
  --deep-muted: #91b696;
}

body {
  color: var(--deep-text) !important;
  
}

.text-muted,
.text-secondary,
small.text-muted,
.table .text-muted {
  color: var(--deep-muted) !important;
}

.bg-white,
.bg-light,
.table-light,
.list-group-item,
.dropdown-menu,
.card,
.stat-card,
.modal-content {
  background:
    linear-gradient(145deg, rgba(11, 22, 12, .98), rgba(3, 8, 4, .97)) !important;
  color: var(--deep-text) !important;
  border-color: var(--neon-green-line) !important;
}

.page-content > .d-flex.justify-content-between:first-child,
.page-content > .d-flex.justify-content-between.align-items-start:first-child,
.page-content > .d-flex.justify-content-between.align-items-center:first-child {
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 146, 26, .22), transparent 22rem),
    linear-gradient(135deg, rgba(9, 24, 10, .96), rgba(2, 7, 3, .94)) !important;
  border-color: rgba(88, 255, 112, .18) !important;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(88, 255, 112, .08);
}

.topbar {
  background:
    linear-gradient(90deg, rgba(3, 8, 4, .98), rgba(8, 20, 9, .96)) !important;
  border-bottom-color: rgba(0, 146, 26, .35) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .28), 0 1px 0 rgba(88, 255, 112, .08);
}

.topbar-user {
  margin-left: auto !important;
}

.user-badge {
  appearance: none;
  border: 1px solid rgba(88, 255, 112, .34);
  border-radius: 999px;
  background:
    radial-gradient(circle at 15% 0%, #000, transparent 4rem),
    linear-gradient(135deg, rgba(0, 146, 26, .28), rgba(5, 12, 6, .96));
  color: var(--deep-text);
  min-height: 44px;
  padding: 5px 14px 5px 6px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .32), 0 0 24px rgba(0, 146, 26, .14);
  max-width: min(360px, 42vw);
}

.user-badge::after {
  margin-left: 2px;
  color: var(--neon-green-bright);
}

.user-badge-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--brand-primary);
  box-shadow: 0 0 22px rgba(0, 0, 0, .25);
  flex: 0 0 auto;
}

.user-badge-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}

.user-badge-label {
  color: rgba(196, 255, 204, .72);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.user-badge-name {
  color: #f4fff6;
  font-size: .88rem;
  font-weight: 800;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-menu {
  padding: 8px;
  background: rgba(4, 12, 5, .98) !important;
  border: 1px solid rgba(88, 255, 112, .22) !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .64), 0 0 0 1px rgba(0, 146, 26, .14) !important;
}

.dropdown-divider {
  border-color: rgba(0, 146, 26, .28);
}

.dropdown-item {
  color: #d9ffde !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  color: #ffffff !important;
  background: rgba(0, 146, 26, .22) !important;
}

.btn-light,
.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-success,
.btn-outline-warning,
.btn-outline-danger {
  color: #ddffe2 !important;
  background: rgba(0, 146, 26, .10) !important;
  border-color: rgba(88, 255, 112, .25) !important;
}

.btn-light:hover,
.btn-outline-secondary:hover,
.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-warning:hover,
.btn-outline-danger:hover {
  color: #fff !important;
  background: rgba(0, 146, 26, .24) !important;
  border-color: rgba(88, 255, 112, .48) !important;
}

.table th {
  background: rgba(0, 146, 26, .16) !important;
  color: #baffc4 !important;
}

.table td {
  background: transparent !important;
}

.badge.bg-light,
.badge.text-dark,
.bg-light.text-dark,
.bg-success-subtle,
.bg-primary-subtle {
  color: #caffd1 !important;
  background: rgba(0, 146, 26, .16) !important;
  border-color: rgba(88, 255, 112, .28) !important;
}

.card-header h5,
.card-header h6,
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
  color: #f5fff6;
}

.card:hover,
.stat-card:hover {
  border-color: rgba(88, 255, 112, .34) !important;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .5), 0 0 30px rgba(0, 146, 26, .12) !important;
}

@media (max-width: 575px) {
  .user-badge {
    max-width: 48vw;
    padding-right: 10px;
  }

  .user-badge-label {
    display: none;
  }

  .user-badge-name {
    max-width: 110px;
  }
}

/* Absolute final shell lock: keep the portal black/neon and the user badge on the right. */
:root {
  --deep-muted: #7fe891;
  --app-muted: #7fe891;
  --bs-body-color: #eaffed;
  --bs-body-bg: #010301;
  --bs-secondary-color: #7fe891;
  --bs-border-color: rgba(0, 146, 26, .28);
}

.topbar {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 72px !important;
  padding-inline: clamp(14px, 2vw, 24px) !important;
}

.topbar > .fw-semibold,
.topbar > span.fw-semibold {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin-right: auto !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #f2fff4 !important;
}

.topbar-user {
  display: flex !important;
  flex: 0 0 auto !important;
  justify-content: flex-end !important;
  margin-left: auto !important;
}

.topbar .dropdown-menu {
  right: 0 !important;
  left: auto !important;
}

.page-shell,
.app-shell,
.page-content,
.content-wrapper,
main,
#main,
#main-content {
  background:
    radial-gradient(circle at 18% 8%, rgba(0, 146, 26, .18), transparent 26rem),
    linear-gradient(135deg, #010301, #031003 52%, #000) !important;
  color: var(--deep-text) !important;
}

.card,
.modal-content,
.offcanvas,
.dropdown-menu,
.list-group,
.list-group-item,
.accordion-item,
.accordion-button,
.toast,
.alert,
.form-control,
.form-select,
.input-group-text,
.table-responsive,
.data-card,
.metric-card,
.stat-card {
  color: var(--deep-text) !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 146, 26, .12), transparent 18rem),
    linear-gradient(145deg, rgba(7, 16, 7, .98), rgba(1, 3, 1, .98)) !important;
  border-color: rgba(0, 146, 26, .32) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .36), inset 0 1px 0 rgba(88, 255, 112, .06) !important;
}

.card-header,
.card-footer,
.modal-header,
.modal-footer,
.offcanvas-header,
.offcanvas-footer,
.accordion-header,
.accordion-button:not(.collapsed) {
  color: #f3fff5 !important;
  background: rgba(0, 146, 26, .10) !important;
  border-color: rgba(0, 146, 26, .25) !important;
}

.bg-white,
.bg-light,
.bg-body,
.bg-body-tertiary,
.bg-secondary,
.table-light,
.table-secondary,
.text-bg-light,
.text-bg-secondary {
  color: var(--deep-text) !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 146, 26, .12), transparent 18rem),
    linear-gradient(145deg, rgba(6, 14, 6, .98), rgba(1, 3, 1, .98)) !important;
  border-color: rgba(0, 146, 26, .30) !important;
}

.border,
.border-top,
.border-end,
.border-bottom,
.border-start {
  border-color: rgba(0, 146, 26, .28) !important;
}

.shadow,
.shadow-sm,
.shadow-lg {
  box-shadow: 0 20px 55px rgba(0, 0, 0, .45), 0 0 24px rgba(0, 146, 26, .08) !important;
}

.text-muted,
.text-secondary,
.form-text,
.small,
small,
.table .text-muted,
.card .text-muted,
.modal .text-muted {
  color: var(--deep-muted) !important;
}

.table,
.table > :not(caption) > * > * {
  --bs-table-bg: transparent !important;
  --bs-table-color: var(--deep-text) !important;
  --bs-table-border-color: rgba(0, 146, 26, .22) !important;
  --bs-table-striped-bg: rgba(0, 146, 26, .055) !important;
  --bs-table-striped-color: var(--deep-text) !important;
  --bs-table-active-bg: rgba(0, 146, 26, .16) !important;
  --bs-table-active-color: #ffffff !important;
  --bs-table-hover-bg: rgba(0, 146, 26, .12) !important;
  --bs-table-hover-color: #ffffff !important;
  color: var(--deep-text) !important;
  background-color: transparent !important;
  border-color: rgba(0, 146, 26, .22) !important;
}

.table-responsive,
.card > .table-responsive,
.table-wrapper {
  overflow: auto;
  border: 1px solid rgba(0, 146, 26, .34) !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 146, 26, .12), transparent 18rem),
    linear-gradient(145deg, rgba(5, 12, 6, .98), rgba(1, 3, 1, .98)) !important;
}

.table thead,
.table thead tr,
.table thead th {
  color: #caffd1 !important;
  background: rgba(0, 146, 26, .18) !important;
  border-color: rgba(0, 146, 26, .28) !important;
}

.table tbody,
.table tbody tr,
.table tbody td {
  color: var(--deep-text) !important;
  background: rgba(3, 8, 4, .92) !important;
  border-color: rgba(0, 146, 26, .18) !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > *,
.table tbody tr:nth-child(even) > * {
  color: var(--deep-text) !important;
  background: rgba(0, 146, 26, .045) !important;
}

.table-hover > tbody > tr:hover > *,
.table tbody tr:hover > * {
  color: #ffffff !important;
  background: rgba(0, 146, 26, .14) !important;
}

.table .py-4,
.table .py-5,
.table td.text-center,
.table td.text-muted {
  background: rgba(2, 6, 3, .98) !important;
  color: #8fec9b !important;
}

.badge.bg-secondary,
.badge.text-bg-secondary,
.badge.bg-light,
.badge.text-bg-light,
.badge-status-inactive,
.badge-status-hidden,
.badge-status-cancelled,
.badge-status-muted {
  color: #caffd1 !important;
  background: rgba(0, 146, 26, .16) !important;
  border: 1px solid rgba(88, 255, 112, .28) !important;
}

.btn,
.form-control,
.form-select,
.input-group-text {
  border-color: rgba(0, 146, 26, .36) !important;
}

.btn-primary,
.btn-success {
  color: #fff !important;
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 22px rgba(0, 0, 0, .22) !important;
}

@media (max-width: 575px) {
  .topbar {
    min-height: 64px !important;
    gap: 8px !important;
  }

  .user-badge {
    padding: 5px !important;
    max-width: none !important;
  }

  .user-badge-copy {
    display: none !important;
  }
}

/* Keep table action dropdowns above cards/tables instead of clipping under rows. */
.card:has(.dropdown-menu.show),
.table-responsive:has(.dropdown-menu.show),
.card-body:has(.dropdown-menu.show) {
  overflow: visible !important;
  z-index: 1200 !important;
}

.table-responsive:has(.dropdown-menu.show) {
  position: relative !important;
}

.table td:has(.dropdown-menu.show),
.table th:has(.dropdown-menu.show),
.dropdown:has(.dropdown-menu.show) {
  position: relative !important;
  z-index: 1250 !important;
}

.table .dropdown-menu.show,
.card .dropdown-menu.show {
  z-index: 3000 !important;
  max-height: none !important;
  overflow: visible !important;
  transform: translate3d(0, 38px, 0);
}

/* Keep top profile/account dropdown above the dashboard content. */
.topbar,
.topbar:has(.dropdown-menu.show),
.topbar-user,
.topbar-user:has(.dropdown-menu.show) {
  overflow: visible !important;
  position: relative !important;
  z-index: 3500 !important;
}

.topbar .dropdown-menu,
.topbar .dropdown-menu.show,
.topbar-user .dropdown-menu,
.topbar-user .dropdown-menu.show {
  z-index: 4000 !important;
  max-height: none !important;
  overflow: visible !important;
  transform: translate3d(0, 48px, 0) !important;
}

.main-wrapper:has(.topbar .dropdown-menu.show),
.content-wrapper:has(.topbar .dropdown-menu.show),
#main-content:has(.topbar .dropdown-menu.show),
#main:has(.topbar .dropdown-menu.show) {
  overflow: visible !important;
}


/* Searchable assignment select boxes used by reseller plan provisioning rules. */
.assignment-select {
  position: relative;
}

.assignment-select-toggle {
  min-height: 44px;
  color: #eaffed !important;
  background:
    linear-gradient(145deg, rgba(4, 12, 5, .98), rgba(1, 3, 1, .98)) !important;
  border: 1px solid rgba(0, 146, 26, .44) !important;
  box-shadow: inset 0 1px 0 rgba(88, 255, 112, .08), 0 0 18px rgba(0, 146, 26, .08) !important;
}

.assignment-select-toggle::after {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.assignment-select-menu {
  width: 100%;
  min-width: min(420px, 84vw);  
  z-index: 4100 !important;
}

.assignment-options {
  overflow-y: auto;
  padding-right: 4px;
}

.assignment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  margin: 0;
  border-radius: 10px;
  color: #dfffe4;
  cursor: pointer;
}

.assignment-option:hover {
  background: rgba(0, 146, 26, .16);
}

.assignment-option .form-check-input {
  margin: 0;
  flex: 0 0 auto;
}

.assignment-select.dropup .assignment-select-menu {
  margin-bottom: 8px !important;
}

.assignment-select:not(.dropup) .assignment-select-menu {
  margin-top: 8px !important;
}

.modal:has(.assignment-select .dropdown-menu.show),
.modal-dialog:has(.assignment-select .dropdown-menu.show),
.modal-content:has(.assignment-select .dropdown-menu.show),
.modal-body:has(.assignment-select .dropdown-menu.show) {
  overflow: visible !important;
}

@media (max-height: 820px) {
  .assignment-select-menu {
    max-height: min(270px, 36vh) !important;
  }

  .assignment-options {
    max-height: min(145px, 20vh);
  }
}

@media (max-height: 680px) {
  .assignment-select-menu {
    max-height: min(230px, 32vh) !important;
    padding: 10px !important;
  }

  .assignment-options {
    max-height: min(108px, 16vh);
  }

  .assignment-option {
    padding-block: 7px;
  }
}


/* In large modals, assignment menus need viewport placement rather than field placement. */
.modal .assignment-select .assignment-select-menu.show {
  position: fixed !important;
  inset: 50% auto auto 50% !important;
  transform: translate(-50%, -50%) !important;
  width: min(560px, calc(100vw - 32px)) !important;
  min-width: 0 !important;
  max-height: min(520px, calc(100vh - 96px)) !important;
  overflow: hidden !important;
  padding: 14px !important;
  z-index: 5000 !important;
}

.modal .assignment-select .assignment-select-menu.show .assignment-options {
  max-height: min(340px, calc(100vh - 250px)) !important;
  overflow-y: auto !important;
}

.modal .assignment-select .assignment-select-menu.show .assignment-option {
  padding: 8px 10px;
}

@media (max-height: 720px) {
  .modal .assignment-select .assignment-select-menu.show {
    max-height: calc(100vh - 56px) !important;
    padding: 10px !important;
  }

  .modal .assignment-select .assignment-select-menu.show .assignment-options {
    max-height: calc(100vh - 210px) !important;
  }
}

@media (max-width: 575px) {
  .modal .assignment-select .assignment-select-menu.show {
    width: calc(100vw - 20px) !important;
  }
}


/* Final modal stacking fix: dialogs must sit above the fixed shell/topbar. */
.modal-backdrop {
  z-index: 6000 !important;
}

.modal {
  z-index: 6010 !important;
  padding-top: calc(var(--topbar-height, 64px) + 18px) !important;
}

.modal-dialog {
  z-index: 6020 !important;
  margin-top: 0 !important;
  margin-bottom: 1.25rem !important;
}

.modal-dialog-centered {
  min-height: calc(100dvh - var(--topbar-height, 64px) - 36px) !important;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
}

.modal .assignment-select .assignment-select-menu.show {
  z-index: 6030 !important;
}

@media (max-width: 575px) {
  .modal {
    padding-top: calc(var(--topbar-height, 58px) + 10px) !important;
  }
}


/* VPS live metric charts */
.vps-metric-grid canvas {
  width: 100% !important;
  height: 150px !important;
}

.metric-chart-card {
  min-height: 220px;
  padding: 14px;
  border: 1px solid rgba(88, 255, 112, .20);
  border-radius: 18px;
  background:
    radial-gradient(circle at 10% 0%, rgba(0, 146, 26, .22), transparent 16rem),
    linear-gradient(145deg, rgba(5, 16, 6, .96), rgba(1, 4, 2, .98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(88, 255, 112, .08);
}

.metric-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--deep-text, #f2fff4);
}

.metric-chart-head span {
  color: var(--deep-muted, #8df59a);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.metric-chart-head strong {
  color: #58ff70;
  font-size: .9rem;
  text-align: right;
  white-space: nowrap;
}

.active>.page-link, .page-link.active {
    z-index: 3;
    color: #FFFFFF !important;
    background-color: #00921A !important;
    border-color: #FFFFFF !important;
}
.page-link {color: #29d84a !important;}