﻿   LOGIN SCREEN
══════════════════════════════════════════ */
    #loginScreen {
      position: fixed;
      inset: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: opacity 0.8s ease, visibility 0.8s ease;
      perspective: 1200px;
    }

    #loginScreen.hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .login-card {
      position: relative;
      z-index: 200;
      width: 420px;
      background: linear-gradient(135deg,
          rgba(15, 23, 42, 0.5) 0%,
          rgba(2, 6, 23, 0.4) 50%,
          rgba(15, 23, 42, 0.55) 100%);
      backdrop-filter: blur(12px) saturate(120%);
      border: 1.5px solid rgba(255, 255, 255, 0.15);
      border-top-color: rgba(255, 255, 255, 0.3);
      border-left-color: rgba(255, 255, 255, 0.3);
      border-radius: 24px;
      padding: 40px 38px 32px;
      box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 0 4px rgba(255, 255, 255, 0.03),
        0 30px 60px rgba(0, 0, 0, 0.5);
      animation: cardPulse 8s ease-in-out infinite;
      overflow: hidden;
    }

    .login-card::before {
      content: '';
      position: absolute;
      inset: -6px;
      border-radius: 30px;
      padding: 2px;
      background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent, rgba(255, 255, 255, 0.1));
      -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      -webkit-mask-composite: xor;
      mask-composite: exclude;
      pointer-events: none;
      filter: blur(0.5px);
    }

    @keyframes cardPulse {

      0%,
      100% {
        box-shadow: 0 0 60px rgba(0, 180, 255, 0.15), 0 0 120px rgba(0, 100, 200, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.06);
      }

      50% {
        box-shadow: 0 0 80px rgba(0, 212, 255, 0.25), 0 0 160px rgba(0, 100, 200, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.1);
      }
    }

    /* Scan line animation */
    .login-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, transparent, var(--accent), transparent);
      border-radius: 20px 20px 0 0;
      animation: scanLine 3s ease-in-out infinite;
      opacity: 0.8;
    }

    .login-card::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 24px;
      background: linear-gradient(135deg,
          rgba(255, 255, 255, 0) 0%,
          rgba(255, 255, 255, 0.05) 40%,
          rgba(255, 255, 255, 0.2) 50%,
          rgba(255, 255, 255, 0.05) 60%,
          rgba(255, 255, 255, 0) 100%);
      background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 0%), rgba(255, 255, 255, 0.06), transparent 80%);
      background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 75%);
      animation: ambientGlow 12s infinite alternate ease-in-out;
      pointer-events: none;
    }

    @keyframes ambientGlow {
      0% {
        opacity: 0.2;
        transform: scale(1);
      }

      100% {
        opacity: 0.6;
        transform: scale(1.05);
      }
    }

    @keyframes scanLine {

      0%,
      100% {
        transform: scaleX(0);
        transform-origin: left;
        opacity: 0;
      }

      20% {
        transform: scaleX(1);
        transform-origin: left;
        opacity: 1;
      }

      80% {
        transform: scaleX(1);
        transform-origin: right;
        opacity: 1;
      }

      99% {
        transform: scaleX(0);
        transform-origin: right;
        opacity: 0;
      }
    }

    .login-logo-wrap {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 14px;
      margin-bottom: 28px;
    }

    .login-hex {
      width: 52px;
      height: 52px;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      animation: hexRotate 8s linear infinite;
    }

    @keyframes hexRotate {
      0% {
        filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.6));
      }

      50% {
        filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.9));
      }

      100% {
        filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.6));
      }
    }

    .login-brand-text {
      display: flex;
      flex-direction: column;
    }

    .login-brand-main {
      font-family: 'Orbitron', monospace;
      font-size: 17px;
      font-weight: 700;
      letter-spacing: 3px;
      color: #fff;
      line-height: 1.1;
    }

    .login-brand-main span {
      color: var(--accent);
    }

    .login-brand-sub {
      font-family: 'JetBrains Mono', monospace;
      font-size: 9px;
      color: var(--text-muted);
      letter-spacing: 2px;
      margin-top: 3px;
    }

    .login-divider {
      width: 100%;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.4), transparent);
      margin: 0 0 22px;
    }

    .login-title {
      text-align: center;
      margin-bottom: 6px;
    }

    .login-title h2 {
      font-family: 'Orbitron', monospace;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 3px;
      color: #fff;
      text-transform: uppercase;
    }

    .login-title p {
      font-family: 'JetBrains Mono', monospace;
      font-size: 9px;
      color: var(--text-muted);
      letter-spacing: 2px;
      margin-top: 4px;
    }

    .login-field {
      position: relative;
      margin-bottom: 16px;
    }

    .login-field-label {
      font-family: 'JetBrains Mono', monospace;
      font-size: 9px;
      color: var(--text-muted);
      letter-spacing: 2px;
      text-transform: uppercase;
      margin-bottom: 6px;
      display: block;
    }

    .login-field-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }

    .login-field-icon {
      position: absolute;
      left: 14px;
      color: rgba(0, 212, 255, 0.5);
      font-size: 13px;
      font-family: 'JetBrains Mono', monospace;
    }

    .login-input {
      width: 100%;
      background: rgba(255, 255, 255, 0.05);
      border: 1px solid rgba(255, 255, 255, 0.2);
      border-radius: 12px;
      padding: 12px 14px 12px 38px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 13px;
      color: #ffffff;
      letter-spacing: 2px;
      outline: none;
      transition: all 0.3s;
      box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .login-input::placeholder {
      color: rgba(255, 255, 255, 0.4);
      letter-spacing: 1px;
    }

    .login-input:focus {
      border-color: rgba(0, 212, 255, 0.6);
      box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08), 0 0 16px rgba(0, 212, 255, 0.15);
    }

    .login-eye {
      position: absolute;
      right: 12px;
      cursor: pointer;
      opacity: 0.5;
      transition: opacity 0.2s;
      font-size: 14px;
    }

    .login-eye:hover {
      opacity: 1;
    }

    .login-indicators {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 22px;
      padding: 0 2px;
    }

    .login-indicator {
      display: flex;
      align-items: center;
      gap: 6px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 9px;
      color: rgba(0, 255, 200, 0.7);
      letter-spacing: 1px;
    }

    .login-indicator-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--accent6);
      box-shadow: 0 0 6px var(--accent6);
      animation: blink 1.5s infinite;
    }

    @keyframes blink {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: 0.3;
      }
    }

    .login-btn {
      width: 100%;
      padding: 14px;
      background: linear-gradient(135deg,
          #f8fafc 0%,
          #cbd5e1 50%,
          #94a3b8 100%);
      border: 1px solid #ffffff;
      border-radius: 12px;
      font-family: 'Orbitron', monospace;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 3px;
      color: #1e293b;
      cursor: pointer;
      transition: all 0.3s;
      position: relative;
      overflow: hidden;
      text-transform: uppercase;
      margin-bottom: 18px;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }

    .login-btn:hover {
      background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(0, 150, 255, 0.35));
      border-color: rgba(0, 212, 255, 0.8);
      box-shadow: 0 0 24px rgba(0, 212, 255, 0.3), 0 0 48px rgba(0, 100, 200, 0.2);
      transform: translateY(-1px);
    }

    .login-btn::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
      transition: left 0.5s;
    }

    .login-btn:active,
    .action-btn:active,
    .nav-tab:active {
      transform: translateY(2px) scale(0.98);
    }

    .login-btn.loading {
      pointer-events: none;
      animation: btnPulse 0.8s ease infinite;
    }

    @keyframes btnPulse {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: 0.6;
      }
    }

    .login-footer {
      text-align: center;
    }

    .login-footer-info {
      font-family: 'JetBrains Mono', monospace;
      font-size: 8px;
      color: rgba(106, 138, 170, 0.5);
      letter-spacing: 1px;
      line-height: 1.8;
    }

    .login-error {
      display: none;
      background: rgba(255, 77, 109, 0.1);
      border: 1px solid rgba(255, 77, 109, 0.3);
      border-radius: 8px;
      padding: 10px 14px;
      margin-bottom: 14px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      color: #ff4d6d;
      letter-spacing: 1px;
      text-align: center;
    }

    .login-error.show {
      display: block;
    }

    /* Corner decorations on login card */
    .login-corner {
      position: absolute;
      width: 16px;
      height: 16px;
      border-color: rgba(0, 212, 255, 0.5);
      border-style: solid;
    }

    .login-corner.tl {
      top: -1px;
      left: -1px;
      border-width: 2px 0 0 2px;
      border-radius: 20px 0 0 0;
    }

    .login-corner.tr {
      top: -1px;
      right: -1px;
      border-width: 2px 2px 0 0;
      border-radius: 0 20px 0 0;
    }

    .login-corner.bl {
      bottom: -1px;
      left: -1px;
      border-width: 0 0 2px 2px;
      border-radius: 0 0 0 20px;
    }

    .login-corner.br {
      bottom: -1px;
      right: -1px;
      border-width: 0 2px 2px 0;
      border-radius: 0 0 20px 0;
    }

    /* ═══════════════════════════════════════
   MAIN APP
══════════════════════════════════════════ */
    #mainApp {
      display: none;
      position: relative;
      z-index: 10;
    }

    /* TOP NAVIGATION BAR */
    .main-topbar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 90;
      height: 56px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 24px;
      background: var(--bg-card);
      border-bottom: 1px solid var(--border);
      backdrop-filter: blur(12px) saturate(120%);
      box-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
    }

    .main-topbar-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .main-hex-logo {
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.6));
    }

    .muted-steel {
      filter: var(--muted-steel);
    }

    .main-title {
      font-family: 'Orbitron', monospace;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 2px;
      color: #fff;
    }

    .main-title span {
      color: var(--accent);
    }

    .main-nav {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .nav-tab {
      padding: 6px 18px;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 8px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      letter-spacing: 2px;
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.2s;
      text-transform: uppercase;
    }

    .nav-tab:hover {
      color: var(--accent);
      border-color: rgba(0, 212, 255, 0.3);
    }

    .nav-tab.active {
      color: var(--accent);
      border-color: rgba(0, 212, 255, 0.5);
      background: rgba(0, 212, 255, 0.08);
      box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
    }

    .main-topbar-right {
      display: flex;
      align-items: center;
      gap: 16px;
    }

    .user-badge {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 5px 14px;
      background: rgba(255, 255, 255, 0.06);
      backdrop-filter: blur(8px);
      border: 1px solid rgba(0, 212, 255, 0.2);
      border-radius: 20px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      letter-spacing: 1px;
      color: var(--accent);
    }

    .user-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--accent6);
      box-shadow: 0 0 6px var(--accent6);
      animation: blink 1.5s infinite;
    }

    .logout-btn {
      padding: 6px 16px;
      background: transparent;
      border: 1px solid rgba(255, 77, 109, 0.4);
      border-radius: 8px;
      font-family: 'JetBrains Mono', monospace;
      font-size: 10px;
      letter-spacing: 1px;
      color: #ff4d6d;
      cursor: pointer;
      transition: all 0.2s;
    }

    .logout-btn:hover {
      background: rgba(255, 77, 109, 0.1);
      border-color: #ff4d6d;
    }

    /* ═══════════════════════════════════════
   TAB CONTENT AREAS
══════════════════════════════════════════ */
    .tab-content {
      display: none;
      padding-top: 56px;
    }

    .tab-content.active {
      display: block;
    }
