:root {
      --bg-darkest: #070d19;
      --bg-main: #0c1427;
      --bg-card: #121c33;
      --bg-card-hover: #182544;
      --bg-input: #17233e;
      --bg-glass: rgba(18, 28, 51, 0.75);

      --border-subtle: #1e2f50;
      --border-medium: #2a416d;
      --border-focus: #0ea5e9;

      --text-primary: #f8fafc;
      --text-secondary: #94a3b8;
      --text-muted: #64748b;

      /* Dental & Clinical Accent Palette */
      --cyan-bright: #06b6d4;
      --cyan-glow: rgba(6, 182, 212, 0.18);
      --teal-primary: #0ea5e9;
      --emerald-green: #10b981;
      --emerald-glow: rgba(16, 185, 129, 0.15);
      --amber-warn: #f59e0b;
      --amber-glow: rgba(245, 158, 11, 0.15);
      --rose-danger: #f43f5e;
      --rose-glow: rgba(244, 63, 94, 0.15);
      --indigo-accent: #6366f1;

      --radius-sm: 6px;
      --radius-md: 10px;
      --radius-lg: 14px;
      --radius-xl: 20px;

      --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.35);
      --shadow-card: 0 10px 30px -10px rgba(7, 13, 25, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.05);
      --shadow-glow: 0 0 25px rgba(14, 165, 233, 0.25);

      --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
      --font-mono: 'JetBrains Mono', monospace;
    }

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

    body {
      background-color: #070e1c;
      background-image: 
        /* Medical ambient lighting glows */
        radial-gradient(ellipse at 15% 10%, rgba(14, 165, 233, 0.15) 0px, transparent 55%),
        radial-gradient(ellipse at 85% 15%, rgba(6, 182, 212, 0.10) 0px, transparent 50%),
        radial-gradient(ellipse at 50% 95%, rgba(16, 185, 129, 0.07) 0px, transparent 55%),
        /* Clinical Precision Charting Grid (Dental Blueprint Texture) */
        linear-gradient(to right, rgba(56, 189, 248, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(56, 189, 248, 0.03) 1px, transparent 1px);
      background-size: 100% 100%, 100% 100%, 100% 100%, 32px 32px, 32px 32px;
      background-attachment: fixed;
      color: var(--text-primary);
      font-family: var(--font-sans);
      line-height: 1.5;
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
    }

    /* Top Navigation Header */
    header {
      background: rgba(12, 20, 39, 0.85);
      backdrop-filter: blur(14px);
      border-bottom: 1px solid var(--border-subtle);
      position: sticky;
      top: 0;
      z-index: 50;
    }

    .nav-container {
      max-width: min(97vw, 2560px);
      margin: 0 auto;
      padding: 0.6rem 1.5rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .brand-group {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      text-decoration: none;
    }

    .brand-mark {
      width: 34px;
      height: 34px;
      border-radius: var(--radius-md);
      background: linear-gradient(135deg, #0ea5e9, #06b6d4 80%);
      box-shadow: 0 0 16px rgba(14, 165, 233, 0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      position: relative;
    }

    .brand-mark::after {
      content: '';
      position: absolute;
      inset: -1px;
      border-radius: var(--radius-md);
      border: 1px solid rgba(255, 255, 255, 0.3);
      pointer-events: none;
    }

    .brand-titles h1 {
      font-size: 1.05rem;
      font-weight: 800;
      letter-spacing: -0.02em;
      color: #fff;
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

    .brand-titles h1 span.highlight {
      background: linear-gradient(135deg, #38bdf8, #22d3ee);
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .brand-tag {
      font-size: 0.65rem;
      color: var(--text-secondary);
      font-weight: 500;
      letter-spacing: 0.03em;
    }

    .header-system-meta {
      display: flex;
      align-items: center;
      gap: 0.85rem;
    }

    .meta-chip {
      background: rgba(23, 35, 62, 0.8);
      border: 1px solid var(--border-subtle);
      border-radius: 9999px;
      padding: 0.25rem 0.65rem;
      font-size: 0.7rem;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      gap: 0.4rem;
    }

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

    @keyframes pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.5; transform: scale(0.85); }
    }

    /* Main Container - Expands responsively from 16-inch up to 34-inch ultrawide screens */
    main {
      width: 100%;
      max-width: min(97vw, 2560px);
      margin: 0 auto;
      padding: 1.25rem 1.5rem 4rem;
    }

    /* Verification Badge Header Hero */
    .hero-section {
      margin-bottom: 1.15rem;
      display: flex;
      flex-wrap: wrap;
      align-items: flex-end;
      justify-content: space-between;
      gap: 1rem;
    }

    .hero-lead {
      max-width: 780px;
    }

    .verification-kicker {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      background: rgba(14, 165, 233, 0.12);
      border: 1px solid rgba(14, 165, 233, 0.35);
      color: #38bdf8;
      font-size: 0.68rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      padding: 0.2rem 0.55rem;
      border-radius: 9999px;
      margin-bottom: 0.5rem;
    }

    .hero-lead h2 {
      font-size: 1.15rem;
      font-weight: 800;
      letter-spacing: -0.02em;
      line-height: 1.25;
      color: #fff;
      margin-bottom: 0.3rem;
    }

    .hero-lead p {
      color: var(--text-secondary);
      font-size: 0.75rem;
      line-height: 1.45;
    }

    .hero-actions {
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .btn-sample {
      background: rgba(23, 35, 62, 0.7);
      border: 1px solid var(--border-medium);
      color: #38bdf8;
      font-size: 0.72rem;
      font-weight: 600;
      padding: 0.35rem 0.7rem;
      border-radius: var(--radius-md);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      transition: all 0.2s;
    }

    .btn-sample:hover {
      background: rgba(14, 165, 233, 0.15);
      border-color: var(--teal-primary);
      transform: translateY(-1px);
    }

    /* Workspace Grid - Compact Spacing */
    .workspace-layout {
      display: flex;
      flex-direction: column;
      gap: 1.15rem;
    }

    /* Cards */
    .ui-panel {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow-card);
      position: relative;
      overflow: hidden;
    }

    .panel-header-accent {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(90deg, #0ea5e9, #06b6d4, #10b981);
    }

    /* Verification Form Card - Compact */
    .verification-form-box {
      padding: 0.95rem 1.15rem;
    }

    .step-header {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      margin-bottom: 0.75rem;
    }

    .step-pill {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: var(--teal-primary);
      color: white;
      font-size: 0.68rem;
      font-weight: 800;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .step-title {
      font-size: 0.85rem;
      font-weight: 700;
      color: #fff;
    }

    .step-desc {
      font-size: 0.72rem;
      color: var(--text-muted);
    }

    /* Dropzone Upload - Compact */
    .dropzone-field {
      border: 2px dashed var(--border-medium);
      border-radius: var(--radius-md);
      background: rgba(15, 23, 42, 0.45);
      padding: 0.85rem 1rem;
      text-align: center;
      cursor: pointer;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      position: relative;
    }

    .dropzone-field:hover, .dropzone-field.dragover {
      border-color: var(--teal-primary);
      background: rgba(14, 165, 233, 0.06);
      box-shadow: inset 0 0 20px rgba(14, 165, 233, 0.1);
    }

    .drop-illustration {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: rgba(14, 165, 233, 0.12);
      border: 1px solid rgba(14, 165, 233, 0.25);
      color: var(--teal-primary);
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 0.5rem;
      transition: transform 0.2s;
    }

    .dropzone-field:hover .drop-illustration {
      transform: scale(1.08);
      background: rgba(14, 165, 233, 0.2);
    }

    .drop-heading {
      font-size: 0.88rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 0.25rem;
    }

    .drop-subheading {
      font-size: 0.72rem;
      color: var(--text-muted);
      max-width: 480px;
      margin: 0 auto;
    }

    .file-input-hidden {
      display: none;
    }

    /* File Attached Banner */
    .file-attached-card {
      display: none;
      align-items: center;
      justify-content: space-between;
      background: rgba(23, 35, 62, 0.9);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      padding: 1rem 1.25rem;
      margin-top: 1.25rem;
    }

    .file-attached-card.active {
      display: flex;
    }

    /* Multi-file Container */
    .files-list-container {
      display: none;
      flex-direction: column;
      gap: 0.75rem;
      margin-top: 1.25rem;
    }

    .files-list-container.active {
      display: flex;
    }

    .files-list-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0.25rem 0.2rem;
    }

    .files-count-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--teal-primary);
      background: rgba(14, 165, 233, 0.12);
      border: 1px solid rgba(14, 165, 233, 0.25);
      padding: 0.2rem 0.6rem;
      border-radius: 999px;
    }

    .btn-add-more-files {
      background: transparent;
      border: 1px dashed rgba(14, 165, 233, 0.4);
      color: var(--teal-primary);
      padding: 0.25rem 0.65rem;
      border-radius: var(--radius-sm);
      font-size: 0.72rem;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      transition: all 0.2s;
    }

    .btn-add-more-files:hover {
      background: rgba(14, 165, 233, 0.15);
      border-color: var(--teal-primary);
      color: #fff;
    }

    .files-items-grid {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }

    .file-item-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: rgba(23, 35, 62, 0.85);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      padding: 0.5rem 0.75rem;
      transition: all 0.2s;
    }

    .file-item-row:hover {
      border-color: rgba(14, 165, 233, 0.4);
      background: rgba(23, 35, 62, 0.98);
    }

    .file-item-left {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      min-width: 0;
    }

    .file-item-badge {
      width: 30px;
      height: 30px;
      border-radius: var(--radius-sm);
      background: rgba(14, 165, 233, 0.15);
      border: 1px solid rgba(14, 165, 233, 0.3);
      color: var(--teal-primary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 0.68rem;
      font-family: var(--font-mono);
      flex-shrink: 0;
    }

    .file-item-info {
      min-width: 0;
    }

    .file-item-name {
      font-size: 0.78rem;
      font-weight: 600;
      color: #fff;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 420px;
    }

    .file-item-meta {
      font-size: 0.68rem;
      color: var(--text-secondary);
      font-family: var(--font-mono);
    }

    .file-preview-left {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }

    .file-doc-icon {
      width: 32px;
      height: 32px;
      border-radius: var(--radius-sm);
      background: rgba(14, 165, 233, 0.15);
      border: 1px solid rgba(14, 165, 233, 0.3);
      color: var(--teal-primary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 0.68rem;
      font-family: var(--font-mono);
    }

    .file-doc-details h4 {
      font-size: 0.8rem;
      font-weight: 600;
      color: #fff;
    }

    .file-doc-details span {
      font-size: 0.7rem;
      color: var(--text-secondary);
      font-family: var(--font-mono);
    }

    .btn-icon-danger {
      background: rgba(244, 63, 94, 0.1);
      border: 1px solid rgba(244, 63, 94, 0.2);
      color: #fda4af;
      padding: 0.35rem;
      border-radius: var(--radius-sm);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
    }

    .btn-icon-danger:hover {
      background: var(--rose-danger);
      color: white;
    }

    /* Patient Matching Inputs (Optional) */
    .patient-optional-inputs-box {
      margin-top: 1rem;
      padding: 0.85rem 1rem;
      background: rgba(18, 28, 51, 0.5);
      border: 1px dashed var(--border-medium);
      border-radius: var(--radius-md);
    }

    .patient-inputs-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.85rem;
    }

    @media (max-width: 640px) {
      .patient-inputs-row {
        grid-template-columns: 1fr;
      }
    }

    .patient-input-field label {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-size: 0.73rem;
      font-weight: 700;
      color: var(--teal-primary);
      margin-bottom: 0.35rem;
    }

    .patient-input-field .input-opt-tag {
      font-size: 0.68rem;
      color: var(--text-muted);
      font-weight: 500;
    }

    .patient-input-field input {
      width: 100%;
      background: rgba(13, 21, 38, 0.85);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-sm);
      padding: 0.45rem 0.75rem;
      font-size: 0.82rem;
      color: #fff;
      font-family: var(--font-sans);
      transition: all 0.2s;
    }

    .patient-input-field input:focus {
      outline: none;
      border-color: var(--teal-primary);
      box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
    }

    /* Network Preference Options */
    .network-tier-block {
      margin-top: 1.25rem;
    }

    .tier-cards-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 0.75rem;
      margin-top: 0.65rem;
    }

    .tier-card {
      position: relative;
    }

    .tier-card input[type="radio"] {
      position: absolute;
      opacity: 0;
      inset: 0;
      cursor: pointer;
      z-index: 2;
    }

    .tier-card-inner {
      background: rgba(23, 35, 62, 0.5);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 0.75rem 0.95rem;
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .tier-card input[type="radio"]:checked + .tier-card-inner {
      background: rgba(14, 165, 233, 0.1);
      border-color: var(--teal-primary);
      box-shadow: 0 0 0 1px var(--teal-primary), 0 4px 16px rgba(14, 165, 233, 0.2);
    }

    .tier-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 0.3rem;
    }

    .tier-name {
      font-size: 0.82rem;
      font-weight: 700;
      color: #fff;
    }

    .tier-check-circle {
      width: 15px;
      height: 15px;
      border-radius: 50%;
      border: 2px solid var(--text-muted);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }

    .tier-card input[type="radio"]:checked + .tier-card-inner .tier-check-circle {
      border-color: var(--teal-primary);
      background: var(--teal-primary);
    }

    .tier-check-circle::after {
      content: '';
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: #fff;
      display: none;
    }

    .tier-card input[type="radio"]:checked + .tier-card-inner .tier-check-circle::after {
      display: block;
    }

    .tier-desc {
      font-size: 0.72rem;
      color: var(--text-secondary);
      line-height: 1.35;
    }

    /* Actions Bottom */
    .form-cta-bar {
      margin-top: 1.25rem;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding-top: 1.15rem;
      border-top: 1px solid var(--border-subtle);
    }

    .btn-verify-primary {
      background: linear-gradient(135deg, #0ea5e9, #0284c7);
      color: white;
      border: none;
      padding: 0.6rem 1.45rem;
      border-radius: var(--radius-md);
      font-size: 0.84rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
    }

    .btn-verify-primary:hover:not(:disabled) {
      background: linear-gradient(135deg, #38bdf8, #0ea5e9);
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
    }

    .btn-verify-primary:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      transform: none;
    }

    .compliance-stamp {
      display: flex;
      align-items: center;
      gap: 0.45rem;
      font-size: 0.7rem;
      color: var(--text-muted);
    }

    .compliance-stamp svg {
      color: var(--emerald-green);
    }

    /* Loading Progress Indicator */
    .auditor-loading {
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 3.5rem 1.5rem;
      text-align: center;
    }

    .auditor-loading.active {
      display: flex;
    }

    .sonar-emitter {
      position: relative;
      width: 72px;
      height: 72px;
      margin-bottom: 1.5rem;
    }

    .sonar-circle {
      position: absolute;
      inset: 0;
      border-radius: 50%;
      border: 3px solid rgba(14, 165, 233, 0.2);
      border-top-color: var(--teal-primary);
      animation: spin 1s linear infinite;
    }

    .sonar-inner {
      position: absolute;
      inset: 12px;
      background: rgba(14, 165, 233, 0.15);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--teal-primary);
    }

    .loading-head {
      font-size: 1.25rem;
      font-weight: 800;
      color: #fff;
      margin-bottom: 0.45rem;
    }

    .loading-ticker {
      font-size: 0.85rem;
      color: var(--cyan-bright);
      font-family: var(--font-mono);
      min-height: 1.5rem;
    }

    /* Alert Banner */
    .ui-alert-error {
      display: none;
      background: var(--rose-glow);
      border: 1px solid rgba(244, 63, 94, 0.35);
      color: #fecdd3;
      padding: 1rem 1.25rem;
      border-radius: var(--radius-md);
      margin-top: 1.5rem;
      font-size: 0.9rem;
      align-items: flex-start;
      gap: 0.75rem;
    }

    .ui-alert-error.active {
      display: flex;
    }

    /* ========================================= */
    /* VERIFICATION REPORT DASHBOARD (RESULTS) */
    /* ========================================= */
    .report-dashboard {
      display: none;
      animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .report-dashboard.active {
      display: block;
    }

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

    /* Patient / Policy Status Banner - Compact */
    .policy-hero-card {
      background: linear-gradient(135deg, rgba(23, 35, 62, 0.9) 0%, rgba(14, 23, 44, 0.95) 100%);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-lg);
      padding: 0.85rem 1.15rem;
      margin-bottom: 0.95rem;
      box-shadow: var(--shadow-card);
    }

    .policy-banner-top {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.65rem;
      padding-bottom: 0.65rem;
      border-bottom: 1px solid var(--border-subtle);
    }

    .carrier-title-group {
      display: flex;
      align-items: center;
      gap: 0.65rem;
    }

    .carrier-badge-icon {
      width: 30px;
      height: 30px;
      border-radius: var(--radius-md);
      background: rgba(14, 165, 233, 0.15);
      border: 1px solid rgba(14, 165, 233, 0.3);
      color: var(--teal-primary);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .carrier-title-group h2 {
      font-size: 1.05rem;
      font-weight: 800;
      letter-spacing: -0.02em;
      color: #fff;
    }

    .policy-meta-sub {
      display: flex;
      align-items: center;
      gap: 0.65rem;
      font-size: 0.72rem;
      color: var(--text-secondary);
      margin-top: 0.15rem;
    }

    .network-indicator-pill {
      font-size: 0.7rem;
      font-weight: 800;
      padding: 0.2rem 0.65rem;
      border-radius: 9999px;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
    }

    .network-indicator-pill.in-network {
      background: rgba(16, 185, 129, 0.15);
      border: 1px solid var(--emerald-green);
      color: #34d399;
    }

    .network-indicator-pill.out-network {
      background: rgba(245, 158, 11, 0.15);
      border: 1px solid var(--amber-warn);
      color: #fbbf24;
    }

    .banner-quick-actions {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.45rem;
    }

    .btn-action-excel {
      background: linear-gradient(135deg, #0284c7, #0369a1);
      color: white;
      border: 1px solid rgba(56, 189, 248, 0.4);
      padding: 0.38rem 0.75rem;
      border-radius: var(--radius-md);
      font-size: 0.73rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
      transition: all 0.2s;
    }

    .btn-action-excel:hover {
      background: linear-gradient(135deg, #38bdf8, #0284c7);
      transform: translateY(-1px);
      box-shadow: 0 5px 14px rgba(2, 132, 199, 0.35);
    }

    .btn-action-pms {
      background: linear-gradient(135deg, #10b981, #059669);
      color: white;
      border: none;
      padding: 0.38rem 0.75rem;
      border-radius: var(--radius-md);
      font-size: 0.73rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
      transition: all 0.2s;
    }

    .btn-action-pms:hover {
      background: linear-gradient(135deg, #34d399, #10b981);
      transform: translateY(-1px);
      box-shadow: 0 5px 14px rgba(16, 185, 129, 0.35);
    }

    .btn-action-ghost {
      background: rgba(23, 35, 62, 0.8);
      border: 1px solid var(--border-medium);
      color: var(--text-primary);
      padding: 0.38rem 0.75rem;
      border-radius: var(--radius-md);
      font-size: 0.73rem;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      transition: all 0.2s;
    }

    .btn-action-ghost:hover {
      background: var(--bg-card-hover);
      border-color: var(--teal-primary);
    }

    /* Compact Policy Details Grid in Hero Card */
    .policy-details-compact-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 0.55rem;
      margin-top: 0.75rem;
      padding-top: 0.75rem;
      border-top: 1px solid var(--border-subtle);
    }

    @media (max-width: 1100px) {
      .policy-details-compact-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    @media (max-width: 600px) {
      .policy-details-compact-grid {
        grid-template-columns: 1fr;
      }
    }

    .policy-detail-cell {
      background: rgba(15, 23, 42, 0.65);
      border: 1px solid rgba(56, 189, 248, 0.12);
      border-radius: var(--radius-md);
      padding: 0.5rem 0.7rem;
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 0.2rem;
      min-width: 0;
      transition: all 0.2s;
    }

    .policy-detail-cell:hover {
      border-color: rgba(56, 189, 248, 0.3);
      background: rgba(15, 23, 42, 0.85);
    }

    .policy-cell-label {
      font-size: 0.65rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: #94a3b8;
    }

    .policy-cell-value-group {
      display: flex;
      flex-direction: column;
      gap: 0.15rem;
      min-width: 0;
    }

    .policy-cell-value {
      font-size: 0.84rem;
      font-weight: 600;
      color: #f1f5f9;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .policy-cell-value.bold {
      font-weight: 700;
    }

    .policy-cell-value.text-highlight {
      color: #38bdf8;
    }

    .policy-cell-sub {
      font-size: 0.7rem;
      color: #94a3b8;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* Policy Status Pill (Active / Termed) */
    .policy-status-pill {
      font-size: 0.64rem;
      font-weight: 800;
      padding: 1px 7px;
      border-radius: 4px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
    }

    .policy-status-pill.active {
      background: rgba(16, 185, 129, 0.15);
      border: 1px solid rgba(16, 185, 129, 0.4);
      color: #34d399;
    }

    .policy-status-pill.termed {
      background: rgba(244, 63, 94, 0.18);
      border: 1px solid rgba(244, 63, 94, 0.45);
      color: #fda4af;
    }

    /* Financial Meters Grid - 3 Top Columns with Full-Width Scope Below */
    .financials-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.65rem;
      margin-top: 0.85rem;
    }

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

    .financial-card {
      background: rgba(18, 28, 51, 0.65);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 0.65rem 0.85rem;
      position: relative;
    }

    .financial-card.scope-card-full {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 0.5rem;
      padding: 0.5rem 0.85rem;
      background: rgba(15, 23, 42, 0.75);
      border: 1px solid rgba(56, 189, 248, 0.25);
    }

    .financial-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 0.25rem;
    }

    .financial-label {
      font-size: 0.65rem;
      font-weight: 700;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }

    .financial-amount {
      font-size: 1.05rem;
      font-weight: 800;
      color: #fff;
      font-family: var(--font-mono);
      letter-spacing: -0.02em;
      margin-bottom: 0.15rem;
    }

    .meter-progress-track {
      width: 100%;
      height: 4px;
      background: rgba(255, 255, 255, 0.08);
      border-radius: 9999px;
      overflow: hidden;
      margin: 0.35rem 0 0.25rem;
    }

    .meter-progress-bar {
      height: 100%;
      border-radius: 9999px;
      transition: width 0.6s ease;
    }

    .meter-progress-bar.emerald { background: linear-gradient(90deg, #10b981, #34d399); }
    .meter-progress-bar.amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
    .meter-progress-bar.cyan { background: linear-gradient(90deg, #0284c7, #38bdf8); }

    .financial-sub-text {
      font-size: 0.68rem;
      color: var(--text-muted);
      display: flex;
      justify-content: space-between;
    }

    /* Policy Rules Pills Row */
    .policy-rules-row {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
      margin-bottom: 1.75rem;
    }

    .rule-chip {
      background: rgba(23, 35, 62, 0.85);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 0.55rem 0.95rem;
      display: flex;
      align-items: center;
      gap: 0.6rem;
      font-size: 0.825rem;
    }

    .rule-status-circle {
      width: 8px;
      height: 8px;
      border-radius: 50%;
    }

    .rule-status-circle.good {
      background: var(--emerald-green);
      box-shadow: 0 0 8px var(--emerald-green);
    }

    .rule-status-circle.warn {
      background: var(--amber-warn);
      box-shadow: 0 0 8px var(--amber-warn);
    }

    .rule-status-circle.neutral {
      background: var(--text-muted);
    }

    /* Category Benefit Percentages Grid - Compact & Excel Categorization */
    .category-matrix-card {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-lg);
      padding: 0.85rem 1.15rem;
      margin-bottom: 0.95rem;
      box-shadow: var(--shadow-card);
    }

    .matrix-heading {
      font-size: 0.84rem;
      font-weight: 700;
      color: #fff;
      display: flex;
      align-items: center;
      gap: 0.4rem;
      margin-bottom: 0.65rem;
    }

    .category-cards-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
      gap: 0.5rem;
    }

    .category-box {
      background: rgba(23, 35, 62, 0.6);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      padding: 0.55rem 0.5rem;
      text-align: center;
      transition: all 0.15s;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      word-break: break-word !important;
      overflow-wrap: anywhere !important;
      white-space: normal !important;
    }

    .category-box:hover {
      background: rgba(23, 35, 62, 0.95);
      border-color: var(--border-medium);
      transform: translateY(-1px);
    }

    .category-code-tag {
      font-size: 0.6rem;
      font-weight: 800;
      color: var(--teal-primary);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 0.15rem;
      word-break: break-word;
      overflow-wrap: anywhere;
    }

    .category-name-text {
      font-size: 0.68rem;
      font-weight: 600;
      color: var(--text-secondary);
      margin-bottom: 0.2rem;
      line-height: 1.2;
      word-break: break-word;
      overflow-wrap: anywhere;
    }

    .category-percentage-num {
      font-size: 1.05rem;
      font-weight: 800;
      color: #fff;
      font-family: var(--font-mono);
      margin: 0.05rem 0;
      word-break: break-word;
      overflow-wrap: anywhere;
    }

    .category-sub-note {
      font-size: 0.62rem;
      color: var(--text-muted);
      font-weight: 600;
      margin-top: 0.15rem;
      word-break: break-word;
      overflow-wrap: anywhere;
    }

    /* Color category card borders */
    .cat-card-emerald { border-color: rgba(16, 185, 129, 0.35); }
    .cat-card-emerald .category-percentage-num { color: #34d399; }
    .cat-card-cyan { border-color: rgba(14, 165, 233, 0.35); }
    .cat-card-cyan .category-percentage-num { color: #38bdf8; }
    .cat-card-indigo { border-color: rgba(99, 102, 241, 0.35); }
    .cat-card-indigo .category-percentage-num { color: #818cf8; }
    .cat-card-purple { border-color: rgba(168, 85, 247, 0.35); }
    .cat-card-purple .category-percentage-num { color: #c084fc; }
    .cat-card-amber { border-color: rgba(245, 158, 11, 0.35); }
    .cat-card-amber .category-percentage-num { color: #fbbf24; }
    .cat-card-rose { border-color: rgba(244, 63, 94, 0.35); }
    .cat-card-rose .category-percentage-num { color: #fda4af; }
    .cat-card-neutral { border-color: var(--border-subtle); }

    .category-box {
      position: relative;
      transition: all 0.18s ease;
    }
    .category-box:hover {
      border-color: rgba(56, 189, 248, 0.65);
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    }
    .category-box .card-edit-trigger {
      position: absolute;
      top: 5px;
      right: 5px;
      opacity: 0;
      transition: opacity 0.15s ease;
      background: rgba(15, 23, 42, 0.85);
      border: 1px solid rgba(148, 163, 184, 0.3);
      color: #cbd5e1;
      border-radius: 4px;
      padding: 1px 5px;
      font-size: 0.65rem;
      cursor: pointer;
    }
    .category-box:hover .card-edit-trigger {
      opacity: 1;
    }
    .category-box .card-edit-trigger:hover {
      color: #38bdf8;
      border-color: #38bdf8;
    }

    /* Procedure Codes Table Card - Compact */
    .codes-table-panel {
      background: var(--bg-card);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-lg);
      padding: 0.85rem 1.15rem;
      box-shadow: var(--shadow-card);
    }

    .table-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.65rem;
      margin-bottom: 0.75rem;
    }

    .toolbar-left {
      display: flex;
      align-items: center;
      gap: 0.55rem;
    }

    .codes-count-pill {
      background: rgba(14, 165, 233, 0.15);
      border: 1px solid rgba(14, 165, 233, 0.3);
      color: var(--cyan-bright);
      font-size: 0.66rem;
      font-weight: 700;
      padding: 0.15rem 0.45rem;
      border-radius: 9999px;
    }

    .search-input-container {
      position: relative;
      min-width: 220px;
      max-width: 340px;
      flex: 1;
    }

    .search-input-container svg {
      position: absolute;
      left: 0.75rem;
      top: 50%;
      transform: translateY(-50%);
      color: var(--text-muted);
    }

    .table-search-input {
      width: 100%;
      background: var(--bg-input);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      padding: 0.38rem 0.75rem 0.38rem 2.1rem;
      color: #fff;
      font-size: 0.75rem;
      font-family: var(--font-sans);
      outline: none;
      transition: all 0.2s;
    }

    .table-search-input:focus {
      border-color: var(--teal-primary);
      box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
    }

    .table-filter-chips {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 0.35rem;
    }

    .filter-chip {
      background: var(--bg-input);
      border: 1px solid var(--border-subtle);
      color: var(--text-secondary);
      padding: 0.22rem 0.6rem;
      border-radius: 9999px;
      font-size: 0.68rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s;
    }

    .filter-chip.active, .filter-chip:hover {
      background: var(--teal-primary);
      color: white;
      border-color: var(--teal-primary);
    }

    /* Table Component - Natural Auto-Height (Depends entirely on content) */
    .table-responsive-box {
      overflow-x: auto;
      overflow-y: visible;
      height: auto;
      max-height: none !important;
      border-radius: var(--radius-md);
      border: 1px solid var(--border-subtle);
      background: rgba(12, 20, 39, 0.6);
      width: 100%;
    }

    /* Custom sleek scrollbar for natural vertical scrolling */
    .table-responsive-box::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }

    .table-responsive-box::-webkit-scrollbar-track {
      background: rgba(12, 20, 39, 0.8);
      border-radius: 9999px;
    }

    .table-responsive-box::-webkit-scrollbar-thumb {
      background: rgba(56, 189, 248, 0.35);
      border-radius: 9999px;
    }

    .table-responsive-box::-webkit-scrollbar-thumb:hover {
      background: rgba(56, 189, 248, 0.6);
    }

    table.cdt-data-table {
      width: 100%;
      min-width: 1000px;
      border-collapse: separate;
      border-spacing: 0;
      text-align: left;
      font-size: 0.70rem;
    }

    table.cdt-data-table thead {
      position: sticky;
      top: 0;
      z-index: 10;
      background: #090f1d;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    table.cdt-data-table th {
      position: sticky;
      top: 0;
      z-index: 10;
      background: #090f1d;
      padding: 0.38rem 0.45rem;
      color: var(--text-secondary);
      font-weight: 700;
      font-size: 0.62rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      border-bottom: 2px solid var(--border-medium);
      white-space: nowrap;
    }

    table.cdt-data-table tbody tr {
      border-bottom: 1px solid rgba(30, 47, 80, 0.45);
      transition: background-color 0.12s;
    }

    table.cdt-data-table tbody tr:hover {
      background-color: rgba(24, 37, 68, 0.7);
    }

    table.cdt-data-table td {
      padding: 0.35rem 0.45rem;
      color: var(--text-primary);
      vertical-align: middle;
      font-size: 0.70rem;
      word-break: normal !important;
      overflow-wrap: normal !important;
    }

    .category-header-row td {
      position: sticky;
      top: 32px;
      z-index: 8;
      backdrop-filter: blur(8px);
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    }

    /* Column Specific Compact Proportions for 14"-16" Full-Fit */
    table.cdt-data-table th:nth-child(1),
    table.cdt-data-table td:nth-child(1) {
      white-space: nowrap;
      min-width: 72px;
      width: 72px;
    }

    table.cdt-data-table th:nth-child(2),
    table.cdt-data-table td:nth-child(2) {
      min-width: 170px;
    }

    table.cdt-data-table th:nth-child(3),
    table.cdt-data-table td:nth-child(3) {
      white-space: nowrap;
      min-width: 65px;
      width: 65px;
      text-align: center;
    }

    table.cdt-data-table th:nth-child(4),
    table.cdt-data-table td:nth-child(4) {
      white-space: nowrap;
      min-width: 72px;
      width: 72px;
      text-align: center;
    }

    table.cdt-data-table th:nth-child(5),
    table.cdt-data-table td:nth-child(5) {
      min-width: 140px;
    }

    table.cdt-data-table th:nth-child(6),
    table.cdt-data-table td:nth-child(6) {
      white-space: nowrap;
      min-width: 70px;
      width: 70px;
      text-align: center;
    }

    table.cdt-data-table th:nth-child(7),
    table.cdt-data-table td:nth-child(7) {
      white-space: nowrap;
      min-width: 86px;
      width: 86px;
      text-align: center;
    }

    table.cdt-data-table th:nth-child(8),
    table.cdt-data-table td:nth-child(8) {
      white-space: nowrap;
      min-width: 90px;
      width: 90px;
    }

    table.cdt-data-table th:nth-child(9),
    table.cdt-data-table td:nth-child(9) {
      min-width: 95px;
    }

    table.cdt-data-table th:nth-child(10),
    table.cdt-data-table td:nth-child(10) {
      min-width: 160px;
      line-height: 1.35;
    }

    .cdt-badge {
      font-family: var(--font-mono);
      font-weight: 700;
      font-size: 0.68rem;
      background: rgba(14, 165, 233, 0.15);
      border: 1px solid rgba(14, 165, 233, 0.3);
      color: #38bdf8;
      padding: 0.12rem 0.38rem;
      border-radius: 4px;
      display: inline-block;
      white-space: nowrap;
    }

    .desc-text {
      font-weight: 500;
      min-width: 150px;
      color: #e2e8f0;
      font-size: 0.70rem;
      line-height: 1.35;
    }

    .pct-badge-num {
      font-family: var(--font-mono);
      font-weight: 700;
      font-size: 0.70rem;
      white-space: nowrap !important;
      display: inline-block;
    }

    .tag-ded-yes {
      background: rgba(245, 158, 11, 0.15);
      color: #fcd34d;
      border: 1px solid rgba(245, 158, 11, 0.3);
      font-size: 0.62rem;
      font-weight: 600;
      padding: 0.1rem 0.38rem;
      border-radius: 4px;
      white-space: nowrap !important;
      display: inline-block;
    }

    .tag-ded-no {
      color: var(--text-muted);
      font-size: 0.66rem;
      white-space: nowrap !important;
      display: inline-block;
    }

    .badge-status-eligible {
      background: var(--emerald-glow);
      border: 1px solid var(--emerald-green);
      color: #34d399;
      font-size: 0.62rem;
      font-weight: 700;
      padding: 0.12rem 0.42rem;
      border-radius: 9999px;
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      white-space: nowrap;
    }

    .badge-status-ineligible {
      background: var(--rose-glow);
      border: 1px solid var(--rose-danger);
      color: #fda4af;
      font-size: 0.62rem;
      font-weight: 700;
      padding: 0.12rem 0.42rem;
      border-radius: 9999px;
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      white-space: nowrap;
    }

    .downgrade-flag {
      display: inline-flex;
      align-items: center;
      gap: 0.2rem;
      background: rgba(245, 158, 11, 0.15);
      border: 1px solid rgba(245, 158, 11, 0.3);
      color: #fbbf24;
      padding: 0.1rem 0.35rem;
      border-radius: 4px;
      font-size: 0.64rem;
      font-weight: 500;
    }

    .history-text {
      font-family: var(--font-mono);
      font-size: 0.68rem;
      color: var(--text-muted);
      white-space: nowrap;
    }

    .notes-snippet {
      font-size: 0.68rem;
      color: var(--text-secondary);
      max-width: 200px;
      line-height: 1.35;
    }

    /* Modal for Practice Management Software Notes */
    .pms-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(4, 8, 17, 0.85);
      backdrop-filter: blur(8px);
      z-index: 100;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1.25rem;
    }

    .pms-modal-backdrop.active {
      display: flex;
    }

    .pms-modal-box {
      background: var(--bg-card);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-xl);
      width: 100%;
      max-width: 780px;
      max-height: 92vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
      overflow: hidden;
      animation: modalSpring 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes modalSpring {
      from { transform: scale(0.96); opacity: 0; }
      to { transform: scale(1); opacity: 1; }
    }

    .pms-modal-header {
      padding: 1.25rem 1.75rem;
      border-bottom: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: rgba(18, 28, 51, 0.9);
    }

    .pms-modal-header h3 {
      font-size: 1.15rem;
      color: #fff;
      display: flex;
      align-items: center;
      gap: 0.6rem;
    }

    .btn-close-modal {
      background: none;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      padding: 0.3rem;
      border-radius: 4px;
      transition: color 0.15s;
    }

    .btn-close-modal:hover {
      color: #fff;
    }

    .pms-modal-body {
      padding: 1.5rem 1.75rem;
      overflow-y: auto;
    }

    .pms-textbox {
      width: 100%;
      height: 400px;
      background: #080e1b;
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      color: #cbd5e1;
      font-family: var(--font-mono);
      font-size: 0.825rem;
      line-height: 1.65;
      padding: 1.15rem;
      resize: vertical;
      outline: none;
    }

    .pms-textbox:focus {
      border-color: var(--teal-primary);
    }

    .pms-modal-footer {
      padding: 1.15rem 1.75rem;
      border-top: 1px solid var(--border-subtle);
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: rgba(18, 28, 51, 0.9);
    }

    /* Toast Notification */
    .toast-pill {
      position: fixed;
      bottom: 2rem;
      right: 2rem;
      background: #064e3b;
      color: #d1fae5;
      border: 1px solid #10b981;
      padding: 0.9rem 1.4rem;
      border-radius: var(--radius-md);
      box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
      font-size: 0.875rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 0.65rem;
      z-index: 120;
      transform: translateY(100px);
      opacity: 0;
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
      pointer-events: none;
    }

    .toast-pill.show {
      transform: translateY(0);
      opacity: 1;
    }

    /* Word-break and overflow prevention on all boxes/cards */
    .word-wrap-safe,
    .category-box,
    .category-name-text,
    .category-code-tag,
    .category-percentage-num,
    .category-sub-note,
    .financial-card,
    .financial-amount,
    .financial-sub-text,
    .financial-label,
    .rule-chip,
    .history-card-item,
    .history-patient-row,
    .history-meta-info,
    table.cdt-data-table td,
    table.cdt-data-table th,
    .desc-text,
    .history-text,
    .notes-snippet,
    .excel-sheet-table td,
    .excel-sheet-table th {
      word-break: break-word !important;
      overflow-wrap: anywhere !important;
      white-space: normal !important;
    }

    /* Excel Breakdown Sheet Modal & Document */
    .excel-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(4, 8, 17, 0.88);
      backdrop-filter: blur(8px);
      z-index: 100;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }

    .excel-modal-backdrop.active {
      display: flex;
    }

    .excel-modal-box {
      background: #0f172a;
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-xl);
      width: 95vw;
      max-width: 1440px;
      height: 90vh;
      max-height: 94vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9);
      overflow: hidden;
      animation: modalSpring 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .excel-sheet-viewport {
      padding: 1.25rem;
      overflow-y: auto;
      background: #090f1d;
    }

    /* Clean Excel Bordered Sheet Document */
    .excel-sheet-doc {
      background: #ffffff;
      color: #0f172a;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
      font-size: 11px;
      line-height: 1.35;
      padding: 1.5rem;
      border-radius: 4px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
      margin: 0 auto;
      max-width: 980px;
    }

    .excel-sheet-header-title {
      font-size: 14px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      text-align: center;
      padding: 6px 10px;
      background: #1e293b;
      color: #ffffff;
      margin-bottom: 8px;
      border: 1px solid #0f172a;
    }

    .excel-grid-table {
      width: 100%;
      border-collapse: collapse;
      margin-bottom: 10px;
      font-size: 10.5px;
    }

    .excel-grid-table th,
    .excel-grid-table td {
      border: 1px solid #475569;
      padding: 4px 6px;
      vertical-align: middle;
      word-break: break-word;
      overflow-wrap: anywhere;
    }

    .excel-grid-table th {
      background: #f1f5f9;
      font-weight: 700;
      color: #0f172a;
      text-transform: uppercase;
      font-size: 9.5px;
      letter-spacing: 0.04em;
    }

    .excel-label-cell {
      background: #f8fafc;
      font-weight: 700;
      color: #334155;
      width: 18%;
    }

    .excel-val-cell {
      background: #ffffff;
      color: #0f172a;
      font-weight: 600;
      width: 32%;
    }

    .excel-section-banner {
      font-weight: 800;
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      padding: 5px 8px !important;
      border: 1px solid #334155 !important;
    }

    .excel-banner-pink {
      background: #fce7f3 !important;
      color: #9d174d !important;
    }

    .excel-banner-green {
      background: #ecfdf5 !important;
      color: #065f46 !important;
    }

    .excel-banner-purple {
      background: #f3e8ff !important;
      color: #6b21a8 !important;
    }

    .excel-banner-blue {
      background: #e0f2fe !important;
      color: #0369a1 !important;
    }

    .excel-summary-cat-box {
      text-align: center;
      background: #f8fafc;
      font-weight: 700;
    }

    .excel-summary-cat-box .cat-h {
      font-size: 9px;
      color: #475569;
      text-transform: uppercase;
      margin-bottom: 2px;
    }

    .excel-summary-cat-box .cat-v {
      font-size: 12.5px;
      font-weight: 800;
      color: #0f172a;
    }

    .excel-summary-cat-box .cat-sub {
      font-size: 8.5px;
      color: #64748b;
      font-weight: 600;
    }

    /* Print Formatting: Clean PDF Document with Excel Gridlines */
    @media print {
      body * {
        visibility: hidden !important;
      }
      #excelPrintWrapper, #excelPrintWrapper * {
        visibility: visible !important;
      }
      #excelPrintWrapper {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        display: block !important;
      }
      .excel-sheet-doc {
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        color: #000000 !important;
      }
      .excel-grid-table th, .excel-grid-table td {
        border: 1px solid #000000 !important;
        color: #000000 !important;
      }
      .excel-sheet-header-title {
        background: #000000 !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
      }
      .excel-section-banner {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
      }
      .excel-banner-pink { background: #fce7f3 !important; color: #9d174d !important; }
      .excel-banner-green { background: #ecfdf5 !important; color: #065f46 !important; }
      .excel-banner-purple { background: #f3e8ff !important; color: #6b21a8 !important; }
      .excel-banner-blue { background: #e0f2fe !important; color: #0369a1 !important; }
    }

    @media (max-width: 768px) {
      .nav-container { padding: 0.75rem 1rem; }
      main { padding: 1.25rem 0.85rem 4rem; }
      .hero-section { flex-direction: column; align-items: flex-start; }
      .policy-banner-top { flex-direction: column; align-items: flex-start; }
      .banner-quick-actions { width: 100%; justify-content: flex-start; }
    }
    /* AI Settings Modal & Header Button */
    .btn-prompt-settings {
      background: rgba(23, 35, 62, 0.85);
      border: 1px solid var(--border-medium);
      color: #38bdf8;
      padding: 0.3rem 0.65rem;
      border-radius: var(--radius-md);
      font-size: 0.72rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      transition: all 0.2s;
    }

    .btn-prompt-settings:hover {
      background: rgba(14, 165, 233, 0.18);
      border-color: var(--teal-primary);
      color: #fff;
      transform: translateY(-1px);
    }

    .settings-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(4, 8, 17, 0.85);
      backdrop-filter: blur(8px);
      z-index: 100;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1.25rem;
    }

    .settings-modal-backdrop.active {
      display: flex;
    }

    .settings-modal-box {
      background: #0f172a;
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-xl);
      width: 95vw;
      max-width: 1400px;
      height: 88vh;
      max-height: 94vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9);
      overflow: hidden;
      animation: modalSpring 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .settings-modal-box.is-fullscreen,
    .excel-modal-box.is-fullscreen {
      position: fixed !important;
      inset: 0 !important;
      width: 100vw !important;
      height: 100vh !important;
      max-width: 100vw !important;
      max-height: 100vh !important;
      border-radius: 0 !important;
      border: none !important;
      z-index: 99999 !important;
    }

    .btn-modal-fullscreen-toggle {
      background: rgba(15, 23, 42, 0.75);
      border: 1px solid rgba(148, 163, 184, 0.25);
      color: #94a3b8;
      cursor: pointer;
      padding: 0.32rem 0.65rem;
      border-radius: 6px;
      font-size: 0.72rem;
      font-weight: 700;
      display: inline-flex;
      align-items: center;
      gap: 0.38rem;
      transition: all 0.15s ease;
    }

    .btn-modal-fullscreen-toggle:hover {
      background: rgba(56, 189, 248, 0.15);
      border-color: rgba(56, 189, 248, 0.5);
      color: #38bdf8;
    }

    .settings-modal-box .pms-modal-body {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-height: 0;
      overflow-y: auto;
      padding: 1.25rem 1.6rem;
    }

    .settings-tabs-row {
      display: flex;
      gap: 0.4rem;
      padding: 0.6rem 1.25rem 0;
      background: rgba(18, 28, 51, 0.95);
      border-bottom: 1px solid var(--border-subtle);
    }

    .settings-tab-btn {
      background: transparent;
      border: none;
      border-bottom: 2px solid transparent;
      color: var(--text-secondary);
      font-size: 0.78rem;
      font-weight: 700;
      padding: 0.5rem 0.85rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 0.35rem;
      transition: all 0.15s;
    }

    .settings-tab-btn.active {
      color: #38bdf8;
      border-bottom-color: #38bdf8;
    }

    .settings-tab-pane {
      display: none;
      flex-direction: column;
      gap: 0.75rem;
      flex: 1;
      min-height: 0;
    }

    .settings-tab-pane.active {
      display: flex;
    }

    .prompt-editor-textarea {
      width: 100%;
      flex: 1;
      min-height: 420px;
      background: #080e1b;
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-md);
      color: #e2e8f0;
      font-family: var(--font-mono);
      font-size: 0.8rem;
      line-height: 1.6;
      padding: 1rem;
      resize: vertical;
      outline: none;
    }

    .prompt-editor-textarea:focus {
      border-color: var(--teal-primary);
    }

    .settings-info-badge {
      font-size: 0.72rem;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 0.4rem;
      background: rgba(23, 35, 62, 0.5);
      padding: 0.4rem 0.75rem;
      border-radius: var(--radius-sm);
    }

    .btn-restore-defaults {
      background: rgba(23, 35, 62, 0.8);
      border: 1px solid var(--border-subtle);
      color: var(--text-secondary);
      font-size: 0.75rem;
      font-weight: 600;
      padding: 0.45rem 0.85rem;
      border-radius: var(--radius-md);
      cursor: pointer;
      transition: all 0.2s;
    }

    .btn-restore-defaults:hover {
      color: #fff;
      border-color: var(--text-muted);
    }

    /* History & Patient Badge Styles */
    .btn-history-toggle {
      background: rgba(23, 35, 62, 0.85);
      border: 1px solid var(--border-medium);
      color: #10b981;
      padding: 0.3rem 0.65rem;
      border-radius: var(--radius-md);
      font-size: 0.72rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      transition: all 0.2s;
    }

    .btn-history-toggle:hover {
      background: rgba(16, 185, 129, 0.18);
      border-color: #10b981;
      color: #fff;
      transform: translateY(-1px);
    }

    .btn-auth-user {
      background: rgba(23, 35, 62, 0.85);
      border: 1px solid var(--border-medium);
      color: #cbd5e1;
      padding: 0.3rem 0.65rem;
      border-radius: var(--radius-md);
      font-size: 0.72rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      transition: all 0.2s;
    }

    .btn-auth-user:hover {
      background: rgba(56, 189, 248, 0.18);
      border-color: #38bdf8;
      color: #fff;
      transform: translateY(-1px);
    }

    .btn-auth-user.logged-in {
      background: rgba(16, 185, 129, 0.12);
      border-color: rgba(16, 185, 129, 0.4);
      color: #34d399;
    }

    /* HIPAA Inactivity Warning Modal */
    .inactivity-modal-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(2, 6, 23, 0.92);
      backdrop-filter: blur(10px);
      z-index: 9999;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1.5rem;
    }

    .inactivity-modal-backdrop.active {
      display: flex;
    }

    .inactivity-modal-box {
      background: #0b1329;
      border: 1px solid rgba(245, 158, 11, 0.4);
      box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.95), 0 0 25px rgba(245, 158, 11, 0.15);
      border-radius: var(--radius-xl);
      max-width: 440px;
      width: 100%;
      padding: 1.75rem 1.5rem;
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1rem;
      animation: modalSpring 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .inactivity-icon-wrap {
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background: rgba(245, 158, 11, 0.15);
      border: 1px solid rgba(245, 158, 11, 0.35);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .inactivity-title {
      font-size: 1.15rem;
      font-weight: 800;
      color: #fff;
    }

    .inactivity-desc {
      font-size: 0.825rem;
      color: #94a3b8;
      line-height: 1.55;
    }

    .inactivity-actions {
      display: flex;
      gap: 0.75rem;
      width: 100%;
      margin-top: 0.5rem;
    }

    .patient-hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      background: rgba(16, 185, 129, 0.15);
      border: 1px solid rgba(16, 185, 129, 0.35);
      color: #34d399;
      padding: 0.2rem 0.65rem;
      border-radius: 999px;
      font-size: 0.75rem;
      font-weight: 700;
      letter-spacing: 0.02em;
    }

    /* Verification History Drawer / Modal */
    .history-drawer-backdrop {
      position: fixed;
      inset: 0;
      background: rgba(4, 8, 17, 0.85);
      backdrop-filter: blur(8px);
      z-index: 100;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 1rem;
    }

    .history-drawer-backdrop.active {
      display: flex;
    }

    .history-modal-box {
      background: var(--bg-card);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-xl);
      width: 100%;
      max-width: 720px;
      max-height: 86vh;
      display: flex;
      flex-direction: column;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85);
      overflow: hidden;
      animation: modalSpring 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .history-list-body {
      padding: 1rem 1.25rem;
      overflow-y: auto;
      display: flex;
      flex-direction: column;
      gap: 0.6rem;
    }

    .history-empty-state {
      padding: 2.5rem 1.25rem;
      text-align: center;
      color: var(--text-muted);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.65rem;
    }

    .history-card-item {
      background: rgba(23, 35, 62, 0.75);
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      padding: 0.75rem 1rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.85rem;
      transition: all 0.2s;
      cursor: pointer;
    }

    .history-card-item:hover {
      border-color: rgba(14, 165, 233, 0.4);
      background: rgba(23, 35, 62, 0.95);
      transform: translateY(-1px);
    }

    .history-card-left {
      display: flex;
      flex-direction: column;
      gap: 0.2rem;
      min-width: 0;
    }

    .history-patient-row {
      display: flex;
      align-items: center;
      gap: 0.55rem;
      flex-wrap: wrap;
    }

    .history-patient-title {
      font-size: 0.82rem;
      font-weight: 700;
      color: #fff;
    }

    .history-meta-info {
      font-size: 0.7rem;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      gap: 0.45rem;
      flex-wrap: wrap;
    }

    .history-actions-row {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      flex-shrink: 0;
    }

    .btn-history-load {
      background: rgba(14, 165, 233, 0.15);
      border: 1px solid rgba(14, 165, 233, 0.35);
      color: #38bdf8;
      padding: 0.3rem 0.65rem;
      border-radius: var(--radius-sm);
      font-size: 0.72rem;
      font-weight: 700;
      cursor: pointer;
      transition: all 0.2s;
    }

    .btn-history-load:hover {
      background: var(--teal-primary);
      color: #fff;
    }

    .btn-history-delete {
      background: rgba(244, 63, 94, 0.1);
      border: 1px solid rgba(244, 63, 94, 0.2);
      color: #fda4af;
      padding: 0.3rem 0.45rem;
      border-radius: var(--radius-sm);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }

    .btn-history-delete:hover {
      background: var(--rose-danger);
      color: white;
    }

    /* ── Inline Editable CDT Cells ───────────────────────────────── */
    .editable-cell {
      cursor: pointer;
      border-radius: 4px;
      padding: 0.15rem 0.35rem;
      transition: background 0.15s ease, outline 0.15s ease;
      display: inline-flex;
      align-items: center;
      gap: 0.3rem;
      white-space: nowrap !important;
    }

    .editable-cell:hover {
      background: rgba(56, 189, 248, 0.15);
      outline: 1px dashed rgba(56, 189, 248, 0.5);
    }

    .editable-cell-input {
      background: #0f172a !important;
      color: #f8fafc !important;
      border: 1px solid var(--cyan-bright) !important;
      border-radius: 4px !important;
      font-family: inherit !important;
      font-size: 0.74rem !important;
      padding: 0.15rem 0.4rem !important;
      outline: none !important;
      width: 100% !important;
      max-width: 140px !important;
      box-shadow: 0 0 8px rgba(56, 189, 248, 0.3) !important;
    }

    .clickable-toggle-pill {
      cursor: pointer;
      user-select: none;
      display: inline-flex;
      align-items: center;
      white-space: nowrap !important;
      transition: transform 0.15s ease, filter 0.15s ease;
    }

    .clickable-toggle-pill:hover {
      transform: scale(1.06);
      filter: brightness(1.2);
    }

    .clickable-toggle-pill:active {
      transform: scale(0.95);
    }

    /* ── Payer Directory Modal List ──────────────────────────────── */
    .payer-directory-card {
      background: rgba(15, 23, 42, 0.6);
      border: 1px solid rgba(56, 189, 248, 0.2);
      border-radius: 6px;
      padding: 0.6rem 0.85rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      transition: all 0.15s ease;
    }

    .payer-directory-card:hover {
      border-color: rgba(56, 189, 248, 0.45);
      background: rgba(15, 23, 42, 0.85);
    }

    .payer-card-info {
      flex: 1;
      min-width: 0;
    }

    .payer-card-name {
      font-weight: 800;
      font-size: 0.78rem;
      color: #38bdf8;
      display: flex;
      align-items: center;
      gap: 0.45rem;
    }

    .payer-card-addr {
      font-size: 0.7rem;
      color: var(--text-secondary);
      margin-top: 0.15rem;
      line-height: 1.3;
    }

    .payer-card-meta {
      font-size: 0.68rem;
      color: #94a3b8;
      margin-top: 0.1rem;
      display: flex;
      gap: 0.75rem;
    }

    .btn-apply-payer {
      background: rgba(16, 185, 129, 0.15);
      border: 1px solid rgba(16, 185, 129, 0.35);
      color: #34d399;
      font-size: 0.68rem;
      font-weight: 700;
      padding: 0.25rem 0.55rem;
      border-radius: 4px;
      cursor: pointer;
      white-space: nowrap;
      transition: all 0.15s ease;
    }

    .btn-apply-payer:hover {
      background: #10b981;
      color: #fff;
    }

    .payer-network-toggle-badge {
      font-size: 0.65rem;
      font-weight: 700;
      padding: 0.15rem 0.55rem;
      border-radius: 9999px;
      cursor: pointer;
      border: 1px solid transparent;
      transition: all 0.15s ease;
      user-select: none;
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
      letter-spacing: 0.02em;
    }

    .payer-network-toggle-badge.in {
      background: rgba(16, 185, 129, 0.18);
      color: #34d399;
      border-color: rgba(16, 185, 129, 0.4);
    }

    .payer-network-toggle-badge.in:hover {
      background: rgba(16, 185, 129, 0.35);
      transform: scale(1.05);
    }

    .payer-network-toggle-badge.out {
      background: rgba(244, 63, 94, 0.18);
      color: #fda4af;
      border-color: rgba(244, 63, 94, 0.4);
    }

    .payer-network-toggle-badge.out:hover {
      background: rgba(244, 63, 94, 0.35);
      transform: scale(1.05);
    }

    #heroNetworkBadge {
      cursor: pointer;
      user-select: none;
      transition: transform 0.15s ease, filter 0.15s ease;
    }

    #heroNetworkBadge:hover {
      transform: scale(1.05);
      filter: brightness(1.2);
    }

    /* ========================================================
       RESPONSIVE ADAPTATION: 16-INCH LAPTOPS TO 34-INCH ULTRAWIDE
       ======================================================== */
    /* Large Laptops / Standard Desktops (1440px - 1799px, e.g. 14-16 inch standard/high-DPI displays) */
    @media (min-width: 1440px) {
      .codes-table-panel {
        padding: 0.95rem 1.25rem;
      }
      .table-responsive-box {
        height: auto;
        max-height: none !important;
      }
      table.cdt-data-table {
        min-width: 100%;
        font-size: 0.71rem;
      }
      table.cdt-data-table th {
        font-size: 0.63rem;
        padding: 0.4rem 0.5rem;
      }
      table.cdt-data-table td {
        font-size: 0.71rem;
        padding: 0.38rem 0.5rem;
      }
      table.cdt-data-table th:nth-child(2),
      table.cdt-data-table td:nth-child(2) {
        min-width: 190px;
      }
      table.cdt-data-table th:nth-child(10),
      table.cdt-data-table td:nth-child(10) {
        min-width: 190px;
      }
    }

    /* Wide Desktop Displays (1800px - 2199px, e.g. 24-27 inch QHD/4K displays) */
    @media (min-width: 1800px) {
      .codes-table-panel {
        padding: 1.35rem 1.75rem;
        border-radius: var(--radius-xl);
      }
      .table-responsive-box {
        height: auto;
        max-height: none !important;
      }
      table.cdt-data-table {
        min-width: 100%;
        font-size: 0.82rem;
      }
      table.cdt-data-table th {
        font-size: 0.72rem;
        padding: 0.65rem 0.95rem;
      }
      table.cdt-data-table td {
        font-size: 0.82rem;
        padding: 0.6rem 0.95rem;
      }
      .search-input-container {
        max-width: 480px;
      }
      .table-search-input {
        font-size: 0.82rem;
        padding: 0.48rem 0.85rem 0.48rem 2.3rem;
      }
      .filter-chip {
        font-size: 0.74rem;
        padding: 0.28rem 0.75rem;
      }
      table.cdt-data-table th:nth-child(2),
      table.cdt-data-table td:nth-child(2) {
        min-width: 280px;
      }
      table.cdt-data-table th:nth-child(5),
      table.cdt-data-table td:nth-child(5) {
        min-width: 220px;
      }
      table.cdt-data-table th:nth-child(10),
      table.cdt-data-table td:nth-child(10) {
        min-width: 320px;
      }
      .category-cards-grid {
        grid-template-columns: repeat(4, 1fr);
      }
    }

    /* Ultrawide Displays (2200px+ up to 34-inch 21:9 WQHD 3440x1440 or 4K/5K) */
    @media (min-width: 2200px) {
      .codes-table-panel {
        padding: 1.6rem 2.2rem;
        border-radius: var(--radius-xl);
      }
      .table-responsive-box {
        height: auto;
        max-height: none !important;
      }
      table.cdt-data-table {
        min-width: 100%;
        font-size: 0.88rem;
      }
      table.cdt-data-table th {
        font-size: 0.76rem;
        padding: 0.75rem 1.15rem;
      }
      table.cdt-data-table td {
        font-size: 0.88rem;
        padding: 0.7rem 1.15rem;
      }
      .search-input-container {
        max-width: 600px;
      }
      .table-search-input {
        font-size: 0.88rem;
        padding: 0.55rem 1rem 0.55rem 2.5rem;
      }
      .filter-chip {
        font-size: 0.8rem;
        padding: 0.32rem 0.85rem;
      }
      .codes-count-pill {
        font-size: 0.76rem;
        padding: 0.22rem 0.65rem;
      }
      table.cdt-data-table th:nth-child(2),
      table.cdt-data-table td:nth-child(2) {
        min-width: 320px;
      }
      table.cdt-data-table th:nth-child(5),
      table.cdt-data-table td:nth-child(5) {
        min-width: 260px;
      }
      table.cdt-data-table th:nth-child(10),
      table.cdt-data-table td:nth-child(10) {
        min-width: 420px;
      }
      .category-cards-grid {
        grid-template-columns: repeat(8, 1fr);
      }
    }

    /* ==========================================================================
       FULL-PAGE GATEKEEPER LOGIN SCREEN
       ========================================================================== */
    .gatekeeper-screen {
      position: fixed;
      inset: 0;
      z-index: 10000;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: #070e1c;
      background-image: 
        radial-gradient(ellipse at 50% 20%, rgba(14, 165, 233, 0.22) 0px, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.12) 0px, transparent 50%),
        linear-gradient(to right, rgba(56, 189, 248, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
      background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
      padding: 1.5rem;
    }

    .gatekeeper-card {
      width: 100%;
      max-width: 460px;
      background: rgba(18, 28, 51, 0.95);
      border: 1px solid rgba(56, 189, 248, 0.35);
      box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85), 0 0 30px rgba(14, 165, 233, 0.15);
      border-radius: var(--radius-xl);
      padding: 2.25rem 2rem;
      display: flex;
      flex-direction: column;
      gap: 1.25rem;
      backdrop-filter: blur(16px);
      animation: modalSpring 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .gatekeeper-brand {
      text-align: center;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.35rem;
    }

    .gatekeeper-logo {
      width: 56px;
      height: 56px;
      border-radius: 16px;
      background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(6, 182, 212, 0.1));
      border: 1px solid rgba(56, 189, 248, 0.35);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 0.5rem;
      box-shadow: 0 0 20px rgba(14, 165, 233, 0.25);
    }

    .gatekeeper-brand h2 {
      font-size: 1.65rem;
      font-weight: 800;
      letter-spacing: -0.02em;
      color: #fff;
    }

    .gatekeeper-subtitle {
      font-size: 0.825rem;
      color: var(--text-secondary);
    }

    .gatekeeper-notice {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      background: rgba(14, 165, 233, 0.08);
      border: 1px solid rgba(14, 165, 233, 0.25);
      padding: 0.5rem 0.75rem;
      border-radius: var(--radius-sm);
      font-size: 0.72rem;
      color: #38bdf8;
      font-weight: 600;
    }

    .gatekeeper-form {
      display: flex;
      flex-direction: column;
      gap: 0.95rem;
    }

    .form-group {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
    }

    .form-group label {
      font-size: 0.74rem;
      font-weight: 700;
      color: #94a3b8;
    }

    .input-with-icon {
      position: relative;
      display: flex;
      align-items: center;
    }

    .input-with-icon svg {
      position: absolute;
      left: 0.85rem;
      color: #64748b;
      pointer-events: none;
    }

    .input-with-icon input {
      width: 100%;
      background: #09101f;
      border: 1px solid var(--border-medium);
      border-radius: var(--radius-md);
      color: #fff;
      font-size: 0.85rem;
      padding: 0.65rem 0.85rem 0.65rem 2.5rem;
      outline: none;
      transition: all 0.2s;
      font-family: inherit;
    }

    .input-with-icon input:focus {
      border-color: #38bdf8;
      box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
    }

    .btn-gatekeeper-submit {
      background: linear-gradient(135deg, #0ea5e9, #0284c7);
      border: none;
      color: #fff;
      padding: 0.75rem 1rem;
      border-radius: var(--radius-md);
      font-size: 0.88rem;
      font-weight: 700;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      transition: all 0.2s;
      box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
      margin-top: 0.4rem;
    }

    .btn-gatekeeper-submit:hover {
      background: linear-gradient(135deg, #38bdf8, #0ea5e9);
      transform: translateY(-1px);
      box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
    }

    .gatekeeper-error {
      color: #f87171;
      background: rgba(239, 68, 68, 0.12);
      border: 1px solid rgba(239, 68, 68, 0.3);
      padding: 0.5rem 0.75rem;
      border-radius: var(--radius-sm);
      font-size: 0.75rem;
      line-height: 1.4;
    }

    .gatekeeper-footer {
      text-align: center;
      font-size: 0.68rem;
      color: #64748b;
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      padding-top: 0.85rem;
    }

    .btn-pw-toggle {
      position: absolute;
      right: 0.65rem;
      top: 50%;
      transform: translateY(-50%);
      background: transparent;
      border: none;
      color: #64748b;
      cursor: pointer;
      padding: 0.25rem;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 4px;
      transition: color 0.15s ease, background 0.15s ease;
    }

    .btn-pw-toggle:hover {
      color: #38bdf8;
      background: rgba(56, 189, 248, 0.1);
    }

    .gatekeeper-trust-badges {
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      gap: 0.45rem;
      margin-top: 0.1rem;
    }

    .trust-pill {
      display: inline-flex;
      align-items: center;
      gap: 0.28rem;
      font-size: 0.66rem;
      font-weight: 700;
      color: #94a3b8;
      background: rgba(15, 23, 42, 0.72);
      border: 1px solid rgba(56, 189, 248, 0.22);
      padding: 0.24rem 0.58rem;
      border-radius: 999px;
      letter-spacing: 0.01em;
    }

    .gatekeeper-statutory-note {
      font-size: 0.63rem;
      line-height: 1.48;
      color: #64748b;
      text-align: left;
      background: rgba(2, 6, 23, 0.45);
      border: 1px solid rgba(148, 163, 184, 0.12);
      border-radius: 8px;
      padding: 0.55rem 0.7rem;
    }

    .gatekeeper-statutory-note strong {
      color: #94a3b8;
    }

    /* ==========================================================================
       WORKSPACE SWITCHER DROPDOWN & HEADER BUTTONS
       ========================================================================== */
    .workspace-pill-container {
      position: relative;
    }

    .btn-workspace-switcher {
      background: rgba(14, 165, 233, 0.12);
      border: 1px solid rgba(56, 189, 248, 0.35);
      color: #38bdf8;
      padding: 0.32rem 0.75rem;
      border-radius: var(--radius-md);
      font-size: 0.74rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.45rem;
      transition: all 0.2s;
    }

    .btn-workspace-switcher:hover {
      background: rgba(14, 165, 233, 0.22);
      border-color: #38bdf8;
      color: #fff;
    }

    .workspace-dropdown-panel {
      position: absolute;
      top: calc(100% + 6px);
      left: 0;
      min-width: 260px;
      background: #0f1a30;
      border: 1px solid rgba(56, 189, 248, 0.35);
      border-radius: var(--radius-lg);
      box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
      padding: 0.5rem;
      z-index: 1000;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      animation: modalSpring 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .workspace-item-btn {
      background: transparent;
      border: none;
      border-radius: var(--radius-sm);
      padding: 0.55rem 0.75rem;
      color: #cbd5e1;
      font-size: 0.76rem;
      font-weight: 600;
      cursor: pointer;
      text-align: left;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: all 0.15s;
      width: 100%;
    }

    .workspace-item-btn:hover {
      background: rgba(56, 189, 248, 0.12);
      color: #fff;
    }

    .workspace-item-btn.active {
      background: rgba(16, 185, 129, 0.15);
      color: #34d399;
      font-weight: 700;
    }

    .btn-payers-directory {
      background: rgba(23, 35, 62, 0.85);
      border: 1px solid var(--border-medium);
      color: #a78bfa;
      padding: 0.3rem 0.65rem;
      border-radius: var(--radius-md);
      font-size: 0.72rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      transition: all 0.2s;
    }

    .btn-payers-directory:hover {
      background: rgba(167, 139, 250, 0.18);
      border-color: #a78bfa;
      color: #fff;
      transform: translateY(-1px);
    }

    .btn-manage-clinics {
      background: rgba(23, 35, 62, 0.85);
      border: 1px solid var(--border-medium);
      color: #f59e0b;
      padding: 0.3rem 0.65rem;
      border-radius: var(--radius-md);
      font-size: 0.72rem;
      font-weight: 700;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      transition: all 0.2s;
    }

    .btn-manage-clinics:hover {
      background: rgba(245, 158, 11, 0.18);
      border-color: #f59e0b;
      color: #fff;
      transform: translateY(-1px);
    }

    /* Sub-Portal & Carrier Badges */
    .payer-parent-badge {
      display: inline-block;
      font-size: 0.65rem;
      font-weight: 700;
      padding: 0.1rem 0.45rem;
      border-radius: 4px;
      background: rgba(56, 189, 248, 0.15);
      border: 1px solid rgba(56, 189, 248, 0.35);
      color: #38bdf8;
      text-transform: uppercase;
      letter-spacing: 0.04em;
    }

    .payer-parent-badge.delta {
      background: rgba(14, 165, 233, 0.2);
      border-color: #0ea5e9;
      color: #7dd3fc;
    }

    /* Clinic & User Manager Cards */
    .clinic-mgmt-card,
    .user-mgmt-card {
      background: rgba(15, 23, 42, 0.7);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: var(--radius-md);
      padding: 0.75rem 0.95rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.75rem;
      transition: all 0.2s;
    }

    .clinic-mgmt-card:hover,
    .user-mgmt-card:hover {
      border-color: rgba(56, 189, 248, 0.35);
      background: rgba(15, 23, 42, 0.9);
    }

    .clinic-mgmt-title {
      font-size: 0.85rem;
      font-weight: 700;
      color: #fff;
      display: flex;
      align-items: center;
      gap: 0.45rem;
    }

    .clinic-mgmt-stats {
      font-size: 0.72rem;
      color: #94a3b8;
      margin-top: 0.2rem;
      display: flex;
      gap: 0.6rem;
    }

    .user-role-badge {
      font-size: 0.66rem;
      font-weight: 700;
      padding: 0.12rem 0.45rem;
      border-radius: 4px;
      text-transform: uppercase;
    }

    .user-role-badge.owner {
      background: rgba(245, 158, 11, 0.2);
      border: 1px solid rgba(245, 158, 11, 0.45);
      color: #fbbf24;
    }

    .user-role-badge.clinic_admin {
      background: rgba(56, 189, 248, 0.2);
      border: 1px solid rgba(56, 189, 248, 0.45);
      color: #38bdf8;
    }

    .user-role-badge.staff {
      background: rgba(16, 185, 129, 0.2);
      border: 1px solid rgba(16, 185, 129, 0.45);
      color: #34d399;
    }

    /* Full-Page Boot / Reload Loading Spinner Overlay */
    .app-boot-loader {
      position: fixed;
      inset: 0;
      z-index: 10000;
      background: radial-gradient(circle at 50% 35%, rgba(15, 23, 42, 0.96) 0%, rgba(2, 6, 23, 0.99) 100%);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 1;
      transition: opacity 0.28s ease, visibility 0.28s ease;
    }

    .app-boot-loader.hidden {
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
    }

    .boot-loader-content {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.85rem;
      text-align: center;
    }

    .boot-spinner-wrapper {
      position: relative;
      width: 76px;
      height: 76px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .boot-spinner-ring {
      position: absolute;
      inset: 0;
      border-radius: 50%;
      border: 3px solid rgba(56, 189, 248, 0.14);
      border-top-color: #38bdf8;
      border-right-color: #06b6d4;
      animation: bootSpin 0.9s cubic-bezier(0.5, 0.15, 0.5, 0.85) infinite;
      box-shadow: 0 0 24px rgba(56, 189, 248, 0.22);
    }

    .boot-spinner-ring-inner {
      position: absolute;
      inset: 9px;
      border-radius: 50%;
      border: 2px solid rgba(16, 185, 129, 0.12);
      border-bottom-color: #34d399;
      animation: bootSpinReverse 1.35s linear infinite;
    }

    .boot-spinner-logo {
      position: relative;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: center;
      animation: bootPulse 1.8s ease-in-out infinite;
    }

    .boot-loader-title {
      font-size: 1.25rem;
      font-weight: 800;
      letter-spacing: -0.02em;
      color: #f8fafc;
      margin-top: 0.2rem;
    }

    .boot-loader-title .highlight {
      background: linear-gradient(135deg, #38bdf8, #34d399);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }

    .boot-loader-sub {
      font-size: 0.8rem;
      font-weight: 500;
      color: #94a3b8;
      letter-spacing: 0.01em;
    }

    @keyframes bootSpin {
      to { transform: rotate(360deg); }
    }

    @keyframes bootSpinReverse {
      to { transform: rotate(-360deg); }
    }

    @keyframes bootPulse {
      0%, 100% { transform: scale(0.95); opacity: 0.85; }
      50% { transform: scale(1.06); opacity: 1; }
    }

