:root {
      --bg-base: #060913;
      --bg-sidebar: #090d1a;
      --bg-surface: rgba(15, 23, 42, 0.7);
      --bg-surface-elevated: rgba(30, 41, 59, 0.65);
      --bg-input: rgba(6, 9, 19, 0.85);
      --border-subtle: rgba(255, 255, 255, 0.08);
      --border-focus: rgba(99, 102, 241, 0.5);
      --border-active: rgba(99, 102, 241, 0.8);
      
      --text-main: #f8fafc;
      --text-muted: #94a3b8;
      --text-dim: #64748b;
      
      --accent-cyan: #06b6d4;
      --accent-indigo: #6366f1;
      --accent-purple: #a855f7;
      --accent-emerald: #10b981;
      --accent-amber: #f59e0b;
      --accent-rose: #f43f5e;
      
      --gradient-brand: linear-gradient(135deg, #06b6d4 0%, #6366f1 50%, #a855f7 100%);
      --gradient-card: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.5) 100%);
      --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
      --sidebar-width: 250px;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    body {
      background-color: var(--bg-base);
      background-image: 
        radial-gradient(circle at 10% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 90% 85%, rgba(6, 182, 212, 0.1) 0%, transparent 45%);
      color: var(--text-main);
      font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
      min-height: 100vh;
      display: flex;
      overflow-x: hidden;
    }

    /* Scrollbar */
    ::-webkit-scrollbar { width: 6px; height: 6px; }
    ::-webkit-scrollbar-track { background: var(--bg-base); }
    ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

    /* Layout */
    .app-container {
      display: flex;
      width: 100vw;
      height: 100vh;
      overflow: hidden;
    }

    /* Sidebar */
    aside.sidebar {
      width: var(--sidebar-width);
      min-width: var(--sidebar-width);
      background: var(--bg-sidebar);
      border-right: 1px solid var(--border-subtle);
      display: flex;
      flex-direction: column;
      z-index: 40;
    }

    .sidebar-header {
      padding: 1.25rem 1.25rem;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      gap: 0.85rem;
    }

    .brand-logo {
      width: 34px;
      height: 34px;
      border-radius: 9px;
      background: var(--gradient-brand);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 1.1rem;
      color: #fff;
      box-shadow: 0 0 16px rgba(99, 102, 241, 0.4);
      flex-shrink: 0;
    }

    .brand-text h1 {
      font-size: 1.05rem;
      font-weight: 700;
      letter-spacing: -0.02em;
    }

    .brand-text span {
      font-size: 0.7rem;
      color: var(--accent-cyan);
      font-weight: 600;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }

    .sidebar-nav {
      flex: 1;
      overflow-y: auto;
      padding: 1rem 0.75rem;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
    }

    .nav-category {
      font-size: 0.68rem;
      font-weight: 700;
      color: var(--text-dim);
      text-transform: uppercase;
      letter-spacing: 0.08em;
      padding: 0.6rem 0.65rem 0.3rem;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.65rem 0.75rem;
      border-radius: 8px;
      color: var(--text-muted);
      text-decoration: none;
      font-size: 0.85rem;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.15s ease;
      position: relative;
    }

    .nav-item:hover {
      color: var(--text-main);
      background: rgba(255, 255, 255, 0.04);
    }

    .nav-item.active {
      color: #fff;
      background: rgba(99, 102, 241, 0.15);
      border: 1px solid rgba(99, 102, 241, 0.35);
      font-weight: 600;
    }

    .nav-item.active::before {
      content: '';
      position: absolute;
      left: -0.75rem;
      top: 20%;
      height: 60%;
      width: 3px;
      background: var(--accent-cyan);
      border-radius: 0 4px 4px 0;
    }

    .nav-icon {
      width: 18px;
      height: 18px;
      opacity: 0.8;
      flex-shrink: 0;
    }

    .nav-item.active .nav-icon {
      opacity: 1;
      color: var(--accent-cyan);
    }

    .nav-badge {
      margin-left: auto;
      font-size: 0.68rem;
      font-weight: 700;
      padding: 0.15rem 0.45rem;
      border-radius: 9999px;
      background: rgba(16, 185, 129, 0.15);
      color: var(--accent-emerald);
      border: 1px solid rgba(16, 185, 129, 0.25);
    }

    .sidebar-footer {
      padding: 1rem 1.25rem;
      border-top: 1px solid var(--border-subtle);
      background: rgba(6, 9, 19, 0.4);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .org-selector {
      display: flex;
      flex-direction: column;
    }

    .org-name {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--text-main);
    }

    .org-tier {
      font-size: 0.7rem;
      color: var(--accent-emerald);
      font-weight: 500;
    }

    /* Content Area */
    .main-viewport {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: transparent;
    }

    /* Top Header */
    header.topbar {
      height: 64px;
      padding: 0 2rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid var(--border-subtle);
      background: rgba(6, 9, 19, 0.85);
      backdrop-filter: blur(16px);
      z-index: 30;
      flex-shrink: 0;
    }

    .topbar-left {
      display: flex;
      align-items: center;
      gap: 1.25rem;
    }

    .view-title {
      font-size: 1.15rem;
      font-weight: 700;
      letter-spacing: -0.01em;
    }

    .crumb-sep {
      color: var(--text-dim);
      font-size: 0.9rem;
    }

    .crumb-sub {
      color: var(--text-muted);
      font-size: 0.85rem;
      font-weight: 500;
    }

    .topbar-right {
      display: flex;
      align-items: center;
      gap: 1rem;
    }

    .status-pill {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      background: rgba(16, 185, 129, 0.1);
      border: 1px solid rgba(16, 185, 129, 0.25);
      padding: 0.35rem 0.8rem;
      border-radius: 9999px;
      font-size: 0.72rem;
      font-weight: 600;
      color: var(--accent-emerald);
    }

    .pulse-dot {
      width: 7px;
      height: 7px;
      background: var(--accent-emerald);
      border-radius: 50%;
      box-shadow: 0 0 8px var(--accent-emerald);
      animation: pulse 2s infinite;
    }

    @keyframes pulse {
      0% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.4; transform: scale(1.2); }
      100% { opacity: 1; transform: scale(1); }
    }

    .btn {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.45rem 0.9rem;
      border-radius: 7px;
      font-size: 0.8rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
      border: 1px solid transparent;
      font-family: inherit;
    }

    .btn-primary {
      background: var(--gradient-brand);
      color: #fff;
      box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
    }

    .btn-primary:hover {
      box-shadow: 0 4px 16px rgba(99, 102, 241, 0.5);
      transform: translateY(-1px);
    }

    .btn-secondary {
      background: rgba(255, 255, 255, 0.05);
      border-color: var(--border-subtle);
      color: var(--text-main);
    }

    .btn-secondary:hover {
      background: rgba(255, 255, 255, 0.08);
      border-color: rgba(255, 255, 255, 0.15);
    }

    /* Views Container */
    .view-container {
      flex: 1;
      overflow-y: auto;
      padding: 2rem;
    }

    .view-content {
      display: none;
      flex-direction: column;
      gap: 1.75rem;
      max-width: 1400px;
      margin: 0 auto;
      animation: fadeIn 0.2s ease-in-out;
    }

    .view-content.active {
      display: flex;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* Common Card & Grid Styles */
    .kpi-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 1.25rem;
    }

    .card {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      padding: 1.35rem 1.5rem;
      backdrop-filter: blur(14px);
      box-shadow: var(--glass-shadow);
      transition: border-color 0.2s ease, transform 0.2s ease;
      position: relative;
      overflow: hidden;
    }

    .card:hover {
      border-color: rgba(99, 102, 241, 0.35);
      transform: translateY(-2px);
    }

    .card-label {
      font-size: 0.75rem;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 0.4rem;
    }

    .card-value {
      font-size: 1.85rem;
      font-weight: 800;
      letter-spacing: -0.03em;
      line-height: 1.1;
      margin-bottom: 0.3rem;
    }

    .card-subtext {
      font-size: 0.75rem;
      color: var(--text-dim);
    }

    .text-emerald { color: var(--accent-emerald); }
    .text-cyan { color: var(--accent-cyan); }
    .text-indigo { color: var(--accent-indigo); }
    .text-amber { color: var(--accent-amber); }
    .text-purple { color: var(--accent-purple); }

    /* Tables */
    .table-card {
      background: var(--bg-surface);
      border: 1px solid var(--border-subtle);
      border-radius: 12px;
      overflow: hidden;
      backdrop-filter: blur(14px);
      box-shadow: var(--glass-shadow);
    }

    .table-header-bar {
      padding: 1.1rem 1.5rem;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
    }

    .table-title {
      font-size: 1rem;
      font-weight: 700;
      letter-spacing: -0.01em;
    }

    .table-search {
      background: var(--bg-input);
      border: 1px solid var(--border-subtle);
      border-radius: 7px;
      padding: 0.4rem 0.8rem;
      color: var(--text-main);
      font-size: 0.8rem;
      outline: none;
      width: 220px;
    }

    .table-search:focus {
      border-color: var(--border-focus);
    }

    .table-responsive {
      overflow-x: auto;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      text-align: left;
      font-size: 0.84rem;
    }

    th {
      color: var(--text-dim);
      font-weight: 600;
      text-transform: uppercase;
      font-size: 0.7rem;
      letter-spacing: 0.06em;
      padding: 0.75rem 1.25rem;
      border-bottom: 1px solid var(--border-subtle);
      background: rgba(0, 0, 0, 0.15);
    }

    td {
      padding: 0.85rem 1.25rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.04);
      color: var(--text-main);
    }

    tr:hover td {
      background: rgba(255, 255, 255, 0.02);
    }

    .mono {
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.8rem;
    }

    .badge {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      padding: 0.2rem 0.55rem;
      border-radius: 4px;
      font-size: 0.7rem;
      font-weight: 600;
      letter-spacing: 0.03em;
    }

    .badge-bd {
      background: rgba(16, 185, 129, 0.15);
      color: #34d399;
      border: 1px solid rgba(16, 185, 129, 0.3);
    }

    .badge-global {
      background: rgba(99, 102, 241, 0.15);
      color: #818cf8;
      border: 1px solid rgba(99, 102, 241, 0.3);
    }

    .badge-spot {
      background: rgba(6, 182, 212, 0.15);
      color: #22d3ee;
      border: 1px solid rgba(6, 182, 212, 0.3);
    }

    .badge-amber {
      background: rgba(245, 158, 11, 0.15);
      color: #fbbf24;
      border: 1px solid rgba(245, 158, 11, 0.3);
    }

    /* Abstracted Infrastructure Hero Banner */
    .abstracted-hero {
      background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
      border: 1px solid rgba(99, 102, 241, 0.3);
      border-radius: 12px;
      padding: 1.5rem 1.75rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1.5rem;
    }

    .abstracted-text h2 {
      font-size: 1.25rem;
      font-weight: 700;
      margin-bottom: 0.35rem;
      background: var(--gradient-brand);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .abstracted-text p {
      color: var(--text-muted);
      font-size: 0.85rem;
      max-width: 650px;
      line-height: 1.5;
    }

    /* Forms */
    .form-group {
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
    }

    label {
      font-size: 0.74rem;
      font-weight: 600;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    select, textarea, input {
      background: var(--bg-input);
      border: 1px solid var(--border-subtle);
      border-radius: 7px;
      padding: 0.65rem 0.85rem;
      color: var(--text-main);
      font-family: inherit;
      font-size: 0.85rem;
      outline: none;
    }

    select:focus, textarea:focus, input:focus {
      border-color: var(--border-focus);
    }

    /* Dual Column Layout */
    .dual-grid {
      display: grid;
      grid-template-columns: 1.25fr 1fr;
      gap: 1.5rem;
    }

    @media (max-width: 1080px) {
      .dual-grid {
        grid-template-columns: 1fr;
      }
    }

    /* Terminal Console */
    .terminal-box {
      background: #02040a;
      border: 1px solid var(--border-subtle);
      border-radius: 9px;
      padding: 1rem;
      font-family: 'JetBrains Mono', monospace;
      font-size: 0.78rem;
      line-height: 1.6;
      color: #38bdf8;
      max-height: 320px;
      overflow-y: auto;
      white-space: pre-wrap;
    }

    /* Modal */
    .modal-backdrop {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(8px);
      z-index: 100;
      align-items: center;
      justify-content: center;
    }

    .modal-backdrop.open {
      display: flex;
    }

    .modal-dialog {
      background: #0d1222;
      border: 1px solid rgba(99, 102, 241, 0.35);
      border-radius: 14px;
      width: 100%;
      max-width: 520px;
      box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
      overflow: hidden;
      animation: modalScale 0.18s ease-out;
    }

    @keyframes modalScale {
      from { transform: scale(0.95); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }

    .modal-header {
      padding: 1.25rem 1.5rem;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .modal-title {
      font-size: 1.05rem;
      font-weight: 700;
    }

    .modal-body {
      padding: 1.5rem;
      display: flex;
      flex-direction: column;
      gap: 1.1rem;
    }

    .modal-footer {
      padding: 1rem 1.5rem;
      border-top: 1px solid var(--border-subtle);
      display: flex;
      justify-content: flex-end;
      gap: 0.75rem;
      background: rgba(0, 0, 0, 0.2);
    }

    /* Toast */
    .toast {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      background: #0f172a;
      border: 1px solid var(--accent-emerald);
      color: #fff;
      padding: 0.75rem 1.25rem;
      border-radius: 8px;
      font-size: 0.84rem;
      font-weight: 500;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
      z-index: 200;
      display: none;
      align-items: center;
      gap: 0.5rem;
      animation: slideUp 0.2s ease-out;
    }

    @keyframes slideUp {
      from { transform: translateY(16px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
