:root {
      --brand-950: #070d1d;
      --brand-900: #0b132b;
      --brand-850: #0f1c3f;
      --brand-800: #1c2541;
      --brand-700: #1e3a8a;
      --brand-600: #2563eb;
      --brand-500: #3b82f6;
      --brand-400: #60a5fa;
      --brand-100: #dbeafe;
      --brand-50: #eff6ff;
      --gold-600: #d97706;
      --gold-500: #f59e0b;
      --gold-400: #fbbf24;
      --gold-100: #fef3c7;
      --gold-50: #fffbeb;
      --emerald-600: #059669;
      --emerald-500: #10b981;
      --emerald-100: #d1fae5;
      --bg: #f1f5f9;
      --card-bg: #ffffff;
      --line: #e2e8f0;
      --line-strong: #cbd5e1;
      --ink-900: #0f172a;
      --ink-800: #1e293b;
      --ink-700: #334155;
      --ink-600: #475569;
      --ink-500: #64748b;
      --ink-400: #94a3b8;
      --ink-300: #cbd5e1;
      --ink-200: #e2e8f0;
      --ink-100: #f8fafc;
      --radius-sm: 8px;
      --radius-md: 12px;
      --radius-lg: 16px;
      --radius-xl: 20px;
      --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
      --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -2px rgba(15, 23, 42, 0.03);
      --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.1), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
      --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.22);
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      font-family: 'Plus Jakarta Sans', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
      background: var(--bg);
      color: var(--ink-800);
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }

    /* Top Announcement Bar */
    .top-announcement {
      background: linear-gradient(90deg, #0b132b 0%, #1e3a8a 50%, #0b132b 100%);
      color: #e2e8f0;
      font-size: 12px;
      font-weight: 500;
      padding: 6px 20px;
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 16px;
      flex-wrap: wrap;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .top-ann-row {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      text-align: center;
    }
    .top-announcement a {
      color: var(--gold-400);
      text-decoration: none;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 4px;
      transition: color 0.2s;
    }
    .top-announcement a:hover { color: #fff; text-decoration: underline; }
    .top-announcement .badge-pill {
      background: rgba(245, 158, 11, 0.18);
      border: 1px solid rgba(245, 158, 11, 0.4);
      color: var(--gold-400);
      padding: 1px 8px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.5px;
    }

    /* Premium Header */
    header.site-header {
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--line);
      box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
      position: sticky;
      top: 0;
      z-index: 100;
      transition: all 0.3s ease;
    }
    .header-container {
      width: 90%;
      max-width: 90%;
      margin: 0 auto;
      padding: 12px 0;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
    }
    .header-brand {
      display: flex;
      align-items: center;
      gap: 16px;
      text-decoration: none;
      color: inherit;
    }
    .header-logo-wrap {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 4px;
      border-radius: 10px;
      background: #ffffff;
      border: 1px solid var(--line);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
      transition: transform 0.2s;
    }
    .header-logo-wrap:hover { transform: scale(1.02); }
    .header-logo {
      height: 46px;
      width: auto;
      max-width: 160px;
      object-fit: contain;
      display: block;
    }
    .brand-divider {
      width: 1px;
      height: 38px;
      background: var(--line);
    }
    .brand-titles h1 {
      margin: 0;
      font-size: 19px;
      font-weight: 800;
      color: var(--ink-900);
      letter-spacing: -0.3px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .brand-titles h1 span.highlight {
      background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    .brand-titles p {
      margin: 2px 0 0;
      font-size: 12px;
      color: var(--ink-500);
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .brand-titles p .company-tag {
      font-weight: 700;
      color: var(--gold-600);
    }

    .header-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: nowrap;
      flex-shrink: 0;
    }
    .privacy-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 36px;
      padding: 0 12px;
      background: #ecfdf5;
      color: #047857;
      border: 1px solid #a7f3d0;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 600;
      white-space: nowrap;
      flex-shrink: 0;
      box-sizing: border-box;
    }
    .pulse-green {
      width: 7px;
      height: 7px;
      background: var(--emerald-500);
      border-radius: 50%;
      box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
      animation: pulseGreen 2s infinite;
      flex-shrink: 0;
    }
    @keyframes pulseGreen {
      0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
      70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
      100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
    }
    .header-phone-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      height: 36px;
      padding: 0 12px;
      font-size: 12.5px;
      font-weight: 700;
      color: var(--ink-700);
      text-decoration: none;
      border-radius: 999px;
      border: 1px solid var(--line);
      background: #fff;
      white-space: nowrap;
      flex-shrink: 0;
      box-sizing: border-box;
      transition: all 0.2s;
    }
    .header-phone-link:hover {
      border-color: var(--brand-500);
      color: var(--brand-600);
      background: var(--brand-50);
    }
    .header-btn-quote {
      background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
      color: #fff;
      font-weight: 700;
      font-size: 12.5px;
      height: 36px;
      padding: 0 14px;
      border-radius: 999px;
      text-decoration: none;
      box-shadow: 0 2px 8px rgba(245, 158, 11, 0.28);
      transition: all 0.2s;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      white-space: nowrap;
      flex-shrink: 0;
      box-sizing: border-box;
    }
    .header-btn-quote:hover {
      box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
      transform: translateY(-1px);
    }

    /* Main Grid Layout */
    main.app-main {
      width: 90%;
      max-width: 90%;
      margin: 0 auto;
      padding: 24px 0;
      display: grid;
      grid-template-columns: 380px 1fr;
      gap: 24px;
      flex: 1;
    }
    @media (max-width: 1024px) {
      main.app-main { grid-template-columns: 1fr; }
    }

    /* Card Component */
    .card {
      background: var(--card-bg);
      border: 1px solid var(--line);
      border-radius: var(--radius-lg);
      padding: 20px;
      box-shadow: var(--shadow-md);
      transition: box-shadow 0.2s ease, border-color 0.2s ease;
      margin-bottom: 20px;
      position: relative;
    }
    .card:hover {
      box-shadow: var(--shadow-lg);
      border-color: #cbd5e1;
    }
    .card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--line);
    }
    .card-title-group {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .step-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      border-radius: 8px;
      background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
      color: #fff;
      font-size: 13px;
      font-weight: 800;
      box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
    }
    .card h2 {
      margin: 0;
      font-size: 15px;
      font-weight: 700;
      color: var(--ink-900);
      letter-spacing: -0.2px;
    }

    /* Standardized Upload Drop Area */
    .drop {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      border: 2px dashed #93c5fd;
      background: #f8fafc;
      border-radius: var(--radius-md);
      padding: 30px 18px;
      text-align: center;
      cursor: pointer;
      color: var(--ink-600);
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
    }
    .drop:hover {
      border-color: var(--brand-600);
      background: #f0f7ff;
      transform: translateY(-1px);
      box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
    }
    .drop.on {
      border-color: var(--brand-600);
      background: #eff6ff;
      transform: scale(1.01);
      box-shadow: var(--shadow-glow);
    }
    .upload-icon-circle {
      width: 58px;
      height: 58px;
      border-radius: 50%;
      background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
      border: 1px solid #bfdbfe;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 12px;
      color: var(--brand-600);
      transition: transform 0.25s ease;
    }
    .drop:hover .upload-icon-circle {
      transform: scale(1.1) translateY(-2px);
      background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
      color: #fff;
    }
    .drop-main-text {
      font-size: 14px;
      font-weight: 700;
      color: var(--ink-800);
      margin-bottom: 4px;
    }
    .drop-sub-text {
      font-size: 11.5px;
      color: var(--ink-500);
      line-height: 1.4;
    }
    .file-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      margin-top: 10px;
      padding: 3px 9px;
      border-radius: 999px;
      background: #e2e8f0;
      color: var(--ink-700);
      font-size: 11px;
      font-weight: 600;
    }

    /* Status indicator */
    .status {
      font-size: 12.5px;
      color: var(--brand-600);
      margin-top: 12px;
      min-height: 20px;
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      border-radius: var(--radius-sm);
      background: #f1f5f9;
      border: 1px solid var(--line);
      transition: all 0.2s;
    }
    .status:empty { display: none; }

    /* Action Controls Section */
    .action-controls-card {
      background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
      border: 1px solid #cbd5e1;
      border-radius: var(--radius-lg);
      padding: 18px 20px;
      box-shadow: var(--shadow-md);
      margin-top: 20px;
      margin-bottom: 20px;
    }
    .action-controls-header {
      font-size: 13px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--ink-500);
      margin-bottom: 14px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .action-btn-stack {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .action-btn-stack #dlNoticeBox {
      grid-column: 1 / -1;
    }
    .action-guide-text {
      text-align: center;
      font-size: 12.5px;
      color: var(--ink-500);
      margin-top: 12px;
    }
    button {
      font: inherit;
      border: 0;
      border-radius: var(--radius-md);
      padding: 11px 16px;
      cursor: pointer;
      font-weight: 700;
      font-size: 14px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      width: 100%;
    }
    button.primary {
      background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
      color: #fff;
      box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
      border: 1px solid rgba(255, 255, 255, 0.15);
    }
    button.primary:hover:not(:disabled) {
      background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #2563eb 100%);
      box-shadow: 0 6px 20px rgba(37, 99, 235, 0.48);
      transform: translateY(-1px);
    }
    button.primary:active:not(:disabled) {
      transform: translateY(0);
    }
    button.btn-download, button.ghost {
      background: linear-gradient(135deg, #059669 0%, #10b981 100%);
      color: #fff;
      box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
      border: 1px solid rgba(255, 255, 255, 0.15);
    }
    button.btn-download:hover:not(:disabled), button.ghost:hover:not(:disabled) {
      background: linear-gradient(135deg, #047857 0%, #059669 100%);
      box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
      transform: translateY(-1px);
    }
    button:disabled {
      background: #cbd5e1 !important;
      color: #64748b !important;
      cursor: not-allowed !important;
      box-shadow: none !important;
      transform: none !important;
      opacity: 0.85;
    }
    .action-guide-text {
      font-size: 11.5px;
      color: var(--ink-500);
      margin-top: 10px;
      line-height: 1.4;
      text-align: center;
    }

    /* Form inputs in Globals Card */
    .form-group {
      margin-bottom: 12px;
    }
    label.f {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 12px;
      font-weight: 600;
      margin: 8px 0 3px;
      color: var(--ink-700);
    }
    input.t {
      width: 100%;
      padding: 9px 12px;
      border: 1px solid var(--line);
      border-radius: var(--radius-sm);
      font: inherit;
      font-size: 13px;
      color: var(--ink-900);
      background: #ffffff;
      transition: all 0.2s;
    }
    input.t:focus {
      outline: none;
      border-color: var(--brand-500);
      box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
      background: #fdfdfd;
    }

    /* Right Display Cards */
    #previewCard {
      margin-top: 0;
    }
    #preview {
      background: #334155;
      background: radial-gradient(circle, #475569 0%, #1e293b 100%);
      border-radius: var(--radius-md);
      padding: 24px;
      text-align: center;
      overflow: auto;
      max-height: 82vh;
      border: 1px solid #475569;
      box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    #preview canvas {
      background: #fff;
      max-width: 100%;
      box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
      margin: 0 auto 16px;
      display: block;
      border-radius: 4px;
    }
    .pager {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      color: #fff;
      font-size: 13px;
      font-weight: 600;
      margin-bottom: 12px;
    }
    .pager button.ghost {
      width: auto;
      padding: 6px 14px;
      font-size: 12px;
      background: #f1f5f9;
      color: var(--ink-800);
      border: 1px solid var(--line);
      box-shadow: var(--shadow-sm);
    }
    .pager button.ghost:hover:not(:disabled) {
      background: #e2e8f0;
    }

    /* Voters Table */
    .tablewrap {
      max-height: 380px;
      overflow: auto;
      margin-top: 10px;
      border: 1px solid var(--line);
      border-radius: var(--radius-md);
      box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
    }
    table {
      border-collapse: collapse;
      width: 100%;
      font-size: 12px;
      white-space: nowrap;
    }
    th, td {
      border: 1px solid var(--line);
      padding: 6px 8px;
      text-align: left;
    }
    th {
      background: #f8fafc;
      color: var(--ink-800);
      font-weight: 700;
      position: sticky;
      top: 0;
      z-index: 10;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }
    tr:hover td {
      background: #f8fafc;
    }
    td input {
      width: 100%;
      border: 0;
      font: inherit;
      font-size: 12px;
      background: transparent;
      padding: 2px 4px;
      border-radius: 4px;
    }
    td input:focus {
      background: #fef9c3;
      outline: 2px solid #eab308;
    }

    .muted { color: var(--ink-500); font-size: 12px; font-weight: normal; }
    .hide { display: none !important; }

    /* Site footer styles now live in css/footer.css (shared by every page) */

    /* Floating WhatsApp Button */
    .floating-wa-btn {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 999;
      width: 54px;
      height: 54px;
      border-radius: 50%;
      background: #25d366;
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
      transition: all 0.25s;
      text-decoration: none;
    }
    .floating-wa-btn:hover {
      transform: scale(1.08) translateY(-2px);
      box-shadow: 0 10px 25px rgba(37, 211, 102, 0.55);
    }
    .floating-wa-btn svg {
      width: 28px;
      height: 28px;
      fill: currentColor;
    }
  
    /* =========================================================
       COMPREHENSIVE RESPONSIVE DESIGN & MOBILE OPTIMIZATION
       ========================================================= */
    html, body {
      overflow-x: hidden;
      max-width: 100vw;
      width: 100%;
      -webkit-tap-highlight-color: transparent;
    }

    img, svg, canvas {
      max-width: 100%;
      height: auto;
    }

    /* Option 2 Typing Mode Toggle Badge */
    .typing-toggle-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 4px 10px;
      border-radius: 20px;
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      color: #1d4ed8;
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
      user-select: none;
      transition: all 0.2s ease;
    }
    .typing-toggle-badge:hover {
      background: #dbeafe;
      border-color: #93c5fd;
    }
    .typing-toggle-badge.disabled {
      background: #f1f5f9;
      border-color: #cbd5e1;
      color: #64748b;
    }
    .typing-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #22c55e;
      box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
    }
    .typing-toggle-badge.disabled .typing-dot {
      background: #94a3b8;
      box-shadow: none;
    }

    /* Floating Hindi Suggestions Popup */
    .hindi-suggest-box {
      position: absolute;
      z-index: 99999;
      background: #ffffff;
      border: 1px solid #cbd5e1;
      border-radius: 10px;
      box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
      font-family: 'Noto Sans Devanagari', 'Noto Sans', system-ui, sans-serif;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      animation: suggestFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes suggestFadeIn {
      from { opacity: 0; transform: translateY(-4px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .suggest-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 6px 12px;
      background: #f8fafc;
      border-bottom: 1px solid #e2e8f0;
      font-size: 11px;
      color: #64748b;
    }
    .suggest-badge {
      background: #e0f2fe;
      color: #0369a1;
      padding: 2px 6px;
      border-radius: 4px;
      font-weight: 700;
      font-size: 10px;
    }
    .suggest-query {
      font-weight: 700;
      color: #1e293b;
    }
    .suggest-list {
      display: flex;
      flex-direction: column;
      padding: 4px 0;
      max-height: 220px;
      overflow-y: auto;
    }
    .suggest-item {
      display: flex;
      align-items: center;
      padding: 7px 12px;
      gap: 10px;
      cursor: pointer;
      transition: background 0.12s ease;
      user-select: none;
    }
    .suggest-item:hover, .suggest-item.selected {
      background: #eff6ff;
    }
    .suggest-num {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      border-radius: 4px;
      background: #f1f5f9;
      color: #64748b;
      font-size: 10.5px;
      font-weight: 700;
    }
    .suggest-item.selected .suggest-num {
      background: #3b82f6;
      color: #ffffff;
    }
    .suggest-word {
      flex: 1;
      font-size: 13.5px;
      font-weight: 700;
      color: #0f172a;
    }
    .suggest-word.english-opt {
      color: #64748b;
      font-style: italic;
      font-size: 12px;
    }
    .suggest-key {
      font-size: 10px;
      color: #94a3b8;
      font-weight: 600;
      font-family: monospace;
    }
    .suggest-footer {
      padding: 5px 10px;
      background: #f8fafc;
      border-top: 1px solid #e2e8f0;
      font-size: 10px;
      color: #94a3b8;
      text-align: center;
    }

    /* Comprehensive Media Queries */
    @media (max-width: 1100px) {
      main.app-main {
        grid-template-columns: 1fr !important;
        padding: 16px 0;
        gap: 18px;
      }
      .sidebar-controls-col, .main-display-col {
        width: 100%;
        max-width: 100%;
        min-width: 0;
      }
    }

    @media (max-width: 768px) {
      main.app-main {
        padding: 12px 0;
        gap: 14px;
      }
      .top-announcement {
        flex-direction: column;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 5px;
        padding: 7px 10px;
        font-size: 11px;
      }
      .top-ann-row {
        width: 100%;
        justify-content: center !important;
        text-align: center !important;
        flex-wrap: wrap;
        gap: 8px;
      }
      /* Mobile header: Remove user icon, admin and super admin, keep ONLY logout button */
      .nav-user-meta {
        display: none !important;
      }
      .nav-user-badge {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
      }
      .btn-nav-logout {
        padding: 6px 14px;
        font-size: 12px;
      }
      .header-container {
        width: 94%;
        max-width: 94%;
        margin: 0 auto;
        padding: 8px 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap !important;
        gap: 10px;
      }
      .header-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        flex: 1 1 auto;
      }
      .header-logo-wrap {
        flex-shrink: 0;
      }
      .header-logo-wrap img,
      .header-logo {
        width: 38px;
        height: 38px;
        object-fit: contain;
      }
      .brand-divider {
        width: 1px;
        height: 28px;
        background: var(--line);
        flex-shrink: 0;
        margin: 0 1px;
      }
      .brand-titles {
        min-width: 0;
        flex: 1;
      }
      .brand-titles h1 {
        font-size: 15.5px;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .brand-titles p {
        font-size: 10.5px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap !important;
        flex-shrink: 0;
        margin-left: auto;
      }
      .header-actions .privacy-badge {
        display: none !important; /* Hide long badge on mobile to keep header clean */
      }
      .header-btn-quote {
        display: none !important; /* Hide quote button on mobile */
      }
      .header-phone-link {
        display: none !important; /* Mobile view: phone number hidden as requested */
      }
      .header-menu-wrap {
        display: inline-flex;
        flex-shrink: 0;
      }
      .btn-header-menu-toggle {
        height: 36px;
        padding: 0 8px 0 4px;
        gap: 4px;
      }
      .header-menu-avatar {
        width: 28px;
        height: 28px;
      }
      .card {
        padding: 14px 10px;
        margin-bottom: 12px;
      }
      .tablewrap {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }
      #preview {
        padding: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
      }
      #preview canvas {
        max-width: 100% !important;
        height: auto !important;
      }
      .action-controls-card {
        margin-top: 14px;
        padding: 16px 14px;
      }
      .action-btn-stack {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
      }
    }

    @media (max-width: 480px) {
      .header-container {
        width: 95%;
        max-width: 95%;
        padding: 6px 0;
        gap: 6px;
      }
      .header-brand {
        gap: 6px;
      }
      .header-logo-wrap img,
      .header-logo {
        width: 32px;
        height: 32px;
      }
      .brand-divider {
        height: 24px;
        margin: 0;
      }
      .brand-titles h1 {
        font-size: 13.5px;
      }
      .brand-titles p {
        font-size: 9px;
      }
      .header-phone-link {
        display: none !important;
      }
      .btn-header-menu-toggle {
        height: 34px;
        padding: 0 6px 0 3px;
        gap: 3px;
      }
      .header-menu-avatar {
        width: 26px;
        height: 26px;
      }
      .card-header h2 {
        font-size: 14px;
      }
      .form-group label {
        font-size: 12px;
      }
      .form-group input {
        font-size: 13px;
        padding: 7px 9px;
      }
    }

    /* ========================================================= */
    /* NEW FOLDER & SELECTION ENHANCEMENTS CSS                  */
    /* ========================================================= */
    .folder-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 3px 8px;
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      color: #1e40af;
      font-size: 10.5px;
      font-weight: 700;
      border-radius: 6px;
      letter-spacing: 0.2px;
    }
    .folder-pill.pill-amber {
      background: #fffbeb;
      border-color: #fde68a;
      color: #b45309;
    }
    .folder-pill.pill-emerald {
      background: #ecfdf5;
      border-color: #a7f3d0;
      color: #047857;
    }

    /* Existing PDF Card in Card 1 */
    .existing-file-card {
      background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
      border: 1.5px solid #cbd5e1;
      border-radius: var(--radius-md);
      padding: 15px 13px;
      margin-bottom: 8px;
      transition: all 0.25s ease;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    }
    .existing-file-card:hover {
      border-color: var(--brand-500);
      box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
    }
    .existing-file-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }
    .file-status-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      padding: 2.5px 8px;
      background: #dcfce7;
      border: 1px solid #86efac;
      color: #15803d;
      font-size: 11px;
      font-weight: 800;
      border-radius: 999px;
    }
    .file-size-badge {
      font-size: 11px;
      font-weight: 700;
      color: var(--ink-500);
      background: #e2e8f0;
      padding: 2px 7px;
      border-radius: 6px;
    }
    .existing-file-body {
      display: flex;
      align-items: center;
      gap: 12px;
      background: #ffffff;
      padding: 11px 13px;
      border-radius: 10px;
      border: 1px solid #e2e8f0;
      margin-bottom: 11px;
    }
    .pdf-icon-box {
      width: 44px;
      height: 44px;
      background: #fee2e2;
      color: #dc2626;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      border: 1px solid #fecaca;
    }
    .existing-file-info {
      flex: 1;
      min-width: 0;
    }
    .existing-file-name {
      font-size: 13px;
      font-weight: 800;
      color: var(--ink-900);
      word-break: break-all;
      line-height: 1.3;
    }
    .existing-file-meta {
      font-size: 11px;
      color: var(--ink-500);
      margin-top: 3px;
    }
    .existing-file-prompt {
      font-size: 12px;
      font-weight: 600;
      color: var(--ink-700);
      margin-bottom: 12px;
      line-height: 1.4;
      background: #eff6ff;
      border: 1px solid #dbeafe;
      padding: 8px 10px;
      border-radius: 8px;
    }
    .existing-file-actions {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .btn-use-existing {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      padding: 10px 14px;
      background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
      color: #ffffff;
      border: none;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s ease;
      box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    }
    .btn-use-existing:hover {
      background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    }
    .btn-toggle-upload {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      width: 100%;
      padding: 8px 14px;
      background: #ffffff;
      color: var(--ink-700);
      border: 1.5px solid #cbd5e1;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .btn-toggle-upload:hover {
      background: #f8fafc;
      border-color: var(--brand-500);
      color: var(--brand-600);
    }

    /* All PDFs dropdown list */
    .toggle-all-link {
      font-size: 11.5px;
      color: var(--brand-600);
      font-weight: 700;
      cursor: pointer;
      margin-top: 8px;
      text-align: center;
      padding: 4px;
      display: block;
      border-radius: 6px;
    }
    .toggle-all-link:hover {
      background: #eff6ff;
      text-decoration: underline;
    }
    .all-pdfs-dropdown {
      margin-top: 10px;
      padding: 10px;
      background: #ffffff;
      border: 1.5px solid #e2e8f0;
      border-radius: 10px;
      max-height: 220px;
      overflow-y: auto;
    }
    .all-pdfs-header {
      font-size: 11.5px;
      font-weight: 800;
      color: var(--ink-800);
      margin-bottom: 8px;
    }
    .all-pdf-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 6px 8px;
      border-radius: 6px;
      border: 1px solid #f1f5f9;
      margin-bottom: 4px;
      cursor: pointer;
      transition: background 0.15s ease;
    }
    .all-pdf-item:hover {
      background: #eff6ff;
      border-color: #bfdbfe;
    }
    .all-pdf-item-name {
      font-size: 12px;
      font-weight: 700;
      color: var(--ink-800);
      max-width: 170px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .all-pdf-item-btn {
      padding: 3px 8px;
      font-size: 11px;
      font-weight: 700;
      background: var(--brand-50);
      color: var(--brand-600);
      border: 1px solid #bfdbfe;
      border-radius: 4px;
      cursor: pointer;
    }

    /* Upload section top bar */
    .upload-section-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 10px;
    }
    .upload-section-title {
      font-size: 12.5px;
      font-weight: 800;
      color: var(--ink-800);
    }
    .btn-back-link {
      font-size: 11.5px;
      font-weight: 700;
      color: var(--brand-600);
      background: none;
      border: none;
      cursor: pointer;
      padding: 3px 6px;
      border-radius: 4px;
    }
    .btn-back-link:hover {
      background: #eff6ff;
      text-decoration: underline;
    }

    /* Symbol Gallery Styles */
    .symbol-gallery-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
      gap: 9px;
      margin: 10px 0 14px;
    }
    .symbol-card-item {
      background: #ffffff;
      border: 1.5px solid #e2e8f0;
      border-radius: 12px;
      padding: 10px 4px 8px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      text-align: center;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
      user-select: none;
    }
    .symbol-card-item:hover {
      border-color: #f59e0b;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(245, 158, 11, 0.16);
    }
    .symbol-card-item.selected {
      border-color: #d97706;
      background: #fffdf5;
      box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.3), 0 4px 12px rgba(217, 119, 6, 0.15);
    }
    .symbol-card-item .symbol-img-wrap {
      width: 56px;
      height: 56px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #ffffff;
      border-radius: 8px;
      padding: 4px;
      border: 1px solid #f1f5f9;
      margin-bottom: 6px;
    }
    .symbol-card-item .symbol-img-wrap img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
    }
    .symbol-card-item .symbol-title {
      font-size: 10.5px;
      font-weight: 700;
      color: var(--ink-800);
      line-height: 1.25;
      max-width: 76px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .symbol-card-item .check-badge {
      position: absolute;
      top: 4px;
      right: 4px;
      width: 16px;
      height: 16px;
      background: #d97706;
      color: #fff;
      border-radius: 50%;
      display: none;
      align-items: center;
      justify-content: center;
      font-size: 9px;
      font-weight: 900;
      box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }
    .symbol-card-item.selected .check-badge {
      display: flex;
    }

    /* Active Symbol Banner */
    .active-symbol-banner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 9px 12px;
      background: #fffbeb;
      border: 1.5px solid #fcd34d;
      border-radius: 10px;
      margin-bottom: 12px;
      box-shadow: 0 1px 4px rgba(245, 158, 11, 0.08);
    }
    .active-sym-left {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .active-sym-thumb {
      width: 38px;
      height: 38px;
      object-fit: contain;
      background: #fff;
      border-radius: 6px;
      padding: 2px;
      border: 1px solid #fbbf24;
      flex-shrink: 0;
    }
    .active-sym-title {
      font-size: 12px;
      font-weight: 800;
      color: #92400e;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      max-width: 140px;
    }
    .active-sym-status {
      font-size: 10.5px;
      color: #b45309;
      font-weight: 600;
    }
    .btn-remove-symbol {
      padding: 4px 8px;
      background: #fee2e2;
      color: #dc2626;
      border: 1px solid #fca5a5;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
      flex-shrink: 0;
    }
    .btn-remove-symbol:hover {
      background: #fecaca;
    }
    .gallery-sub-header {
      margin-bottom: 8px;
    }
    .gallery-instruction {
      font-size: 11.5px;
      font-weight: 700;
      color: var(--ink-700);
    }
    .symbol-card-footer {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 4px;
    }
    .btn-show-sym-upload {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 8px 12px;
      background: #fffdf5;
      border: 1.5px dashed #d97706;
      color: #b45309;
      border-radius: 8px;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .btn-show-sym-upload:hover {
      background: #fef3c7;
      border-color: #b45309;
      color: #92400e;
    }
    .btn-sym-none {
      padding: 8px 10px;
      background: #f1f5f9;
      border: 1px solid #cbd5e1;
      color: var(--ink-600);
      border-radius: 8px;
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
    }
    .btn-sym-none:hover {
      background: #e2e8f0;
      color: var(--ink-800);
    }


    /* ========================================================= */
    /* MODAL POPUP & COMPACT CARDS SYSTEM                        */
    /* ========================================================= */
    .gtech-modal-overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(15, 23, 42, 0.68);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10000;
      padding: 16px;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.22s ease, visibility 0.22s ease;
    }
    .gtech-modal-overlay.active {
      opacity: 1;
      visibility: visible;
    }
    .gtech-modal-dialog {
      background: #ffffff;
      border-radius: 18px;
      box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.8);
      width: 100%;
      max-width: 540px;
      max-height: 86vh;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      transform: scale(0.94) translateY(12px);
      transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .gtech-modal-overlay.active .gtech-modal-dialog {
      transform: scale(1) translateY(0);
    }
    .gtech-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px 14px;
      border-bottom: 1px solid #e2e8f0;
      background: #f8fafc;
    }
    .gtech-modal-title-group h3 {
      margin: 0;
      font-size: 15.5px;
      font-weight: 800;
      color: var(--ink-900);
    }
    .gtech-modal-title-group p {
      margin: 3px 0 0;
      font-size: 11.5px;
      color: var(--ink-500);
    }
    .gtech-modal-close {
      background: #f1f5f9;
      border: 1px solid #cbd5e1;
      color: var(--ink-600);
      width: 32px;
      height: 32px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .gtech-modal-close:hover {
      background: #fee2e2;
      border-color: #fca5a5;
      color: #dc2626;
      transform: scale(1.05);
    }
    .gtech-modal-body {
      padding: 16px 20px;
      overflow-y: auto;
      flex: 1;
    }
    .gtech-modal-section-title {
      font-size: 12px;
      font-weight: 800;
      color: var(--ink-800);
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    /* Modal PDF List items */
    .modal-pdf-container {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .modal-pdf-item {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 12px 14px;
      background: #ffffff;
      border: 1.5px solid #e2e8f0;
      border-radius: 12px;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
      width: 100%;
      box-sizing: border-box;
    }
    .modal-pdf-item:hover {
      background: #f8fafc;
      border-color: var(--brand-500);
      transform: translateY(-1px);
      box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
    }
    .modal-pdf-item.selected {
      background: #eff6ff;
      border-color: var(--brand-600);
      box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
    }
    
    /* Left column: Icon at top, चुनें button directly below */
    .modal-pdf-action-col {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      width: 68px;
    }
    .modal-pdf-icon {
      width: 42px;
      height: 42px;
      background: #fee2e2;
      color: #dc2626;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #fecaca;
      margin-bottom: 6px;
      flex-shrink: 0;
    }
    .modal-pdf-select-btn {
      width: 100%;
      height: 28px;
      padding: 0 6px;
      background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
      color: #ffffff;
      border: none;
      border-radius: 6px;
      font-size: 11.5px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
      box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
      transition: all 0.15s ease;
      box-sizing: border-box;
    }
    .modal-pdf-select-btn:hover {
      background: #1d4ed8;
      transform: scale(1.02);
    }
    .modal-pdf-item.selected .modal-pdf-select-btn {
      background: #15803d;
      box-shadow: 0 2px 4px rgba(21, 128, 61, 0.2);
    }

    /* Right column: Clean PDF name in one line, meta details below */
    .modal-pdf-info-col {
      flex: 1 1 auto;
      min-width: 0;
      display: flex;
      flex-direction: column;
      gap: 3px;
    }
    .modal-pdf-name {
      font-size: 14px;
      font-weight: 800;
      color: var(--ink-900);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.4;
      display: block;
      width: 100%;
    }
    .modal-pdf-active-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 10.5px;
      font-weight: 800;
      color: #15803d;
      background: #dcfce7;
      padding: 2px 7px;
      border-radius: 4px;
      width: fit-content;
      margin-top: 1px;
    }
    .modal-pdf-meta {
      font-size: 11.5px;
      color: var(--ink-500);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-top: 2px;
    }
    .modal-pdf-folder-path {
      font-size: 10.5px;
      color: var(--brand-600);
      font-weight: 600;
    }

    /* Modal Symbol Grid */
    .modal-symbol-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
      gap: 10px;
      margin-bottom: 14px;
    }
    .modal-symbol-card {
      background: #ffffff;
      border: 1.5px solid #e2e8f0;
      border-radius: 12px;
      padding: 10px 6px 8px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      text-align: center;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }
    .modal-symbol-card:hover {
      border-color: #f59e0b;
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(245, 158, 11, 0.2);
    }
    .modal-symbol-card.selected {
      border-color: #d97706;
      background: #fffdf5;
      box-shadow: 0 0 0 2.5px rgba(217, 119, 6, 0.35), 0 4px 14px rgba(217, 119, 6, 0.18);
    }
    .modal-symbol-img-wrap {
      width: 64px;
      height: 64px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #ffffff;
      border-radius: 8px;
      padding: 5px;
      border: 1px solid #f1f5f9;
      margin-bottom: 6px;
    }
    .modal-symbol-img-wrap img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
    }
    .modal-symbol-title {
      font-size: 11px;
      font-weight: 800;
      color: var(--ink-800);
      line-height: 1.3;
      max-width: 90px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .modal-symbol-card .check-badge {
      position: absolute;
      top: 5px;
      right: 5px;
      width: 17px;
      height: 17px;
      background: #d97706;
      color: #fff;
      border-radius: 50%;
      display: none;
      align-items: center;
      justify-content: center;
      font-size: 9.5px;
      font-weight: 900;
      box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    }
    .modal-symbol-card.selected .check-badge {
      display: flex;
    }

    /* Modal Bottom Upload Section */
    .modal-upload-toggle-box {
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid #e2e8f0;
    }
    .btn-modal-upload-trigger {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      padding: 9px 14px;
      background: #f8fafc;
      border: 1.5px dashed #cbd5e1;
      color: var(--ink-700);
      border-radius: 9px;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .btn-modal-upload-trigger:hover {
      background: #eff6ff;
      border-color: var(--brand-500);
      color: var(--brand-600);
    }
    .btn-modal-upload-trigger.amber {
      border-color: #fcd34d;
      color: #b45309;
      background: #fffdf5;
    }
    .btn-modal-upload-trigger.amber:hover {
      background: #fef3c7;
      border-color: #d97706;
      color: #92400e;
    }
    .modal-upload-drop-zone {
      margin-top: 10px;
    }

    /* Compact Main Page Cards */
    .empty-pdf-card, .empty-symbol-card {
      background: #f8fafc;
      border: 1.5px dashed #cbd5e1;
      border-radius: 12px;
      padding: 18px 14px;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }
    .empty-pdf-icon, .empty-sym-icon {
      color: var(--ink-400);
    }
    .empty-pdf-text, .empty-sym-text {
      font-size: 12px;
      color: var(--ink-600);
      font-weight: 600;
    }
    .btn-open-pdf-modal {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      width: 100%;
      padding: 10px 14px;
      background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
      transition: all 0.2s ease;
    }
    .btn-open-pdf-modal:hover {
      background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
      transform: translateY(-1px);
    }
    .btn-open-symbol-modal {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 7px;
      width: 100%;
      padding: 10px 14px;
      background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
      color: #fff;
      border: none;
      border-radius: 8px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
      transition: all 0.2s ease;
    }
    .btn-open-symbol-modal:hover {
      background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
      transform: translateY(-1px);
    }

    /* Active State for Card 1 */
    .active-pdf-card {
      background: #f0fdf4;
      border: 1.5px solid #86efac;
      border-radius: 12px;
      padding: 13px 14px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      box-shadow: 0 2px 6px rgba(16, 185, 129, 0.08);
    }
    .active-pdf-top {
      display: flex;
      align-items: center;
      gap: 11px;
    }
    .active-pdf-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 10.5px;
      font-weight: 800;
      color: #15803d;
      background: #dcfce7;
      padding: 2px 6px;
      border-radius: 4px;
      margin-bottom: 2px;
    }
    .active-pdf-name {
      font-size: 13px;
      font-weight: 800;
      color: var(--ink-900);
      word-break: break-all;
      line-height: 1.3;
    }
    .active-pdf-meta {
      font-size: 11px;
      color: var(--ink-500);
      margin-top: 2px;
    }
    .btn-change-pdf {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      width: 100%;
      padding: 8px 12px;
      background: #ffffff;
      border: 1.5px solid #86efac;
      color: #15803d;
      border-radius: 7px;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .btn-change-pdf:hover {
      background: #dcfce7;
    }

    /* Active State for Card 2 */
    .active-symbol-card {
      background: #fffbeb;
      border: 1.5px solid #fcd34d;
      border-radius: 12px;
      padding: 13px 14px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      box-shadow: 0 2px 6px rgba(245, 158, 11, 0.08);
    }
    .active-sym-top {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .active-sym-figure-wrap {
      width: 50px;
      height: 50px;
      background: #ffffff;
      border: 1px solid #fde68a;
      border-radius: 10px;
      padding: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }
    .active-sym-figure-wrap img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
    }
    .active-sym-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 10.5px;
      font-weight: 800;
      color: #b45309;
      background: #fef3c7;
      padding: 2px 6px;
      border-radius: 4px;
      margin-bottom: 2px;
    }
    .active-sym-title {
      font-size: 13.5px;
      font-weight: 800;
      color: #92400e;
      line-height: 1.3;
    }
    .active-sym-meta {
      font-size: 11px;
      color: #b45309;
      margin-top: 2px;
    }
    .active-sym-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      margin-top: 4px;
    }
    .btn-change-symbol {
      flex: 1 1 0;
      min-width: 0;
      height: 38px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 10px;
      background: #ffffff;
      border: 1.5px solid #fcd34d;
      color: #b45309;
      border-radius: 8px;
      font-size: 12.5px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s ease;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
      box-sizing: border-box;
    }
    .btn-change-symbol:hover {
      background: #fef3c7;
      border-color: #f59e0b;
      transform: translateY(-1px);
    }
    .btn-remove-symbol-main {
      flex: 1 1 0;
      min-width: 0;
      height: 38px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 10px;
      background: #fff1f2;
      border: 1.5px solid #fecdd3;
      color: #e11d48;
      border-radius: 8px;
      font-size: 12.5px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s ease;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
      box-sizing: border-box;
    }
    .btn-remove-symbol-main:hover {
      background: #ffe4e6;
      border-color: #fda4af;
      color: #be123c;
      transform: translateY(-1px);
    }

    /* Election Symbol Position Checkboxes Bar */
    .symbol-positions-bar {
      margin-top: 10px;
      padding: 10px 12px;
      background: #f8fafc;
      border: 1.5px solid #e2e8f0;
      border-radius: 10px;
      transition: all 0.2s ease;
    }
    .symbol-positions-bar.in-modal {
      margin: 12px 0 6px 0;
      background: #fffdf7;
      border-color: #fde68a;
    }
    .symbol-pos-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 8px;
    }
    .symbol-pos-title {
      font-size: 11.5px;
      font-weight: 700;
      color: #475569;
      display: flex;
      align-items: center;
      gap: 5px;
    }
    .symbol-pos-row {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 6px;
      width: 100%;
    }
    .symbol-pos-chip {
      flex: 1 1 0;
      min-width: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      padding: 7px 4px;
      background: #ffffff;
      border: 1.5px solid #cbd5e1;
      border-radius: 8px;
      cursor: pointer;
      user-select: none;
      transition: all 0.18s ease;
      font-size: 11.5px;
      font-weight: 700;
      color: #334155;
      text-align: center;
      box-sizing: border-box;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    }
    .symbol-pos-chip:hover {
      border-color: #f59e0b;
      background: #fffdf5;
      transform: translateY(-1px);
    }
    .symbol-pos-chip:has(input:checked) {
      background: #fef3c7;
      border-color: #f59e0b;
      color: #92400e;
      box-shadow: 0 1px 4px rgba(245, 158, 11, 0.16);
    }
    .symbol-pos-chip input[type="checkbox"] {
      cursor: pointer;
      accent-color: #d97706;
      width: 15px;
      height: 15px;
      margin: 0;
      flex-shrink: 0;
    }
    .symbol-pos-chip .symbol-pos-text {
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }


    /* ========================================================= */
    /* HIGH-SECURITY AUTHENTICATION & LOCK SCREEN STYLES         */
    /* ========================================================= */
    body.auth-locked {
      overflow: hidden !important;
    }
    body.auth-locked .top-banner,
    body.auth-locked .app-header,
    body.auth-locked .app-main,
    body.auth-locked .floating-wa-btn {
      filter: blur(16px) grayscale(30%) brightness(0.9) !important;
      pointer-events: none !important;
      user-select: none !important;
      transition: filter 0.35s ease;
    }

    /* Fullscreen Overlay with Modern Radial Mesh & Backdrop Blur (Vertically Scrollable) */
    .auth-overlay {
      position: fixed;
      inset: 0;
      z-index: 999999;
      display: flex;
      align-items: flex-start;
      justify-content: center;
      padding: 24px 16px 40px;
      overflow-y: auto !important;
      overflow-x: hidden;
      -webkit-overflow-scrolling: touch;
      background: radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.28) 0%, transparent 45%),
                  radial-gradient(circle at 82% 80%, rgba(124, 58, 237, 0.25) 0%, transparent 45%),
                  rgba(10, 15, 29, 0.92);
      backdrop-filter: blur(28px) saturate(180%);
      -webkit-backdrop-filter: blur(28px) saturate(180%);
      opacity: 1;
      visibility: visible;
      transition: opacity 0.35s ease, visibility 0.35s ease;
      box-sizing: border-box;
    }
    .auth-overlay.hide {
      opacity: 0 !important;
      visibility: hidden !important;
      pointer-events: none !important;
    }

    /* Glassmorphism Luxury Security Card with Auto-Center & Vertical Scroll */
    .auth-card {
      background: rgba(15, 23, 42, 0.94);
      border: 1px solid rgba(255, 255, 255, 0.15);
      border-radius: 26px;
      padding: 34px 28px 28px;
      width: 100%;
      max-width: 440px;
      margin: auto 0;
      max-height: calc(100vh - 48px);
      overflow-y: auto !important;
      overscroll-behavior: contain;
      box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.85),
                  0 0 0 1px rgba(255, 255, 255, 0.08) inset,
                  0 0 50px rgba(37, 99, 235, 0.22);
      text-align: center;
      color: #f8fafc;
      animation: authPopIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
      position: relative;
      box-sizing: border-box;
    }
    /* Sleek Custom Scrollbars for Auth Window */
    .auth-overlay::-webkit-scrollbar,
    .auth-card::-webkit-scrollbar {
      width: 7px;
    }
    .auth-overlay::-webkit-scrollbar-track,
    .auth-card::-webkit-scrollbar-track {
      background: rgba(15, 23, 42, 0.5);
      border-radius: 8px;
    }
    .auth-overlay::-webkit-scrollbar-thumb,
    .auth-card::-webkit-scrollbar-thumb {
      background: rgba(59, 130, 246, 0.55);
      border-radius: 8px;
    }
    .auth-overlay::-webkit-scrollbar-thumb:hover,
    .auth-card::-webkit-scrollbar-thumb:hover {
      background: rgba(59, 130, 246, 0.85);
    }
    @keyframes authPopIn {
      0% { transform: scale(0.92) translateY(14px); opacity: 0; }
      100% { transform: scale(1) translateY(0); opacity: 1; }
    }
    .auth-card.shake {
      animation: authShake 0.45s ease-in-out;
    }
    @keyframes authShake {
      0%, 100% { transform: translateX(0); }
      20%, 60% { transform: translateX(-10px); }
      40%, 80% { transform: translateX(10px); }
    }

    /* Company Logo Section in Login Modal */
    .auth-brand-logo-wrap {
      position: relative;
      margin: 0 auto 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      width: fit-content;
    }
    .auth-brand-logo-glow {
      position: absolute;
      inset: -10px;
      border-radius: 24px;
      background: radial-gradient(circle, rgba(59, 130, 246, 0.45) 0%, rgba(37, 99, 235, 0) 70%);
      animation: brandLogoPulse 2.8s infinite;
    }
    @keyframes brandLogoPulse {
      0% { transform: scale(0.96); opacity: 0.5; }
      50% { transform: scale(1.12); opacity: 0.9; }
      100% { transform: scale(0.96); opacity: 0.5; }
    }
    .auth-brand-logo-card {
      position: relative;
      background: #ffffff;
      border-radius: 18px;
      padding: 10px 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.4),
                  0 0 25px rgba(59, 130, 246, 0.35);
      border: 2px solid rgba(255, 255, 255, 0.6);
      transition: transform 0.2s ease;
    }
    .auth-brand-logo-card:hover {
      transform: translateY(-2px);
    }
    .auth-company-logo {
      height: 44px;
      width: auto;
      max-width: 170px;
      object-fit: contain;
      display: block;
    }

    /* Top Gateway Badge */
    .auth-badge {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      padding: 5px 14px;
      background: rgba(30, 41, 59, 0.8);
      border: 1px solid rgba(59, 130, 246, 0.35);
      border-radius: 999px;
      font-size: 11.5px;
      font-weight: 700;
      color: #93c5fd;
      letter-spacing: 0.5px;
      margin-bottom: 12px;
    }
    .auth-badge-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #10b981;
      box-shadow: 0 0 8px #10b981;
    }

    .auth-title {
      font-size: 20px;
      font-weight: 800;
      color: #ffffff;
      margin: 0 0 6px;
      letter-spacing: -0.3px;
    }
    .auth-subtitle {
      font-size: 13px;
      color: #94a3b8;
      margin: 0 0 20px;
      line-height: 1.4;
    }

    /* Alert / Error Box */
    .auth-alert-box {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      padding: 12px 14px;
      border-radius: 12px;
      font-size: 12.5px;
      line-height: 1.4;
      text-align: left;
      margin-bottom: 18px;
      transition: all 0.25s ease;
    }
    .auth-alert-box.alert-error {
      background: rgba(225, 29, 72, 0.15);
      border: 1px solid rgba(244, 63, 94, 0.4);
      color: #fecdd3;
    }
    .auth-alert-box.alert-inactivity {
      background: rgba(245, 158, 11, 0.15);
      border: 1px solid rgba(245, 158, 11, 0.4);
      color: #fde68a;
    }
    .auth-alert-box.alert-success {
      background: rgba(16, 185, 129, 0.15);
      border: 1px solid rgba(16, 185, 129, 0.4);
      color: #a7f3d0;
    }
    .auth-alert-box.hide {
      display: none !important;
    }
    .auth-alert-content-wrap {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    .auth-alert-action-btn {
      align-self: flex-start;
      margin-top: 4px;
      padding: 5px 12px;
      background: #2563eb;
      color: #ffffff;
      border: none;
      border-radius: 7px;
      font-size: 11.5px;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
      transition: all 0.2s ease;
      font-family: inherit;
    }
    .auth-alert-action-btn:hover {
      background: #1d4ed8;
      transform: translateY(-1px);
    }
    .auth-alert-action-btn.hide {
      display: none !important;
    }

    /* Login Method Switcher Tabs (Password vs WhatsApp OTP) */
    .auth-login-tabs {
      display: flex;
      background: rgba(30, 41, 59, 0.7);
      padding: 4px;
      border-radius: 14px;
      margin-bottom: 18px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      gap: 6px;
    }
    .auth-login-tab-btn {
      flex: 1;
      padding: 9px 10px;
      background: transparent;
      border: none;
      border-radius: 10px;
      color: #94a3b8;
      font-size: 12.5px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      transition: all 0.2s ease;
      font-family: inherit;
    }
    .auth-login-tab-btn:hover {
      color: #ffffff;
      background: rgba(255, 255, 255, 0.06);
    }
    .auth-login-tab-btn.active {
      background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
      color: #ffffff;
      box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
    }

    /* "OR" Divider Between Form and Google Login */
    .auth-divider-or {
      position: relative;
      margin: 16px 0 14px;
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .auth-divider-or::before {
      content: '';
      position: absolute;
      left: 0;
      right: 0;
      top: 50%;
      height: 1px;
      background: rgba(255, 255, 255, 0.12);
    }
    .auth-divider-or span {
      position: relative;
      background: rgba(15, 23, 42, 0.96);
      padding: 2px 14px;
      font-size: 11px;
      font-weight: 700;
      color: #94a3b8;
      border-radius: 999px;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Google Sign-In Button */
    .auth-google-wrap {
      width: 100%;
      margin-bottom: 6px;
    }
    .btn-google-login {
      width: 100%;
      padding: 11.5px 16px;
      background: rgba(255, 255, 255, 0.08);
      border: 1.5px solid rgba(255, 255, 255, 0.18);
      border-radius: 12px;
      color: #f8fafc;
      font-size: 13.5px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      transition: all 0.2s ease;
      font-family: inherit;
      box-sizing: border-box;
    }
    .btn-google-login:hover {
      background: rgba(255, 255, 255, 0.14);
      border-color: rgba(255, 255, 255, 0.35);
      transform: translateY(-1px);
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
    }
    .btn-google-login:active {
      transform: translateY(0);
    }
    .google-svg-icon {
      flex-shrink: 0;
    }
    .google-gis-btn-box {
      display: flex;
      justify-content: center;
      margin-bottom: 8px;
    }

    /* Form Fields */
    .auth-form-group {
      text-align: left;
      margin-bottom: 16px;
    }
    .auth-label {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      font-weight: 600;
      color: #cbd5e1;
      margin-bottom: 7px;
    }
    .auth-input-wrap {
      position: relative;
      display: flex;
      align-items: center;
      width: 100%;
    }
    .auth-input {
      width: 100%;
      background: rgba(30, 41, 59, 0.7);
      border: 1.5px solid rgba(255, 255, 255, 0.14);
      border-radius: 12px;
      padding: 13px 48px 13px 14px;
      font-size: 14px;
      color: #ffffff;
      outline: none;
      box-sizing: border-box;
      transition: all 0.2s ease;
      font-family: inherit;
    }
    .auth-input:focus {
      background: rgba(30, 41, 59, 0.95);
      border-color: #3b82f6;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28), 0 0 16px rgba(59, 130, 246, 0.2);
    }
    .auth-input::placeholder {
      color: #64748b;
      font-size: 13px;
    }
    .auth-eye-btn {
      position: absolute;
      right: 6px;
      top: 50%;
      transform: translateY(-50%);
      width: 36px;
      height: 36px;
      background: transparent;
      border: none;
      color: #94a3b8;
      cursor: pointer;
      padding: 0;
      margin: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      transition: all 0.2s ease;
      z-index: 10;
    }
    .auth-eye-btn:hover {
      color: #ffffff;
      background: rgba(255, 255, 255, 0.12);
    }
    .auth-eye-btn svg {
      pointer-events: none;
    }

    /* Security Notice Pill */
    .auth-meta-row {
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 14px 0 18px;
    }
    .auth-security-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      color: #94a3b8;
      background: rgba(255, 255, 255, 0.04);
      padding: 4px 10px;
      border-radius: 6px;
      border: 1px solid rgba(255, 255, 255, 0.07);
    }

    /* Submit Button */
    .btn-auth-submit {
      width: 100%;
      padding: 13px 18px;
      background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #4338ca 100%);
      color: #ffffff;
      border: none;
      border-radius: 12px;
      font-size: 14.5px;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      box-shadow: 0 10px 25px -4px rgba(37, 99, 235, 0.5);
      transition: all 0.2s ease;
      box-sizing: border-box;
    }
    .btn-auth-submit:hover {
      transform: translateY(-1px);
      box-shadow: 0 14px 30px -4px rgba(37, 99, 235, 0.65);
      background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #4f46e5 100%);
    }
    .btn-auth-submit:active {
      transform: translateY(0);
    }
    .btn-auth-submit:disabled {
      opacity: 0.7;
      cursor: not-allowed;
      transform: none;
    }
    .btn-auth-spinner {
      width: 16px;
      height: 16px;
      border: 2px solid rgba(255, 255, 255, 0.3);
      border-top-color: #ffffff;
      border-radius: 50%;
      animation: spinAuth 0.7s linear infinite;
    }
    @keyframes spinAuth {
      to { transform: rotate(360deg); }
    }

    .auth-footer-note {
      margin-top: 18px;
      font-size: 11.5px;
      color: #64748b;
    }

    /* ========================================================================= */
    /* USER SIGNUP & SEQUENTIAL VERIFICATION STYLES                             */
    /* ========================================================================= */
    .auth-card.auth-card-wide {
      max-width: 540px;
    }
    .auth-tabs-switcher {
      display: flex;
      background: rgba(30, 41, 59, 0.7);
      padding: 4px;
      border-radius: 14px;
      margin-bottom: 20px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      gap: 4px;
    }
    .auth-tab-btn {
      flex: 1;
      padding: 9px 12px;
      background: transparent;
      border: none;
      border-radius: 10px;
      color: #94a3b8;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      font-family: inherit;
    }
    .auth-tab-btn:hover {
      color: #ffffff;
      background: rgba(255, 255, 255, 0.05);
    }
    .auth-tab-btn.active {
      background: #2563eb;
      color: #ffffff;
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    }
    .auth-grid-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }
    @media (max-width: 480px) {
      .auth-grid-2 {
        grid-template-columns: 1fr;
      }
    }
    .auth-switch-box {
      margin-top: 16px;
      font-size: 13px;
      color: #94a3b8;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
    }
    .auth-link-btn {
      background: none;
      border: none;
      color: #60a5fa;
      font-weight: 700;
      cursor: pointer;
      padding: 0;
      font-size: 13px;
      font-family: inherit;
      text-decoration: underline;
      transition: color 0.15s ease;
    }
    .auth-link-btn:hover {
      color: #93c5fd;
    }
    /* Verification Step Box */
    .auth-verify-card {
      background: rgba(30, 41, 59, 0.55);
      border: 1.5px solid rgba(255, 255, 255, 0.1);
      border-radius: 16px;
      padding: 14px 16px;
      margin-bottom: 14px;
      text-align: left;
      transition: all 0.25s ease;
    }
    .auth-verify-card.active-step {
      border-color: rgba(59, 130, 246, 0.5);
      background: rgba(30, 41, 59, 0.85);
      box-shadow: 0 4px 20px rgba(37, 99, 235, 0.15);
    }
    .auth-verify-card.completed-step {
      border-color: rgba(34, 197, 94, 0.4);
      background: rgba(20, 83, 45, 0.15);
    }
    .auth-verify-card.locked {
      opacity: 0.5;
      pointer-events: none;
      filter: grayscale(40%);
    }
    .auth-verify-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 12px;
    }
    .auth-step-circle {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: #2563eb;
      color: #ffffff;
      font-size: 12px;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .auth-verify-card.completed-step .auth-step-circle {
      background: #16a34a;
    }
    .auth-verify-title-wrap {
      flex: 1;
    }
    .auth-verify-title {
      font-size: 13px;
      font-weight: 700;
      color: #f1f5f9;
    }
    .auth-verify-sub {
      font-size: 11px;
      color: #94a3b8;
    }
    .auth-step-status {
      font-size: 10.5px;
      padding: 3px 8px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.08);
      color: #cbd5e1;
      font-weight: 600;
      white-space: nowrap;
    }
    .auth-verify-card.completed-step .auth-step-status {
      background: rgba(34, 197, 94, 0.2);
      color: #4ade80;
    }
    /* Vertical Layout: Full-width Field on top, Full-width Action button below */
    .auth-verify-vertical-group {
      display: flex;
      flex-direction: column;
      gap: 10px;
      width: 100%;
      box-sizing: border-box;
    }
    .auth-field-row {
      width: 100%;
      display: flex;
      position: relative;
    }
    .auth-field-row .auth-input-wrap {
      width: 100%;
      flex: 1;
    }
    .auth-action-row {
      width: 100%;
    }
    .auth-verify-row, .auth-otp-row {
      display: flex;
      gap: 12px;
      align-items: stretch;
      box-sizing: border-box;
      width: 100%;
    }
    .auth-verify-row .auth-input-wrap,
    .auth-otp-row .auth-input-wrap {
      flex: 1 1 auto !important;
      min-width: 0 !important;
      width: auto !important;
    }
    .auth-otp-row {
      margin-top: 12px;
    }
    .auth-country-code {
      position: absolute;
      left: 14px;
      top: 50%;
      transform: translateY(-50%);
      font-weight: 700;
      color: #93c5fd;
      font-size: 14px;
      pointer-events: none;
      z-index: 2;
    }
    .auth-input-phone {
      padding-left: 50px !important;
      font-weight: 600;
      letter-spacing: 0.8px;
      font-size: 14.5px !important;
    }
    .auth-input-otp {
      width: 100% !important;
      box-sizing: border-box !important;
      font-family: monospace;
      font-size: 17px !important;
      font-weight: 800;
      letter-spacing: 6px;
      text-align: center;
      padding: 11px 12px !important;
    }
    .btn-otp-action {
      width: auto !important;
      flex: 0 0 auto !important;
      background: #2563eb;
      color: #ffffff;
      border: none;
      border-radius: 12px;
      padding: 10px 18px;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s ease;
      font-family: inherit;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }
    .btn-otp-action:hover:not(:disabled) {
      background: #1d4ed8;
      transform: translateY(-1px);
    }
    .btn-otp-action:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    /* Full-width OTP Send Button placed below input */
    .btn-otp-full {
      width: 100% !important;
      flex: 1 1 100% !important;
      padding: 11px 16px;
      font-size: 13.5px;
      background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
      box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    }
    .btn-otp-full:hover:not(:disabled) {
      background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
      box-shadow: 0 6px 18px rgba(37, 99, 235, 0.5);
    }
    .btn-otp-verify {
      width: auto !important;
      flex: 0 0 auto !important;
      min-width: 130px !important;
      background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
      box-shadow: 0 4px 12px rgba(22, 163, 74, 0.35);
      padding: 10px 20px !important;
    }
    .btn-otp-verify:hover:not(:disabled) {
      background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
      box-shadow: 0 6px 16px rgba(22, 163, 74, 0.45);
    }
    .auth-cooldown-text {
      font-size: 11.5px;
      color: #f59e0b;
      margin-top: 6px;
      text-align: right;
    }
    .auth-verified-pill {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      background: rgba(34, 197, 94, 0.15);
      border: 1px solid rgba(34, 197, 94, 0.35);
      border-radius: 8px;
      color: #4ade80;
      font-size: 12px;
      font-weight: 700;
      margin-top: 10px;
    }

    /* Navbar Logout Button (Positioned at the very end after Get Free Quote) */
    .nav-user-badge {
      display: inline-flex;
      align-items: center;
      padding: 0;
      background: transparent;
      border: none;
      box-shadow: none;
    }
    .btn-nav-logout {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      height: 36px;
      padding: 0 13px;
      background: #fee2e2;
      border: 1.5px solid #fca5a5;
      color: #b91c1c;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
      flex-shrink: 0;
      box-sizing: border-box;
      box-shadow: 0 1px 3px rgba(185, 28, 28, 0.08);
    }
    .btn-nav-logout:hover {
      background: #fecaca;
      border-color: #f87171;
      color: #991b1b;
      transform: translateY(-1px);
      box-shadow: 0 4px 10px rgba(185, 28, 28, 0.18);
    }
    .btn-nav-logout:active {
      transform: translateY(0);
    }

    /* Floating Inactivity Warning Countdown Toast */
    .inactivity-toast {
      position: fixed;
      bottom: 24px;
      right: 24px;
      z-index: 1000001;
      display: flex;
      align-items: center;
      gap: 12px;
      background: rgba(15, 23, 42, 0.94);
      border: 1.5px solid #f59e0b;
      border-radius: 16px;
      padding: 14px 18px;
      color: #ffffff;
      box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 25px rgba(245, 158, 11, 0.3);
      backdrop-filter: blur(16px);
      animation: toastSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
      max-width: 380px;
    }
    @keyframes toastSlideUp {
      from { transform: translateY(30px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
    .inactivity-toast.hide {
      display: none !important;
    }
    .inactivity-toast-icon {
      font-size: 24px;
    }
    .inactivity-toast-title {
      font-size: 13px;
      font-weight: 700;
      color: #fbbf24;
      margin-bottom: 2px;
    }
    .inactivity-toast-msg {
      font-size: 12px;
      color: #e2e8f0;
      line-height: 1.35;
    }
    .btn-inactivity-stay {
      background: #f59e0b;
      border: none;
      color: #0f172a;
      font-weight: 800;
      font-size: 12px;
      padding: 8px 12px;
      border-radius: 8px;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.2s ease;
    }
    .btn-inactivity-stay:hover {
      background: #d97706;
      color: #ffffff;
    }

    /* ========================================================= */
    /* REAL-TIME PDF UPLOAD & PARSING PRELOADER MODAL STYLES     */
    /* ========================================================= */
    .pdf-progress-overlay {
      position: fixed;
      inset: 0;
      z-index: 1000000;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(7, 13, 29, 0.78);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      padding: 20px;
      transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .pdf-progress-overlay.hide {
      display: none !important;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }
    .pdf-progress-card {
      position: relative;
      width: 100%;
      max-width: 580px;
      background: rgba(15, 23, 42, 0.94);
      border: 1.5px solid rgba(59, 130, 246, 0.35);
      border-radius: 24px;
      padding: 28px;
      color: #ffffff;
      box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 40px rgba(37, 99, 235, 0.25);
      overflow: hidden;
      animation: progCardPop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes progCardPop {
      from { transform: scale(0.92) translateY(20px); opacity: 0; }
      to { transform: scale(1) translateY(0); opacity: 1; }
    }
    .pdf-prog-glow {
      position: absolute;
      top: -100px;
      left: 50%;
      transform: translateX(-50%);
      width: 360px;
      height: 160px;
      background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, rgba(37, 99, 235, 0) 70%);
      filter: blur(35px);
      pointer-events: none;
    }
    .pdf-prog-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 20px;
    }
    .pdf-prog-brand {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .pdf-prog-logo {
      width: 38px;
      height: 38px;
      object-fit: contain;
      background: #ffffff;
      padding: 4px;
      border-radius: 10px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
    .pdf-prog-title {
      font-size: 17px;
      font-weight: 800;
      color: #ffffff;
      line-height: 1.2;
      letter-spacing: -0.2px;
    }
    .pdf-prog-subtitle {
      font-size: 11px;
      font-weight: 600;
      color: #94a3b8;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      margin-top: 2px;
    }
    .pdf-prog-phase-pill {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      background: rgba(37, 99, 235, 0.22);
      border: 1px solid rgba(96, 165, 250, 0.45);
      color: #93c5fd;
      font-size: 11.5px;
      font-weight: 700;
      padding: 5px 12px;
      border-radius: 999px;
      white-space: nowrap;
    }
    .pdf-prog-file-box {
      display: flex;
      align-items: center;
      gap: 12px;
      background: rgba(30, 41, 59, 0.75);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 14px;
      padding: 12px 16px;
      margin-bottom: 16px;
    }
    .pdf-prog-file-icon {
      color: #60a5fa;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .pdf-prog-file-details {
      flex: 1;
      min-width: 0;
    }
    .pdf-prog-fname {
      font-size: 13.5px;
      font-weight: 700;
      color: #f8fafc;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .pdf-prog-fmeta {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11.5px;
      color: #94a3b8;
      margin-top: 2px;
      flex-wrap: wrap;
    }
    .pdf-prog-percent {
      font-size: 22px;
      font-weight: 800;
      color: #38bdf8;
      font-variant-numeric: tabular-nums;
      flex-shrink: 0;
    }
    .pdf-prog-bar-track {
      width: 100%;
      height: 10px;
      background: rgba(255, 255, 255, 0.08);
      border-radius: 999px;
      overflow: hidden;
      margin-bottom: 20px;
      position: relative;
      border: 1px solid rgba(255, 255, 255, 0.05);
    }
    .pdf-prog-bar-fill {
      height: 100%;
      border-radius: 999px;
      background: linear-gradient(90deg, #2563eb 0%, #38bdf8 50%, #10b981 100%);
      transition: width 0.12s ease-out;
      position: relative;
      box-shadow: 0 0 16px rgba(56, 189, 248, 0.5);
    }
    .pdf-prog-bar-shimmer {
      position: absolute;
      inset: 0;
      background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
      animation: progShimmer 1.4s infinite;
      transform: translateX(-100%);
    }
    @keyframes progShimmer {
      100% { transform: translateX(100%); }
    }
    .pdf-prog-metrics-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-bottom: 18px;
    }
    .pdf-metric-card {
      background: rgba(30, 41, 59, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 12px;
      padding: 10px 12px;
      text-align: center;
    }
    .pdf-metric-label {
      font-size: 11px;
      font-weight: 600;
      color: #94a3b8;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 4px;
    }
    .pdf-metric-value {
      font-size: 15px;
      font-weight: 800;
      color: #f8fafc;
      font-variant-numeric: tabular-nums;
    }
    .pdf-metric-value.highlight {
      color: #4ade80;
    }
    .pdf-metric-status {
      font-size: 12px;
      font-weight: 600;
      color: #cbd5e1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: 1.4;
    }
    .pdf-prog-footer {
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      padding-top: 12px;
    }
    .pdf-prog-tip {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 11.5px;
      color: #94a3b8;
      line-height: 1.35;
    }

    /* ========================================================= */
    /* HIERARCHICAL FOLDER/SUBFOLDER TREE & SELECTION FOOTER     */
    /* ========================================================= */
    .gtech-modal-dialog-tree {
      max-width: 620px;
      width: 95%;
      max-height: 88vh;
      display: flex;
      flex-direction: column;
    }

    .modal-search-wrap {
      display: flex;
      align-items: center;
      gap: 10px;
      background: #ffffff;
      border: 1.5px solid var(--line);
      border-radius: 10px;
      padding: 8px 12px;
      margin-bottom: 12px;
      color: var(--ink-500);
      transition: all 0.2s ease;
    }
    .modal-search-wrap:focus-within {
      border-color: var(--brand-500);
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
      color: var(--brand-600);
    }
    .modal-search-wrap input {
      border: none;
      outline: none;
      width: 100%;
      font-size: 13px;
      font-family: inherit;
      color: var(--ink-900);
      background: transparent;
    }
    .modal-search-wrap input::placeholder {
      color: var(--ink-400);
    }
    .btn-clear-search {
      background: none;
      border: none;
      color: var(--ink-400);
      font-size: 13px;
      padding: 2px 6px;
      border-radius: 4px;
    }
    .btn-clear-search:hover {
      color: var(--ink-800);
      background: #e2e8f0;
    }

    .modal-pdf-tree-container {
      max-height: 380px;
      min-height: 260px;
      overflow-y: auto;
      background: #ffffff;
      border: 1.5px solid #e2e8f0;
      border-radius: 12px;
      padding: 10px;
      margin-bottom: 14px;
      scrollbar-width: thin;
      scrollbar-color: #cbd5e1 #ffffff;
    }
    .modal-pdf-tree-container::-webkit-scrollbar {
      width: 6px;
    }
    .modal-pdf-tree-container::-webkit-scrollbar-thumb {
      background: #cbd5e1;
      border-radius: 3px;
    }

    .tree-folder-group {
      margin-bottom: 2px;
    }

    /* Folder Row */
    .tree-folder-row {
      display: flex;
      align-items: center;
      gap: 7px;
      padding: 6px 10px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13.5px;
      font-weight: 600;
      color: #1e293b;
      user-select: none;
      transition: background 0.15s ease, color 0.15s ease;
    }
    .tree-folder-row:hover {
      background: #f1f5f9;
      color: #0f172a;
    }
    .tree-chevron {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 14px;
      font-size: 9px;
      color: #64748b;
      transition: transform 0.2s ease;
    }
    .tree-folder-row.open .tree-chevron {
      transform: rotate(90deg);
    }
    .tree-folder-icon {
      width: 17px;
      height: 17px;
      flex-shrink: 0;
      color: #d97706;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .tree-folder-name {
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .tree-folder-count {
      font-size: 11px;
      font-weight: 600;
      color: #64748b;
      background: #f1f5f9;
      padding: 1px 7px;
      border-radius: 999px;
      flex-shrink: 0;
    }
    .tree-folder-count.has-files {
      color: #1d4ed8;
      background: #dbeafe;
      font-weight: 700;
    }

    /* Folder Sub-Children */
    .tree-children {
      padding-left: 18px;
      border-left: 1.5px dotted #cbd5e1;
      margin-left: 16px;
      margin-top: 2px;
      margin-bottom: 4px;
    }
    .tree-children.collapsed {
      display: none;
    }
    .tree-empty-folder-notice {
      padding: 5px 10px;
      font-size: 11.5px;
      color: #94a3b8;
      font-style: italic;
    }

    /* File Row */
    .tree-file-row {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 10px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 500;
      color: #334155;
      margin: 2px 0;
      border: 1.5px solid transparent;
      transition: all 0.15s ease;
      user-select: none;
    }
    .tree-file-row:hover {
      background: #edf2f7;
      color: #0f172a;
    }
    .tree-file-row.selected {
      background: #eff6ff;
      border-color: #3b82f6;
      color: #1d4ed8;
      font-weight: 700;
      box-shadow: 0 1px 4px rgba(59, 130, 246, 0.15);
    }
    .tree-pdf-icon {
      width: 15px;
      height: 15px;
      flex-shrink: 0;
      color: #ef4444;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .tree-file-name {
      flex: 1;
      min-width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .tree-file-size {
      font-size: 11px;
      font-weight: 600;
      color: #64748b;
      margin-right: 4px;
      flex-shrink: 0;
    }
    .tree-selected-check {
      font-size: 11px;
      font-weight: 800;
      color: #2563eb;
      background: #dbeafe;
      padding: 1px 7px;
      border-radius: 999px;
      display: none;
      flex-shrink: 0;
    }
    .tree-file-row.selected .tree-selected-check {
      display: inline-block;
    }

    .tree-no-search-results {
      padding: 28px 16px;
      text-align: center;
      color: var(--ink-500);
      font-size: 13px;
    }

    /* Modal Sticky Bottom Action Footer */
    .gtech-modal-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      padding: 13px 20px;
      border-top: 1px solid #e2e8f0;
      background: #f8fafc;
      flex-shrink: 0;
      border-bottom-left-radius: 18px;
      border-bottom-right-radius: 18px;
    }
    .modal-footer-selected-wrap {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12.5px;
      color: var(--ink-600);
    }
    .selected-label {
      font-weight: 600;
      color: var(--ink-500);
      white-space: nowrap;
    }
    .selected-val {
      font-weight: 700;
      color: #1e3a8a;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 260px;
    }
    .modal-footer-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-shrink: 0;
    }
    .btn-modal-cancel,
    .btn-modal-select-confirm {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      height: 38px;
      min-width: 120px;
      padding: 0 16px;
      border-radius: 8px;
      font-size: 13.5px;
      font-weight: 600;
      white-space: nowrap;
      cursor: pointer;
      box-sizing: border-box;
      width: auto;
      line-height: 1;
      transition: all 0.2s ease;
    }
    .btn-modal-cancel {
      background: #f1f5f9;
      border: 1px solid #cbd5e1;
      color: var(--ink-700);
    }
    .btn-modal-cancel:hover {
      background: #e2e8f0;
      color: var(--ink-900);
      border-color: #94a3b8;
    }
    .btn-modal-select-confirm {
      background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
      color: #ffffff;
      border: 1px solid transparent;
      gap: 6px;
      box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
    }
    .btn-modal-select-confirm svg {
      flex-shrink: 0;
    }
    .btn-modal-select-confirm span {
      white-space: nowrap;
    }
    .btn-modal-select-confirm:hover:not(:disabled) {
      background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
      transform: translateY(-1px);
      box-shadow: 0 6px 16px rgba(37, 99, 235, 0.38);
    }
    .btn-modal-select-confirm:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      box-shadow: none;
      filter: grayscale(0.5);
    }

/* ==============================================================================
   G TECH SOLUTIONS — ADMIN, PAYMENT & AI SUITE MODERN CSS
   ============================================================================== */

/* ==============================================================================
   HEADER TOGGLE DROPDOWN MENU (AI, ADMIN & LOGOUT)
   ============================================================================== */
.header-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.btn-header-menu-toggle {
  height: 38px;
  padding: 0 10px 0 5px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.btn-header-menu-toggle:hover {
  background: #eff6ff;
  border-color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
.header-menu-wrap.menu-active .btn-header-menu-toggle {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.header-menu-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.25);
  transition: all 0.2s;
}
.btn-header-menu-toggle:hover .header-menu-avatar {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.header-menu-chevron {
  color: #64748b;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s;
}
.header-menu-wrap.menu-active .header-menu-chevron {
  transform: rotate(180deg);
  color: #1d4ed8;
}

/* Dropdown Popover */
.header-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 330px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 10px;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.header-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
@media (max-width: 768px) {
  .header-dropdown-menu {
    top: calc(100% + 8px);
    right: 0;
    width: 310px;
    max-width: calc(100vw - 20px);
    box-sizing: border-box;
  }
}
@media (max-width: 480px) {
  .header-dropdown-menu {
    right: -2px;
    width: min(300px, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
  }
}

/* Dropdown Header Profile */
.dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
}
.dropdown-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}
.dropdown-user-meta {
  flex: 1;
  min-width: 0;
}
.dropdown-user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropdown-user-role {
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dropdown Menu Items */
.dropdown-menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
.dropdown-menu-item:hover {
  transform: translateX(2px);
}

/* Item Profile */
.dropdown-header[role="button"] {
  cursor: pointer;
  transition: all 0.2s ease;
}
.dropdown-header[role="button"]:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}
.dropdown-menu-item.item-profile:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.profile-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 17px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s;
}
.dropdown-menu-item.item-profile:hover .profile-icon-box {
  transform: scale(1.06);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}
.badge-profile {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* Item AI */
.dropdown-menu-item.item-ai:hover {
  background: #faf5ff;
  border-color: #d8b4fe;
}
.ai-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
  transition: transform 0.2s;
}
.dropdown-menu-item.item-ai:hover .ai-icon-box {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.38);
}

/* Item Admin */
.dropdown-menu-item.item-admin:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.admin-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #60a5fa;
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
  transition: transform 0.2s;
}
.dropdown-menu-item.item-admin:hover .admin-icon-box {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
}
.dropdown-menu-item.item-admin:hover .admin-icon-box svg {
  transform: rotate(45deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dropdown-item-info {
  flex: 1;
  min-width: 0;
}
.dropdown-item-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dropdown-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
}
.dropdown-item-desc {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
  line-height: 1.35;
}
.dropdown-pill-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.3;
}
.badge-ai {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}
.badge-admin {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}
.dropdown-item-arrow {
  margin-left: auto;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.2s, color 0.2s;
}
.dropdown-menu-item:hover .dropdown-item-arrow {
  transform: translateX(3px);
  color: #3b82f6;
}

/* Dropdown Footer & Logout Button */
.dropdown-menu-footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}
.btn-dropdown-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1.5px solid #fca5a5;
  border-radius: 12px;
  color: #991b1b;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  text-align: left;
}
.logout-icon-circle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #fca5a5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc2626;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.12);
  transition: all 0.2s;
}
.logout-text-wrap {
  flex: 1;
  min-width: 0;
}
.logout-main-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #991b1b;
  display: block;
  line-height: 1.2;
}
.logout-sub-title {
  font-size: 10.5px;
  font-weight: 500;
  color: #b91c1c;
  opacity: 0.85;
  display: block;
  margin-top: 2px;
}
.logout-arrow-icon {
  margin-left: auto;
  color: #dc2626;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.btn-dropdown-logout:hover {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border-color: #f87171;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.18);
}
.btn-dropdown-logout:hover .logout-icon-circle {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}
.btn-dropdown-logout:hover .logout-arrow-icon {
  transform: translateX(3px);
}
.btn-dropdown-logout:active {
  transform: translateY(0);
}
.btn-nav-ai:hover {
  background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}
