/* ── Main portal styles ── */
    :root {
      --lion-gold: #C9A84C;
      --lion-dark: #1a1a2e;
      --lion-navy: #16213e;
      --lion-blue: #0f3460;
      --lion-accent: #e94560;
    }
    body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: #f0f2f5; }
    .sidebar { background: var(--lion-dark); min-height: 100%; width: 260px; transition: width 0.3s; }
    .sidebar-collapsed { width: 70px; }
    .nav-item { transition: all 0.2s; border-left: 3px solid transparent; }
    .nav-item:hover, .nav-item.active { background: rgba(201,168,76,0.12); border-left-color: var(--lion-gold); }
    .nav-item.active span { color: var(--lion-gold); }
    .card { background: white; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
    .btn-primary { background: var(--lion-gold); color: white; transition: all 0.2s; }
    .btn-primary:hover { background: #b8943d; transform: translateY(-1px); }
    .btn-danger { background: #ef4444; color: white; }
    .btn-danger:hover { background: #dc2626; }
    .btn-outline { border: 1.5px solid var(--lion-gold); color: var(--lion-gold); }
    .btn-outline:hover { background: var(--lion-gold); color: white; }
    .status-badge { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
    .badge-approved { background: #d1fae5; color: #065f46; }
    .badge-flagged { background: #fef3c7; color: #92400e; }
    .badge-sync { background: #dbeafe; color: #1e40af; }
    .badge-async { background: #f3e8ff; color: #6b21a8; }
    .badge-orderly { background: #ffe4e6; color: #be123c; }
    .table-row:hover { background: #fafaf0; }
    .sort-th { cursor: pointer; user-select: none; }
    .sort-th:hover { background: #f1f5f9 !important; }
    .sort-th .sort-icon { opacity: 0; transition: opacity 0.15s; }
    .sort-th:hover .sort-icon { opacity: 1; }
    .upload-zone { border: 2px dashed #cbd5e1; border-radius: 12px; transition: all 0.2s; }
    .upload-zone:hover, .upload-zone.drag-over { border-color: var(--lion-gold); background: rgba(201,168,76,0.05); }
    .stat-card { border-radius: 12px; padding: 20px; }
    .modal-backdrop { background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }
    .tab-active { border-bottom: 2px solid var(--lion-gold); color: var(--lion-gold); font-weight: 600; }
    .spinner { border: 3px solid #f3f3f3; border-top: 3px solid var(--lion-gold); border-radius: 50%; width: 36px; height: 36px; animation: spin 0.8s linear infinite; }
    .spinner-sm { display: inline-block; border: 2px solid #f3f3f3; border-top: 2px solid currentColor; border-radius: 50%; width: 14px; height: 14px; animation: spin 0.8s linear infinite; vertical-align: middle; }
    @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
    .loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.8); z-index: 9999; display: flex; align-items: center; justify-content: center; flex-direction: column; }
    input[type="number"] { -moz-appearance: textfield; }
    input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; }
    .role-cv { --lion-gold: #2563eb; }
    .tooltip { position: relative; }
    .tooltip:hover::after { content: attr(data-tip); position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%); background: #1a1a2e; color: white; padding: 4px 8px; border-radius: 6px; font-size: 11px; white-space: nowrap; z-index: 100; }
    select, input[type="text"], input[type="email"], input[type="number"] {
      border: 1.5px solid #e2e8f0; border-radius: 8px; padding: 8px 12px; font-size: 14px;
      transition: border-color 0.2s; outline: none;
    }
    select:focus, input[type="text"]:focus, input[type="email"]:focus, input[type="number"]:focus {
      border-color: var(--lion-gold);
    }
    .progress-bar { background: linear-gradient(90deg, var(--lion-gold), #f59e0b); height: 6px; border-radius: 3px; transition: width 0.5s; }
    /* Drilldown clickable numbers */
    .drilldown-link {
      cursor: pointer;
      text-decoration: underline;
      text-decoration-style: dotted;
      text-underline-offset: 3px;
      transition: color 0.15s, opacity 0.15s;
    }
    .drilldown-link:hover { opacity: 0.7; }

    /* ── Global mobile utilities ───────────────────────────────── */
    @media (max-width: 767px) {
      /* Tables: bounded horizontal scroll */
      .overflow-x-auto { -webkit-overflow-scrolling: touch; }
      /* Rate grid rows adapt */
      .rate-grid-row { grid-template-columns: 1fr 100px 60px !important; gap: 8px !important; }
      /* UM table: hide secondary columns */
      .um-hide-mobile { display: none !important; }
      /* Kanban slightly narrower */
      .kb-col { width: 232px !important; }
      /* Dashboard header buttons: icon-only */
      .dash-btn-label { display: none !important; }
    }
    @media (max-width: 479px) {
      .rate-grid-row { grid-template-columns: 1fr 88px 52px !important; }
    }

    /* Active filter chips above consults table */
    .drilldown-chip {
      display: inline-flex; align-items: center;
      background: rgba(201,168,76,0.12); color: #92712a;
      border: 1px solid rgba(201,168,76,0.35);
      padding: 2px 10px; border-radius: 20px;
      font-size: 12px; font-weight: 600;
    }
    .drilldown-chip.badge-orderly { background: #ffe4e6; color: #be123c; border-color: #fecdd3; }

    /* Dashboard column visibility */
    .dash-col-hidden { display: none !important; }
    #dashColPanel {
      position: absolute; right: 0; top: calc(100% + 4px); z-index: 50;
      background: #fff; border: 1px solid #e5e7eb; border-radius: 12px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 12px 14px;
      min-width: 190px; max-height: 340px; overflow-y: auto;
    }
    .col-badge {
      display: inline-flex; align-items: center;
      margin-left: 6px; padding: 1px 6px;
      background: #fef3c7; color: #d97706;
      border-radius: 9999px; font-size: 11px; font-weight: 600;
      border: 1px solid #fcd34d;
    }

    /* ── Kanban Board ─────────────────────────────── */
    #obKanbanBoard {
      display: flex;
      gap: 14px;
      overflow-x: auto;
      padding-bottom: 16px;
      padding-top: 4px;
      align-items: flex-start;
      height: calc(100vh - 200px);
      min-height: 520px;
      /* Custom scrollbar */
      scrollbar-width: thin;
      scrollbar-color: #d1d5db #f9fafb;
    }
    #obKanbanBoard::-webkit-scrollbar { height: 6px; }
    #obKanbanBoard::-webkit-scrollbar-track { background: #f9fafb; border-radius: 3px; }
    #obKanbanBoard::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

    .kb-col {
      flex-shrink: 0;
      width: 260px;
      display: flex;
      flex-direction: column;
      height: 100%;
      border-radius: 16px;
      background: #f4f5f7;
      border: 1.5px solid #e5e7eb;
      transition: border-color 0.2s, background 0.2s;
    }
    .kb-col.drag-target {
      border-color: var(--lion-gold);
      background: #fffbeb;
    }
    .kb-col-header {
      padding: 11px 13px 9px;
      border-radius: 16px 16px 0 0;
      display: flex;
      align-items: center;
      gap: 7px;
      flex-shrink: 0;
      background: rgba(255,255,255,0.5);
      border-bottom: 1px solid #e5e7eb;
    }
    .kb-col-body {
      flex: 1;
      overflow-y: auto;
      padding: 8px 8px 4px;
      display: flex;
      flex-direction: column;
      gap: 8px;
      border-radius: 0 0 16px 16px;
      transition: background 0.15s, outline 0.15s;
      min-height: 80px;
      /* Custom scrollbar for column */
      scrollbar-width: thin;
      scrollbar-color: #d1d5db transparent;
    }
    .kb-col-body::-webkit-scrollbar { width: 4px; }
    .kb-col-body::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 2px; }
    .kb-col-body.drag-over {
      background: rgba(201,168,76,0.12);
      outline: 2.5px dashed var(--lion-gold);
      outline-offset: -5px;
      border-radius: 0 0 14px 14px;
    }
    .kb-card {
      background: #fff;
      border-radius: 11px;
      padding: 12px 13px 10px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04);
      cursor: grab;
      border: 1.5px solid transparent;
      transition: box-shadow 0.15s, border-color 0.15s, transform 0.12s, opacity 0.15s;
      user-select: none;
      position: relative;
    }
    .kb-card:hover {
      box-shadow: 0 4px 16px rgba(0,0,0,0.13);
      border-color: #e5e7eb;
      transform: translateY(-1px);
    }
    .kb-card:active { cursor: grabbing; }
    .kb-card.dragging {
      opacity: 0.4;
      transform: scale(0.96) rotate(-1deg);
      box-shadow: 0 12px 32px rgba(0,0,0,0.2);
      z-index: 999;
    }
    .kb-card.drag-ghost { opacity: 0.3; }
    .kb-drop-indicator {
      height: 3px;
      border-radius: 3px;
      background: var(--lion-gold);
      margin: 0 2px;
      flex-shrink: 0;
      box-shadow: 0 0 6px rgba(201,168,76,0.5);
    }
    .kb-empty {
      border: 1.5px dashed #d1d5db;
      border-radius: 10px;
      padding: 24px 12px;
      text-align: center;
      color: #d1d5db;
      font-size: 11px;
      pointer-events: none;
      flex-shrink: 0;
    }
    .kb-add-btn {
      padding: 7px 10px;
      border-radius: 10px;
      border: none;
      background: transparent;
      color: #9ca3af;
      font-size: 12px;
      cursor: pointer;
      text-align: left;
      transition: background 0.15s, color 0.15s;
      flex-shrink: 0;
      margin: 4px 8px 8px;
      width: calc(100% - 16px);
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .kb-add-btn:hover { background: rgba(0,0,0,0.05); color: #374151; }
    /* Column color accents */
    .kb-col[data-status="new"] { background: #f0f4ff; border-color: #c7d2fe; }
    .kb-col[data-status="new"] .kb-col-header { background: rgba(238,242,255,0.8); }

    .kb-col[data-status="contacted"] { background: #faf0ff; border-color: #e9d5ff; }
    .kb-col[data-status="contacted"] .kb-col-header { background: rgba(250,240,255,0.8); }
    .kb-col[data-status="interview_scheduled"] { background: #fffdf0; border-color: #fde68a; }
    .kb-col[data-status="interview_scheduled"] .kb-col-header { background: rgba(255,253,240,0.8); }
    .kb-col[data-status="interviewed"] { background: #fff8f0; border-color: #fed7aa; }
    .kb-col[data-status="interviewed"] .kb-col-header { background: rgba(255,248,240,0.8); }
    .kb-col[data-status="hired"] { background: #f0fdf4; border-color: #bbf7d0; }
    .kb-col[data-status="hired"] .kb-col-header { background: #dcfce7; }
    .kb-col[data-status="rejected"] { background: #fff5f5; border-color: #fecaca; }
    .kb-col[data-status="rejected"] .kb-col-header { background: #fee2e2; }
    /* Card accent borders */
    .kb-card.kb-hired { border-left: 3px solid #22c55e; }
    .kb-card.kb-rejected { border-left: 3px solid #ef4444; opacity: 0.72; }
    /* Search dim */
    .kb-card.kb-dim { opacity: 0.18; pointer-events: none; transform: none !important; }
    /* Quick-add inline form */
    /* Status select on kanban card */
    .kb-status-select {
      appearance: none;
      -webkit-appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%239ca3af' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 8px center;
      padding-right: 22px !important;
    }
    .kb-status-select:hover { opacity: 0.88; }

    #obQuickAdd {
      background: #fff;
      border-radius: 11px;
      padding: 11px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      border: 1.5px solid var(--lion-gold);
      flex-shrink: 0;
    }

    /* ── Sidebar ───────────────────────────────────────── */
    #sidebar {
      transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    }
    /* Desktop: always visible, no transform */
    @media (min-width: 768px) {
      #sidebar { transform: none !important; box-shadow: none !important; }
      #mobileOverlay { display: none !important; }
    }
    /* Mobile: hidden off-screen by default */
    @media (max-width: 767px) {
      #sidebar {
        position: fixed !important;
        top: 0; left: 0;
        min-height: 0 !important;       /* kill the 100vh min-height from .sidebar */
        height: 100vh !important;       /* fallback for older browsers */
        height: 100dvh !important;      /* dynamic viewport — fills exactly the visible area */
        width: 260px !important;
        transform: translateX(-100%);
        z-index: 9000 !important;
        box-shadow: none;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
      }
      #sidebar.sidebar-open {
        transform: translateX(0) !important;
        box-shadow: 4px 0 32px rgba(0,0,0,0.45) !important;
      }
      /* Nav scrolls if there are many items; footer is always visible */
      #sidebar nav { overflow-y: auto !important; flex: 1 1 0% !important; min-height: 0 !important; }
      /* Footer section: never shrink, never overflow */
      #sidebar > div:last-child { flex-shrink: 0 !important; overflow: visible !important; }
    }
    /* Overlay */
    #mobileOverlay {
      display: none;
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.5);
      z-index: 8999;
    }
    #mobileOverlay.active { display: block; }

/* ── Landing page styles ── */
      /* Landing page styles */
      @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

      #landingPage { font-family: 'Inter', sans-serif; }

      /* ── Left panel ── */
      .landing-left {
        background: linear-gradient(155deg, #0b1120 0%, #1a1a2e 45%, #0f2d5a 100%);
        position: relative;
        overflow: hidden;
      }
      /* Glow orbs */
      .landing-left::before {
        content: '';
        position: absolute;
        top: -140px; right: -100px;
        width: 520px; height: 520px;
        background: radial-gradient(circle, rgba(201,168,76,0.14) 0%, transparent 68%);
        pointer-events: none;
      }
      .landing-left::after {
        content: '';
        position: absolute;
        bottom: -100px; left: -60px;
        width: 360px; height: 360px;
        background: radial-gradient(circle, rgba(15,45,90,0.8) 0%, transparent 70%);
        pointer-events: none;
      }
      /* Dot-grid texture overlay */
      .landing-left-dots {
        position: absolute; inset: 0;
        background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
        background-size: 28px 28px;
        pointer-events: none;
      }
      /* Decorative ring */
      .landing-ring {
        position: absolute;
        bottom: -180px; right: -180px;
        width: 480px; height: 480px;
        border-radius: 50%;
        border: 1px solid rgba(201,168,76,0.12);
        pointer-events: none;
      }
      .landing-ring-2 {
        position: absolute;
        bottom: -240px; right: -240px;
        width: 620px; height: 620px;
        border-radius: 50%;
        border: 1px solid rgba(201,168,76,0.06);
        pointer-events: none;
      }

      .landing-gold-bar {
        width: 44px; height: 3px;
        background: linear-gradient(90deg, #C9A84C, #f6c84a);
        border-radius: 2px;
        margin-bottom: 22px;
      }

      .feature-pill {
        display: inline-flex; align-items: center; gap: 7px;
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.10);
        border-radius: 999px;
        padding: 5px 13px;
        font-size: 11.5px; color: rgba(255,255,255,0.68);
        letter-spacing: 0.01em;
        transition: background 0.18s, border-color 0.18s;
      }
      .feature-pill:hover {
        background: rgba(201,168,76,0.12);
        border-color: rgba(201,168,76,0.3);
        color: rgba(255,255,255,0.9);
      }
      .feature-pill i { color: #C9A84C; font-size: 10px; }

      .landing-divider {
        width: 100%; height: 1px;
        background: rgba(255,255,255,0.07);
        margin: 24px 0;
      }

      .landing-stat-item {
        padding-left: 14px;
        border-left: 2px solid rgba(201,168,76,0.35);
      }

      /* ── Right panel ── */
      .landing-right {
        background: #f6f7fb;
      }

      .cta-card {
        background: #ffffff;
        border: 1.5px solid #e5e8f0;
        border-radius: 14px;
        padding: 18px 20px;
        display: flex; align-items: center; gap: 14px;
        cursor: pointer;
        transition: border-color 0.2s, box-shadow 0.2s, transform 0.18s;
        text-decoration: none;
        position: relative;
        overflow: hidden;
        width: 100%;
        text-align: left;
      }
      .cta-card:hover {
        border-color: #C9A84C;
        box-shadow: 0 6px 28px rgba(201,168,76,0.13), 0 1px 6px rgba(0,0,0,0.05);
        transform: translateY(-2px);
      }

      /* Primary (dark) card */
      .cta-card.cta-primary {
        background: linear-gradient(135deg, #141b2d 0%, #0f3460 100%);
        border-color: rgba(255,255,255,0.07);
        box-shadow: 0 4px 20px rgba(10,20,50,0.25);
      }
      .cta-card.cta-primary:hover {
        border-color: #C9A84C;
        box-shadow: 0 10px 36px rgba(10,30,80,0.4);
        transform: translateY(-2px);
      }
      /* Shine sweep on hover */
      .cta-card.cta-primary::after {
        content: '';
        position: absolute; top: 0; left: -70%;
        width: 50%; height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
        transform: skewX(-18deg);
        transition: left 0.5s;
        pointer-events: none;
      }
      .cta-card.cta-primary:hover::after { left: 130%; }

      .cta-icon {
        width: 46px; height: 46px;
        border-radius: 11px;
        display: flex; align-items: center; justify-content: center;
        flex-shrink: 0;
        font-size: 17px;
        transition: transform 0.2s;
      }
      .cta-card:hover .cta-icon { transform: scale(1.07); }

      .cta-arrow {
        width: 30px; height: 30px;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        flex-shrink: 0;
        margin-left: auto;
        background: rgba(0,0,0,0.04);
        transition: background 0.18s, transform 0.18s;
      }
      .cta-card:hover .cta-arrow { background: #C9A84C; transform: translateX(2px); }
      .cta-card:hover .cta-arrow i { color: #fff !important; }
      .cta-card.cta-primary .cta-arrow { background: rgba(255,255,255,0.08); }
      .cta-card.cta-primary:hover .cta-arrow { background: #C9A84C; }

      /* Trust bar */
      .trust-bar {
        border-top: 1px solid #eaecf3;
        padding-top: 20px;
        display: flex; align-items: center; justify-content: space-between;
        flex-wrap: wrap; gap: 10px;
      }
      .trust-item {
        display: flex; align-items: center; gap: 6px;
        font-size: 11.5px; color: #9ca3af; font-weight: 500;
      }

      /* Mobile adaptations */
      @media (max-width: 1023px) {
        .landing-left { min-height: auto; padding: 36px 24px 32px; }
        .landing-left h1 { font-size: 2rem !important; }
        .landing-right { padding: 32px 20px 40px; }
      }
      @media (min-width: 1024px) {
        .landing-left { min-height: 100vh; }
        .landing-right { min-height: 100vh; }
      }

/* ── Apply screen styles ── */
  /* ── Apply screen styles ── */
  #applyScreen input, #applyScreen select, #applyScreen textarea {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
  }
  #applyScreen input:focus, #applyScreen select:focus, #applyScreen textarea:focus {
    border-color: #C9A84C;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.10);
  }
  #applyScreen input.field-error, #applyScreen select.field-error {
    border-color: #ef4444;
  }
  .apply-step { display: none; }
  .apply-step.active { display: block; }
  .apply-step-indicator {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
  }
  .apply-step-indicator.done    { background: #C9A84C; color: #fff; }
  .apply-step-indicator.active  { background: #1a1a2e; color: #C9A84C; border: 2px solid #C9A84C; }
  .apply-step-indicator.pending { background: #f3f4f6; color: #9ca3af; }
  .apply-connector { flex: 1; height: 2px; background: #e5e7eb; margin: 0 4px; }
  .apply-connector.done { background: #C9A84C; }
  .state-chip {
    display: inline-flex; align-items: center; gap: 5px;
    background: #eff6ff; border: 1px solid #bfdbfe;
    border-radius: 999px; padding: 3px 10px;
    font-size: 12px; color: #1d4ed8; font-weight: 600;
    cursor: pointer; transition: background 0.15s;
  }
  .state-chip:hover { background: #dbeafe; }
  .state-chip .chip-x { color: #93c5fd; font-size: 10px; margin-left: 2px; }
  .upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
  }
  .upload-zone:hover, .upload-zone.drag-over {
    border-color: #C9A84C;
    background: rgba(201,168,76,0.04);
  }
  .upload-zone input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer;
    border: none; border-radius: 0; padding: 0;
  }
  .photo-preview {
    width: 96px; height: 96px; border-radius: 50%;
    object-fit: cover;
    border: 3px solid #C9A84C;
    display: block; margin: 0 auto 12px;
  }
  .apply-section-title {
    font-size: 11px; font-weight: 700; letter-spacing: 0.07em;
    color: #9ca3af; text-transform: uppercase;
    margin-bottom: 14px; padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
  }
  .apply-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
  }
  .apply-nav-btn {
    padding: 11px 28px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
  }
  .apply-nav-btn.primary {
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    color: #fff;
  }
  .apply-nav-btn.primary:hover { opacity: 0.92; transform: translateY(-1px); }
  .apply-nav-btn.primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
  .apply-nav-btn.secondary {
    background: #f3f4f6; color: #374151;
  }
  .apply-nav-btn.secondary:hover { background: #e5e7eb; }