.btn-action-ai {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  margin-top: 6px;
}
.btn-action-ai:hover:not(:disabled) {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}
/* Locked until a voter PDF has been loaded & parsed */
.btn-action-ai:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.btn-action-ai:disabled .ai-sparkle-icon {
  filter: grayscale(1);
  opacity: 0.7;
}

/* Modals Overlay Base */
.gtech-custom-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  animation: fadeInModal 0.25s ease;
}
@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal Dialog Glassmorphism */
.admin-modal-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalScaleUp {
  from { transform: scale(0.96) translateY(12px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.admin-modal-header {
  padding: 18px 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.admin-modal-title h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-modal-title p {
  font-size: 12px;
  color: #94a3b8;
  margin: 3px 0 0;
}
.admin-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.admin-modal-close:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
}

/* Tabs Bar */
.admin-tabs-bar {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 16px;
  gap: 8px;
  overflow-x: auto;
}
.admin-tab-btn {
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.admin-tab-btn:hover {
  color: #1e293b;
}
.admin-tab-btn.active {
  color: #059669;
  border-bottom-color: #059669;
  background: #ffffff;
}

.admin-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  background: #fcfdfd;
}

.admin-tab-pane {
  display: none;
}
.admin-tab-pane.active {
  display: block;
}

/* Overview Stat Cards Grid */
.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.admin-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}
.admin-metric-card .metric-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
}
.admin-metric-card .metric-val {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}
.admin-metric-card .metric-val.highlight-green {
  color: #059669;
}
.admin-metric-card .metric-val.highlight-blue {
  color: #2563eb;
}
.metric-status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 6px;
}
.badge-green { background: #dcfce7; color: #15803d; }
.badge-amber { background: #fef3c7; color: #b45309; }

/* Admin Settings Form */
.admin-settings-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}
.admin-section-title {
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-form-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}
.admin-form-group input, .admin-form-group select {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  font-size: 13.5px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s ease;
}
.admin-form-group input:focus, .admin-form-group select:focus {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.admin-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  margin-top: 10px;
}
.admin-toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #059669;
}

.btn-admin-save {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
  transition: all 0.2s ease;
}
.btn-admin-save:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: translateY(-1px);
}

.admin-alert-success {
  background: #ecfdf5;
  border: 1px solid #10b981;
  color: #065f46;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}
.admin-alert-error {
  background: #fef2f2;
  border: 1px solid #ef4444;
  color: #991b1b;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Admin Table Styles */
.admin-table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}
.admin-table th {
  background: #f8fafc;
  padding: 12px 14px;
  font-weight: 800;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
}
.admin-table tr:hover {
  background: #f8fafc;
}
.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}
.role-superadmin { background: #ede9fe; color: #6d28d9; }
.role-admin { background: #dbeafe; color: #1d4ed8; }
.role-user { background: #f1f5f9; color: #475569; }

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.status-active, .status-captured, .status-completed { background: #dcfce7; color: #166534; }
.status-inactive, .status-failed { background: #fee2e2; color: #991b1b; }
.status-created { background: #fef3c7; color: #92400e; }

.table-action-btns {
  display: flex;
  gap: 6px;
}
.btn-sm {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-sm:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.btn-del-user:hover {
  background: #fee2e2;
  border-color: #ef4444;
  color: #dc2626;
}

/* ==============================================================================
   RAZORPAY PAYMENT MODAL STYLES
   ============================================================================== */
.payment-modal-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  text-align: center;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.payment-modal-header {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  padding: 24px 20px;
  position: relative;
}
.payment-modal-header h3 {
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 6px;
  color: #ffffff;
}
.payment-modal-header p {
  font-size: 12.5px;
  opacity: 0.9;
  margin: 0;
}
.payment-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
}
.payment-modal-body {
  padding: 24px 24px 20px;
}
.payment-breakdown-box {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
  text-align: left;
}
.pay-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13.5px;
  color: #475569;
}
.pay-row.total-row {
  border-top: 1.5px solid #e2e8f0;
  padding-top: 12px;
  margin-top: 12px;
  margin-bottom: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}
.pay-total-val {
  color: #059669;
  font-size: 22px;
  font-weight: 800;
}

.btn-pay-rzp {
  width: 100%;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.btn-pay-rzp:hover:not(:disabled) {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}
.btn-pay-rzp:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ==============================================================================
   AI VOTER INTELLIGENCE MODAL STYLES
   ============================================================================== */
.ai-modal-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: modalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-modal-header {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #ffffff;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ai-modal-title h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ai-modal-title p {
  font-size: 12px;
  color: #ddd6fe;
  margin: 3px 0 0;
}
.ai-cohort-row {
  margin-bottom: 12px;
}
.ai-cohort-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-bottom: 4px;
  color: #334155;
}
.ai-cohort-track {
  background: #f1f5f9;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.ai-cohort-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
}

.ai-house-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 8px;
  margin: 4px;
  font-size: 12.5px;
}
.ai-house-cnt {
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

.ai-issue-item {
  background: #ffffff;
  border: 1px solid #fee2e2;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  text-align: left;
}
.ai-issue-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.ai-issue-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fee2e2;
  color: #dc2626;
}
.ai-issue-badge.amber { background: #fef3c7; color: #d97706; }
.ai-issue-body {
  font-size: 12px;
  color: #64748b;
}

.ai-strategy-card {
  background: #fdf4ff;
  border: 1px solid #f0abfc;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  text-align: left;
}
.ai-strategy-card h4 {
  margin: 0 0 6px;
  font-size: 14.5px;
  font-weight: 800;
  color: #86198f;
}
.ai-strategy-card p {
  margin: 0;
  font-size: 13px;
  color: #4a044e;
  line-height: 1.5;
}
.ai-good-state {
  padding: 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

/* ========================================================================= */
/* USER PROFILE MANAGEMENT MODAL STYLES                                      */
/* ========================================================================= */
#userProfileModal {
  z-index: 20000;
}
#userProfileModal:not(.hide),
#userProfileModal.active {
  opacity: 1 !important;
  visibility: visible !important;
  display: flex !important;
}
#userProfileModal:not(.hide) .profile-modal-dialog,
#userProfileModal.active .profile-modal-dialog {
  transform: scale(1) translateY(0) !important;
}
.profile-modal-dialog {
  max-width: 580px;
  width: 95%;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-sizing: border-box;
}
.profile-modal-header {
  padding: 18px 24px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
}
.profile-modal-header h3 {
  color: #ffffff;
  font-size: 16.5px;
  font-weight: 800;
  margin: 0 0 4px;
}
.profile-modal-header p {
  color: #94a3b8;
  font-size: 12px;
  margin: 0;
}
.profile-modal-header .gtech-modal-close {
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.15);
}
.profile-modal-header .gtech-modal-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.profile-modal-body {
  padding: 22px 24px;
  max-height: calc(85vh - 140px);
  overflow-y: auto;
  box-sizing: border-box;
}

/* Profile Hero Card */
.profile-hero-card {
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 20px;
}
.profile-avatar-section {
  display: flex;
  align-items: center;
  gap: 18px;
}
.profile-avatar-preview-wrap {
  position: relative;
  width: 74px;
  height: 74px;
  flex-shrink: 0;
}
.profile-avatar-preview {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #1e293b 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
  border: 3px solid #ffffff;
  overflow: hidden;
}
.profile-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.profile-avatar-upload-btn {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
  border: 2px solid #ffffff;
  transition: all 0.2s ease;
}
.profile-avatar-upload-btn:hover {
  background: #1d4ed8;
  transform: scale(1.1);
}
.profile-hero-meta {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.profile-hero-name {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}
.profile-hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  flex-wrap: wrap;
}
.profile-role-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}
.profile-status-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.profile-hero-sub {
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.profile-avatar-presets-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}
.profile-preset-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.btn-clear-avatar {
  background: none;
  border: none;
  color: #ef4444;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  width: auto;
}
.profile-avatar-preset-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-avatar-preset {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}
.btn-avatar-preset:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}
.btn-avatar-preset.active {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  transform: scale(1.08);
}

/* Alert Notification Box */
.profile-alert-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.4;
  text-align: left;
}
.profile-alert-box.alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.profile-alert-box.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* Form Fields */
.profile-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 520px) {
  .profile-form-grid {
    grid-template-columns: 1fr;
  }
}
.profile-form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}
.profile-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}
.profile-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-size: 13.5px;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.profile-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.profile-phone-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.profile-phone-prefix {
  position: absolute;
  left: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  pointer-events: none;
}
.profile-phone-input {
  padding-left: 44px !important;
  letter-spacing: 0.5px;
}
.profile-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.btn-toggle-pwd-view {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  color: #64748b;
  width: auto;
}

/* Password Collapsible Section */
.profile-password-section {
  margin-top: 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
}
.btn-toggle-password-section {
  width: 100%;
  padding: 12px 16px;
  background: #f8fafc;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  color: #1e293b;
  transition: background 0.2s;
}
.btn-toggle-password-section:hover {
  background: #f1f5f9;
}
.toggle-pass-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2563eb;
}
.toggle-pass-arrow {
  font-size: 10px;
  color: #64748b;
  transition: transform 0.2s ease;
}
.btn-toggle-password-section.open .toggle-pass-arrow {
  transform: rotate(180deg);
}
.profile-password-fields {
  padding: 16px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

/* Footer & Buttons */
.profile-modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.btn-save-profile {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 10px 22px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
  width: auto;
}
.btn-save-profile:hover:not(:disabled) {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45);
}
.btn-save-profile:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-save-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spinProfile 0.7s linear infinite;
}
@keyframes spinProfile {
  to { transform: rotate(360deg); }
}



