  /* Embedded font fallbacks for printing when Google Fonts unavailable */
  @media print {
    :root {
      --print-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
      --print-sans: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
    }
  }

  :root {
    --navy: #0f1f3d;
    --navy-mid: #1a3260;
    --gold: #c9a84c;
    --gold-light: #e8c97a;
    --cream: #f8f5ef;
    --cream-dark: #ede8df;
    --slate: #4a5568;
    --mist: #e8edf5;
    --white: #ffffff;
    --success: #2d6a4f;
    --shadow: 0 4px 24px rgba(15,31,61,0.10);
    --shadow-lg: 0 12px 48px rgba(15,31,61,0.16);
  }

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

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
    color: #0f1f3d;
    min-height: 100vh;
  }

  /* ── Header ── */
  /* ═══════════════════════════════════════
     APP SHELL — sidebar layout
  ═══════════════════════════════════════ */
  .app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--cream);
  }

  .sidebar {
    width: 224px;
    flex-shrink: 0;
    background: #0f1f3d;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid rgba(201,168,76,0.12);
    scrollbar-width: none;
    position: relative;
    z-index: 50;
    transition: width 0.25s ease;
  }
  .sidebar::-webkit-scrollbar { display: none; }

  .sidebar-logo {
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(201,168,76,0.1);
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
    text-decoration: none;
  }
  .sidebar-logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.22rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
  }
  .sidebar-logo-text span { color: #c9a84c; }
  .sidebar-logo-tagline {
    font-size: 0.58rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 3px;
    white-space: nowrap;
  }

  .sidebar-nav {
    flex: 1;
    padding: 10px 0 8px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }

  .sidebar-section-label {
    padding: 14px 20px 5px;
    font-size: 0.58rem;
    font-weight: 700;
    color: rgba(255,255,255,0.22);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  .sidebar-bottom {
    padding: 12px 14px 14px;
    border-top: 1px solid rgba(201,168,76,0.1);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
  }
  .sidebar-beta-badge {
    font-size: 0.62rem;
    color: rgba(201,168,76,0.55);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    text-align: center;
    padding: 6px 0 2px;
    white-space: nowrap;
    overflow: hidden;
  }

  .app-content {
    flex: 1;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
  }

  /* Legacy header classes kept for backward compat */
  .app-header { display: none; }
  .app-header-logo-text span { color: #c9a84c; }
  .header-badge { display: none; }

  /* Hamburger for mobile */
  .hamburger-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 300;
    background: #0f1f3d;
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
  }
  .hamburger-btn svg { display: block; }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 149;
  }
  .sidebar-backdrop.visible { display: block; }


  /* ══════════════════════════════════════
     SIDEBAR NAV ITEMS
  ══════════════════════════════════════ */
  .tool-nav { display: none; } /* replaced by sidebar */
  .tool-nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 16px 9px 18px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.845rem;
    font-weight: 500;
    letter-spacing: 0.005em;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    border-left: 2px solid transparent;
    transition: color 0.14s, background 0.14s, border-color 0.14s;
    white-space: nowrap;
    user-select: none;
    position: relative;
  }
  .tool-nav-item:hover {
    color: rgba(255,255,255,0.82);
    background: rgba(255,255,255,0.045);
  }
  .tool-nav-item.active {
    color: #c9a84c;
    border-left-color: #c9a84c;
    background: rgba(201,168,76,0.08);
  }
  .tool-nav-item .nav-icon-svg {
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.14s;
    width: 16px;
    height: 16px;
  }
  .tool-nav-item:hover .nav-icon-svg { opacity: 0.78; }
  .tool-nav-item.active .nav-icon-svg { opacity: 1; stroke: #c9a84c; }
  .tool-nav-item .nav-label { white-space: nowrap; overflow: hidden; }
  .nav-badge {
    margin-left: auto;
    font-size: 0.56rem;
    background: rgba(201,168,76,0.18);
    color: #c9a84c;
    border: 1px solid rgba(201,168,76,0.28);
    padding: 1px 5px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }

  /* ══════════════════════════════════════
     HOME SCREEN — TOOL DASHBOARD
  ══════════════════════════════════════ */
  .home-screen {
    display: none;
    visibility: hidden;
    padding: 44px 52px 64px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow-y: auto;
    height: 100vh;
  }
  .home-screen.active { display: block; visibility: visible; }
  .home-screen-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #0f1f3d;
    font-weight: 700;
    margin-bottom: 4px;
  }
  .home-screen-sub {
    font-size: 0.9rem;
    color: #4a5568;
    margin-bottom: 40px;
    line-height: 1.6;
  }
  .tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 48px;
  }
  .tool-card {
    background: white;
    border: 1.5px solid #ede8df;
    border-radius: 14px;
    padding: 28px 26px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    position: relative;
    overflow: hidden;
  }
  .tool-card::before {
    content: '';
    position: absolute;
    top: 16px; bottom: 16px; left: 0;
    width: 3px;
    background: linear-gradient(180deg, #0f1f3d, #c9a84c);
    border-radius: 0 2px 2px 0;
    opacity: 0;
    transition: opacity 0.25s;
  }
  .tool-card:hover {
    border-color: rgba(201,168,76,0.4);
    box-shadow: 0 8px 32px rgba(15,31,61,0.10), 0 1px 3px rgba(15,31,61,0.06);
    transform: translateY(-2px);
  }
  .tool-card:hover::before { opacity: 1; }
  .tool-card.coming-soon {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
  }
  .tool-card-icon {
    display: none; /* replaced by .tool-card-icon-wrap */
  }
  .tool-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f1f3d;
    margin-bottom: 8px;
  }
  .tool-card-desc {
    font-size: 0.82rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 18px;
  }
  .tool-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #c9a84c;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
  .tool-card-cta .arrow { transition: transform 0.15s; }
  .tool-card:hover .tool-card-cta .arrow { transform: translateX(4px); }
  /* ── Renewal Manager Tool ─────────────────────────────────────────────────── */
  .ams-screen-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    background: var(--cream);
    overflow-y: auto;
  }
  .ams-shell { max-width: 1100px; margin: 0 auto; padding: 28px 24px 60px; width: 100%; box-sizing: border-box; }
  .ams-header { margin-bottom: 28px; }
  .ams-title { font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 700; color: #0f1f3d; margin: 0 0 4px; }
  .ams-subtitle { font-size: 0.85rem; color: #4a5568; }
  .ams-tabs { display: flex; gap: 6px; margin-bottom: 24px; border-bottom: 2px solid #eaecf0; padding-bottom: 0; }
  .ams-tab { background: none; border: none; padding: 10px 18px; font-family: 'DM Sans', sans-serif; font-size: 0.82rem; font-weight: 600; color: #8899aa; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; white-space: nowrap; }
  .ams-tab.active { color: #0f1f3d; border-bottom-color: #c9a84c; }
  .ams-tab-panel { display: none; }
  .ams-tab-panel.active { display: block; }

  /* ── Renewal Manager Preview ────────────────────────────────── */
  .rm-preview-shell { max-width: 1200px; margin: 0 auto; padding: 0 24px 60px; width: 100%; box-sizing: border-box; }
  .rm-demo-banner { background: linear-gradient(90deg, rgba(201,168,76,0.12), rgba(201,168,76,0.06)); border: 1px solid rgba(201,168,76,0.25); border-radius: 10px; padding: 10px 18px; text-align: center; font-size: 0.78rem; font-weight: 600; color: #92700e; margin: 20px 0 18px; letter-spacing: 0.02em; }
  .rm-topbar-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
  .rm-connect-card { background: white; border: 1.5px solid #e2ddd5; border-radius: 14px; padding: 22px 24px; position: relative; cursor: default; transition: border-color 0.15s; }
  .rm-connect-card:hover { border-color: #c9a84c; }
  .rm-connect-title { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 700; color: #0f1f3d; margin-bottom: 4px; }
  .rm-connect-sub { font-size: 0.75rem; color: #4a5568; line-height: 1.4; }
  .rm-coming-badge { position: absolute; top: 14px; right: 14px; background: #0f1f3d; color: #c9a84c; font-size: 0.6rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.08em; }
  .rm-stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
  .rm-stat-card { background: #0f1f3d; border-radius: 12px; padding: 18px 20px; text-align: center; }
  .rm-stat-value { font-family: 'Playfair Display', serif; font-size: 1.35rem; font-weight: 700; color: #c9a84c; line-height: 1.2; }
  .rm-stat-label { font-size: 0.65rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }
  .rm-urgency-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 22px; }
  .rm-urgency-card { border-radius: 12px; padding: 16px 14px; text-align: center; border: 1.5px solid transparent; cursor: pointer; transition: all 0.15s; }
  .rm-urgency-card.rm-filter-active { background: #0f1f3d !important; border-color: #0f1f3d !important; }
  .rm-urgency-card.rm-filter-active .rm-urgency-count, .rm-urgency-card.rm-filter-active .rm-urgency-label { color: #c9a84c !important; }
  .rm-urgency-count { font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 700; line-height: 1; margin-bottom: 4px; }
  .rm-urgency-label { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
  .rm-urg-green { background: #ecfdf5; border-color: #a7f3d0; } .rm-urg-green .rm-urgency-count { color: #059669; } .rm-urg-green .rm-urgency-label { color: #047857; }
  .rm-urg-gold { background: #fffbeb; border-color: #fcd34d; } .rm-urg-gold .rm-urgency-count { color: #b45309; } .rm-urg-gold .rm-urgency-label { color: #92400e; }
  .rm-urg-red { background: #fef2f2; border-color: #fca5a5; } .rm-urg-red .rm-urgency-count { color: #dc2626; } .rm-urg-red .rm-urgency-label { color: #b91c1c; }
  .rm-urg-burg { background: #fdf2f8; border-color: #f9a8d4; } .rm-urg-burg .rm-urgency-count { color: #9d174d; } .rm-urg-burg .rm-urgency-label { color: #831843; }
  .rm-urg-gray { background: #f3f4f6; border-color: #d1d5db; } .rm-urg-gray .rm-urgency-count { color: #4b5563; } .rm-urg-gray .rm-urgency-label { color: #6b7280; }
  .rm-month-selector { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 2px; }
  .rm-month-btn { background: white; border: 1.5px solid #e2ddd5; border-radius: 8px; padding: 8px 14px; font-family: 'DM Sans', sans-serif; font-size: 0.78rem; font-weight: 600; color: #4a5568; cursor: pointer; transition: all 0.15s; white-space: nowrap; flex-shrink: 0; }
  .rm-month-btn:hover { border-color: #c9a84c; color: #0f1f3d; }
  .rm-month-btn.active { background: #0f1f3d; color: #c9a84c; border-color: #0f1f3d; }
  .rm-month-snapshot { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 22px; }
  .rm-snap-card { background: white; border: 1.5px solid #e8e4dc; border-radius: 10px; padding: 14px 12px; text-align: center; cursor: pointer; transition: all 0.15s; }
  .rm-snap-card:hover { border-color: #c9a84c; }
  .rm-snap-card.rm-filter-active { background: #0f1f3d !important; border-color: #0f1f3d !important; }
  .rm-snap-card.rm-filter-active .rm-snap-value { color: #c9a84c !important; }
  .rm-snap-card.rm-filter-active .rm-snap-label { color: rgba(255,255,255,0.5) !important; }
  .rm-clear-filter { display: inline-block; font-size: 0.72rem; color: #c9a84c; cursor: pointer; margin-left: 8px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
  .rm-snap-value { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; color: #0f1f3d; }
  .rm-snap-label { font-size: 0.6rem; color: #4a5568; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }
  .rm-list-section { background: white; border: 1.5px solid #e8e4dc; border-radius: 14px; overflow: hidden; margin-bottom: 28px; }
  .rm-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
  .rm-table thead th { background: #0f1f3d; color: rgba(255,255,255,0.7); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; padding: 12px 16px; text-align: left; }
  .rm-table tbody tr { border-bottom: 1px solid #f0efe9; cursor: pointer; transition: background 0.12s; }
  .rm-table tbody tr:hover { background: rgba(201,168,76,0.04); }
  .rm-table tbody tr:last-child { border-bottom: none; }
  .rm-table td { padding: 13px 16px; color: #0f1f3d; vertical-align: middle; }
  .rm-table td:first-child { font-weight: 600; }
  .rm-status-badge { display: inline-block; font-size: 0.65rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
  .rm-badge-bound { background: #d1fae5; color: #065f46; }
  .rm-badge-inprogress { background: #dbeafe; color: #1e40af; }
  .rm-badge-notstarted { background: #f3f4f6; color: #4b5563; }
  .rm-badge-nonrenewal { background: #fef2f2; color: #991b1b; }
  .rm-badge-lost { background: #f3f4f6; color: #6b7280; border: 1px solid #d1d5db; }
  .rm-badge-pastdue { background: #fdf2f8; color: #9d174d; }
  .rm-bottom-cta { text-align: center; padding: 10px 0 30px; }
  .rm-inquire-btn { display: inline-block; background: #0f1f3d; color: #c9a84c; border: none; border-radius: 10px; padding: 14px 36px; font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; text-decoration: none; transition: all 0.2s; }
  .rm-inquire-btn:hover { background: #1a3260; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(15,31,61,0.18); }
  /* Drawer */
  .rm-drawer-backdrop { position: fixed; top: 0; bottom: 0; right: 0; left: 224px; background: rgba(15,31,61,0.35); z-index: 90; backdrop-filter: blur(2px); display: none; }
  .rm-drawer-backdrop.open { display: block; }
  .rm-drawer { position: fixed; top: 0; right: -480px; width: 470px; height: 100vh; background: white; z-index: 91; box-shadow: -8px 0 40px rgba(15,31,61,0.15); display: flex; flex-direction: column; transition: right 0.3s cubic-bezier(0.4,0,0.2,1); }
  .rm-drawer.open { right: 0; }
  .rm-drawer-header { background: #0f1f3d; padding: 22px 24px; flex-shrink: 0; }
  .rm-drawer-header .rm-dh-name { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 700; color: white; margin-bottom: 8px; }
  .rm-drawer-header .rm-dh-meta { display: flex; gap: 16px; flex-wrap: wrap; }
  .rm-drawer-header .rm-dh-meta span { font-size: 0.75rem; color: rgba(255,255,255,0.55); }
  .rm-drawer-header .rm-dh-meta strong { color: #c9a84c; }
  .rm-drawer-header .rm-dh-close { position: absolute; top: 16px; right: 18px; background: none; border: none; color: rgba(255,255,255,0.5); font-size: 1.3rem; cursor: pointer; }
  .rm-drawer-header .rm-dh-close:hover { color: white; }
  .rm-drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
  .rm-note-entry { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f0efe9; }
  .rm-note-entry:last-child { border-bottom: none; }
  .rm-note-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
  .rm-note-dot.quote { background: #3b82f6; } .rm-note-dot.email { background: #8b5cf6; } .rm-note-dot.nonrenewal { background: #dc2626; }
  .rm-note-dot.lossrun { background: #f59e0b; } .rm-note-dot.declined { background: #ef4444; } .rm-note-dot.note { background: #6b7280; }
  .rm-note-dot.bound { background: #059669; } .rm-note-dot.submission { background: #0ea5e9; }
  .rm-note-content { flex: 1; min-width: 0; }
  .rm-note-tag { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; }
  .rm-note-tag.quote { color: #3b82f6; } .rm-note-tag.email { color: #8b5cf6; } .rm-note-tag.nonrenewal { color: #dc2626; }
  .rm-note-tag.lossrun { color: #f59e0b; } .rm-note-tag.declined { color: #ef4444; } .rm-note-tag.note { color: #6b7280; }
  .rm-note-tag.bound { color: #059669; } .rm-note-tag.submission { color: #0ea5e9; }
  .rm-note-text { font-size: 0.82rem; color: #0f1f3d; line-height: 1.55; }
  .rm-note-time { font-size: 0.68rem; color: #9ca3af; margin-top: 4px; }
  .rm-drawer-footer { border-top: 1px solid #e8e4dc; padding: 16px 24px; flex-shrink: 0; }
  .rm-drop-zone { border: 1.5px dashed #d1d5db; border-radius: 10px; padding: 14px; text-align: center; margin-bottom: 12px; position: relative; cursor: default; }
  .rm-drop-icon { font-size: 1.2rem; color: #9ca3af; }
  .rm-drop-label { font-size: 0.72rem; color: #9ca3af; margin-top: 2px; }
  .rm-drop-tooltip { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: #0f1f3d; color: #c9a84c; font-size: 0.68rem; font-weight: 600; padding: 6px 12px; border-radius: 6px; white-space: nowrap; }
  .rm-drop-zone:hover .rm-drop-tooltip { display: block; }
  .rm-note-input-row { display: flex; gap: 8px; }
  .rm-note-input { flex: 1; border: 1.5px solid #e2ddd5; border-radius: 8px; padding: 9px 12px; font-family: 'DM Sans', sans-serif; font-size: 0.82rem; outline: none; }
  .rm-note-input:focus { border-color: #c9a84c; }
  .rm-note-btn { background: #0f1f3d; color: #c9a84c; border: none; border-radius: 8px; padding: 9px 18px; font-family: 'DM Sans', sans-serif; font-size: 0.78rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
  .rm-note-btn:hover { background: #1a3260; }
  @media (max-width: 900px) { .rm-stats-bar { grid-template-columns: repeat(2, 1fr); } .rm-urgency-row { grid-template-columns: repeat(3, 1fr); } .rm-month-snapshot { grid-template-columns: repeat(3, 1fr); } .rm-drawer { width: 100%; right: -100%; } .rm-drawer-backdrop { left: 0; } }
  @media (max-width: 600px) { .rm-topbar-row { grid-template-columns: 1fr; } .rm-urgency-row { grid-template-columns: repeat(2, 1fr); } .rm-month-snapshot { grid-template-columns: repeat(2, 1fr); } }

  /* Upload zone */
  .ams-upload-zone { border: 2px dashed #d0d5dd; border-radius: 14px; padding: 48px 32px; text-align: center; background: #fafbfc; cursor: pointer; transition: all 0.2s; position: relative; }
  .ams-upload-zone:hover, .ams-upload-zone.drag-over { border-color: #c9a84c; background: #fffdf5; }
  .ams-upload-icon { font-size: 2.5rem; margin-bottom: 14px; }
  .ams-upload-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: #0f1f3d; margin-bottom: 6px; }
  .ams-upload-hint { font-size: 0.8rem; color: #4a5568; line-height: 1.6; max-width: 420px; margin: 0 auto 16px; }
  .ams-upload-btn { background: #0f1f3d; color: white; border: none; border-radius: 8px; padding: 9px 20px; font-family: 'DM Sans', sans-serif; font-size: 0.82rem; font-weight: 600; cursor: pointer; }
  .ams-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
  .ams-instructions { margin-top: 24px; background: white; border: 1.5px solid #eaecf0; border-radius: 12px; padding: 20px 24px; }
  .ams-instructions-title { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #4a5568; margin-bottom: 12px; }
  .ams-step-list { display: flex; flex-direction: column; gap: 10px; }
  .ams-step { display: flex; gap: 12px; align-items: flex-start; font-size: 0.82rem; color: #4a5568; line-height: 1.5; }
  .ams-step-num { width: 22px; height: 22px; border-radius: 50%; background: #0f1f3d; color: white; font-size: 0.68rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
  .ams-step strong { color: #0f1f3d; }

  /* Mapping review */
  .ams-mapping-card { background: white; border: 1.5px solid #eaecf0; border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
  .ams-mapping-header { background: #0f1f3d; color: white; padding: 14px 20px; display: flex; align-items: center; gap: 10px; }
  .ams-mapping-title { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; flex: 1; }
  .ams-mapping-badge { font-size: 0.7rem; font-weight: 600; background: rgba(201,168,76,0.3); color: var(--gold-light); padding: 2px 8px; border-radius: 10px; }
  .ams-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .ams-field-grid .ams-field-row { display: contents; }
  .ams-field-grid .ams-field-row > div { padding: 10px 20px; font-size: 0.8rem; border-bottom: 1px solid #f0f2f5; }
  .ams-field-row:last-child > div { border-bottom: none; }
  .ams-field-csv { color: #4a5568; font-family: monospace; font-size: 0.75rem; background: #f7f8fa; }
  .ams-field-mapped { color: #0f1f3d; font-weight: 600; display: flex; align-items: center; gap: 6px; }
  .ams-field-mapped .conf-high { color: #059669; font-size: 0.68rem; }
  .ams-field-mapped .conf-low { color: #d97706; font-size: 0.68rem; }
  .ams-field-skip { color: #aaa; font-style: italic; font-size: 0.75rem; }
  .ams-preview-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
  .ams-preview-table th { background: #f7f8fa; padding: 9px 14px; text-align: left; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #4a5568; border-bottom: 2px solid #eaecf0; white-space: nowrap; }
  .ams-preview-table td { padding: 9px 14px; border-bottom: 1px solid #f0f2f5; color: #1a2a4a; vertical-align: top; }
  .ams-preview-table tr:last-child td { border-bottom: none; }
  .ams-preview-table tr:hover td { background: #fafbff; }
  .ams-expiry-urgent { color: #dc2626; font-weight: 700; }
  .ams-expiry-soon { color: #d97706; font-weight: 600; }
  .ams-expiry-ok { color: #059669; }
  .ams-import-bar { display: flex; align-items: center; gap: 12px; padding: 16px 0; }
  .ams-import-btn { background: linear-gradient(135deg, #0f1f3d, #1a3060); color: white; border: none; border-radius: 9px; padding: 11px 24px; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; font-weight: 700; cursor: pointer; border-bottom: 2px solid #c9a84c; letter-spacing: 0.03em; }
  .ams-import-btn:disabled { opacity: 0.5; cursor: not-allowed; }
  .ams-count-badge { font-size: 0.78rem; color: #4a5568; }

  /* Renewal pipeline */
  .ams-pipeline-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
  .ams-search { flex: 1; min-width: 200px; border: 1.5px solid #e2e5ea; border-radius: 8px; padding: 8px 12px; font-size: 0.82rem; font-family: 'DM Sans', sans-serif; outline: none; }
  .ams-search:focus { border-color: #0f1f3d; }
  .ams-filter-btn { background: white; border: 1.5px solid #e2e5ea; border-radius: 7px; padding: 7px 13px; font-size: 0.75rem; font-weight: 600; font-family: 'DM Sans', sans-serif; cursor: pointer; color: #4a5568; transition: all 0.15s; white-space: nowrap; }
  .ams-filter-btn.active { background: #0f1f3d; color: white; border-color: #0f1f3d; }
  .ams-pipeline-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
  .ams-renewal-card { background: white; border: 1.5px solid #eaecf0; border-radius: 12px; padding: 16px 18px; transition: box-shadow 0.15s, border-color 0.15s; }
  .ams-renewal-card:hover { box-shadow: 0 4px 16px rgba(15,31,61,0.08); border-color: #c5cad5; }
  .ams-renewal-card.urgent { border-left: 4px solid #dc2626; }
  .ams-renewal-card.soon { border-left: 4px solid #d97706; }
  .ams-renewal-card.ok { border-left: 4px solid #059669; }
  .ams-rc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
  .ams-rc-name { font-family: 'Playfair Display', serif; font-size: 0.95rem; font-weight: 700; color: #0f1f3d; line-height: 1.3; }
  .ams-rc-days { font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 10px; white-space: nowrap; flex-shrink: 0; }
  .ams-rc-days.urgent { background: #fef2f2; color: #dc2626; }
  .ams-rc-days.soon { background: #fffbeb; color: #d97706; }
  .ams-rc-days.ok { background: #f0fdf4; color: #059669; }
  .ams-rc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-bottom: 12px; }
  .ams-rc-field { font-size: 0.72rem; color: #4a5568; }
  .ams-rc-field strong { color: #0f1f3d; display: block; font-size: 0.78rem; }
  .ams-rc-actions { display: flex; gap: 8px; }
  .ams-rc-btn { flex: 1; border: none; border-radius: 7px; padding: 7px 10px; font-family: 'DM Sans', sans-serif; font-size: 0.72rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
  .ams-rc-btn.primary { background: #0f1f3d; color: white; }
  .ams-rc-btn.primary:hover { background: #1a3060; }
  .ams-rc-btn.secondary { background: #f0f2f5; color: #0f1f3d; }
  .ams-rc-btn.secondary:hover { background: #e2e5ea; }
  .ams-empty-state { text-align: center; padding: 60px 20px; color: #4a5568; }
  .ams-empty-icon { font-size: 2.5rem; margin-bottom: 14px; }
  .ams-empty-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: #0f1f3d; margin-bottom: 6px; }
  .ams-stats-row { display: flex; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
  .ams-stat-pill { background: white; border: 1.5px solid #eaecf0; border-radius: 10px; padding: 12px 18px; display: flex; align-items: center; gap: 10px; }
  .ams-stat-num { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: #0f1f3d; }
  .ams-stat-label { font-size: 0.72rem; color: #4a5568; font-weight: 500; }
  .ams-stat-pill.urgent .ams-stat-num { color: #dc2626; }
  .ams-stat-pill.soon .ams-stat-num { color: #d97706; }
  .ams-clear-btn { background: none; border: 1.5px solid #e2e5ea; border-radius: 7px; padding: 7px 13px; font-size: 0.75rem; font-weight: 600; color: #aaa; cursor: pointer; font-family: 'DM Sans', sans-serif; }
  .ams-clear-btn:hover { color: #dc2626; border-color: #dc2626; }






  .ams-renewal-card.needs-attn { box-shadow: 0 0 0 1px #fcd34d; }
  .ams-renewal-card.is-bound   { box-shadow: none; }

  /* ── Pipeline card workflow status ───────────────────────────────────── */
  .ams-card-workflow { display:flex;align-items:center;gap:6px;margin-bottom:10px;flex-wrap:wrap; }
  .ams-card-path-badge { font-size:0.65rem;font-weight:700;padding:3px 8px;border-radius:10px;white-space:nowrap; }
  .ams-card-path-badge.fast     { background:#dcfce7;color:#15803d; }
  .ams-card-path-badge.remarket { background:#fef3c7;color:#b45309; }
  .ams-card-path-badge.none     { background:#f1f5f9;color:#64748b; }
  .ams-card-stage-badge { font-size:0.65rem;font-weight:600;padding:3px 8px;border-radius:10px;background:#f1f5f9;color:#0f1f3d;white-space:nowrap; }
  .ams-card-non-renewal { font-size:0.65rem;font-weight:700;padding:3px 8px;border-radius:10px;background:#fef2f2;color:#dc2626;white-space:nowrap; }
  .ams-card-last-activity { font-size:0.65rem;color:#4a5568;margin-left:auto; }
  .ams-pipeline-sort { display:flex;align-items:center;gap:6px;font-size:0.75rem;color:#4a5568;margin-left:auto; }
  .ams-pipeline-sort select { font-size:0.72rem;border:1px solid #d1d5db;border-radius:6px;padding:4px 8px;font-family:'DM Sans',sans-serif;color:#0f1f3d;background:white; }
  .ams-card-rate-pill { font-size:0.65rem;font-weight:700;padding:3px 8px;border-radius:10px;white-space:nowrap; }
  .ams-card-rate-pill.competitive { background:#dcfce7;color:#15803d; }
  .ams-card-rate-pill.high-explain { background:#fef3c7;color:#b45309; }
  .ams-card-rate-pill.remarket { background:#fef2f2;color:#dc2626; }
  .ams-stats-workflow { display:flex;gap:8px;flex-wrap:wrap;margin-top:10px; }
  .ams-stat-workflow-pill { font-size:0.72rem;font-weight:600;padding:5px 12px;border-radius:20px;background:#f1f5f9;color:#0f1f3d;white-space:nowrap; }
  .ams-stat-workflow-pill.highlight { background:#0f1f3d;color:#c9a84c; }

  /* ── Renewal Workflow Stages ───────────────────────────────────────────── */
  .ams-path-select { display:flex;gap:12px;margin-bottom:20px;flex-wrap:wrap; }
  .ams-path-btn { flex:1;min-width:220px;border:2px solid #d1d5db;border-radius:12px;padding:16px 18px;cursor:pointer;background:white;text-align:left;transition:all 0.2s;font-family:'DM Sans',sans-serif; }
  .ams-path-btn:hover { border-color:#c9a84c;background:#fffdf7; }
  .ams-path-btn.selected.fast { border-color:#16a34a;background:#f0fdf4; }
  .ams-path-btn.selected.remarket { border-color:#dc2626;background:#fff1f2; }
  .ams-path-btn-icon { font-size:1.4rem;margin-bottom:6px; }
  .ams-path-btn-title { font-size:0.88rem;font-weight:700;color:#0f1f3d;margin-bottom:3px; }
  .ams-path-btn-desc { font-size:0.72rem;color:#4a5568;line-height:1.5; }
  .ams-stage-progress { display:flex;align-items:center;margin-bottom:20px;overflow-x:auto;padding-bottom:4px; }
  .ams-stage-step { display:flex;flex-direction:column;align-items:center;gap:4px;min-width:80px;cursor:pointer;flex:1; }
  .ams-stage-step:hover .ams-stage-dot { opacity:0.8; }
  .ams-stage-dot { width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:0.68rem;font-weight:700;transition:all 0.2s;flex-shrink:0; }
  .ams-stage-dot.done { background:#0f1f3d;color:white; }
  .ams-stage-dot.active { background:#c9a84c;color:#0f1f3d; }
  .ams-stage-dot.pending { background:#e5e7eb;color:#9ca3af; }
  .ams-stage-label { font-size:0.62rem;font-weight:600;color:#4a5568;text-align:center;line-height:1.3;max-width:72px; }
  .ams-stage-label.active { color:#0f1f3d;font-weight:700; }
  .ams-stage-connector { height:2px;flex:1;min-width:16px;background:#e5e7eb;margin-bottom:18px; }
  .ams-stage-connector.done { background:#0f1f3d; }
  .ams-stage-panel { border:1px solid #eaecf0;border-radius:12px;padding:22px;margin-bottom:16px;background:white; }
  .ams-stage-panel.active-stage { border-color:#c9a84c;box-shadow:0 0 0 2px rgba(201,168,76,0.12); }
  .ams-stage-title { font-family:'Playfair Display',serif;font-size:1rem;font-weight:700;color:#0f1f3d;margin-bottom:4px; }
  .ams-stage-subtitle { font-size:0.75rem;color:#4a5568;margin-bottom:18px;line-height:1.5; }
  .ams-advance-btn { background:#0f1f3d;color:#c9a84c;border:none;border-radius:9px;padding:11px 22px;font-size:0.82rem;font-weight:700;cursor:pointer;font-family:'DM Sans',sans-serif;margin-top:16px;transition:background 0.15s; }
  .ams-advance-btn:hover { background:#162847; }
  .ams-advance-btn.green { background:#16a34a;color:white; }
  .ams-non-renewal-banner { background:#fef2f2;border:1px solid #fca5a5;border-radius:10px;padding:14px 16px;margin-bottom:16px;display:flex;align-items:center;gap:12px; }
  .ams-non-renewal-banner-text { font-size:0.8rem;color:#dc2626;font-weight:600;line-height:1.5; }
  .ams-checklist { display:flex;flex-direction:column;gap:8px; }
  .ams-checklist-item { display:flex;align-items:flex-start;gap:10px;padding:10px 12px;background:#f8f9fa;border-radius:8px;border:1px solid #eaecf0;cursor:pointer;transition:all 0.15s; }
  .ams-checklist-item.checked { background:#f0fdf4;border-color:#86efac; }
  .ams-checklist-item.na { background:#f8f9fa;border-color:#e5e7eb;opacity:0.6; }
  .ams-checklist-cb { width:16px;height:16px;margin-top:1px;flex-shrink:0;cursor:pointer; }
  .ams-checklist-label { font-size:0.8rem;color:#0f1f3d;font-weight:600;margin-bottom:2px; }
  .ams-checklist-hint { font-size:0.7rem;color:#4a5568;line-height:1.4; }
  .ams-checklist-na { font-size:0.68rem;color:#4a5568;margin-left:auto;flex-shrink:0;text-decoration:underline;cursor:pointer; }
  .ams-submission-grid { display:flex;flex-direction:column;gap:8px; }
  .ams-submission-row { display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:8px;align-items:center;background:#f8f9fa;border:1px solid #eaecf0;border-radius:8px;padding:10px 12px; }
  .ams-submission-carrier { font-size:0.82rem;font-weight:700;color:#0f1f3d; }
  .ams-submission-status { font-size:0.7rem;font-weight:700;padding:3px 8px;border-radius:10px;text-align:center; }
  .ams-submission-status.not-submitted { background:#f1f5f9;color:#64748b; }
  .ams-submission-status.submitted    { background:#fef3c7;color:#d97706; }
  .ams-submission-status.quoted       { background:#dcfce7;color:#16a34a; }
  .ams-submission-status.declined     { background:#fee2e2;color:#dc2626; }
  .ams-quote-grid { display:flex;flex-direction:column;gap:10px; }
  .ams-quote-card { border:1px solid #eaecf0;border-radius:10px;padding:14px 16px;background:white;transition:all 0.15s; }
  .ams-quote-card.recommended { border-color:#c9a84c;background:#fffdf7;box-shadow:0 0 0 2px rgba(201,168,76,0.15); }
  .ams-quote-card-header { display:flex;align-items:center;gap:10px;margin-bottom:10px; }
  .ams-quote-carrier-name { font-size:0.9rem;font-weight:700;color:#0f1f3d;flex:1; }
  .ams-quote-rate-pill { font-size:0.72rem;font-weight:700;padding:3px 10px;border-radius:12px; }
  .ams-quote-rate-pill.competitive { background:#dcfce7;color:#16a34a; }
  .ams-quote-rate-pill.high { background:#fef3c7;color:#d97706; }
  .ams-quote-fields { display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px; }
  .ams-offer-change { display:flex;gap:10px;flex-wrap:wrap;margin-top:12px; }
  .ams-offer-change-item { background:#f8f5ef;border:1px solid #e5ddd0;border-radius:8px;padding:10px 12px;flex:1;min-width:140px; }
  .ams-offer-change-label { font-size:0.68rem;font-weight:700;color:#4a5568;text-transform:uppercase;letter-spacing:0.04em;margin-bottom:4px; }
  .ams-offer-change-value { font-size:0.85rem;font-weight:700;color:#0f1f3d; }
  .ams-offer-change-note { font-size:0.68rem;color:#4a5568;margin-top:2px; }
  .ams-bind-box { background:linear-gradient(135deg,#f0fdf4,#dcfce7);border:1px solid #86efac;border-radius:12px;padding:20px;text-align:center; }
  .ams-close-checklist { display:flex;flex-direction:column;gap:8px; }
  .ams-close-item { display:flex;align-items:center;gap:10px;padding:10px 14px;background:#f8f9fa;border-radius:8px;border:1px solid #eaecf0; }
  .ams-close-item.done { background:#f0fdf4;border-color:#86efac; }

  /* ── Renewal Record Detail View ───────────────────────────────────────── */
  .ams-record-back { display:flex;align-items:center;gap:8px;background:none;border:none;color:#4a5568;font-size:0.8rem;font-weight:600;cursor:pointer;padding:0 0 16px;font-family:'DM Sans',sans-serif;transition:color 0.15s; }
  .ams-record-back:hover { color:#0f1f3d; }
  .ams-record-header { background:#0f1f3d;border-radius:12px;padding:20px 24px;margin-bottom:20px;display:flex;align-items:flex-start;justify-content:space-between;flex-wrap:wrap;gap:12px; }
  .ams-record-client { font-family:'Playfair Display',serif;font-size:1.3rem;font-weight:700;color:white;margin-bottom:4px; }
  .ams-record-meta { font-size:0.75rem;color:rgba(255,255,255,0.55);line-height:1.8; }
  .ams-record-meta strong { color:rgba(255,255,255,0.85); }
  .ams-record-badges { display:flex;flex-direction:column;align-items:flex-end;gap:8px; }
  .ams-expiry-badge { font-size:0.75rem;font-weight:700;padding:5px 12px;border-radius:20px;white-space:nowrap; }
  .ams-expiry-badge.urgent { background:#fee2e2;color:#dc2626; }
  .ams-expiry-badge.soon   { background:#fef3c7;color:#d97706; }
  .ams-expiry-badge.ok     { background:#dcfce7;color:#16a34a; }
  .ams-expiry-badge.gray   { background:rgba(255,255,255,0.1);color:rgba(255,255,255,0.6); }
  .ams-status-select { font-size:0.72rem;font-weight:700;border:1px solid rgba(201,168,76,0.4);border-radius:20px;padding:4px 10px;background:rgba(201,168,76,0.1);color:var(--gold-light);cursor:pointer;font-family:'DM Sans',sans-serif; }
  .ams-record-section { background:white;border:1px solid #eaecf0;border-radius:12px;padding:20px 22px;margin-bottom:16px; }
  .ams-record-section-title { font-family:'Playfair Display',serif;font-size:0.95rem;font-weight:700;color:#0f1f3d;margin:0 0 16px;display:flex;align-items:center;gap:8px; }
  .ams-field-row { display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;margin-bottom:12px; }
  .ams-field-group { display:flex;flex-direction:column;gap:4px; }
  .ams-field-label { font-size:0.68rem;font-weight:700;color:#4a5568;text-transform:uppercase;letter-spacing:0.04em; }
  .ams-field-value { font-size:0.85rem;color:#0f1f3d;font-weight:600; }
  .ams-field-input { font-size:0.82rem;border:1px solid #d1d5db;border-radius:6px;padding:7px 10px;font-family:'DM Sans',sans-serif;color:#0f1f3d;width:100%;box-sizing:border-box;transition:border-color 0.15s; }
  .ams-field-input:focus { outline:none;border-color:#c9a84c;box-shadow:0 0 0 2px rgba(201,168,76,0.15); }
  .ams-field-select { font-size:0.82rem;border:1px solid #d1d5db;border-radius:6px;padding:7px 10px;font-family:'DM Sans',sans-serif;color:#0f1f3d;width:100%;box-sizing:border-box;background:white; }
  .ams-tiv-row { display:grid;grid-template-columns:1fr 1fr 1fr auto;gap:10px;align-items:end;margin-bottom:10px; }
  .ams-tiv-total { background:linear-gradient(135deg,#0f1f3d,#1a3a6b);border-radius:10px;padding:14px 18px;display:flex;justify-content:space-between;align-items:center;margin-top:14px; }
  .ams-tiv-total-label { font-size:0.75rem;font-weight:700;color:rgba(255,255,255,0.6);text-transform:uppercase;letter-spacing:0.05em; }
  .ams-tiv-total-value { font-size:1.2rem;font-weight:700;color:var(--gold-light);font-family:'Playfair Display',serif; }
  .ams-rate-box { border-radius:10px;padding:16px 18px;margin-top:14px;display:flex;align-items:center;gap:16px; }
  .ams-rate-box.competitive { background:#f0fdf4;border:1px solid #86efac; }
  .ams-rate-box.high-explain { background:#fffbeb;border:1px solid #fcd34d; }
  .ams-rate-box.remarket { background:#fff1f2;border:1px solid #fca5a5; }
  .ams-rate-box.pending { background:#f8f9fa;border:1px solid #eaecf0; }
  .ams-rate-badge { font-size:1.4rem;font-weight:800;min-width:64px;text-align:center; }
  .ams-rate-badge.competitive { color:#16a34a; }
  .ams-rate-badge.high-explain { color:#d97706; }
  .ams-rate-badge.remarket { color:#dc2626; }
  .ams-rate-badge.pending { color:#4a5568; }
  .ams-rate-assessment { font-size:0.8rem;line-height:1.6;color:#0f1f3d; }
  .ams-rate-assessment strong { display:block;font-size:0.85rem;margin-bottom:4px; }
  .ams-als-prompt { background:#fffbeb;border:1px solid #fcd34d;border-radius:8px;padding:12px 14px;margin-top:10px;font-size:0.78rem;color:#92400e;line-height:1.5; }
  .ams-dec-upload { border:2px dashed #d1d5db;border-radius:10px;padding:20px;text-align:center;cursor:pointer;transition:all 0.15s;margin-bottom:14px; }
  .ams-dec-upload:hover { border-color:#c9a84c;background:#fffdf7; }
  .ams-dec-upload-label { font-size:0.82rem;color:#4a5568;margin-top:6px; }
  .ams-dec-uploaded { background:#f0fdf4;border:1px solid #86efac;border-radius:8px;padding:10px 14px;font-size:0.78rem;color:#166534;display:flex;align-items:center;gap:8px;margin-bottom:14px; }
  .ams-extracting { font-size:0.78rem;color:#4a5568;font-style:italic;margin:8px 0; }
  .ams-loss-source { border:1px solid #eaecf0;border-radius:8px;padding:12px 14px;margin-bottom:8px;display:flex;align-items:center;gap:12px;flex-wrap:wrap; }
  .ams-loss-source-carrier { font-weight:700;font-size:0.82rem;color:#0f1f3d;min-width:140px; }
  .ams-loss-status-badge { font-size:0.68rem;font-weight:700;padding:3px 8px;border-radius:10px;white-space:nowrap; }
  .ams-loss-status-badge.needed    { background:#fee2e2;color:#dc2626; }
  .ams-loss-status-badge.requested { background:#fef3c7;color:#d97706; }
  .ams-loss-status-badge.received  { background:#dcfce7;color:#16a34a; }
  .ams-add-loss-source { font-size:0.78rem;color:#c9a84c;border:1px dashed #c9a84c;background:none;border-radius:6px;padding:6px 12px;cursor:pointer;font-family:'DM Sans',sans-serif;font-weight:600; }
  .ams-activity-log { display:flex;flex-direction:column;gap:8px;max-height:280px;overflow-y:auto; }
  .ams-activity-entry { display:flex;gap:10px;align-items:flex-start;font-size:0.78rem; }
  .ams-activity-dot { width:8px;height:8px;border-radius:50%;background:#c9a84c;margin-top:4px;flex-shrink:0; }
  .ams-activity-dot.auto { background:#94a3b8; }
  .ams-activity-time { color:#4a5568;min-width:90px;flex-shrink:0; }
  .ams-activity-text { color:#0f1f3d;line-height:1.5; }
  .ams-activity-input-row { display:flex;gap:8px;margin-top:10px; }
  .ams-quote-received-box { background:#f8f5ef;border:1px solid #e5ddd0;border-radius:10px;padding:16px 18px;margin-top:12px; }
  .ams-action-bar { display:flex;flex-wrap:wrap;gap:10px;margin-top:4px; }
  .ams-action-btn { font-size:0.78rem;font-weight:700;border:none;border-radius:8px;padding:10px 16px;cursor:pointer;font-family:'DM Sans',sans-serif;transition:all 0.15s; }
  .ams-action-btn.primary { background:#0f1f3d;color:#c9a84c; }
  .ams-action-btn.primary:hover { background:#162847; }
  .ams-action-btn.secondary { background:white;color:#0f1f3d;border:1px solid #d1d5db; }
  .ams-action-btn.secondary:hover { border-color:#0f1f3d;background:#f8f9fa; }
  .ams-action-btn.gold { background:#c9a84c;color:#0f1f3d; }
  .ams-action-btn.gold:hover { background:var(--gold-light); }
  .ams-underinsured-flag { background:#fff1f2;border:1px solid #fca5a5;border-radius:8px;padding:10px 14px;font-size:0.75rem;color:#dc2626;margin-top:8px;line-height:1.5; }
  .ams-acv-flag { background:#fffbeb;border:1px solid #fcd34d;border-radius:8px;padding:10px 14px;font-size:0.75rem;color:#92400e;margin-top:8px;line-height:1.5; }
  @media(max-width:768px) {
    .ams-tiv-row { grid-template-columns:1fr 1fr; }
    .ams-record-header { flex-direction:column; }
    .ams-record-badges { align-items:flex-start; }
  }

  /* ── Your Book signals panel in Market Intelligence ── */
  .book-signals-panel { background: linear-gradient(135deg, #0f1f3d 0%, #162847 100%); border-radius: 12px; padding: 18px 20px; margin: 16px auto 0; max-width: 900px; }
  .book-signals-title { font-family: 'Playfair Display', serif; font-size: 0.9rem; font-weight: 700; color: var(--gold-light); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
  .book-signals-sub { font-size: 0.72rem; color: rgba(255,255,255,0.5); margin-bottom: 14px; }
  .book-signals-grid { display: flex; flex-wrap: wrap; gap: 10px; }
  .book-signal-card { background: rgba(255,255,255,0.07); border: 1px solid rgba(201,168,76,0.2); border-radius: 9px; padding: 12px 14px; min-width: 160px; flex: 1; }
  .book-signal-carrier { font-size: 0.82rem; font-weight: 700; color: white; margin-bottom: 6px; }
  .book-signal-meta { font-size: 0.7rem; color: rgba(255,255,255,0.55); line-height: 1.7; }
  .book-signal-meta strong { color: var(--gold-light); }
  .book-signals-footer { font-size: 0.68rem; color: rgba(255,255,255,0.3); margin-top: 12px; text-align: right; }
  .book-signals-nodata { font-size: 0.78rem; color: rgba(255,255,255,0.4); font-style: italic; }

  /* ── HOME HERO BANNER (landing page aesthetic) ── */
  .home-hero-banner {
    position: relative;
    background: #0f1f3d;
    border-radius: 18px;
    padding: 44px 52px;
    margin-bottom: 40px;
    overflow: hidden;
    border: 1px solid rgba(201,168,76,0.18);
    box-shadow: 0 20px 60px rgba(15,31,61,0.25), 0 0 0 1px rgba(201,168,76,0.08);
  }
  .home-hero-bg {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 70% 80% at 80% 50%, rgba(201,168,76,0.06) 0%, transparent 60%),
      radial-gradient(ellipse 50% 60% at 10% 80%, rgba(26,48,96,0.6) 0%, transparent 70%);
    pointer-events: none;
  }
  .home-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 20%, transparent 100%);
  }
  .home-hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
  }
  .home-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 18px;
    opacity: 0.85;
  }
  .home-hero-dot {
    width: 5px; height: 5px;
    background: #c9a84c;
    border-radius: 50%;
    animation: pulse 2s infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.75); }
  }
  .home-hero-greeting {
    font-family: 'Playfair Display', serif;
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
  }
  .home-hero-greeting em {
    font-style: italic;
    color: var(--gold-light);
  }
  .home-hero-sub {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.65;
    max-width: 460px;
  }
  .home-hero-logomark {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.18;
    pointer-events: none;
  }

  /* ══════════════════════════════════════
     SVG ICON SYSTEM — replaces all emoji
  ══════════════════════════════════════ */
  .icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
  }
  .icon svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* Tool card icon badge */
  .tool-card-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #0f1f3d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    transition: background 0.2s;
    border: 1px solid rgba(201,168,76,0.2);
  }
  .tool-card:hover .tool-card-icon-wrap {
    background: rgba(201,168,76,0.1);
    border-color: rgba(201,168,76,0.4);
  }
  .tool-card-icon-wrap svg {
    stroke: #c9a84c;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* Nav SVG icons */
  .nav-icon-svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
  }

  /* Upload zone SVG icon */
  .upload-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(201,168,76,0.6);
    margin-bottom: 8px;
  }
  .upload-icon-svg svg {
    width: 32px; height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* Status icon dots (replace ✓ ❌ ⚠ ⏳) */
  .status-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .status-dot::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .status-dot.ok::before   { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.4); }
  .status-dot.err::before  { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.4); }
  .status-dot.warn::before { background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.4); }
  .status-dot.load::before { background: rgba(201,168,76,0.6); animation: pulse 1.5s infinite; }

  /* Category icon chips in Market Intelligence */
  .cat-icon-svg {
    width: 18px; height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
  }


  .tool-soon-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--cream);
    color: #4a5568;
    border: 1px solid #ede8df;
    border-radius: 20px;
    padding: 3px 10px;
  }

  /* ══════════════════════════════════════
     INVOICE BUILDER TOOL
  ══════════════════════════════════════ */
  .tool-screen {
    display: none;
    visibility: hidden;
    height: 100vh;
    overflow: hidden;
  }
  .tool-screen.active { display: flex; visibility: visible; }
  /* Suppress editable hints in hidden screens so they don't leak into accessibility tree */
  .tool-screen:not(.active) [data-editable="true"]::after { content: none !important; display: none !important; }

  /* Invoice specific */
  .invoice-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
  }
  .invoice-input-panel {
    background: white;
    border-right: 1px solid #ede8df;
    padding: 24px 22px;
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .invoice-output-panel {
    background: var(--cream);
    padding: 32px;
    overflow-y: auto;
    height: 100%;
  }
  .invoice-preview-wrap {
    max-width: 800px;
    margin: 0 auto;
  }
  /* Invoice document styles */
  .invoice-doc {
    background: white;
    box-shadow: 0 4px 32px rgba(15,31,61,0.1);
    border-radius: 4px;
    overflow: hidden;
    font-family: 'DM Sans', sans-serif;
  }
  .invoice-doc-header {
    background: #0f1f3d;
    padding: 36px 44px 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .invoice-doc-logo-area { flex: 1; }
  .invoice-doc-title-area { text-align: right; }
  .invoice-doc-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.04em;
    line-height: 1;
  }
  .invoice-doc-num {
    font-size: 0.75rem;
    color: var(--gold-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 6px;
  }
  .invoice-doc-body { padding: 36px 44px; }
  .invoice-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #ede8df;
  }
  .invoice-meta-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #4a5568;
    margin-bottom: 5px;
  }
  .invoice-meta-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f1f3d;
    line-height: 1.4;
  }
  .invoice-line-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
  }
  .invoice-line-table thead tr {
    background: #0f1f3d;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .invoice-line-table thead th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: white;
  }
  .invoice-line-table thead th:last-child { text-align: right; }
  .invoice-line-table tbody tr { border-bottom: 1px solid #ede8df; }
  .invoice-line-table tbody td {
    padding: 12px 14px;
    font-size: 0.87rem;
    color: #0f1f3d;
  }
  .invoice-line-table tbody td:last-child { text-align: right; font-weight: 600; }
  .invoice-total-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 28px;
  }
  .invoice-total-box {
    background: #0f1f3d;
    color: white;
    padding: 14px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 24px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .invoice-total-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
  }
  .invoice-total-amount {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #c9a84c;
  }
  .invoice-payment-section {
    background: var(--cream);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid #ede8df;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .invoice-payment-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #4a5568;
    margin-bottom: 10px;
  }
  .invoice-epay-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #c9a84c;
    color: #0f1f3d;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.02em;
    margin-top: 10px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .invoice-footer {
    border-top: 2px solid #c9a84c;
    padding: 16px 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.72rem;
    color: #4a5568;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .invoice-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    color: #4a5568;
    text-align: center;
    gap: 12px;
  }
  .invoice-empty-state .big-icon { font-size: 3rem; opacity: 0.4; }


  /* ── Print: hide sidebar ── */
  @media print {
    .sidebar, .hamburger-btn, .sidebar-backdrop { display: none !important; }
    .app-shell { display: block !important; height: auto !important; overflow: visible !important; }
    .app-content { height: auto !important; overflow: visible !important; }
  }

  /* ── Sidebar mobile responsive ── */
  @media (max-width: 960px) {
    .sidebar { width: 192px; }
  }
  @media (max-width: 760px) {
    .hamburger-btn { display: flex; }
    .sidebar {
      position: fixed;
      left: 0; top: 0; bottom: 0;
      z-index: 150;
      transform: translateX(-100%);
      transition: transform 0.25s ease;
      width: 224px !important;
      box-shadow: 4px 0 24px rgba(0,0,0,0.3);
    }
    .sidebar.open {
      transform: translateX(0);
    }
    .app-content {
      width: 100%;
    }
  }

  @media (max-width: 768px) {
    /* sidebar handles mobile nav */
    .home-screen { padding: 28px 20px; }
    .tool-grid { grid-template-columns: 1fr; }
    .invoice-layout { grid-template-columns: 1fr; }
    .invoice-input-panel { height: auto; position: static; }
    .invoice-output-panel { height: auto; }
  }

  /* Print — invoice */
  @media print {
    .sidebar, .hamburger-btn, .invoice-input-panel, .proposal-actions, .prop-left-panel { display: none !important; }
    .main-layout { grid-template-columns: 1fr !important; height: auto !important; overflow: visible !important; }
    .output-panel { height: auto !important; overflow: visible !important; }
    .proposal-doc { box-shadow: none !important; }
    .ai-disclaimer { display: none !important; }
    .invoice-output-panel { padding: 0 !important; background: white !important; height: auto !important; overflow: visible !important; }
    .invoice-doc { box-shadow: none !important; }
    .invoice-doc-header { background-color: var(--nav-print-color, #0f1f3d) !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .invoice-line-table thead tr { background-color: var(--nav-print-color, #0f1f3d) !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .invoice-total-box { background-color: var(--nav-print-color, #0f1f3d) !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  }


  /* ══════════════════════════════════════
     QUOTE COMPARISON TOOL
  ══════════════════════════════════════ */
  .comparison-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
  }
  .comparison-input-panel {
    background: white;
    border-right: 1px solid #ede8df;
    padding: 24px 22px;
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .comparison-output-panel {
    background: var(--cream);
    padding: 28px 32px;
    overflow-y: auto;
    height: 100%;
  }

  /* Quote upload slots */
  .quote-slot {
    border: 1.5px solid #ede8df;
    border-radius: 10px;
    padding: 12px 14px;
    background: white;
    transition: border-color 0.15s;
    margin-bottom: 10px;
  }
  .quote-slot.has-file { border-color: #86efac; background: #f0fdf4; }
  .quote-slot-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
  }
  .quote-slot-num {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #0f1f3d;
    color: #c9a84c;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
  }
  .quote-slot-label { font-size: 0.78rem; font-weight: 700; color: #0f1f3d; flex: 1; }
  .quote-slot-remove { background: none; border: none; font-size: 0.72rem; color: #bbb; cursor: pointer; padding: 2px 6px; }
  .quote-slot-remove:hover { color: #dc2626; }
  .quote-file-zone {
    border: 1.5px dashed #d1d5db;
    border-radius: 7px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    font-size: 0.78rem;
    color: #4a5568;
    transition: border-color 0.15s, background 0.15s;
    margin-bottom: 8px;
  }
  .quote-file-zone:hover, .quote-file-zone.dragover { border-color: #c9a84c; background: #fffdf7; color: #0f1f3d; border-style: solid; }
  .quote-file-zone.loaded { border-color: #16a34a; background: #f0fdf4; color: #15803d; }

  /* Comparison document — uses shared doc-shell/doc-lh letterhead */

  /* Carrier info cards (white on white) */
  .carrier-cards-row {
    display: grid;
    gap: 8px;
  }
  .carrier-card {
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    padding: 11px 14px;
    background: white;
  }
  .carrier-card-badge {
    display: inline-flex;
    font-size: 0.62rem;
    font-weight: 800;
    color: #0f1f3d;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 4px;
  }
  .carrier-card-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f1f3d;
    margin-bottom: 2px;
  }
  .carrier-card-meta {
    font-size: 0.7rem;
    color: #4a5568;
    line-height: 1.55;
  }

  /* Premium summary */
  .premium-section {
    padding: 18px 28px;
    border-bottom: 1px solid #e8e4dc;
    background: white;
  }
  .premium-section-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #4a5568;
    margin-bottom: 10px;
  }
  .premium-cards-row { display: grid; gap: 8px; }
  .premium-card {
    border: 1px solid #e4e0d8;
    border-radius: 7px;
    padding: 13px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdfcfa;
  }
  .premium-card.lowest { border-left: 4px solid #16a34a; background: #f3fef6; }
  .premium-card.highest { border-left: 4px solid #dc2626; background: #fef4f4; }
  .premium-card-carrier { font-size: 0.79rem; font-weight: 700; color: #0f1f3d; margin-bottom: 2px; }
  .premium-card-label {
    font-size: 0.62rem; color: #4a5568;
    text-transform: uppercase; letter-spacing: 0.07em;
  }
  .premium-savings { font-size: 0.68rem; color: #dc2626; margin-top: 2px; }
  .premium-card-amount {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem; font-weight: 700; color: #0f1f3d;
    letter-spacing: -0.01em;
  }
  .premium-card.lowest .premium-card-amount { color: #15803d; }
  .premium-card.highest .premium-card-amount { color: #dc2626; }

  /* Recommendation — light panel, dark text */
  .winner-banner {
    padding: 20px 28px;
    border-bottom: 1px solid #e8e4dc;
    border-left: 4px solid #c9a84c;
    background: linear-gradient(135deg, #fffef8 0%, #fffdf3 100%);
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .winner-eyebrow {
    font-size: 0.6rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: #c9a84c; margin-bottom: 4px;
  }
  .winner-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem; font-weight: 700;
    color: #0f1f3d; margin-bottom: 7px;
  }
  .winner-confidence {
    display: inline-flex; align-items: center;
    background: var(--cream); border: 1px solid #ddd8ce;
    border-radius: 20px; padding: 2px 9px;
    font-size: 0.63rem; font-weight: 700;
    color: #4a5568; margin-bottom: 10px;
  }
  .winner-recommendation {
    font-size: 0.83rem; color: #0f1f3d; line-height: 1.65;
    margin-bottom: 10px; padding-bottom: 10px;
    border-bottom: 1px solid #ece9e2;
  }
  .winner-reasons {
    list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 4px;
  }
  .winner-reasons li {
    font-size: 0.8rem; color: #4a5568;
    padding-left: 16px; position: relative; line-height: 1.5;
  }
  .winner-reasons li::before { content: '✓'; position: absolute; left: 0; color: #c9a84c; font-weight: 700; }
  .winner-notes {
    font-size: 0.73rem; color: #4a5568;
    margin-top: 10px; padding-top: 8px;
    border-top: 1px solid #ece9e2; line-height: 1.6;
  }

  /* Sections */
  .comp-section { padding: 18px 28px; border-bottom: 1px solid #e8e4dc; }
  .comp-section:last-of-type { border-bottom: none; }
  .comp-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.88rem; font-weight: 700; color: #0f1f3d;
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 1px solid #ece9e2;
    display: flex; align-items: center; gap: 8px;
  }
  .comp-section-title-num {
    width: 18px; height: 18px; border-radius: 50%;
    background: #0f1f3d; color: #c9a84c;
    font-size: 0.58rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  }

  /* Comparison table — light headers */
  .comp-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
  .comp-table thead tr { background: #0f1f3d; }
  .comp-table thead th {
    padding: 9px 12px;
    font-size: 0.64rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--gold-light); text-align: left;
    border-bottom: none;
  }
  .comp-table thead th:first-child { width: 190px; }
  .comp-table tbody tr { border-bottom: 1px solid #ece9e2; }
  .comp-table tbody tr:hover { background: #fafaf8; }
  .comp-table tbody td {
    padding: 8px 12px; color: #0f1f3d;
    vertical-align: top; line-height: 1.45;
  }
  .comp-table tbody td:first-child {
    font-size: 0.73rem; font-weight: 600; color: #4a5568;
    background: #fafaf8;
  }
  .comp-table .cat-row td {
    background: #eae6dc; font-size: 0.63rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: #0f1f3d; padding: 5px 12px;
    border-bottom: 1px solid #d8d2c4;
  }

  /* Cell value indicators */
  .cell-best { color: #15803d !important; font-weight: 700 !important; }
  .cell-best::before { content: '▲ '; font-size: 0.65em; }
  .cell-worst { color: #b91c1c !important; }
  .cell-na { color: #bbb !important; font-style: italic; font-size: 0.78rem !important; }

  /* Key differences */
  .comp-key-diff { display: flex; flex-direction: column; gap: 7px; }
  .comp-diff-row { border: 1px solid #e8e4dc; border-radius: 6px; overflow: hidden; }
  .comp-diff-label {
    background: #f3f1ec; padding: 5px 12px;
    font-size: 0.65rem; font-weight: 700;
    color: #4a5568; text-transform: uppercase; letter-spacing: 0.08em;
    border-bottom: 1px solid #e8e4dc;
  }
  .comp-diff-values { display: grid; }
  .comp-diff-cell {
    padding: 8px 12px; font-size: 0.81rem; color: #0f1f3d;
    border-right: 1px solid #e8e4dc; line-height: 1.45;
  }
  .comp-diff-cell:last-child { border-right: none; }
  .comp-diff-cell-carrier {
    font-size: 0.63rem; font-weight: 700; color: #4a5568;
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px;
  }
  .comp-diff-cell.advantage { background: #f0fdf4; }
  .comp-diff-cell.disadvantage { background: #fef2f2; }

  /* Gaps */
  .gap-item {
    background: #fff8f0; border-left: 3px solid #f59e0b;
    border-radius: 0 6px 6px 0; padding: 8px 12px;
    margin-bottom: 6px; font-size: 0.81rem; color: #78350f;
    display: flex; gap: 10px; line-height: 1.5;
  }
  .gap-icon { flex-shrink: 0; }

  /* Slot badge */
  .slot-detected-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: #f0fdf4; border: 1px solid #86efac; border-radius: 20px;
    padding: 2px 9px; font-size: 0.68rem; font-weight: 700; color: #15803d; margin-top: 5px;
  }

  /* Progress UI */
  .comp-progress-wrap {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 340px; gap: 24px; padding: 40px;
  }
  .comp-progress-title {
    font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700;
    color: #0f1f3d; text-align: center;
  }
  .comp-progress-steps { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 400px; }
  .comp-progress-step {
    display: flex; align-items: center; gap: 12px; padding: 9px 14px;
    border-radius: 8px; background: white; border: 1.5px solid #ede8df;
    font-size: 0.82rem; color: #4a5568; transition: all 0.2s;
  }
  .comp-progress-step.active { border-color: #c9a84c; background: #fffdf7; color: #0f1f3d; font-weight: 600; }
  .comp-progress-step.done { border-color: #86efac; background: #f0fdf4; color: #15803d; }
  .comp-step-icon {
    width: 22px; height: 22px; border-radius: 50%; background: #ede8df;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.67rem; font-weight: 700; color: #4a5568; flex-shrink: 0; transition: all 0.2s;
  }
  .comp-progress-step.active .comp-step-icon { background: #c9a84c; color: #0f1f3d; animation: comp-pulse 1.2s infinite; }
  .comp-progress-step.done .comp-step-icon { background: #16a34a; color: white; }
  @keyframes comp-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(201,168,76,0); }
  }
  .comp-progress-bar-wrap { width: 100%; max-width: 400px; height: 3px; background: #ede8df; border-radius: 99px; overflow: hidden; }
  .comp-progress-bar { height: 100%; background: linear-gradient(90deg, #0f1f3d, #c9a84c); border-radius: 99px; transition: width 0.5s ease; }

  .comparison-empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    height: 400px; color: #4a5568; text-align: center; gap: 12px;
  }

  @media print {
    .sidebar, .hamburger-btn, .comparison-input-panel, #compActionBar { display: none !important; }
    .ai-disclaimer { display: none !important; }
    .comparison-output-panel { padding: 0 !important; height: auto !important; overflow: visible !important; background: white !important; }
    .winner-banner, .premium-card { print-color-adjust: exact !important; -webkit-print-color-adjust: exact !important; }
  }

  @media (max-width: 768px) {
    .comparison-layout { grid-template-columns: 1fr; }
    .comparison-input-panel { height: auto; position: static; }
    .comparison-output-panel { height: auto; }
    .comp-section, .premium-cards-row, .winner-banner { padding: 16px; }
  }

  /* ══════════════════════════════════════
     MARKET INTELLIGENCE / APPETITE TOOL
  ══════════════════════════════════════ */
  .appetite-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    background: var(--cream);
    overflow-y: auto;
  }
  .appetite-input-panel {
    background: white;
    border-bottom: 2px solid #ede8df;
    padding: 24px 32px;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .appetite-output-panel {
    background: var(--cream);
    padding: 32px;
    flex: 1;
  }

  /* ── Market Intel Collapsible Sections ── */
  .mi-section { margin-bottom: 12px; border-radius: 12px; overflow: hidden; border: 1.5px solid #e2ddd5; background: white; }
  .mi-section-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; cursor: pointer; background: white; transition: background 0.15s; user-select: none; }
  .mi-section-header:hover { background: rgba(201,168,76,0.04); }
  .mi-section-header.active { background: #0f1f3d; }
  .mi-section-header.active .mi-section-title { color: white; }
  .mi-section-header.active .mi-section-sub { color: rgba(255,255,255,0.5); }
  .mi-section-header.active .mi-chevron { color: #c9a84c; }
  .mi-section-title { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: #0f1f3d; display: flex; align-items: center; gap: 10px; }
  .mi-section-sub { font-size: 0.72rem; color: #4a5568; white-space: nowrap; }
  .mi-chevron { font-size: 0.85rem; color: #9ca3af; transition: transform 0.25s; flex-shrink: 0; margin-left: 12px; }
  .mi-chevron.open { transform: rotate(180deg); }
  .mi-section-body { display: none; padding: 18px; border-top: 1px solid #eaecf0; }
  .mi-section-body.open { display: block; }
  .mi-results-inline { display: none; padding: 0 18px 18px; }
  .mi-results-inline.visible { display: block; animation: miFadeIn 0.3s ease; }
  @keyframes miFadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

  /* Risk factor chips */
  .risk-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
  }
  .risk-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border: 1.5px solid #ede8df;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.12s;
    background: white;
    user-select: none;
  }
  .risk-chip:hover { border-color: #0f1f3d; color: #0f1f3d; }
  .risk-chip.selected { background: #0f1f3d; color: white; border-color: #0f1f3d; }
  .risk-chip.selected.warning { background: #dc2626; border-color: #dc2626; }

  /* Quick Search flag checkboxes */
  .qs-flag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1.5px solid #ede8df;
    border-radius: 20px;
    font-family: DM Sans, sans-serif;
    font-size: 0.73rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    background: white;
    user-select: none;
    transition: all 0.12s;
  }
  .qs-flag:hover { border-color: #dc2626; color: #dc2626; }
  .qs-flag input { accent-color: #dc2626; margin: 0; }

  /* Carrier result cards */
  .appetite-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
  }
  .appetite-header-strip {
    background: #0f1f3d;
    border-radius: 12px;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .appetite-header-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
  }
  .appetite-header-sub {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
  }
  .appetite-summary-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .appetite-summary-pill {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.04em;
  }
  .pill-strong { background: #f0fdf4; color: #15803d; }
  .pill-possible { background: #fefce8; color: #a16207; }
  .pill-limited { background: #fff7ed; color: #c2410c; }

  /* Individual carrier card */
  .carrier-result-card {
    background: white;
    border: 1.5px solid #ede8df;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15,31,61,0.05);
    transition: box-shadow 0.15s;
  }
  .carrier-result-card:hover { box-shadow: 0 4px 20px rgba(15,31,61,0.1); }
  .carrier-result-card.appetite-strong { border-left: 4px solid #16a34a; }
  .carrier-result-card.appetite-possible { border-left: 4px solid #ca8a04; }
  .carrier-result-card.appetite-limited { border-left: 4px solid #ea580c; }
  .carrier-result-card.appetite-es { border-left: 4px solid #7c3aed; }

  .carrier-card-header {
    padding: 16px 20px 14px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border-bottom: 1px solid #ede8df;
  }
  .carrier-rank-badge {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #0f1f3d;
    color: #c9a84c;
    font-size: 0.72rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
  }
  .carrier-name-block { flex: 1; }
  .carrier-result-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f1f3d;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .appetite-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    letter-spacing: 0.04em;
  }
  .ab-strong { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
  .ab-possible { background: #fefce8; color: #a16207; border: 1px solid #fde047; }
  .ab-limited { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
  .ab-es { background: #f5f3ff; color: #7c3aed; border: 1px solid #ddd6fe; }

  .carrier-card-body { padding: 16px 20px; }
  .carrier-body-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
  }
  .carrier-body-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #4a5568;
    margin-bottom: 7px;
  }
  .carrier-fit-list, .carrier-tip-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .carrier-fit-list li {
    font-size: 0.8rem;
    color: #0f1f3d;
    padding-left: 14px;
    position: relative;
    line-height: 1.5;
  }
  .carrier-fit-list li::before { content: '✓'; position: absolute; left: 0; color: #16a34a; font-weight: 700; }
  .carrier-tip-list li {
    font-size: 0.8rem;
    color: #0f1f3d;
    padding-left: 14px;
    position: relative;
    line-height: 1.5;
  }
  .carrier-tip-list li::before { content: '→'; position: absolute; left: 0; color: #c9a84c; font-weight: 700; }

  .carrier-dealbreakers {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 10px;
  }
  .carrier-dealbreakers-title {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #dc2626;
    margin-bottom: 5px;
  }
  .carrier-dealbreakers ul {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 3px;
  }
  .carrier-dealbreakers ul li {
    font-size: 0.8rem;
    color: #991b1b;
    padding-left: 14px;
    position: relative;
    line-height: 1.5;
  }
  .carrier-dealbreakers ul li::before { content: '✕'; position: absolute; left: 0; font-weight: 700; }

  /* Agency memory confirm strip */
  .carrier-memory-strip {
    padding: 10px 20px;
    background: #f8f5ef;
    border-top: 1px solid #ede8df;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .carrier-memory-btns { display: flex; gap: 6px; }
  .memory-btn {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.12s;
  }
  .memory-btn-confirm { background: #f0fdf4; color: #15803d; border-color: #86efac; }
  .memory-btn-confirm:hover { background: #15803d; color: white; }
  .memory-btn-decline { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
  .memory-btn-decline:hover { background: #dc2626; color: white; }
  .memory-btn-note { background: white; color: #4a5568; border-color: #ede8df; }
  .memory-btn-note:hover { border-color: #0f1f3d; color: #0f1f3d; }
  .memory-confirmed-tag {
    font-size: 0.7rem;
    font-weight: 600;
    color: #15803d;
    background: #f0fdf4;
    border: 1px solid #86efac;
    padding: 3px 9px;
    border-radius: 20px;
  }
  .memory-declined-tag {
    font-size: 0.7rem;
    font-weight: 600;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 3px 9px;
    border-radius: 20px;
  }

  /* Web search activity indicator */
  .search-activity {
    background: white;
    border: 1px solid #ede8df;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.8rem;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 900px;
    margin: 0 auto 16px;
  }
  .search-pulse {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #c9a84c;
    animation: pulse 1s infinite;
    flex-shrink: 0;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
  }

  /* Agency intelligence panel */
  .agency-intel-panel {
    background: white;
    border: 1.5px solid #c9a84c;
    border-radius: 12px;
    padding: 18px 20px;
    max-width: 900px;
    margin: 0 auto 16px;
  }
  .agency-intel-title {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #0f1f3d;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .appetite-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #4a5568;
    text-align: center;
    gap: 12px;
  }

  @media (max-width: 768px) {
    .appetite-layout { grid-template-columns: 1fr; }
    .appetite-input-panel { height: auto; position: static; }
    .appetite-output-panel { height: auto; padding: 20px; }
    .carrier-body-grid { grid-template-columns: 1fr; }
  }

  /* Property Data Panel */
  .prop-data-panel {
    background: linear-gradient(135deg, #f0f7ff, #e8f4fd);
    border: 1.5px solid #93c5fd;
    border-radius: 10px;
    padding: 12px 14px;
    margin-top: 8px;
    font-size: 0.78rem;
  }
  .prop-data-header {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #1d4ed8;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .prop-data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .prop-data-item {
    background: white;
    border-radius: 6px;
    padding: 6px 9px;
    border: 1px solid #dbeafe;
  }
  .prop-data-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 2px;
  }
  .prop-data-value {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0f1f3d;
  }
  .prop-data-value.risk-high { color: #dc2626; }
  .prop-data-value.risk-med { color: #ca8a04; }
  .prop-data-value.risk-low { color: #16a34a; }
  .prop-data-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #1d4ed8;
    padding: 6px 0;
  }
  .prop-autofill-strip {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dbeafe;
    font-size: 0.72rem;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }
  .prop-autofill-btn {
    background: #1d4ed8;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 3px 9px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
  }
  .prop-risk-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
  }
  .prop-risk-flag.flag-warn { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
  .prop-risk-flag.flag-ok { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
  .prop-risk-flag.flag-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }


  /* ── Category Selector ── */
  .cat-selector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 4px;
  }
  .cat-card {
    border: 2px solid #ede8df;
    border-radius: 10px;
    padding: 10px 10px 9px;
    cursor: pointer;
    transition: all 0.14s;
    background: white;
    text-align: center;
    user-select: none;
  }
  .cat-card:hover { border-color: #0f1f3d; background: #f8f9ff; }
  .cat-card.selected { border-color: #0f1f3d; background: #0f1f3d; }
  .cat-card-icon { font-size: 1.4rem; line-height: 1; display: block; margin-bottom: 4px; }
  .cat-card-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #0f1f3d;
    line-height: 1.3;
    display: block;
  }
  .cat-card.selected .cat-card-label { color: #c9a84c; }

  /* Category-specific fields panel */
  .cat-fields-panel {
    background: var(--cream);
    border: 1.5px solid rgba(15,31,61,0.12);
    border-radius: 10px;
    padding: 14px 14px 10px;
  }
  .cat-fields-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0f1f3d;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(15,31,61,0.1);
  }
  .cat-field-row { margin-bottom: 10px; }
  .cat-field-row:last-child { margin-bottom: 0; }
  .cat-field-row label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #0f1f3d;
    display: block;
    margin-bottom: 4px;
  }
  .cat-field-row input, .cat-field-row select, .cat-field-row textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid rgba(15,31,61,0.18);
    border-radius: 7px;
    padding: 7px 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    color: #0f1f3d;
    outline: none;
    background: white;
    transition: border-color 0.15s, background 0.15s;
  }
  .cat-field-row input:focus, .cat-field-row select:focus {
    border-color: #0f1f3d;
    box-shadow: 0 0 0 2px rgba(15,31,61,0.08);
  }
  /* Auto-filled field highlight */
  .field-autofilled input, .field-autofilled select {
    background: rgba(201,168,76,0.07);
    border-left: 3px solid #c9a84c;
    padding-left: 8px;
  }
  /* Cat section group box */
  .cat-group-box {
    background: rgba(15,31,61,0.03);
    border: 1.5px solid rgba(15,31,61,0.12);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 4px 0 10px;
  }
  .cat-group-box.warn {
    background: rgba(201,168,76,0.06);
    border-color: rgba(201,168,76,0.5);
  }
  .cat-group-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0f1f3d;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .cat-group-box.warn .cat-group-label { color: #92400e; }
  .cat-group-hint {
    font-size: 0.68rem;
    color: #4a5568;
    margin-top: 5px;
    line-height: 1.45;
  }
  .cat-group-box.warn .cat-group-hint { color: #92400e; }
  /* Auto-filled badge */
  .autofill-badge {
    display: none;
    font-size: 0.62rem;
    background: #0f1f3d;
    color: #c9a84c;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
  }
  .cat-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

  /* ── Layout ── */

/* ══════════════════════════════════════════════════════════════
   PROPOSAL BUILDER v2 — MAIN LAYOUT
══════════════════════════════════════════════════════════════ */

.main-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 0;
  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
}

/* ══════════════════════════════════════════════════════════════
   PROPOSAL BUILDER v2 — LEFT PANEL
══════════════════════════════════════════════════════════════ */

.prop-left-panel {
  width: 400px;
  min-width: 320px;
  height: 100%;
  background: #f8f7f4;
  border-right: 1px solid #e2ddd5;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}

/* ── Upload Section ── */
.plp-upload-section {
  padding: 18px 18px 14px;
  background: white;
  border-bottom: 1px solid #ede9e1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plp-upload-zone {
  border: 1.5px dashed #c9a84c;
  border-radius: 10px;
  padding: 16px 14px;
  text-align: center;
  cursor: pointer;
  background: #fffdf7;
  transition: background 0.15s, border-color 0.15s;
}
.plp-upload-zone:hover, .plp-upload-zone.drag-over {
  background: #fef9ec;
  border-color: #b8943f;
}
.plp-upload-icon { color: #c9a84c; margin-bottom: 6px; }
.plp-upload-text { font-size: 0.82rem; font-weight: 600; color: #0f1f3d; margin-bottom: 3px; }
.plp-upload-sub  { font-size: 0.68rem; color: #94a3b8; }

.plp-upload-status {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  background: #f8f5ef;
  border-radius: 7px;
  font-size: 0.78rem;
  color: #374151;
}
.plp-upload-fname {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.plp-clear-file {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
}
.plp-clear-file:hover { color: #e11d48; background: #fee2e2; }

.plp-scan-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px 16px;
  background: #0f1f3d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.plp-scan-btn:hover:not(:disabled) { background: #1a3260; }
.plp-scan-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.plp-scan-badge {
  font-size: 0.72rem;
  color: #16a34a;
  font-weight: 600;
  text-align: center;
  min-height: 0;
  transition: all 0.2s;
}
.plp-scan-badge:empty { display: none; }

/* ── Add Manually Button ── */
.plp-add-manual-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 11px 16px;
  background: white;
  color: #0f1f3d;
  border: none;
  border-top: none;
  border-bottom: 1px solid #ede9e1;
  font-size: 0.80rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.01em;
}
.plp-add-manual-btn:hover { background: #f8f5ef; }
.plp-add-manual-btn svg { color: #c9a84c; }

/* ── Account Info Section ── */
.plp-account-section {
  padding: 16px 18px;
  background: white;
  border-bottom: 1px solid #ede9e1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plp-section-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 2px;
}
.plp-field-group { display: flex; flex-direction: column; gap: 4px; }
.plp-label { font-size: 0.70rem; font-weight: 600; color: #5a6a8a; letter-spacing: 0.03em; }
.plp-input {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid #e2ddd5;
  border-radius: 7px;
  font-size: 0.82rem;
  color: #0f1f3d;
  background: white;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.plp-input:focus { outline: none; border-color: #c9a84c; }
.plp-input::placeholder { color: #b0bac8; }

/* ── Coverage Blocks Container ── */
.plp-blocks-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  flex: 1;
}

/* ── Coverage Block ── */
.cov-block {
  border-bottom: 1px solid #e2ddd5;
  background: white;
}
.cov-block.block-navy { background: #0f1f3d; }
.cov-block.block-gold { background: #c9a84c; }

.cov-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  gap: 8px;
}
.block-navy .cov-block-header,
.block-gold .cov-block-header { }

.cov-block-type {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.block-navy .cov-block-type { color: #c9a84c; }
.block-gold .cov-block-type { color: #0f1f3d; }

.cov-block-carrier {
  font-size: 0.72rem;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 8px;
}
.block-navy .cov-block-carrier { color: rgba(255,255,255,0.65); }
.block-gold .cov-block-carrier { color: rgba(15,31,61,0.65); }

.cov-block-premium {
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
}
.block-navy .cov-block-premium { color: white; }
.block-gold .cov-block-premium { color: #0f1f3d; }

.cov-block-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.cov-block-drag-btn,
.cov-block-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 5px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  opacity: 0.6;
  transition: opacity 0.15s, background 0.15s;
}
.cov-block-drag-btn:hover,
.cov-block-remove-btn:hover { opacity: 1; }
.block-navy .cov-block-drag-btn,
.block-navy .cov-block-remove-btn { color: white; }
.block-navy .cov-block-remove-btn:hover { background: rgba(255,255,255,0.15); }
.block-gold .cov-block-drag-btn,
.block-gold .cov-block-remove-btn { color: #0f1f3d; }
.block-gold .cov-block-remove-btn:hover { background: rgba(15,31,61,0.12); }

.cov-block-body {
  background: white;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Fields inside block ── */
.cb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cb-row.full { grid-template-columns: 1fr; }
.cb-row.three { grid-template-columns: 1fr 1fr 1fr; }

.cb-field { display: flex; flex-direction: column; gap: 3px; }
.cb-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8899aa;
}
.cb-input, .cb-select {
  padding: 7px 9px;
  border: 1.5px solid #e2ddd5;
  border-radius: 6px;
  font-size: 0.80rem;
  color: #0f1f3d;
  background: white;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}
.cb-input:focus, .cb-select:focus { outline: none; border-color: #c9a84c; }
.cb-input::placeholder { color: #c0cad8; font-size: 0.77rem; }

/* ── Block section divider ── */
.cb-section-label {
  font-size: 0.60rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #b0bac8;
  padding-bottom: 6px;
  border-bottom: 1px solid #f0ecE6;
  margin-top: 2px;
}

/* ── Toggle row (hab/ab/hnoa style) ── */
.cb-toggle-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cb-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #f8f7f4;
  border-radius: 6px;
  border: 1px solid #e8e4dc;
}
.cb-toggle-label { font-size: 0.76rem; color: #374151; font-weight: 500; }
.cb-toggle-select {
  font-size: 0.74rem;
  border: 1px solid #e2ddd5;
  border-radius: 5px;
  padding: 3px 6px;
  background: white;
  color: #0f1f3d;
  font-family: 'DM Sans', sans-serif;
}

/* ── SOV Upload inside block ── */
.cb-sov-section {
  border-top: 1px solid #f0ece6;
  padding-top: 10px;
  margin-top: 2px;
}
.cb-sov-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 8px 12px;
  background: #f8f5ef;
  border: 1.5px dashed #c9a84c;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #8a6c2a;
  cursor: pointer;
  transition: background 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.cb-sov-btn:hover { background: #fef3d0; }
.cb-sov-uploaded {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 7px;
  font-size: 0.74rem;
  color: #15803d;
  font-weight: 500;
}
.cb-sov-clear {
  margin-left: auto;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 2px;
}
.cb-sov-clear:hover { color: #e11d48; }

/* ── Add class code / schedule rows ── */
.cb-add-row-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px dashed #c0cad8;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.74rem;
  color: #5a6a8a;
  cursor: pointer;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}
.cb-add-row-btn:hover { background: #f0f4ff; border-color: #5a6a8a; }

.cb-schedule-row {
  display: grid;
  gap: 6px;
  align-items: center;
}
.cb-schedule-row.wc-code { grid-template-columns: 80px 1fr 100px 20px; }
.cb-schedule-row.vehicle { grid-template-columns: 1fr 80px 20px; }
.cb-schedule-row.driver  { grid-template-columns: 1fr 80px 20px; }

.cb-row-del {
  background: none;
  border: none;
  color: #c0cad8;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px;
  text-align: center;
}
.cb-row-del:hover { color: #e11d48; }

/* ── Manual Add Modal ── */
.manual-add-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,20,40,0.55);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}
.manual-add-overlay.active { display: flex; }
.manual-add-modal {
  background: white;
  border-radius: 14px;
  width: min(640px, 94vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(10,20,40,0.3);
}
.manual-add-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  background: #0f1f3d;
  flex-shrink: 0;
}
.manual-add-title { font-size: 0.95rem; font-weight: 700; color: white; font-family: 'Playfair Display', serif; }
.manual-add-close {
  background: none; border: none; color: rgba(255,255,255,0.6);
  cursor: pointer; font-size: 1.1rem; padding: 4px 6px;
  border-radius: 5px; transition: color 0.15s;
}
.manual-add-close:hover { color: white; }

.manual-add-type-select {
  padding: 16px 22px;
  border-bottom: 1px solid #f0ece6;
  flex-shrink: 0;
}
.manual-add-type-label {
  font-size: 0.64rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: #8899aa; margin-bottom: 10px;
}
.manual-add-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}
.manual-type-btn {
  padding: 8px 10px;
  border: 1.5px solid #e2ddd5;
  border-radius: 8px;
  background: white;
  font-size: 0.76rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.manual-type-btn:hover { border-color: #c9a84c; color: #0f1f3d; background: #fffdf7; }
.manual-type-btn.selected { border-color: #0f1f3d; background: #0f1f3d; color: white; }

.manual-add-fields {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.manual-add-footer {
  padding: 14px 22px;
  border-top: 1px solid #f0ece6;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.manual-confirm-btn {
  flex: 1;
  padding: 11px;
  background: #0f1f3d;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}
.manual-confirm-btn:hover { background: #1a3260; }
.manual-discard-btn {
  padding: 11px 18px;
  background: none;
  color: #6b7280;
  border: 1.5px solid #e2ddd5;
  border-radius: 8px;
  font-size: 0.84rem;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s;
}
.manual-discard-btn:hover { border-color: #94a3b8; color: #374151; }

/* ── Drag reorder ── */
.cov-block.dragging { opacity: 0.4; }
.cov-block.drag-over-top { border-top: 3px solid #c9a84c; }
.cov-block.drag-over-bottom { border-bottom: 3px solid #c9a84c; }


  .panel-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: #0f1f3d;
    font-weight: 700;
    border-bottom: 1.5px solid rgba(201,168,76,0.3);
    padding-bottom: 10px;
    margin-bottom: 4px;
  }

  .field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
  }
  /* Last field-group in a section shouldn't double-up spacing */
  .field-group:last-child {
    margin-bottom: 0;
  }
  /* two-col gets the same bottom margin so rows breathe evenly */
  .two-col {
    margin-bottom: 14px;
  }
  /* Consistent input sizing across all tools */
  .field-group input,
  .field-group select,
  .field-group textarea,
  .comms-input-panel input,
  .comms-input-panel select,
  .comms-input-panel textarea,
  .docanalyzer-input-panel input,
  .docanalyzer-input-panel select,
  .cert-input-panel input,
  .cert-input-panel select,
  .invoice-input-panel input,
  .invoice-input-panel select,
  .invoice-input-panel textarea,
  .comparison-input-panel input,
  .comparison-input-panel select,
  .appetite-input-panel input,
  .appetite-input-panel select {
    padding: 9px 12px;
    border: 1.5px solid #ede8df;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.84rem;
    color: #0f1f3d;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
  }
  .field-group input:focus,
  .field-group select:focus,
  .field-group textarea:focus,
  .comms-input-panel input:focus,
  .comms-input-panel select:focus,
  .cert-input-panel input:focus,
  .cert-input-panel select:focus,
  .invoice-input-panel input:focus,
  .invoice-input-panel select:focus,
  .comparison-input-panel input:focus,
  .comparison-input-panel select:focus,
  .appetite-input-panel input:focus,
  .appetite-input-panel select:focus { border-color: #0f1f3d; }
  /* Auto-filled field highlight (main form) */
  .field-group.field-autofilled input, .field-group.field-autofilled select {
    background: rgba(201,168,76,0.07);
    border-left: 3px solid #c9a84c;
  }
  .field-group label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a5568;
  }
  .field-group input, .field-group select, .field-group textarea {
    border: 1.5px solid #ede8df;
    border-radius: 8px;
    padding: 10px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    color: #0f1f3d;
    background: var(--cream);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 100%;
  }
  .field-group input:focus, .field-group select:focus, .field-group textarea:focus {
    border-color: #c9a84c;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
    background: var(--white);
  }
  .field-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
  }

  .section-divider {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 4px 0 6px;
    border-bottom: 1px solid #ede8df;
    margin-bottom: 8px;
  }
  .section-divider::before, .section-divider::after { content: none; }

  /* ── Tool empty states (output panels) ── */
  .comms-empty-state, .da-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    flex: 1;
    text-align: center;
    padding: 48px 32px;
    color: #4a5568;
  }

  /* ── Input panel field labels: consistent uppercase style ── */
  .comms-input-panel label,
  .docanalyzer-input-panel label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a5568;
  }

  /* ── Tool input panel: consistent sticky header ── */
  .tool-input-header {
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1.5px solid rgba(201,168,76,0.25);
    flex-shrink: 0;
  }
  .tool-input-header .tool-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f1f3d;
    line-height: 1.2;
  }
  .tool-input-header .tool-subtitle {
    font-size: 0.73rem;
    color: #4a5568;
    margin-top: 3px;
    line-height: 1.4;
  }

  /* ── cat-card layout: left-aligned ── */
  .cat-card {
    text-align: left;
  }
  .cat-card-icon {
    margin-bottom: 6px;
  }
  .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .generate-btn {
    background: #0f1f3d;
    color: var(--white);
    border: none;
    border-radius: 10px;
    padding: 14px 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
  }
  .generate-btn::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: #c9a84c;
    transform: scaleX(0);
    transition: transform 0.3s;
  }
  .generate-btn:hover { background: var(--navy-mid); transform: translateY(-1px); box-shadow: var(--shadow); }
  .generate-btn:hover::before { transform: scaleX(1); }
  .generate-btn:active { transform: translateY(0); }
  .generate-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

  .paste-btn {
    background: transparent;
    border: 1.5px solid #c9a84c;
    color: #c9a84c;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    align-self: flex-start;
  }
  .paste-btn:hover { background: #c9a84c; color: #0f1f3d; }

  /* ── Right Panel (Output) ── */
  .output-panel {
    padding: 32px 36px;
    overflow-y: auto;
    height: 100%;
  }

  .empty-state {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    text-align: center;
    opacity: 0.6;
    gap: 16px;
  }
  .empty-state .icon { font-size: 4rem; opacity: 0.4; }
  .empty-state h3 { font-family: 'Playfair Display', serif; font-size: 1.4rem; }
  .empty-state p { font-size: 0.9rem; max-width: 320px; line-height: 1.6; }

  /* ── Proposal Output ── */
  .proposal-output {
    display: none;
    flex-direction: column;
    gap: 0;
    animation: fadeIn 0.5s ease;
  }
  .proposal-output.visible { display: flex; }

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

  .proposal-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
  }
  .action-btn {
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1.5px solid #0f1f3d;
    background: #0f1f3d;
    color: var(--white);
  }
  .action-btn:hover { background: var(--navy-mid); }
  .action-btn.secondary {
    background: transparent;
    color: #0f1f3d;
  }
  .action-btn.secondary:hover { background: var(--mist); }

  /* ── Proposal Document ── */
  .proposal-doc {
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
  }

  /* ── COVER PAGE — clean white/navy split ── */
  .doc-cover {
    position: relative;
    height: calc(100vh - 200px);
    min-height: 680px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
  }
  /* Gold accent bar at top */
  .cover-accent-bar {
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, #0f1f3d, #c9a84c, var(--gold-light), #c9a84c);
    flex-shrink: 0;
  }
  /* Main content area — fills all space between accent bar and bottom strip */
  .cover-content {
    display: flex;
    flex: 1;
    min-height: 0;
    align-items: stretch;
  }
  /* Left navy sidebar — stretches full height of cover-content */
  .cover-sidebar {
    width: 175px;
    flex-shrink: 0;
    background: #0f1f3d;
    padding: 40px 28px 36px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    align-self: stretch;
  }
  .cover-sidebar::after {
    content: '';
    position: absolute;
    bottom: -80px; right: -80px;
    width: 200px; height: 200px;
    border: 1px solid rgba(201,168,76,0.15);
    border-radius: 50%;
    pointer-events: none;
  }
  .cover-sidebar-logo {
    margin-bottom: auto;
  }
  .cover-sidebar-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #c9a84c;
    line-height: 1.6;
    margin-top: auto;
  }
  .cover-sidebar-agency {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-top: 6px;
  }
  /* Vertical gold rule dividing sidebar from main */
  .cover-vbar {
    width: 4px;
    flex-shrink: 0;
    align-self: stretch;
    background: linear-gradient(180deg, #c9a84c, var(--gold-light) 60%, rgba(201,168,76,0.2));
  }
  /* Right main content */
  .cover-main {
    flex: 1;
    padding: 52px 52px 0 44px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
    overflow: hidden;
  }
  .cover-eyebrow {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 24px;
  }
  .cover-client {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #0f1f3d;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cover-subtitle {
    color: #4a5568;
    font-size: 0.88rem;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .cover-divider {
    width: 56px;
    height: 3px;
    background: linear-gradient(90deg, #c9a84c, var(--gold-light));
    margin: 24px 0 0;
    border-radius: 2px;
  }
  /* SF skyline — lower-right of main area */
  .cover-skyline-wrap {
    position: absolute;
    bottom: 0; right: 0;
    width: 75%;
    pointer-events: none;
    opacity: 0.07;
  }
  /* Bottom meta strip — full width, left side navy to continue sidebar */
  .cover-bottom {
    flex-shrink: 0;
    display: flex;
    border-top: 2px solid #c9a84c;
  }
  .cover-bottom-sidebar {
    width: 175px;
    flex-shrink: 0;
    background: #0f1f3d;
    padding: 22px 28px;
    display: flex;
    align-items: center;
  }
  .cover-bottom-main {
    flex: 1;
    background: var(--cream);
    padding: 22px 44px;
  }
  .cover-meta {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
  .cover-meta-item {
    padding-right: 20px;
    border-right: 1px solid rgba(15,31,61,0.1);
  }
  .cover-meta-item:last-child { border-right: none; padding-left: 20px; padding-right: 0; }
  .cover-meta-item:nth-child(2), .cover-meta-item:nth-child(3) { padding-left: 20px; }
  .cover-meta-item label {
    display: block;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #0f1f3d;
    opacity: 0.5;
    margin-bottom: 5px;
  }
  .cover-meta-item span {
    color: #0f1f3d;
    font-size: 0.88rem;
    font-weight: 600;
  }

  .gold-bar {
    height: 4px;
    background: linear-gradient(90deg, #c9a84c, var(--gold-light), #c9a84c);
  }

  .doc-body {
    padding: 40px 48px;
    display: flex;
    flex-direction: column;
    gap: 36px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  .doc-section {
    overflow-wrap: break-word;
    word-wrap: break-word;
    min-width: 0;
  }
  .doc-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #0f1f3d;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ede8df;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .doc-section-title .section-num {
    background: #0f1f3d;
    color: #c9a84c;
    font-size: 0.7rem;
    font-weight: 700;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .section-body {
    font-size: 0.9rem;
    line-height: 1.75;
    color: #4a5568;
  }

  /* Executive summary box */
  .exec-summary-box {
    background: #0f1f3d;
    border-radius: 10px;
    padding: 24px 28px;
    color: var(--white);
    position: relative;
    overflow: hidden;
  }
  .exec-summary-box::before {
    content: '"';
    position: absolute;
    top: -10px; left: 16px;
    font-size: 8rem;
    color: rgba(201,168,76,0.12);
    font-family: 'Playfair Display', serif;
    line-height: 1;
  }
  .exec-summary-box p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.85);
    position: relative;
  }

  /* Coverage table */
  .coverage-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    table-layout: auto;
  }
  .coverage-table thead tr {
    background: #0f1f3d;
  }
  .coverage-table thead th {
    color: var(--gold-light);
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }
  .coverage-table tbody tr {
    border-bottom: 1px solid #ede8df;
    transition: background 0.15s;
  }
  .coverage-table tbody tr:hover { background: var(--mist); }
  .coverage-table tbody td {
    padding: 11px 16px;
    color: #4a5568;
    vertical-align: top;
  }
  .coverage-table tbody td:first-child { font-weight: 500; color: #0f1f3d; }
  .coverage-table .amount { font-weight: 600; color: #0f1f3d; }
  .coverage-table .highlight-row td { background: rgba(201,168,76,0.06); }

  /* Premium summary */
  .premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
  }
  .premium-card {
    background: var(--cream);
    border-radius: 10px;
    padding: 18px 20px;
    border: 1.5px solid #ede8df;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .premium-card:hover { border-color: #c9a84c; box-shadow: var(--shadow); }
  .premium-card label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4a5568;
    display: block;
    margin-bottom: 6px;
  }
  .premium-card .amount {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f1f3d;
  }
  .premium-card.total {
    background: #0f1f3d;
    border-color: #0f1f3d;
  }
  .premium-card.total label { color: #c9a84c; }
  .premium-card.total .amount { color: var(--white); }

  /* Risk highlight pills */
  .risk-recs {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .risk-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 18px;
    background: var(--cream);
    border-radius: 9px;
    border-left: 3px solid #c9a84c;
  }
  .risk-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
  .risk-item h4 { font-size: 0.88rem; font-weight: 600; color: #0f1f3d; margin-bottom: 3px; }
  .risk-item p { font-size: 0.82rem; color: #4a5568; line-height: 1.55; }

  /* Carrier comparison */
  .carrier-compare {
    overflow-x: auto;
  }

  /* Coverages to consider */
  .additional-coverages {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .add-cov-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    background: var(--cream);
    border-radius: 8px;
    font-size: 0.83rem;
  }
  .add-cov-item .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #c9a84c;
    flex-shrink: 0;
    margin-top: 5px;
  }
  .add-cov-item strong { display: block; color: #0f1f3d; font-size: 0.82rem; margin-bottom: 2px; }
  .add-cov-item span { color: #4a5568; font-size: 0.78rem; line-height: 1.4; }

  /* Next steps */
  .next-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .step-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 18px;
    background: var(--cream);
    border-radius: 9px;
  }
  .step-num {
    width: 28px; height: 28px;
    background: #c9a84c;
    color: #0f1f3d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
  }
  .step-item p { font-size: 0.88rem; color: #4a5568; line-height: 1.5; }
  .step-item p strong { color: #0f1f3d; }

  /* ── Inline editing — right-side proposal ───────────────────────── */
  [data-editable="true"] {
    position: relative;
    border-radius: 4px;
    transition: outline 0.12s ease, background 0.12s ease;
    outline: 1.5px dashed transparent;
    cursor: text;
  }
  [data-editable="true"]:hover {
    outline-color: rgba(201,168,76,0.55);
    background: rgba(201,168,76,0.035);
  }
  [data-editable="true"].editing {
    outline: 2px solid #c9a84c !important;
    background: rgba(201,168,76,0.06) !important;
    cursor: text;
    min-height: 1em;
  }
  /* Subtle "edit" hint tooltip on hover */
  [data-editable="true"]:not(.editing)::after {
    content: 'click to edit';
    position: absolute;
    top: -18px;
    right: 2px;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #c9a84c;
    background: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    border: 1px solid rgba(201,168,76,0.35);
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 20;
  }
  [data-editable="true"]:hover::after { opacity: 1; }

  /* ── Per-section AI regenerate button ───────────────────────────── */
  .section-regen-btn {
    margin-left: auto;
    flex-shrink: 0;
    background: transparent;
    border: 1px solid rgba(201,168,76,0.45);
    border-radius: 6px;
    padding: 3px 10px 3px 8px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #c9a84c;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.14s;
    line-height: 1;
  }
  .section-regen-btn:hover {
    background: rgba(201,168,76,0.09);
    border-color: #c9a84c;
    color: #b8912e;
  }
  .section-regen-btn.regen-loading {
    opacity: 0.55;
    pointer-events: none;
    cursor: default;
  }
  .section-regen-btn svg {
    animation: none;
  }
  .section-regen-btn.regen-loading svg {
    animation: spin 0.7s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  @media print {
    [data-editable="true"] { outline: none !important; background: transparent !important; cursor: default !important; }
    [data-editable="true"]::after { display: none !important; }
    .section-regen-btn { display: none !important; }
  }

  /* Team */
  .team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }
  .team-card {
    background: var(--cream);
    border-radius: 10px;
    padding: 18px 20px;
    border: 1.5px solid #ede8df;
    min-width: 0;
    overflow: hidden;
    overflow-wrap: break-word;
  }
  .team-card .role {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #c9a84c;
    margin-bottom: 6px;
  }
  .team-card .name { font-weight: 600; color: #0f1f3d; font-size: 0.95rem; margin-bottom: 4px; }
  .team-card .contact { font-size: 0.8rem; color: #4a5568; line-height: 1.6; }

  /* Signature */
  .signature-block {
    background: var(--cream);
    border-radius: 10px;
    padding: 28px 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    border: 1.5px solid #ede8df;
  }
  .sig-field label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4a5568;
    display: block;
    margin-bottom: 6px;
  }
  .sig-line {
    border-bottom: 1.5px solid #0f1f3d;
    height: 22px;
  }

  /* Disclaimer */
  .disclaimer-box {
    background: var(--mist);
    border-radius: 9px;
    padding: 18px 22px;
    font-size: 0.8rem;
    color: #4a5568;
    line-height: 1.65;
    border: 1px solid #ede8df;
  }

  /* ── Client Comms Tool ── */
  .comms-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
  }
  .comms-input-panel {
    padding: 24px 22px;
    border-right: 1px solid #ede8df;
    background: #fff;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .comms-input-panel > div {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .comms-output-panel {
    background: #fff;
    overflow-y: auto;
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  .comms-type-grid {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .comms-type-btn {
    background: #fff;
    border: 1.5px solid #ede8df;
    border-radius: 8px;
    padding: 9px 12px;
    text-align: left;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #0f1f3d;
    font-weight: 500;
    transition: all 0.15s;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .comms-type-btn:hover { border-color: #c9a84c; background: #fffdf5; }
  .comms-type-btn.active { border-color: #0f1f3d; background: #0f1f3d; color: #fff; }
  .comms-type-btn.active .type-icon svg { stroke: #c9a84c; }
  .comms-type-btn .type-icon { display: flex; align-items: center; flex-shrink: 0; opacity: 0.6; }
  .comms-type-btn.active .type-icon { opacity: 1; }
  .comms-type-btn:hover .type-icon { opacity: 0.85; }
  .comms-conditional { display: none !important; }
  .comms-conditional.visible { display: flex !important; flex-direction: column; gap: 10px; }
  .comms-upload-zone {
    border: 2px dashed #ede8df;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    font-size: 0.8rem;
    color: #4a5568;
  }
  .comms-upload-zone:hover, .comms-upload-zone.dragover { border-color: #c9a84c; background: var(--cream); }
  .comms-upload-zone.has-file { border-color: #0f1f3d; background: #f0f4ff; color: #0f1f3d; }
  .comms-generate-btn {
    background: #0f1f3d;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.18s;
    margin-top: 4px;
  }
  .comms-generate-btn:hover { background: #1a3060; }
  .comms-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; }
  .comms-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #4a5568;
    text-align: center;
    opacity: 0.6;
  }
  .comms-result {
    display: none;
    flex-direction: column;
    gap: 0;
  }
  .comms-result.visible { display: flex; }
  .comms-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #ede8df;
  }
  .comms-result-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c9a84c;
  }
  .comms-result-actions { display: flex; gap: 8px; flex-wrap: wrap; }

  /* History drawer */
  .comms-output-panel { position: relative; }
  .comms-history-drawer {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 320px;
    background: #fff;
    border-left: 1.5px solid #ede8df;
    box-shadow: -4px 0 18px rgba(15,31,61,0.08);
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
    z-index: 10;
    display: flex;
    flex-direction: column;
  }
  .comms-history-drawer.open { transform: translateX(0); }
  .comms-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1.5px solid #ede8df;
    background: var(--cream);
    flex-shrink: 0;
  }
  .comms-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
  }
  .comms-history-item {
    padding: 12px 16px;
    border-bottom: 1px solid #ede8df;
    cursor: pointer;
    transition: background 0.12s;
  }
  .comms-history-item:hover { background: var(--cream); }
  .comms-history-item:last-child { border-bottom: none; }
  .chi-type {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 2px;
  }
  .chi-client {
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f1f3d;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .chi-subject {
    font-size: 0.78rem;
    color: #4a5568;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
  }
  .chi-meta {
    font-size: 0.72rem;
    color: #aaa;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .chi-delete {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0 2px;
    line-height: 1;
  }
  .chi-delete:hover { color: #e53e3e; }
  .chi-empty {
    padding: 32px 16px;
    text-align: center;
    color: #4a5568;
    font-size: 0.82rem;
    line-height: 1.6;
  }
  #commsHistoryBtn.active {
    background: #0f1f3d;
    color: #fff;
    border-color: #0f1f3d;
  }
  .comms-action-btn {
    background: var(--cream);
    border: 1.5px solid #ede8df;
    border-radius: 8px;
    padding: 6px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f1f3d;
    cursor: pointer;
    transition: all 0.15s;
  }
  .comms-action-btn:hover { border-color: #0f1f3d; background: #fff; }
  #commsMailBtn {
    background: #0f1f3d;
    color: #fff;
    border-color: #0f1f3d;
    border-bottom: 2px solid #c9a84c;
  }
  #commsMailBtn:hover { background: #1a3060; border-color: #1a3060; }
  .comms-subject-line {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4a5568;
    margin-bottom: 4px;
  }
  .comms-subject-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f1f3d;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #ede8df;
  }
  .comms-body-text {
    font-size: 0.88rem;
    color: #0f1f3d;
    line-height: 1.75;
    white-space: pre-wrap;
    font-family: 'DM Sans', sans-serif;
  }
  .comms-tone-row {
    display: flex;
    gap: 6px;
  }
  .comms-tone-btn {
    flex: 1;
    background: #fff;
    border: 1.5px solid #ede8df;
    border-radius: 8px;
    padding: 6px 4px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
  }
  .comms-tone-btn:hover { border-color: #c9a84c; color: #0f1f3d; }
  .comms-tone-btn.active { border-color: #0f1f3d; background: #0f1f3d; color: #fff; }
  .comms-nonrenewal-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
  }
  .comms-scenario-btn {
    flex: 1;
    background: #fff;
    border: 1.5px solid #ede8df;
    border-radius: 8px;
    padding: 8px 6px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    line-height: 1.4;
  }
  .comms-scenario-btn:hover { border-color: #c9a84c; color: #0f1f3d; }
  .comms-scenario-btn.active { border-color: #0f1f3d; background: #0f1f3d; color: #fff; }

  .comms-info-item {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: 6px;
    align-items: center;
    background: #fff;
    border: 1px solid #ede8df;
    border-radius: 8px;
    padding: 8px 10px;
  }
  .comms-info-item input {
    border: none;
    border-bottom: 1px solid #ede8df;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #0f1f3d;
    padding: 2px 0;
    outline: none;
    width: 100%;
  }
  .comms-info-item input::placeholder { color: #bbb; }
  .comms-info-item .item-label {
    font-size: 0.68rem;
    color: #4a5568;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
  }
  .comms-info-item-remove {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
  }
  .comms-info-item-remove:hover { color: #e53e3e; }
  .comms-info-col { display: flex; flex-direction: column; }

  /* Renewal info request table in output */
  .comms-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 0.85rem;
  }
  .comms-info-table th {
    background: #0f1f3d;
    color: #fff;
    padding: 9px 14px;
    text-align: left;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .comms-info-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #ede8df;
    font-family: 'DM Sans', sans-serif;
    color: #0f1f3d;
    vertical-align: middle;
  }
  .comms-info-table tr:nth-child(even) td { background: var(--cream); }
  .comms-info-table .update-cell {
    color: #bbb;
    font-style: italic;
    font-size: 0.78rem;
    min-width: 140px;
  }

  .ai-disclaimer {
    font-size: 0.7rem;
    color: #aaa;
    font-style: italic;
    text-align: center;
    padding: 8px 12px;
    line-height: 1.5;
  }

  /* ── Document Analyzer Tool ── */
  .docanalyzer-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
  }
  .docanalyzer-input-panel {
    padding: 24px 22px;
    border-right: 1px solid #ede8df;
    background: #fff;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
  }
  .docanalyzer-output-panel {
    background: #fff;
    overflow-y: auto;
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    height: 100%;
  }
  .da-upload-slots {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .da-upload-slot {
    background: #fff;
    border: 1.5px dashed #ede8df;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.18s;
    position: relative;
  }
  .da-upload-slot:hover, .da-upload-slot.dragover { border-color: #c9a84c; background: var(--cream); }
  .da-upload-slot.has-file { border-color: #0f1f3d; border-style: solid; background: #f0f4ff; }
  .da-upload-slot.has-file:hover { background: #e8eeff; }
  .da-slot-icon { font-size: 1.4rem; flex-shrink: 0; }
  .da-slot-info { flex: 1; min-width: 0; }
  .da-slot-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #4a5568; margin-bottom: 2px; }
  .da-slot-name { font-size: 0.8rem; font-weight: 600; color: #0f1f3d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .da-slot-sub { font-size: 0.7rem; color: #4a5568; }
  .da-slot-remove {
    background: none; border: none; color: #ccc; cursor: pointer;
    font-size: 1.1rem; padding: 2px 4px; flex-shrink: 0; line-height: 1;
    transition: color 0.15s;
  }
  .da-slot-remove:hover { color: #e53e3e; }
  .da-quick-prompts {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .da-quick-prompt-btn {
    background: #fff;
    border: 1.5px solid #ede8df;
    border-radius: 8px;
    padding: 8px 12px;
    text-align: left;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.76rem;
    color: #0f1f3d;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.4;
  }
  .da-quick-prompt-btn:hover { border-color: #c9a84c; background: var(--cream); }
  .da-quick-prompt-btn .qp-icon { margin-right: 6px; }
  .da-analyze-btn {
    background: #0f1f3d;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.18s;
    margin-top: 4px;
    border-bottom: 2px solid #c9a84c;
  }
  .da-analyze-btn:hover { background: #1a3060; }
  .da-analyze-btn:disabled { opacity: 0.5; cursor: not-allowed; }
  .da-empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #4a5568;
    text-align: center;
    opacity: 0.6;
  }

  /* ── Sales Manager Pipeline Board ── */
  .sm-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #f0efe9;
    flex: 1;
    min-width: 0;
    width: 100%;
  }
  .sm-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 54px;
    background: #0f1f3d;
    flex-shrink: 0;
    gap: 20px;
  }
  .sm-topbar-left { display: flex; align-items: center; gap: 20px; min-width: 0; }
  .sm-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .sm-stats-bar { display: flex; align-items: center; }
  .sm-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px;
    gap: 1px;
  }
  .sm-stat span:first-child {
    font-size: 0.95rem;
    font-weight: 700;
    color: #c9a84c;
    line-height: 1.2;
  }
  .sm-stat span:last-child {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
  .sm-stat-divider { width: 1px; height: 26px; background: rgba(255,255,255,0.1); }
  .sm-topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

  /* View toggle */
  .sm-view-toggle {
    display: flex;
    background: rgba(255,255,255,0.08);
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.12);
  }
  .sm-view-btn {
    background: none;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    transition: all 0.13s;
  }
  .sm-view-btn.active { background: rgba(255,255,255,0.14); color: #c9a84c; }
  .sm-view-btn:hover:not(.active) { color: rgba(255,255,255,0.8); }

  .sm-add-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #c9a84c;
    color: #0f1f3d;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
  }
  .sm-add-btn:hover { background: var(--gold-light); transform: translateY(-1px); }

  /* Board */
  .sm-board {
    display: grid;
    grid-template-columns: repeat(6, minmax(200px, 1fr));
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 16px 14px 14px;
    gap: 10px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
  }
  .sm-board::-webkit-scrollbar { height: 5px; }
  .sm-board::-webkit-scrollbar-track { background: transparent; }
  .sm-board::-webkit-scrollbar-thumb { background: rgba(15,31,61,0.15); border-radius: 3px; }

  /* Columns */
  .sm-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-height: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(15,31,61,0.07);
  }
  .sm-col-header {
    display: flex;
    flex-direction: column;
    padding: 10px 12px 9px;
    background: white;
    border-top: 3px solid transparent;
    flex-shrink: 0;
  }
  .sm-col-header-row { display: flex; align-items: center; justify-content: space-between; }
  .sm-col-header-left { display: flex; align-items: center; gap: 7px; }
  .sm-col-name {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0f1f3d;
    white-space: nowrap;
  }
  .sm-col-count {
    font-size: 0.63rem;
    font-weight: 700;
    background: rgba(15,31,61,0.08);
    color: #0f1f3d;
    border-radius: 10px;
    padding: 1px 7px;
    min-width: 18px;
    text-align: center;
  }
  .sm-col-value {
    font-size: 0.72rem;
    font-weight: 700;
    color: #0f1f3d;
    margin-top: 3px;
    opacity: 0.7;
  }

  /* Stage accent colors on column top border */
  .sm-col[data-stage="lead"]      .sm-col-header { border-top-color: #94a3b8; }
  .sm-col[data-stage="contacted"] .sm-col-header { border-top-color: #f59e0b; }
  .sm-col[data-stage="quoting"]   .sm-col-header { border-top-color: #60a5fa; }
  .sm-col[data-stage="proposal"]  .sm-col-header { border-top-color: #a78bfa; }
  .sm-col[data-stage="bound"]     .sm-col-header { border-top-color: #34d399; }
  .sm-col[data-stage="lost"]      .sm-col-header { border-top-color: #f87171; }

  /* Stage accent colors on card left border */
  .sm-card[data-stage="lead"]      { border-left-color: #94a3b8; }
  .sm-card[data-stage="contacted"] { border-left-color: #f59e0b; }
  .sm-card[data-stage="quoting"]   { border-left-color: #60a5fa; }
  .sm-card[data-stage="proposal"]  { border-left-color: #a78bfa; }
  .sm-card[data-stage="bound"]     { border-left-color: #34d399; }
  .sm-card[data-stage="lost"]      { border-left-color: #f87171; }

  /* Card drop zone */
  .sm-col-cards {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    background: #fafaf8;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    transition: background 0.15s;
  }
  .sm-col-cards::-webkit-scrollbar { width: 3px; }
  .sm-col-cards::-webkit-scrollbar-thumb { background: rgba(15,31,61,0.1); border-radius: 2px; }
  .sm-col-cards.drag-over { background: rgba(201,168,76,0.07); outline: 2px dashed rgba(201,168,76,0.4); outline-offset: -4px; border-radius: 0 0 10px 10px; }

  /* Cards */
  .sm-card {
    background: white;
    border: 1px solid rgba(15,31,61,0.08);
    border-left: 3px solid #94a3b8;
    border-radius: 7px;
    padding: 10px 11px 9px;
    cursor: grab;
    transition: box-shadow 0.15s, transform 0.1s;
    user-select: none;
    position: relative;
  }
  .sm-card:hover { box-shadow: 0 3px 14px rgba(15,31,61,0.1); transform: translateY(-1px); }
  .sm-card.dragging { opacity: 0.3; cursor: grabbing; }
  .sm-card-name { font-size: 0.82rem; font-weight: 700; color: #0f1f3d; line-height: 1.3; margin-bottom: 1px; }
  .sm-card-contact { font-size: 0.7rem; color: #4a5568; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sm-card-lines { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 7px; }
  .sm-card-line-pill {
    font-size: 0.58rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(15,31,61,0.06);
    color: #5a6a8a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .sm-card-footer { display: flex; align-items: center; justify-content: space-between; }
  .sm-card-premium { font-size: 0.75rem; font-weight: 700; color: #0f1f3d; }
  .sm-card-premium.empty { color: #c4c9d4; font-weight: 400; font-style: italic; font-size: 0.7rem; }
  .sm-card-meta { display: flex; align-items: center; gap: 5px; }
  .sm-card-agent { font-size: 0.62rem; background: rgba(15,31,61,0.06); color: #4a5568; border-radius: 5px; padding: 1px 6px; font-weight: 500; }
  .sm-card-age { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
  .sm-card-age.fresh { background: #34d399; }
  .sm-card-age.warm  { background: #c9a84c; }
  .sm-card-age.cold  { background: #f87171; }
  .sm-card-followup { font-size: 0.62rem; color: #4a5568; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
  .sm-card-followup.overdue { color: #dc2626; font-weight: 600; }
  .sm-card-cold-badge {
    position: absolute;
    top: 8px; right: 8px;
    font-size: 0.58rem;
    font-weight: 700;
    color: #f59e0b;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 4px;
    padding: 1px 5px;
    letter-spacing: 0.03em;
  }
  .sm-col-empty { font-size: 0.72rem; color: rgba(15,31,61,0.18); text-align: center; padding: 24px 12px; line-height: 1.6; }

  /* ── List View ────────────────────────────────────────────────────── */
  .sm-list-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    background: #f0efe9;
  }
  .sm-list-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border-bottom: 1px solid #e8e4de;
    flex-shrink: 0;
    flex-wrap: wrap;
  }
  .sm-list-search {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #f4f3f0;
    border: 1.5px solid #e2ddd5;
    border-radius: 7px;
    padding: 6px 11px;
    flex: 1;
    min-width: 160px;
    max-width: 260px;
    transition: border-color 0.14s;
  }
  .sm-list-search:focus-within { border-color: #0f1f3d; }
  .sm-list-search svg { color: #94a3b8; flex-shrink: 0; }
  .sm-list-search input {
    border: none; outline: none; background: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem; color: #0f1f3d; width: 100%;
  }
  .sm-list-search input::placeholder { color: #b0bac8; }
  .sm-list-filter {
    border: 1.5px solid #e2ddd5;
    border-radius: 7px;
    padding: 6px 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #0f1f3d;
    background: white;
    outline: none;
    cursor: pointer;
    transition: border-color 0.14s;
  }
  .sm-list-filter:focus { border-color: #0f1f3d; }
  .sm-list-count {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-left: auto;
    white-space: nowrap;
  }
  /* Table */
  .sm-list-table-wrap {
    flex: 1;
    overflow: auto;
    background: white;
    margin: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e8e4de;
    box-shadow: 0 1px 4px rgba(15,31,61,0.06);
  }
  .sm-list-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
  }
  .sm-list-table thead {
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .sm-list-table thead tr { background: #0f1f3d; }
  .sm-list-table thead th {
    padding: 9px 13px;
    text-align: left;
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    border-right: 1px solid rgba(255,255,255,0.06);
    transition: color 0.12s;
  }
  .sm-list-table thead th:last-child { border-right: none; cursor: default; }
  .sm-list-table thead th:hover:not(:last-child) { color: white; }
  .sm-list-table thead th.sort-asc::after  { content: ' ↑'; color: #c9a84c; }
  .sm-list-table thead th.sort-desc::after { content: ' ↓'; color: #c9a84c; }
  .sm-list-table tbody tr {
    border-bottom: 1px solid #f0ece6;
    cursor: pointer;
    transition: background 0.1s;
  }
  .sm-list-table tbody tr:hover { background: #faf8f4; }
  .sm-list-table tbody tr:last-child { border-bottom: none; }
  .sm-list-table td {
    padding: 10px 13px;
    color: #0f1f3d;
    vertical-align: middle;
  }
  .sm-list-biz { font-weight: 700; font-size: 0.82rem; }
  .sm-list-contact { font-size: 0.7rem; color: #6b7280; margin-top: 1px; }
  .sm-list-stage-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0;
  }
  .sm-list-stage-label { vertical-align: middle; font-size: 0.75rem; font-weight: 600; }
  .sm-list-premium { font-weight: 700; font-size: 0.82rem; }
  .sm-list-premium.empty { color: #c4c9d4; font-weight: 400; font-style: italic; font-size: 0.72rem; }
  .sm-list-lines { display: flex; gap: 3px; flex-wrap: wrap; }
  .sm-list-line-pill {
    font-size: 0.58rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(15,31,61,0.06);
    color: #5a6a8a;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .sm-list-followup { font-size: 0.72rem; color: #6b7280; }
  .sm-list-followup.overdue { color: #dc2626; font-weight: 600; }
  .sm-list-agent { font-size: 0.72rem; color: #6b7280; }
  .sm-list-days { font-size: 0.72rem; color: #6b7280; text-align: center; }
  .sm-list-cold { font-size: 0.62rem; font-weight: 700; color: #f59e0b; background: #fffbeb; border: 1px solid #fde68a; border-radius: 4px; padding: 1px 5px; }
  .sm-list-empty {
    text-align: center;
    padding: 48px 20px;
    color: #94a3b8;
    font-size: 0.82rem;
  }
  .sm-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,31,61,0.3);
    z-index: 300;
    backdrop-filter: blur(1px);
  }
  .sm-drawer-backdrop.open { display: block; }
  .sm-drawer {
    position: fixed;
    top: 0;
    right: -600px;
    width: 580px;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    background: white;
    z-index: 301;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 32px rgba(15,31,61,0.12);
    transition: right 0.28s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
  }
  .sm-drawer.open { right: 0; }
  .sm-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 20px 14px;
    flex-shrink: 0;
    background: #0f1f3d;
    border-bottom: 3px solid #94a3b8; /* overridden per stage by JS */
  }
  .sm-drawer-title { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 700; color: white; line-height: 1.3; }
  .sm-drawer-meta { font-size: 0.7rem; color: rgba(255,255,255,0.45); margin-top: 3px; }
  /* Lines of coverage checkbox grid */
  .sm-lines-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 6px;
  }
  .sm-line-check {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1.5px solid rgba(15,31,61,0.12);
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.12s;
    user-select: none;
  }
  .sm-line-check:hover { border-color: #0f1f3d; background: #f8f7f4; }
  .sm-line-check.checked { border-color: #0f1f3d; background: rgba(15,31,61,0.05); }
  .sm-line-check input[type=checkbox] { display: none; }
  .sm-line-check-box {
    width: 14px; height: 14px;
    border: 1.5px solid rgba(15,31,61,0.2);
    border-radius: 3px;
    background: white;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.12s;
  }
  .sm-line-check.checked .sm-line-check-box {
    background: #0f1f3d;
    border-color: #0f1f3d;
  }
  .sm-line-check.checked .sm-line-check-box::after {
    content: '';
    display: block;
    width: 4px; height: 7px;
    border: 2px solid #c9a84c;
    border-top: none; border-left: none;
    transform: rotate(45deg) translate(-1px, -1px);
  }
  .sm-line-label { font-size: 0.73rem; font-weight: 600; color: #0f1f3d; }
  /* Coverage section header */
  .sm-section-hdr {
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #c9a84c;
    margin: 14px 0 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #f0ece6;
  }
  /* Activity type select */
  .sm-activity-type {
    border: 1.5px solid rgba(15,31,61,0.15);
    border-radius: 7px;
    padding: 8px 9px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    color: #0f1f3d;
    background: white;
    outline: none;
    cursor: pointer;
    flex-shrink: 0;
  }
  .sm-activity-item { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid #f4f0eb; }
  .sm-activity-item:last-child { border-bottom: none; }
  .sm-activity-type-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4a5568;
    background: rgba(15,31,61,0.06);
    border-radius: 4px;
    padding: 1px 5px;
    display: inline-block;
    margin-bottom: 2px;
  }
  .sm-activity-text { font-size: 0.78rem; color: #0f1f3d; line-height: 1.4; }
  .sm-activity-ts { font-size: 0.67rem; color: #94a3b8; margin-top: 2px; }
  .sm-activity-empty { font-size: 0.78rem; color: #94a3b8; padding: 12px 0; }
  .sm-drawer-save-btn {
    background: #c9a84c;
    color: #0f1f3d;
    border: none;
    border-radius: 7px;
    padding: 7px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
  }
  .sm-drawer-save-btn:hover { background: var(--gold-light); }
  .sm-drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
  .sm-drawer-stage-row { display: flex; gap: 5px; flex-wrap: wrap; }
  .sm-stage-pill {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1.5px solid rgba(15,31,61,0.12);
    color: #4a5568;
    background: white;
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
  }
  .sm-stage-pill:hover { border-color: #0f1f3d; color: #0f1f3d; }
  .sm-stage-pill.active { background: #0f1f3d; color: #c9a84c; border-color: #0f1f3d; }
  .sm-drawer-tabs { display: flex; border-bottom: 1.5px solid #ede8df; flex-shrink: 0; }
  .sm-drawer-tab {
    background: none;
    border: none;
    padding: 8px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1.5px;
    transition: all 0.12s;
  }
  .sm-drawer-tab:hover { color: #0f1f3d; }
  .sm-drawer-tab.active { color: #0f1f3d; border-bottom-color: #0f1f3d; }
  .sm-drawer-tab-panel { display: flex; flex-direction: column; gap: 10px; }
  .sm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .sm-field { display: flex; flex-direction: column; gap: 4px; }
  .sm-field label { font-size: 0.7rem; font-weight: 600; color: #0f1f3d; text-transform: uppercase; letter-spacing: 0.06em; }
  .sm-field input, .sm-field select, .sm-field textarea {
    border: 1.5px solid rgba(15,31,61,0.15);
    border-radius: 7px;
    padding: 8px 11px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    color: #0f1f3d;
    background: white;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
  }
  .sm-field input:focus, .sm-field select:focus, .sm-field textarea:focus { border-color: #0f1f3d; box-shadow: 0 0 0 2px rgba(15,31,61,0.07); }
  .sm-drawer-actions { display: flex; gap: 6px; padding: 12px 20px; border-top: 1px solid #ede8df; flex-shrink: 0; flex-wrap: wrap; background: var(--cream); }

  /* ── Documents ── */
  .sm-docs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
  }
  .sm-docs-upload-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #0f1f3d;
    color: #c9a84c;
    border: none;
    border-radius: 7px;
    padding: 6px 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
  }
  .sm-docs-upload-btn:hover { opacity: 0.85; }
  .sm-docs-empty {
    font-size: 0.75rem;
    color: #b0bac8;
    padding: 10px 0 4px;
    font-style: italic;
  }
  .sm-doc-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 0;
    border-bottom: 1px solid #f0ece6;
  }
  .sm-doc-row:last-child { border-bottom: none; }
  .sm-doc-icon {
    width: 30px; height: 30px;
    border-radius: 6px;
    background: rgba(15,31,61,0.06);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #0f1f3d;
  }
  .sm-doc-info { flex: 1; min-width: 0; }
  .sm-doc-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f1f3d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    text-decoration: none;
  }
  .sm-doc-name:hover { text-decoration: underline; color: #c9a84c; }
  .sm-doc-meta { font-size: 0.65rem; color: #94a3b8; margin-top: 1px; }
  .sm-doc-del {
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    padding: 3px;
    border-radius: 4px;
    transition: color 0.12s;
    flex-shrink: 0;
  }
  .sm-doc-del:hover { color: #f87171; }

  /* Activity feed */
  .sm-activity-list { display: flex; flex-direction: column; }
  .sm-activity-item { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-bottom: 1px solid #f4f0eb; }
  .sm-activity-item:last-child { border-bottom: none; }
  .sm-activity-type-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4a5568;
    background: rgba(15,31,61,0.06);
    border-radius: 4px;
    padding: 1px 5px;
    display: inline-block;
    margin-bottom: 2px;
  }
  .sm-activity-text { font-size: 0.78rem; color: #0f1f3d; line-height: 1.4; }
  .sm-activity-ts { font-size: 0.65rem; color: #94a3b8; margin-top: 2px; }
  .sm-activity-empty { font-size: 0.78rem; color: #94a3b8; padding: 12px 0; font-style: italic; }

  /* ── Outreach / Email Drafting ── */
  .sm-email-types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-bottom: 16px;
  }
  .sm-email-type-btn {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border: 1.5px solid #e8e4de;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    text-align: left;
    transition: all 0.13s;
    font-family: 'DM Sans', sans-serif;
  }
  .sm-email-type-btn:hover { border-color: #0f1f3d; background: #faf9f7; }
  .sm-email-type-btn.active { border-color: #0f1f3d; background: rgba(15,31,61,0.04); }
  .sm-email-type-icon {
    width: 28px; height: 28px;
    border-radius: 6px;
    background: rgba(15,31,61,0.07);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #0f1f3d;
  }
  .sm-email-type-btn.active .sm-email-type-icon { background: #0f1f3d; color: #c9a84c; }
  .sm-email-type-label { font-size: 0.73rem; font-weight: 700; color: #0f1f3d; line-height: 1.3; }
  .sm-email-type-desc { font-size: 0.63rem; color: #94a3b8; margin-top: 1px; line-height: 1.4; }
  .sm-email-generate-btn {
    width: 100%;
    padding: 10px;
    background: #0f1f3d;
    color: #c9a84c;
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
  }
  .sm-email-generate-btn:hover { opacity: 0.88; }
  .sm-email-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; }
  .sm-email-output {
    display: none;
    flex-direction: column;
    gap: 10px;
  }
  .sm-email-output.visible { display: flex; }
  .sm-email-subject-row { display: flex; align-items: center; gap: 8px; }
  .sm-email-subject-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: #94a3b8; white-space: nowrap; }
  .sm-email-subject-input {
    flex: 1;
    border: 1.5px solid #e8e4de;
    border-radius: 7px;
    padding: 7px 11px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: #0f1f3d;
    outline: none;
    transition: border-color 0.14s;
  }
  .sm-email-subject-input:focus { border-color: #0f1f3d; }
  .sm-email-body-textarea {
    width: 100%;
    min-height: 220px;
    border: 1.5px solid #e8e4de;
    border-radius: 8px;
    padding: 12px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: #0f1f3d;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.14s;
  }
  .sm-email-body-textarea:focus { border-color: #0f1f3d; }
  .sm-email-actions { display: flex; gap: 7px; flex-wrap: wrap; }
  .sm-email-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border: 1.5px solid #e8e4de;
    border-radius: 7px;
    background: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f1f3d;
    cursor: pointer;
    transition: all 0.13s;
  }
  .sm-email-action-btn:hover { border-color: #0f1f3d; background: #faf9f7; }
  .sm-email-action-btn.primary { background: #0f1f3d; color: #c9a84c; border-color: #0f1f3d; }
  .sm-email-action-btn.primary:hover { opacity: 0.88; }
  .sm-email-spinner {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    font-size: 0.78rem;
    color: #94a3b8;
    font-style: italic;
  }
  .sm-email-spinner.visible { display: flex; }
  @keyframes smSpin { to { transform: rotate(360deg); } }
  .sm-email-spin-icon { width: 16px; height: 16px; border: 2px solid #e8e4de; border-top-color: #c9a84c; border-radius: 50%; animation: smSpin 0.7s linear infinite; flex-shrink: 0; }

  /* ── Manager Dashboard ── */
  .sm-dash {
    padding: 18px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1100px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
  }
  .sm-dash-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-bottom: 10px;
  }
  /* KPI cards */
  .sm-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
  }
  .sm-kpi-card {
    background: white;
    border-radius: 10px;
    padding: 14px 16px;
    border: 1px solid #e8e4de;
    box-shadow: 0 1px 3px rgba(15,31,61,0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    overflow: hidden;
  }
  .sm-kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: #c9a84c;
    opacity: 0.7;
  }
  .sm-kpi-value {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f1f3d;
    line-height: 1.1;
  }
  .sm-kpi-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
  }
  .sm-kpi-sub {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 2px;
  }
  /* Two-col layout for lower sections */
  .sm-dash-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .sm-dash-panel {
    background: white;
    border-radius: 10px;
    border: 1px solid #e8e4de;
    box-shadow: 0 1px 3px rgba(15,31,61,0.05);
    padding: 16px 18px;
  }
  /* Pipeline funnel */
  .sm-funnel-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
  }
  .sm-funnel-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #0f1f3d;
    width: 110px;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sm-funnel-bar-wrap {
    flex: 1;
    background: #f4f3f0;
    border-radius: 4px;
    height: 20px;
    position: relative;
    overflow: hidden;
  }
  .sm-funnel-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 2px;
  }
  .sm-funnel-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: #0f1f3d;
    width: 20px;
    text-align: right;
    flex-shrink: 0;
  }
  .sm-funnel-val {
    font-size: 0.68rem;
    color: #94a3b8;
    width: 60px;
    text-align: right;
    flex-shrink: 0;
  }
  /* Alerts — follow-ups & cold */
  .sm-alert-list { display: flex; flex-direction: column; gap: 7px; }
  .sm-alert-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    background: #faf9f7;
    border: 1px solid #f0ece6;
    cursor: pointer;
    transition: background 0.12s;
  }
  .sm-alert-row:hover { background: #f4f2ee; }
  .sm-alert-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .sm-alert-name { font-size: 0.78rem; font-weight: 600; color: #0f1f3d; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sm-alert-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .sm-alert-badge.overdue { background: #fef2f2; color: #dc2626; }
  .sm-alert-badge.today   { background: #fff7ed; color: #f59e0b; }
  .sm-alert-badge.soon    { background: #f0fdf4; color: #16a34a; }
  .sm-alert-badge.cold    { background: #fffbeb; color: #f59e0b; border: 1px solid #fde68a; }
  .sm-alert-empty { font-size: 0.75rem; color: #94a3b8; padding: 8px 0; font-style: italic; }
  /* Leaderboard */
  .sm-lb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f4f0eb;
  }
  .sm-lb-row:last-child { border-bottom: none; }
  .sm-lb-rank {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    width: 20px;
    flex-shrink: 0;
    text-align: center;
  }
  .sm-lb-rank.top { color: #c9a84c; }
  .sm-lb-name { flex: 1; font-size: 0.8rem; font-weight: 600; color: #0f1f3d; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sm-lb-bar-wrap { width: 80px; background: #f4f3f0; border-radius: 3px; height: 6px; flex-shrink: 0; }
  .sm-lb-bar { height: 6px; border-radius: 3px; background: #c9a84c; transition: width 0.4s ease; }
  .sm-lb-premium { font-size: 0.75rem; font-weight: 700; color: #0f1f3d; width: 70px; text-align: right; flex-shrink: 0; }
  .sm-lb-count { font-size: 0.68rem; color: #94a3b8; width: 40px; text-align: right; flex-shrink: 0; }
  .sm-dash-empty { font-size: 0.75rem; color: #94a3b8; padding: 10px 0; font-style: italic; }
  .sm-draft-banner {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.78rem;
    color: #92400e;
    display: flex;
    align-items: center;
    margin-bottom: 14px;
    font-weight: 500;
  }
  .sm-daction-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1.5px solid rgba(15,31,61,0.15);
    border-radius: 7px;
    padding: 7px 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f1f3d;
    cursor: pointer;
    transition: all 0.12s;
  }
  .sm-daction-btn:hover { border-color: #c9a84c; background: var(--cream); }
  .sm-daction-btn.danger { color: #dc2626; }
  .sm-daction-btn.danger:hover { border-color: #dc2626; background: #fef2f2; }
  @media (max-width: 768px) {
    .sm-stats-bar { display: none; }
    .sm-drawer { width: 100%; right: -100%; }
    .sm-board { grid-template-columns: repeat(5, 220px); }
    .sm-col { min-width: 0; }
  }
  /* ── DA & Comp shared document shell ── */
  .doc-shell {
    background: white;
    box-shadow: 0 2px 20px rgba(15,31,61,0.07);
    border-radius: 3px;
    overflow: hidden;
    font-family: 'DM Sans', sans-serif;
    max-width: 920px;
    margin: 0 auto;
    border: 1px solid #e8e4dc;
  }
  /* Letterhead header */
  .doc-lh {
    background: white;
    padding: 0;
    border-bottom: 1px solid #e8e4dc;
  }
  .doc-lh-rule {
    height: 4px;
    background: #0f1f3d;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .doc-lh-rule::after {
    content: '';
    display: block;
    height: 2px;
    background: linear-gradient(90deg, #c9a84c 0%, var(--gold-light) 60%, transparent 100%);
    opacity: 0.55;
  }
  .doc-lh-body {
    padding: 18px 32px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
  }
  .doc-lh-left { display: flex; flex-direction: column; gap: 6px; }
  .doc-lh-logo { max-height: 28px; max-width: 110px; object-fit: contain; display: block; }
  .doc-lh-agency {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0f1f3d;
  }
  .doc-lh-right { text-align: right; flex-shrink: 0; }
  .doc-lh-date {
    font-size: 0.72rem;
    color: #4a5568;
    margin-bottom: 4px;
  }
  .doc-lh-type {
    display: inline-flex;
    background: #0f1f3d;
    border: 1px solid #0f1f3d;
    border-radius: 20px;
    padding: 3px 11px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold-light);
  }
  /* Title area */
  .doc-title-area {
    padding: 20px 32px 22px;
    border-bottom: 1px solid #e8e4dc;
    background: #fafaf8;
    border-left: 3px solid #c9a84c;
  }
  .doc-title-eyebrow {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 6px;
  }
  .doc-main-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f1f3d;
    line-height: 1.35;
    /* Prevent a very long case caption from dominating */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .doc-title-meta {
    font-size: 0.75rem;
    color: #4a5568;
    margin-top: 6px;
  }
  /* Summary panel */
  .doc-summary {
    margin: 0;
    padding: 18px 32px;
    background: #fafaf8;
    border-bottom: 1px solid #e8e4dc;
    border-left: 3px solid #c9a84c;
  }
  .doc-summary-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 6px;
  }
  .doc-summary-text {
    font-size: 0.85rem;
    color: #0f1f3d;
    line-height: 1.7;
  }
  /* Sections — scoped to DA/Comparison screens to avoid overriding proposal styles */
  #screen-docanalyzer .doc-section,
  #screen-comparison .doc-section {
    padding: 22px 32px;
    border-bottom: 1px solid #e8e4dc;
  }
  #screen-docanalyzer .doc-section:last-of-type,
  #screen-comparison .doc-section:last-of-type { border-bottom: none; }
  #screen-docanalyzer .doc-section-title,
  #screen-comparison .doc-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f1f3d;
    margin-bottom: 14px;
    padding-bottom: 9px;
    border-bottom: 1.5px solid #ddd8ce;
    display: flex;
    align-items: center;
    gap: 9px;
  }
  .doc-section-num {
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #0f1f3d;
    color: var(--gold-light);
    font-size: 0.6rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(201,168,76,0.22);
  }
  /* Key facts grid */
  .doc-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
  }
  .doc-fact-item {
    padding: 9px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    border-top: 2px solid #ddd0a8;
    background: #fdfcfa;
  }
  .doc-fact-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a5568;
    margin-bottom: 2px;
  }
  .doc-fact-value {
    font-size: 0.83rem;
    font-weight: 600;
    color: #0f1f3d;
    line-height: 1.4;
  }
  /* Parties */
  .doc-parties-row { display: flex; flex-wrap: wrap; gap: 8px; }
  .doc-party-card {
    flex: 1; min-width: 150px;
    border: 1px solid #e8e4dc;
    border-top: 2px solid #0f1f3d;
    border-radius: 6px;
    padding: 11px 14px;
    background: #fdfcfa;
  }
  .doc-party-role {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a5568;
    margin-bottom: 2px;
  }
  .doc-party-name {
    font-size: 0.86rem;
    font-weight: 700;
    color: #0f1f3d;
    margin-bottom: 2px;
  }
  .doc-party-desc { font-size: 0.74rem; color: #4a5568; line-height: 1.4; }
  /* Tables — light professional headers */
  .doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
  }
  .doc-table thead tr { background: #f3f1ec; }
  .doc-table thead th {
    padding: 8px 12px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0f1f3d;
    text-align: left;
    border-bottom: 2px solid #ddd8ce;
  }
  .doc-table tbody tr { border-bottom: 1px solid #ece9e2; }
  .doc-table tbody tr:last-child { border-bottom: none; }
  .doc-table tbody tr:hover { background: #fafaf8; }
  .doc-table tbody td {
    padding: 9px 12px;
    color: #0f1f3d;
    vertical-align: top;
    line-height: 1.5;
    font-size: 0.82rem;
  }
  .doc-table tbody td:first-child { font-weight: 600; }
  /* Dates */
  .doc-dates-list { display: flex; flex-direction: column; gap: 6px; }
  .doc-date-item {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 12px;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    background: #fdfcfa;
  }
  .doc-date-item.high { background: #fff8f8; border-color: #f8c8c8; }
  .doc-date-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
  .doc-date-dot.high   { background: #dc2626; }
  .doc-date-dot.medium { background: #d97706; }
  .doc-date-dot.low    { background: #16a34a; }
  .doc-date-event { font-size: 0.83rem; font-weight: 600; color: #0f1f3d; flex: 1; }
  .doc-date-val   { font-size: 0.78rem; color: #4a5568; white-space: nowrap; }
  /* Allegation items */
  .doc-allegation {
    padding: 11px 14px 11px 16px;
    border: 1px solid #e8e4dc;
    border-left: 3px solid #8b1c2e;
    border-radius: 0 6px 6px 0;
    margin-bottom: 7px;
    background: #fdfcfa;
  }
  .doc-allegation-claim { font-size: 0.83rem; font-weight: 700; color: #0f1f3d; margin-bottom: 3px; }
  .doc-allegation-detail { font-size: 0.79rem; color: #4a5568; line-height: 1.55; }
  /* Gaps & recommendations */
  .doc-gap-item {
    display: flex; gap: 10px;
    padding: 9px 12px;
    background: #fff8f0;
    border-left: 3px solid #f59e0b;
    border-radius: 0 6px 6px 0;
    font-size: 0.82rem;
    color: #78350f;
    margin-bottom: 6px;
    line-height: 1.55;
  }
  .doc-rec-item {
    display: flex; gap: 10px;
    padding: 9px 12px;
    background: #f0fdf4;
    border-left: 3px solid #16a34a;
    border-radius: 0 6px 6px 0;
    font-size: 0.82rem;
    color: #14532d;
    margin-bottom: 6px;
    line-height: 1.55;
  }
  /* Agent notes */
  .doc-agent-notes {
    background: #fafaf8;
    border: 1px solid #ddd8ce;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 0.83rem;
    color: #0f1f3d;
    line-height: 1.7;
  }
  /* Footer */
  .doc-footer {
    padding: 14px 32px;
    border-top: 2px solid #ece9e2;
    font-size: 0.67rem;
    color: #8a8070;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    background: #fafaf8;
  }
  .doc-footer strong { color: #0f1f3d; }
  /* Status badges — unchanged */
  .da-badge {
    display: inline-flex; align-items: center; gap: 4px;
    border-radius: 20px; padding: 2px 8px;
    font-size: 0.67rem; font-weight: 700; white-space: nowrap;
  }
  .da-badge-covered    { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
  .da-badge-not_covered{ background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
  .da-badge-partial    { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
  .da-badge-unclear    { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
  .da-badge-met        { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
  .da-badge-not_met    { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
  .da-badge-n_a        { background: #f8fafc; color: #94a3b8; border: 1px solid #e2e8f0; }
  /* Coverage response section */
  .doc-cov-item {
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
  }
  .doc-cov-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 14px 10px;
    background: #fafaf8;
    border-bottom: 1px solid #e8e4dc;
  }
  .doc-cov-allegation {
    flex: 1;
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f1f3d;
    line-height: 1.4;
  }
  .doc-cov-status {
    display: inline-flex;
    align-items: center;
    border-radius: 20px;
    padding: 2px 9px;
    font-size: 0.64rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .doc-cov-status.present  { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
  .doc-cov-status.likely   { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; }
  .doc-cov-status.uncertain{ background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
  .doc-cov-status.unlikely { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
  .doc-cov-status.absent   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
  .doc-cov-body {
    padding: 11px 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
  }
  .doc-cov-field-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a5568;
    margin-bottom: 2px;
  }
  .doc-cov-field-value {
    font-size: 0.81rem;
    color: #0f1f3d;
    line-height: 1.55;
  }
  .doc-cov-rationale {
    grid-column: 1 / -1;
    padding-top: 8px;
    border-top: 1px solid #ece9e2;
    margin-top: 4px;
  }
  .doc-cov-caveats {
    grid-column: 1 / -1;
    padding: 8px 10px;
    background: #fff8f0;
    border-left: 3px solid #f59e0b;
    border-radius: 0 4px 4px 0;
    font-size: 0.79rem;
    color: #78350f;
    line-height: 1.55;
    margin-top: 4px;
  }
  .doc-cov-mode-banner {
    padding: 9px 14px;
    margin-bottom: 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1.55;
  }
  .doc-cov-mode-banner.advisory {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    color: #1e40af;
  }
  .doc-cov-mode-banner.actual {
    background: #f0fdf4;
    border-left: 3px solid #16a34a;
    color: #14532d;
  }
  /* DA Progress */
  .da-progress-wrap {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 320px; gap: 24px; padding: 40px;
  }
  .da-progress-title {
    font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: #0f1f3d;
  }
  .da-progress-step {
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    border-radius: 8px; background: white; border: 1.5px solid #ede8df;
    font-size: 0.82rem; color: #4a5568; width: 100%; max-width: 400px; transition: all 0.2s;
  }
  .da-progress-step.active { border-color: #c9a84c; background: #fffdf7; color: #0f1f3d; font-weight: 600; }
  .da-progress-step.done   { border-color: #86efac; background: #f0fdf4; color: #15803d; }
  .da-progress-step-icon {
    width: 22px; height: 22px; border-radius: 50%; background: #ede8df; color: #4a5568;
    font-size: 0.67rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s;
  }
  .da-progress-step.active .da-progress-step-icon { background: #c9a84c; color: #0f1f3d; animation: comp-pulse 1.2s infinite; }
  .da-progress-step.done   .da-progress-step-icon { background: #16a34a; color: white; }
  .da-progress-bar-wrap { width: 100%; max-width: 400px; height: 3px; background: #ede8df; border-radius: 99px; overflow: hidden; }
  .da-progress-bar { height: 100%; background: linear-gradient(90deg, #0f1f3d, #c9a84c); border-radius: 99px; transition: width 0.5s ease; }
  /* DA action buttons */
  .da-action-btn {
    background: var(--cream); border: 1.5px solid #ede8df; border-radius: 8px;
    padding: 7px 14px; font-family: 'DM Sans', sans-serif; font-size: 0.78rem; font-weight: 600;
    color: #0f1f3d; cursor: pointer; transition: all 0.15s;
    display: flex; align-items: center; gap: 5px;
  }
  .da-action-btn:hover { border-color: #0f1f3d; background: #fff; }
  .da-action-btn.primary { background: #0f1f3d; color: white; border-color: #0f1f3d; }
  .da-action-btn.primary:hover { background: #1a3060; }
  /* Print */
  @media print {
    .docanalyzer-input-panel, #daActionBar,
    .comparison-input-panel, #compActionBar { display: none !important; }
    .app-shell { display: block !important; height: auto !important; overflow: visible !important; }
    .app-content { height: auto !important; overflow: visible !important; display: block !important; }
    .docanalyzer-layout,
    .comparison-layout { display: block !important; height: auto !important; overflow: visible !important; width: 100% !important; }
    .docanalyzer-output-panel,
    .comparison-output-panel { display: block !important; padding: 0 !important; height: auto !important; overflow: visible !important; background: white !important; width: 100% !important; }
    body { background: white !important; }
    .doc-shell { box-shadow: none !important; max-width: 100% !important; border: none !important; }
    .doc-lh-rule, .doc-summary, .doc-table thead tr,
    .winner-banner, .premium-card { print-color-adjust: exact !important; -webkit-print-color-adjust: exact !important; }
  }

  .nb-industry-btn {
    background: #fff;
    border: 1.5px solid #ede8df;
    border-radius: 9px;
    padding: 8px 6px;
    text-align: center;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    color: #0f1f3d;
    transition: all 0.15s;
    line-height: 1.3;
  }
  .nb-industry-btn:hover { border-color: #c9a84c; background: var(--cream); }
  .nb-industry-btn.active { border-color: #0f1f3d; background: #0f1f3d; color: #fff; }

  .nb-industry-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    background: #fff;
    border: 1.5px solid #ede8df;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    color: #0f1f3d;
    transition: all 0.15s;
    line-height: 1.2;
    text-align: center;
  }
  .nb-industry-btn:hover { border-color: #c9a84c; background: var(--cream); }
  .nb-industry-btn.active { border-color: #0f1f3d; background: #0f1f3d; color: #fff; }

  /* ── Client Database ── */
  .client-picker-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid #ede8df;
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 2px;
    cursor: pointer;
    transition: border-color 0.15s;
  }
  .client-picker-bar:hover { border-color: #c9a84c; }
  .client-picker-bar.has-client { border-color: #0f1f3d; background: #f0f4ff; }
  .client-picker-icon { font-size: 1.1rem; flex-shrink: 0; }
  .client-picker-info { flex: 1; min-width: 0; }
  .client-picker-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #4a5568; }
  .client-picker-name { font-size: 0.85rem; font-weight: 600; color: #0f1f3d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .client-picker-sub { font-size: 0.72rem; color: #4a5568; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .client-picker-clear { background: none; border: none; color: #ccc; cursor: pointer; font-size: 1rem; padding: 2px 4px; transition: color 0.15s; flex-shrink: 0; }
  .client-picker-clear:hover { color: #e53e3e; }

  /* Client DB Modal */
  .client-db-modal {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(10,22,40,0.65);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
  }
  .client-db-modal.open { opacity: 1; pointer-events: all; }
  .client-db-box {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.22s ease;
  }
  .client-db-modal.open .client-db-box { transform: translateY(0) scale(1); }
  .client-db-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #ede8df;
    display: flex; align-items: center; gap: 12px;
  }
  .client-db-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: #0f1f3d; flex: 1; }
  .client-db-search {
    display: flex; gap: 8px; padding: 12px 24px;
    border-bottom: 1px solid #ede8df;
    background: var(--cream);
  }
  .client-db-search input {
    flex: 1; border: 1.5px solid #ede8df; border-radius: 8px;
    padding: 9px 12px; font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem; color: #0f1f3d; outline: none;
    transition: border-color 0.15s;
  }
  .client-db-search input:focus { border-color: #0f1f3d; }
  .client-add-btn {
    background: #0f1f3d; color: #fff; border: none;
    border-radius: 8px; padding: 9px 16px;
    font-family: 'DM Sans', sans-serif; font-size: 0.82rem;
    font-weight: 600; cursor: pointer; white-space: nowrap;
    border-bottom: 2px solid #c9a84c; transition: background 0.15s;
  }
  .client-add-btn:hover { background: #1a3060; }
  .client-db-list {
    flex: 1; overflow-y: auto; padding: 8px 16px;
  }
  .client-db-empty {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 10px; padding: 48px 24px;
    color: #4a5568; text-align: center;
  }
  .client-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 10px; border-radius: 10px;
    cursor: pointer; transition: background 0.12s;
    border-bottom: 1px solid #ede8df;
  }
  .client-row:hover { background: var(--cream); }
  .client-row:last-child { border-bottom: none; }
  .client-row-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: #0f1f3d; color: #c9a84c;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif; font-weight: 700;
    font-size: 0.9rem; flex-shrink: 0;
  }
  .client-row-info { flex: 1; min-width: 0; }
  .client-row-name { font-size: 0.88rem; font-weight: 600; color: #0f1f3d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .client-row-sub { font-size: 0.72rem; color: #4a5568; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
  .client-row-actions { display: flex; gap: 4px; flex-shrink: 0; }
  .client-row-btn {
    background: none; border: 1px solid #ede8df;
    border-radius: 6px; padding: 4px 9px; font-family: 'DM Sans', sans-serif;
    font-size: 0.72rem; color: #4a5568; cursor: pointer;
    transition: all 0.12s;
  }
  .client-row-btn:hover { border-color: #0f1f3d; color: #0f1f3d; }
  .client-row-btn.danger:hover { border-color: #e53e3e; color: #e53e3e; }
  .client-row-btn.primary { background: #0f1f3d; color: #fff; border-color: #0f1f3d; }
  .client-row-btn.primary:hover { background: #1a3060; }

  /* Client edit form */
  .client-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .client-form-full { grid-column: 1 / -1; }
  @media (max-width: 768px) {
    .client-form-grid { grid-template-columns: 1fr; }
    .client-db-box { max-height: 95vh; border-radius: 20px 20px 0 0; }
    .client-db-modal { align-items: flex-end; padding: 0; }
  }

  /* ── Carrier Appetite Admin Modal ── */
  .ca-admin-modal {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(10,22,40,0.65);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
  }
  .ca-admin-modal.open { opacity: 1; pointer-events: all; }
  .ca-admin-box {
    background: #fff; border-radius: 16px; width: 100%; max-width: 780px;
    max-height: 88vh; display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.2);
    transform: translateY(12px) scale(0.98); transition: transform 0.22s ease;
  }
  .ca-admin-modal.open .ca-admin-box { transform: translateY(0) scale(1); }
  .ca-admin-header {
    padding: 20px 24px 16px; border-bottom: 1px solid #ede8df;
    display: flex; align-items: center; gap: 12px;
  }
  .ca-admin-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 700; color: #0f1f3d; flex: 1; }
  .ca-admin-toolbar {
    display: flex; gap: 8px; padding: 12px 24px;
    border-bottom: 1px solid #ede8df; background: #fafaf8; align-items: center;
  }
  .ca-admin-toolbar input {
    flex: 1; border: 1.5px solid #e2ddd5; border-radius: 8px; padding: 8px 12px;
    font-family: 'DM Sans', sans-serif; font-size: 0.82rem; color: #0f1f3d; outline: none;
  }
  .ca-admin-toolbar input:focus { border-color: #c9a84c; }
  .ca-admin-list {
    flex: 1; overflow-y: auto; padding: 0; min-height: 200px;
  }
  .ca-rule-row {
    display: grid; grid-template-columns: 1fr 120px 100px auto auto;
    gap: 10px; align-items: center; padding: 10px 24px;
    border-bottom: 1px solid #f0ede8; font-size: 0.82rem; color: #0f1f3d;
  }
  .ca-rule-row:hover { background: #fafaf8; }
  .ca-rule-row .ca-carrier { font-weight: 700; }
  .ca-rule-row .ca-risk { color: #4a5568; }
  .ca-rule-row .ca-state { color: #4a5568; text-transform: uppercase; }
  .ca-verdict-confirmed { background: #d1fae5; color: #065f46; padding: 3px 10px; border-radius: 12px; font-size: 0.72rem; font-weight: 700; display: inline-block; }
  .ca-verdict-declined { background: #fee2e2; color: #991b1b; padding: 3px 10px; border-radius: 12px; font-size: 0.72rem; font-weight: 700; display: inline-block; }
  .ca-rule-actions { display: flex; gap: 4px; }
  .ca-rule-actions button {
    background: none; border: 1px solid #e2ddd5; border-radius: 6px;
    padding: 4px 8px; font-size: 0.72rem; cursor: pointer; color: #4a5568;
    font-family: 'DM Sans', sans-serif; transition: all 0.12s;
  }
  .ca-rule-actions button:hover { border-color: #0f1f3d; color: #0f1f3d; }
  .ca-rule-actions button.ca-del:hover { border-color: #e53e3e; color: #e53e3e; }
  .ca-admin-empty {
    padding: 48px 24px; text-align: center; color: #8899aa; font-size: 0.88rem;
  }
  .ca-rule-header {
    display: grid; grid-template-columns: 1fr 120px 100px auto auto;
    gap: 10px; padding: 8px 24px; font-size: 0.68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em; color: #8899aa;
    border-bottom: 2px solid #ede8df; background: #fafaf8;
  }
  .ca-admin-form {
    padding: 16px 24px; border-top: 1.5px solid #c9a84c; background: #fffdf5;
    display: none;
  }
  .ca-admin-form.visible { display: block; }
  .ca-form-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px;
  }
  .ca-form-grid label {
    font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: #6b7280; display: block; margin-bottom: 4px;
  }
  .ca-form-grid input, .ca-form-grid select {
    width: 100%; box-sizing: border-box; border: 1.5px solid #e2ddd5; border-radius: 7px;
    padding: 8px 10px; font-family: 'DM Sans', sans-serif; font-size: 0.82rem;
    color: #0f1f3d; outline: none;
  }
  .ca-form-grid input:focus, .ca-form-grid select:focus { border-color: #c9a84c; }
  .ca-form-full { grid-column: 1 / -1; }
  .ca-form-actions { display: flex; gap: 8px; justify-content: flex-end; }
  .ca-form-actions button {
    border-radius: 8px; padding: 9px 18px; font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem; font-weight: 600; cursor: pointer; transition: all 0.12s;
  }
  .ca-btn-save { background: #0f1f3d; color: #fff; border: none; }
  .ca-btn-save:hover { background: #1a3060; }
  .ca-btn-cancel { background: #fafaf8; color: #4a5568; border: 1.5px solid #ede8df; }
  .ca-btn-cancel:hover { border-color: #0f1f3d; }
  .ca-stats { font-size: 0.72rem; color: #8899aa; padding: 0 4px; }
  @media (max-width: 768px) {
    .ca-admin-box { max-height: 95vh; border-radius: 20px 20px 0 0; }
    .ca-admin-modal { align-items: flex-end; padding: 0; }
    .ca-rule-row { grid-template-columns: 1fr auto; gap: 6px; }
    .ca-rule-row .ca-risk, .ca-rule-row .ca-state { display: none; }
    .ca-rule-header { display: none; }
    .ca-form-grid { grid-template-columns: 1fr; }
  }

  /* ── Toast Notifications ── */
  #toast-container {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
  }
  .toast {
    background: #0f1f3d;
    color: #fff;
    padding: 11px 20px;
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.84rem;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition: opacity 0.22s ease, transform 0.22s ease;
    white-space: nowrap;
    border-bottom: 2px solid #c9a84c;
  }
  .toast.show { opacity: 1; transform: translateY(0) scale(1); }
  .toast.toast-error { background: #c53030; border-bottom-color: #fc8181; }
  .toast.toast-success { background: #276749; border-bottom-color: #68d391; }
  .toast.toast-warn { background: #744210; border-bottom-color: #f6ad55; }
  .toast.toast-info { background: #1e3a5f; border-bottom-color: #60a5fa; }

  /* ── Mobile Nav compact ── */
  @media (max-width: 768px) {
    /* sidebar handles narrow layout */

    /* Comms layout — stack on mobile */
    .comms-layout {
      grid-template-columns: 1fr;
      height: auto;
      overflow: visible;
    }
    .comms-input-panel {
      border-right: none;
      border-bottom: 1px solid #ede8df;
      height: auto;
      overflow: visible;
    }
    .comms-output-panel {
      height: auto;
      padding: 20px 16px;
      min-height: 300px;
    }
    .comms-type-grid { flex-direction: column; }
    .comms-result { padding: 16px; }

    /* Doc Analyzer layout — stack on mobile */
    .docanalyzer-layout {
      grid-template-columns: 1fr;
      height: auto;
      overflow: visible;
    }
    .docanalyzer-input-panel {
      border-right: none;
      border-bottom: 1px solid #ede8df;
      height: auto;
    }
    .docanalyzer-output-panel {
      height: auto;
      padding: 20px 16px;
      min-height: 300px;
    }

    /* Home tool grid — single column */
    .tool-grid { grid-template-columns: 1fr; }

    /* Sales Manager industry grid — 2 cols on mobile is fine */
    #nb-industry-grid { grid-template-columns: 1fr 1fr; }

    /* DA upload slots — full width */
    .da-upload-slot { padding: 10px 12px; }

    /* Prevent iOS input zoom — all inputs/selects/textareas */
    input, select, textarea { font-size: 1rem !important; }
  }

  /* Loading */
  /* ── Scan Review Overlay ── */
  #scanReviewOverlay { display: none; }
  #scanReviewOverlay.active { display: flex !important; }
  .theme-card:hover { border-color: #c9a84c !important; background: #fffbf0 !important; }
  #reviewPanelBody input:focus {
    border-color: #c9a84c !important;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
    outline: none;
  }
  #reviewPanelBody input::placeholder { color: #c0cad8; }

  .loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,31,61,0.55);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
  }
  .loading-overlay.active { display: flex; }
  .spinner {
    width: 52px; height: 52px;
    border: 3px solid rgba(201,168,76,0.2);
    border-top-color: #c9a84c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .loading-text {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.04em;
  }

  /* Scrollbar */
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: var(--cream); }
  ::-webkit-scrollbar-thumb { background: #ede8df; border-radius: 3px; }
  ::-webkit-scrollbar-thumb:hover { background: #4a5568; }

  /* ── Upload Zone ── */
  .upload-zone {
    border: 2px dashed #c9a84c;
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    background: rgba(201,168,76,0.04);
    position: relative;
  }
  .upload-zone:hover, .upload-zone.drag-over {
    background: rgba(201,168,76,0.10);
    border-color: var(--gold-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
  }
  .upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
  }
  .upload-icon { font-size: 2rem; margin-bottom: 8px; }
  .upload-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f1f3d;
    margin-bottom: 4px;
  }
  .upload-sub {
    font-size: 0.75rem;
    color: #4a5568;
    line-height: 1.5;
  }
  .upload-sub strong { color: #c9a84c; }

  .upload-status {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--cream);
    border-radius: 8px;
    border: 1.5px solid #ede8df;
    font-size: 0.83rem;
    color: #4a5568;
    margin-top: 4px;
  }
  .upload-status.active { display: flex; }
  .upload-status .file-icon { font-size: 1.1rem; }
  .upload-status .file-name { font-weight: 500; color: #0f1f3d; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .upload-status .clear-btn {
    background: none; border: none; cursor: pointer;
    color: #4a5568; font-size: 1rem; padding: 0 4px;
    transition: color 0.15s;
  }
  .upload-status .clear-btn:hover { color: #e53e3e; }

  .scan-btn {
    background: linear-gradient(135deg, #c9a84c, var(--gold-light));
    color: #0f1f3d;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
  }
  .scan-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(201,168,76,0.35); }
  .scan-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

  .scan-result-badge {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f0faf4;
    border: 1.5px solid #68d391;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 500;
  }
  .scan-result-badge.active { display: flex; }

  /* ── Coverage Indicators ── */
  .coverage-indicator {
    background: var(--cream);
    border: 1.5px solid #ede8df;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .coverage-indicator-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a5568;
  }
  .toggle-row {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--white);
    border: 1.5px solid #ede8df;
    border-radius: 7px;
    overflow: hidden;
  }
  .toggle-row button {
    flex: 1;
    padding: 7px 10px;
    border: none;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
    color: #4a5568;
    letter-spacing: 0.03em;
  }
  .toggle-row button.inc.active { background: #2d6a4f; color: white; }
  .toggle-row button.exc.active { background: #c53030; color: white; }
  .toggle-row button:not(.active):hover { background: var(--mist); }
  .sublimit-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .sublimit-row label {
    font-size: 0.72rem;
    color: #4a5568;
    white-space: nowrap;
    font-weight: 500;
  }
  .sublimit-row input {
    flex: 1;
    border: 1.5px solid #ede8df;
    border-radius: 6px;
    padding: 6px 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    color: #0f1f3d;
    background: var(--white);
    outline: none;
    transition: border-color 0.2s;
  }
  .sublimit-row input:focus { border-color: #c9a84c; }

  /* ── Habitability Notice (print page) ── */
  .hab-notice {
    page-break-before: always;
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-top: 24px;
  }
  .hab-notice-header {
    background: #7b1a1a;
    padding: 20px 36px 18px;
    position: relative;
    overflow: hidden;
  }
  .hab-notice-header::before {
    content: '⚠';
    position: absolute;
    right: 32px; top: 50%;
    transform: translateY(-50%);
    font-size: 5rem;
    opacity: 0.08;
  }
  .hab-notice-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #feb2b2;
    margin-bottom: 10px;
  }
  .hab-notice-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: white;
    font-weight: 700;
    line-height: 1.25;
    max-width: 580px;
  }
  .hab-notice-body {
    padding: 20px 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  .hab-red-bar { height: 4px; background: linear-gradient(90deg, #c53030, #fc8181, #c53030); }
  .hab-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #7b1a1a;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1.5px solid #fed7d7;
  }
  .hab-text {
    font-size: 0.82rem;
    line-height: 1.55;
    color: #4a5568;
  }
  .hab-alert-box {
    background: #fff5f5;
    border: 1.5px solid #fc8181;
    border-left: 4px solid #c53030;
    border-radius: 8px;
    padding: 10px 14px;
  }
  .hab-alert-box .hab-text { color: #742a2a; }
  .hab-update-box {
    background: #fffbeb;
    border: 1.5px solid #f6e05e;
    border-left: 4px solid #d69e2e;
    border-radius: 8px;
    padding: 16px 20px;
  }
  .hab-update-box .title { font-weight: 700; color: #744210; font-size: 0.85rem; margin-bottom: 6px; }
  .hab-update-box .hab-text { color: #744210; }
  .hab-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 4px;
  }
  .hab-list-item {
    display: flex;
    gap: 10px;
    font-size: 0.855rem;
    color: #4a5568;
    line-height: 1.55;
    align-items: flex-start;
  }
  .hab-list-item::before {
    content: '▸';
    color: #c53030;
    font-size: 0.75rem;
    margin-top: 3px;
    flex-shrink: 0;
  }
  .hab-verdicts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .hab-verdict-card {
    background: var(--cream);
    border-radius: 9px;
    padding: 14px 16px;
    border: 1.5px solid #ede8df;
    text-align: center;
  }
  .hab-verdict-card .label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #4a5568; margin-bottom: 4px; }
  .hab-verdict-card .value { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 700; color: #c53030; }
  .hab-tips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .hab-tip {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 11px 14px;
    background: #f0fff4;
    border-radius: 8px;
    border: 1px solid #9ae6b4;
  }
  .hab-tip .tip-icon { font-size: 1rem; flex-shrink: 0; }
  .hab-tip p { font-size: 0.8rem; color: #276749; line-height: 1.5; }
  .hab-sig-block {
    background: #fff5f5;
    border: 1.5px solid #fc8181;
    border-radius: 10px;
    padding: 24px 28px;
  }
  .hab-sig-block .title { font-weight: 700; color: #7b1a1a; font-size: 0.9rem; margin-bottom: 4px; }
  .hab-sig-block .sub { font-size: 0.8rem; color: #4a5568; margin-bottom: 20px; line-height: 1.5; }
  .hab-sig-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .hab-sig-field label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7b1a1a;
    display: block;
    margin-bottom: 5px;
  }
  .hab-sig-line { border-bottom: 1.5px solid #c53030; height: 32px; }

  /* In-proposal GL coverage indicator table */
  .gl-coverage-indicators {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
  }
  .gl-indicator-row {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--cream);
    border-radius: 9px;
    overflow: hidden;
    border: 1.5px solid #ede8df;
  }
  .gl-indicator-name {
    flex: 1;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f1f3d;
  }
  .gl-indicator-name span {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: #4a5568;
    margin-top: 2px;
  }
  .gl-status-badge {
    padding: 8px 18px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    white-space: nowrap;
  }
  .gl-status-badge.included { background: #2d6a4f; color: white; }
  .gl-status-badge.excluded { background: #c53030; color: white; }
  .gl-status-badge.unknown { background: #4a5568; color: white; }
  .gl-sublimit {
    padding: 8px 16px;
    font-size: 0.8rem;
    color: #4a5568;
    border-left: 1px solid #ede8df;
    min-width: 110px;
    text-align: center;
  }
  .gl-sublimit strong { display: block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.07em; color: #4a5568; margin-bottom: 2px; }
  .gl-sublimit .amt { font-weight: 700; color: #0f1f3d; font-size: 0.875rem; }

  .divider-or {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
  }
  .divider-or::before, .divider-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ede8df;
  }

  /* ── Agent Profile Modal ── */
  .modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,31,61,0.6);
    backdrop-filter: blur(6px);
    z-index: 200;
    align-items: center;
    justify-content: center;
  }
  .modal-backdrop.active { display: flex; }
  .profile-modal {
    background: var(--white);
    border-radius: 16px;
    width: 480px;
    max-width: 95vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(15,31,61,0.3);
    overflow: hidden;
    animation: modalIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
  }
  @keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
  }
  .modal-header {
    background: #0f1f3d;
    padding: 28px 32px 24px;
    border-bottom: 3px solid #c9a84c;
  }
  .modal-header h2 {
    font-family: 'Playfair Display', serif;
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 4px;
  }
  .modal-header p { color: rgba(255,255,255,0.55); font-size: 0.82rem; }
  .modal-body { padding: 28px 32px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; flex: 1; }
  .modal-footer {
    padding: 16px 32px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
    border-top: 1px solid #f0f2f5;
    background: var(--white);
  }
  .modal-save-btn {
    background: #0f1f3d;
    color: var(--white);
    border: none;
    border-radius: 9px;
    padding: 11px 28px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid #c9a84c;
  }
  .modal-save-btn:hover { background: var(--navy-mid); transform: translateY(-1px); }
  .modal-cancel-btn {
    background: transparent;
    color: #4a5568;
    border: 1.5px solid #ede8df;
    border-radius: 9px;
    padding: 11px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
  }
  .modal-cancel-btn:hover { background: var(--mist); }

  /* Agent chip in header */
  .agent-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 40px;
    padding: 6px 14px 6px 8px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .agent-chip:hover { background: rgba(255,255,255,0.14); border-color: #c9a84c; }
  .agent-avatar {
    width: 32px; height: 32px;
    background: #c9a84c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f1f3d;
    flex-shrink: 0;
  }
  .agent-chip-info { line-height: 1.3; }
  .agent-chip-name { font-size: 0.82rem; font-weight: 600; color: var(--white); }
  .agent-chip-edit { font-size: 0.68rem; color: var(--gold-light); letter-spacing: 0.05em; }

  /* Locked agent section in input panel */
  .agent-locked-card {
    background: #0f1f3d;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
  }
  .agent-locked-avatar {
    width: 40px; height: 40px;
    background: #c9a84c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f1f3d;
    flex-shrink: 0;
  }
  .agent-locked-info { flex: 1; }
  .agent-locked-name { font-weight: 600; color: var(--white); font-size: 0.95rem; }
  .agent-locked-meta { font-size: 0.78rem; color: rgba(255,255,255,0.55); margin-top: 2px; }
  .agent-locked-edit {
    background: none;
    border: 1px solid rgba(201,168,76,0.4);
    border-radius: 6px;
    padding: 5px 10px;
    color: var(--gold-light);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .agent-locked-edit:hover { background: rgba(201,168,76,0.15); border-color: #c9a84c; }

  /* First-run setup overlay — full screen split design */
  .setup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: #f7f8fa;
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .setup-overlay.active { display: flex; }

  .setup-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: 100%;
  }

  /* Left panel — brand side */
  .setup-left {
    background: #0f1f3d;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 52px 56px;
    position: relative;
    overflow: hidden;
    gap: 0;
  }
  .setup-left-grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(201,168,76,0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(201,168,76,0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 30%, transparent 100%);
    pointer-events: none;
    z-index: 1;
  }
  .setup-left::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 480px; height: 480px;
    background: radial-gradient(circle, rgba(201,168,76,0.11) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
  }
  .setup-left::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 360px; height: 360px;
    background: radial-gradient(circle, rgba(26,48,96,0.8) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
  }
  .setup-brand {
    position: relative;
    z-index: 2;
  }
  .setup-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
  }
  .setup-brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.01em;
  }
  .setup-brand-tagline {
    font-size: 0.68rem;
    color: rgba(201,168,76,0.7);
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-top: 2px;
  }
  /* Hero block */
  .setup-hero-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 36px 0 24px;
  }
  .setup-hero-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .setup-hero-eyebrow::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1.5px;
    background: #c9a84c;
    opacity: 0.7;
  }
  .setup-hero-headline {
    font-family: 'Playfair Display', serif;
    color: var(--white);
    font-size: clamp(2.4rem, 3.2vw, 3rem);
    line-height: 1.15;
    font-weight: 700;
    margin-bottom: 22px;
  }
  .setup-hero-headline em {
    color: #c9a84c;
    font-style: italic;
  }
  .setup-hero-sub {
    color: rgba(255,255,255,0.48);
    font-size: 0.9rem;
    line-height: 1.75;
    max-width: 360px;
  }
  /* Stat cards */
  .setup-stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 32px;
  }
  .setup-stat-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(201,168,76,0.18);
    border-radius: 12px;
    padding: 18px 12px;
    text-align: center;
    transition: background 0.2s, border-color 0.2s;
  }
  .setup-stat-card:hover {
    background: rgba(201,168,76,0.07);
    border-color: rgba(201,168,76,0.35);
  }
  .setup-stat-icon {
    color: #c9a84c;
    opacity: 0.8;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
  }
  .setup-stat-num {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 5px;
  }
  .setup-stat-label {
    font-size: 0.67rem;
    font-weight: 500;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    line-height: 1.4;
  }
  /* Bottom quote */
  .setup-left-quote {
    border-top: 1px solid rgba(201,168,76,0.15);
    padding-top: 24px;
  }
  .setup-left-quote-mark {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    line-height: 0.8;
    color: rgba(201,168,76,0.35);
    margin-bottom: 8px;
  }
  .setup-left-quote-text {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.38);
    line-height: 1.65;
    font-style: italic;
    max-width: 340px;
  }

  /* Right panel — form side */
  .setup-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 48px 64px;
    overflow-y: auto;
  }
  .setup-form-card {
    width: 100%;
    max-width: 440px;
    animation: modalIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
  }
  .setup-form-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 10px;
  }
  .setup-form-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #0f1f3d;
    margin-bottom: 8px;
    line-height: 1.2;
  }
  .setup-form-sub {
    font-size: 0.88rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
  }
  .setup-form-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
  }
  .setup-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f1f3d;
    margin-bottom: 6px;
    letter-spacing: 0.02em;
  }
  .setup-field input {
    width: 100%;
    border: 1.5px solid #e2e5ea;
    border-radius: 10px;
    padding: 12px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    color: #0f1f3d;
    background: var(--white);
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  }
  .setup-field input:focus {
    border-color: #c9a84c;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
  }
  .setup-field input::placeholder { color: #b0b8c4; }
  .setup-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .setup-save-btn {
    width: 100%;
    background: #0f1f3d;
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 15px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(15,31,61,0.25);
    position: relative;
    overflow: hidden;
  }
  .setup-save-btn::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: #c9a84c;
  }
  .setup-save-btn:hover {
    background: var(--navy-mid);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15,31,61,0.3);
  }
  .setup-disclaimer {
    text-align: center;
    font-size: 0.74rem;
    color: #b0b8c4;
    margin-top: 16px;
    line-height: 1.5;
  }

  /* Sign-in Step 1 premium styles */
  .setup-right {
    background: linear-gradient(145deg, #f8f5ef 0%, #ede8de 100%);
    position: relative;
    overflow: hidden;
  }
  .setup-right::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(201,168,76,0.09) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
  }
  .setup-right > * { position: relative; z-index: 1; }
  .signin-orb-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }
  .signin-orb {
    width: 60px;
    height: 60px;
    animation: orb-spin 14s linear infinite;
    filter: drop-shadow(0 0 10px rgba(201,168,76,0.22));
  }
  @keyframes orb-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
  }
  .signin-input-wrap {
    position: relative;
  }
  .signin-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #b0b8c4;
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: color 0.2s;
  }
  .signin-input-wrap:focus-within .signin-input-icon {
    color: #c9a84c;
  }
  .signin-email-field input {
    padding-left: 42px !important;
    font-size: 0.95rem !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    border-radius: 12px !important;
    border: 1.5px solid #ddd8cf !important;
    background: white !important;
    box-shadow: 0 2px 10px rgba(15,31,61,0.07) !important;
  }
  .signin-email-field input:focus {
    border-color: #c9a84c !important;
    box-shadow: 0 0 0 3px rgba(201,168,76,0.14), 0 2px 10px rgba(15,31,61,0.07) !important;
  }
  .signin-btn {
    background: linear-gradient(135deg, #0f1f3d 0%, #1a3060 100%) !important;
    border-radius: 12px !important;
    font-size: 1rem !important;
    padding: 16px !important;
    letter-spacing: 0.04em !important;
    box-shadow: 0 6px 22px rgba(15,31,61,0.3) !important;
  }
  .signin-trust-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
  }
  .signin-trust-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #7a8898;
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(15,31,61,0.08);
    border-radius: 20px;
    padding: 4px 10px;
    letter-spacing: 0.02em;
  }


  .signin-tool-chip:hover {
    background: white;
    border-color: rgba(201,168,76,0.5);
    box-shadow: 0 2px 8px rgba(201,168,76,0.12);
  }
  .signin-tool-chip svg { color: #c9a84c; flex-shrink: 0; }

  /* Branding upload section */
  .branding-upload-section {
    border: 1.5px solid #e2e5ea;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
  }
  .branding-upload-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    background: #fafbfc;
    transition: background 0.2s;
    user-select: none;
  }
  .branding-upload-toggle:hover { background: #f0f2f5; }
  .branding-toggle-arrow {
    font-size: 1.2rem;
    color: #bbb;
    transition: transform 0.2s;
    font-weight: 300;
  }
  .branding-toggle-arrow.open { transform: rotate(90deg); }
  .branding-upload-body {
    display: none;
    padding: 16px;
    border-top: 1.5px solid #e2e5ea;
    background: white;
  }
  .branding-upload-body.open { display: block; }
  .branding-drop-zone {
    border: 1.5px dashed #e2e5ea;
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafbfc;
  }
  .branding-drop-zone:hover {
    border-color: #c9a84c;
    background: rgba(201,168,76,0.04);
  }
  .branding-status {
    margin-top: 12px;
  }
  .branding-status-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f0f2f5;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #555;
  }
  .branding-preview {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f8f9e8;
    border: 1px solid #e8eda0;
    border-radius: 8px;
  }

  /* ══════════════════════════════════════════════
     MOBILE — Full premium redesign
  ══════════════════════════════════════════════ */
  @media (max-width: 768px) {

    /* Setup screen: mobile single-column */
    .setup-overlay {
      background: linear-gradient(145deg, #f8f5ef 0%, #ede8de 100%);
      overflow-y: auto;
    }
    .setup-layout {
      grid-template-columns: 1fr;
      grid-template-rows: auto 1fr;
      height: auto;
      min-height: 100%;
    }

    /* Left panel: collapses to slim branded top bar */
    .setup-left {
      display: flex !important;
      flex-direction: column !important;
      padding: 18px 24px;
      min-height: auto;
      justify-content: flex-start;
      gap: 0;
    }
    .setup-left::before { display: none; }
    .setup-left::after { display: none; }
    .setup-left-grid { display: none; }

    .setup-brand-logo { margin-bottom: 0; }
    .setup-brand-name { font-size: 1rem; }
    .setup-brand-tagline { font-size: 0.62rem; }

    /* Hide everything except logo on mobile */
    .setup-hero-block,
    .setup-stat-row,
    .setup-left-quote { display: none !important; }

    /* Right panel is the main content area on mobile — vertically centered */
    .setup-right {
      padding: 32px 28px 48px;
      align-items: center;
      justify-content: center;
      background: transparent;
      overflow: visible;
      flex: 1;
      min-height: calc(100vh - 80px);
    }
    .setup-form-card {
      max-width: 100%;
      width: 100%;
    }
    .setup-form-eyebrow { font-size: 0.68rem; }
    .setup-form-title { font-size: 1.5rem; margin-bottom: 6px; }
    .setup-form-sub { font-size: 0.84rem; margin-bottom: 24px; }

    /* Form fields — full width, comfortable touch targets */
    .setup-form-fields { gap: 14px; margin-bottom: 20px; }
    .setup-field label { font-size: 0.76rem; margin-bottom: 5px; }
    .setup-field input {
      padding: 13px 15px;
      font-size: 1rem; /* prevents iOS zoom */
      border-radius: 12px;
    }

    /* Phone/email stay two columns on mobile */
    .setup-two-col { grid-template-columns: 1fr 1fr; gap: 10px; }

    /* Branding section — slightly more compact */
    .branding-upload-section { margin-bottom: 16px; }
    .branding-upload-toggle { padding: 13px 14px; }
    .branding-drop-zone { padding: 18px 16px; }

    /* Save button — larger touch target */
    .setup-save-btn {
      padding: 17px;
      font-size: 1rem;
      border-radius: 14px;
    }
    .setup-disclaimer { font-size: 0.72rem; }

    /* Compact orb on mobile */
    .signin-orb-wrap { display: none; }
    .setup-form-title { font-size: 1.65rem; }

    /* Trust pills compact */
    .signin-trust-row { gap: 5px; margin-top: 12px; }
    .signin-trust-pill { font-size: 0.64rem; padding: 3px 8px; }

    /* Main app: mobile layout */
    .app-header {
      padding: 0 16px;
      height: 54px;
    }
    .header-logo-text { font-size: 0.95rem; }
    .header-tagline { display: none; }

    .main-layout {
      grid-template-columns: 1fr !important;
      height: auto !important;
    }

    /* Input panel stacks above output */
    .input-panel {
      height: auto !important;
      overflow: visible !important;
      border-right: none !important;
      border-bottom: 1px solid #e2e5ea;
    }
    .panel-inner { padding: 20px 16px !important; }
    .panel-section { padding: 14px 0 !important; }

    /* Output panel */
    .output-panel {
      height: auto !important;
      overflow: visible !important;
      padding: 16px !important;
    }
    .proposal-doc { border-radius: 12px !important; }
    .doc-cover { padding: 36px 28px 32px !important; }
    .cover-client { font-size: 1.8rem !important; }
    .doc-body { padding: 28px 24px !important; gap: 28px !important; }

    /* Team grid — single column on small phones */
    .team-grid { grid-template-columns: 1fr !important; }

    /* Premium grid — 2 columns max */
    .premium-grid { grid-template-columns: 1fr 1fr !important; }

    /* Additional coverages — single column */
    .additional-coverages { grid-template-columns: 1fr !important; }

    /* Proposal actions bar */
    .proposal-actions {
      padding: 12px 16px !important;
      gap: 8px !important;
      flex-wrap: wrap;
    }
    .action-btn { font-size: 0.78rem !important; padding: 9px 14px !important; }

    /* Modals — full screen on mobile */
    .modal-box {
      width: 100% !important;
      max-width: 100% !important;
      margin: 0 !important;
      border-radius: 20px 20px 0 0 !important;
      position: fixed !important;
      bottom: 0 !important;
      max-height: 92vh !important;
      overflow-y: auto !important;
    }
    .modal-backdrop { align-items: flex-end !important; }

    /* ══════════════════════════════════
       #1 CRITICAL — Proposal input panel stacks vertically
    ══════════════════════════════════ */
    .main-layout {
      display: flex !important;
      flex-direction: column !important;
      height: auto !important;
    }
    .prop-left-panel {
      width: 100% !important;
      min-width: 0 !important;
      height: auto !important;
      border-right: none !important;
      border-bottom: 1px solid #e2ddd5;
    }

    /* ══════════════════════════════════
       #2 CRITICAL — Premium grid responsive columns
    ══════════════════════════════════ */
    #premiumGridHeaders {
      grid-template-columns: 1fr 80px 80px 28px !important;
      gap: 4px !important;
    }
    #premiumGridHeaders > div { font-size: 0.55rem !important; }
    #basePremiumRow div[style*="grid-template-columns"] {
      grid-template-columns: 1fr 80px 80px 28px !important;
      gap: 4px !important;
    }
    #additionalPremiumLines div[style*="grid-template-columns"] {
      grid-template-columns: 1fr 80px 80px 28px !important;
      gap: 4px !important;
    }

    /* ══════════════════════════════════
       #3 HIGH — Coverage block fields collapse to 1 col
    ══════════════════════════════════ */
    .cb-row { grid-template-columns: 1fr !important; }
    .cb-row.three { grid-template-columns: 1fr 1fr !important; }

    /* ══════════════════════════════════
       #4 HIGH — Cover page: hide sidebar, stack vertically
    ══════════════════════════════════ */
    .doc-cover { min-height: auto !important; height: auto !important; }
    .cover-content { flex-direction: column !important; }
    .cover-sidebar { display: none !important; }
    .cover-vbar { display: none !important; }
    .cover-main { padding: 32px 24px 24px !important; overflow: visible !important; }
    .cover-skyline-wrap { display: none !important; }
    .cover-bottom { flex-direction: column !important; }
    .cover-bottom-sidebar { display: none !important; }
    .cover-bottom-main { width: 100% !important; padding: 16px 24px !important; }
    .cover-meta { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
    .cover-client { font-size: 1.6rem !important; white-space: normal !important; }
    .cover-subtitle { white-space: normal !important; }

    /* ══════════════════════════════════
       #5 HIGH — Scan review panel mobile
    ══════════════════════════════════ */
    #scanReviewOverlay { padding: 0 !important; align-items: flex-end !important; }
    #scanReviewOverlay > div {
      border-radius: 16px 16px 0 0 !important;
      max-height: 95vh !important;
    }
    #reviewPanelBody { max-height: 60vh !important; padding: 14px 16px !important; }
    /* Stack confirm/discard buttons vertically */
    #scanReviewOverlay > div > div:last-child {
      flex-direction: column !important;
      gap: 8px !important;
      padding: 12px 16px !important;
    }
    #scanReviewOverlay > div > div:last-child button {
      width: 100% !important;
    }

    /* ══════════════════════════════════
       #6 HIGH — Coverage tables scroll horizontally
    ══════════════════════════════════ */
    .doc-section { overflow-x: auto !important; }
    .coverage-table { min-width: 480px !important; }

    /* ══════════════════════════════════
       #7 MEDIUM — Proposal action buttons: 2-col grid
    ══════════════════════════════════ */
    .proposal-actions {
      display: grid !important;
      grid-template-columns: 1fr 1fr !important;
    }
    .proposal-actions .action-btn:first-child {
      grid-column: 1 / -1 !important;
    }

    /* ══════════════════════════════════
       #8 MEDIUM — SOV editor horizontal scroll
    ══════════════════════════════════ */
    .sov-table-wrap { -webkit-overflow-scrolling: touch; }
    .sov-edit-table { min-width: 520px; }

    /* ══════════════════════════════════
       #10 LOW — iOS input zoom prevention
    ══════════════════════════════════ */
    .cb-input, .cb-select { font-size: 1rem !important; }

    /* ══════════════════════════════════
       #11 LOW — Hamburger button content overlap
    ══════════════════════════════════ */
    .prop-left-panel { padding-top: 48px !important; }
  }

  /* Very small phones */
  @media (max-width: 380px) {
    .setup-two-col { grid-template-columns: 1fr; }
    .setup-hero-text h1 { font-size: 1.55rem; }
    .cover-client { font-size: 1.5rem !important; }
  }

  @media print {
    /* ═══════════════════════════════════════════════
       COVR AI — PREMIUM PRINT STYLES
       Goal: match on-screen quality pixel-for-pixel
    ═══════════════════════════════════════════════ */

    .app-shell { display: block !important; overflow: visible !important; height: auto !important; }
    .app-content { height: auto !important; overflow: visible !important; }
    .tool-screen.active { height: auto !important; overflow: visible !important; }
    .home-screen.active { height: auto !important; overflow: visible !important; }

    .ai-disclaimer { display: none !important; }

    /* Force ALL backgrounds, colors, and gradients to print */
    *  {
      -webkit-print-color-adjust: exact !important;
      print-color-adjust: exact !important;
      color-adjust: exact !important;
    }
    /* Targeted overflow control */
    .doc-body, .doc-section, .exec-summary-box, .step-item,
    .risk-item, .coverage-item, p, li, span, div {
      overflow-wrap: break-word !important;
      word-wrap: break-word !important;
    }
    img { max-width: 100% !important; }
    .doc-body, .doc-section, .proposal-doc, .output-panel,
    .proposal-output, .tool-screen, .screen-proposal { max-width: 100% !important; }

    /* ── Hide all app chrome ── */
    .sidebar, .hamburger-btn, .input-panel, .proposal-actions,
    .setup-overlay, .modal-backdrop,
    .empty-state, .watermark-hint { display: none !important; }

    /* ── Hide every tool screen except the proposal ── */
    #screen-invoice, #screen-comparison, #screen-appetite,
    #screen-certs, #screen-comms, #screen-docanalyzer, #screen-ams, #screen-newbiz, #screen-suppapps, #screen-sov { display: none !important; }

    /* ── Page setup ── */
    @page {
      margin: 44px 52px;
      size: letter portrait;
    }
    @page :first {
      margin: 0;
      size: letter portrait;
    }
    html, body {
      background: white !important;
      margin: 0 !important;
      padding: 0 !important;
      width: 100% !important;
      max-width: 100% !important;
      overflow-x: hidden !important;
    }

    /* ── Kill the screen layout entirely ── */
    .tool-screen, .tool-screen.active {
      display: block !important;
      width: 100% !important;
      max-width: 100% !important;
      min-height: 0 !important;
    }
    .main-layout {
      display: block !important;
      width: 100% !important;
      max-width: 100% !important;
    }
    .input-panel {
      display: none !important;
    }
    .output-panel {
      display: block !important;
      height: auto !important;
      overflow: visible !important;
      padding: 0 !important;
      background: white !important;
      width: 100% !important;
      max-width: 100% !important;
      box-sizing: border-box !important;
    }
    .proposal-output, .proposal-output.visible {
      display: block !important;
      width: 100% !important;
      max-width: 100% !important;
      box-sizing: border-box !important;
    }
    .proposal-doc {
      display: block !important;
      box-shadow: none !important;
      border-radius: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
      width: 100% !important;
      max-width: 100% !important;
      overflow: visible !important;
      box-sizing: border-box !important;
    }

    /* ══════════════════════════════════
       COVER PAGE — white/navy split
    ══════════════════════════════════ */
    .doc-cover {
      page-break-after: always !important;
      break-after: page !important;
      /* 11in = letter height; @page :first has margin:0 so full page is available */
      height: 11in !important;
      overflow: hidden !important;
      display: flex !important;
      flex-direction: column !important;
      background: #ffffff !important;
      print-color-adjust: exact !important;
      -webkit-print-color-adjust: exact !important;
    }
    .cover-accent-bar {
      height: 6px !important;
      width: 100% !important;
      background: linear-gradient(90deg, #0f1f3d, #c9a84c, #e8c97a, #c9a84c) !important;
      flex-shrink: 0 !important;
      print-color-adjust: exact !important;
      -webkit-print-color-adjust: exact !important;
    }
    .cover-content {
      display: flex !important;
      flex: 1 !important;
      align-items: stretch !important;
      min-height: 0 !important;
    }
    .cover-sidebar {
      width: 175px !important;
      flex-shrink: 0 !important;
      background: #0f1f3d !important;
      padding: 36px 24px 32px !important;
      display: flex !important;
      flex-direction: column !important;
      align-self: stretch !important;
      print-color-adjust: exact !important;
      -webkit-print-color-adjust: exact !important;
    }
    .cover-vbar {
      width: 4px !important;
      background: linear-gradient(180deg, #c9a84c, #e8c97a 60%, rgba(201,168,76,0.2)) !important;
      flex-shrink: 0 !important;
      align-self: stretch !important;
      print-color-adjust: exact !important;
      -webkit-print-color-adjust: exact !important;
    }
    .cover-main {
      flex: 1 !important;
      padding: 48px 44px 0 40px !important;
      display: flex !important;
      flex-direction: column !important;
      position: relative !important;
      overflow: hidden !important;
    }
    .cover-eyebrow {
      font-size: 0.6rem !important;
      font-weight: 700 !important;
      letter-spacing: 0.22em !important;
      text-transform: uppercase !important;
      color: #c9a84c !important;
      margin-bottom: 20px !important;
      font-family: Arial, sans-serif !important;
      print-color-adjust: exact !important;
      -webkit-print-color-adjust: exact !important;
    }
    .cover-client {
      font-family: Georgia, 'Times New Roman', serif !important;
      font-size: 2.2rem !important;
      color: #0f1f3d !important;
      font-weight: 700 !important;
      line-height: 1.1 !important;
      margin-bottom: 14px !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
    }
    .cover-subtitle {
      color: #4a5568 !important;
      font-size: 0.88rem !important;
      font-family: Arial, sans-serif !important;
      font-weight: 400 !important;
      white-space: nowrap !important;
      overflow: hidden !important;
      text-overflow: ellipsis !important;
    }
    .cover-divider {
      width: 56px !important;
      height: 3px !important;
      background: #c9a84c !important;
      margin: 22px 0 0 !important;
      border-radius: 2px !important;
      print-color-adjust: exact !important;
      -webkit-print-color-adjust: exact !important;
    }
    .cover-skyline-wrap {
      position: absolute !important;
      bottom: 0 !important; right: 0 !important;
      width: 75% !important;
      opacity: 0.07 !important;
      print-color-adjust: exact !important;
      -webkit-print-color-adjust: exact !important;
    }
    .cover-sidebar-label {
      font-size: 0.57rem !important;
      font-weight: 700 !important;
      letter-spacing: 0.2em !important;
      text-transform: uppercase !important;
      color: #c9a84c !important;
      font-family: Arial, sans-serif !important;
      print-color-adjust: exact !important;
    }
    .cover-sidebar-agency {
      font-size: 0.8rem !important;
      font-weight: 600 !important;
      color: rgba(255,255,255,0.9) !important;
      margin-top: 5px !important;
      font-family: Arial, sans-serif !important;
      print-color-adjust: exact !important;
    }
    .cover-sidebar-logo img {
      max-height: 44px !important;
      max-width: 150px !important;
      object-fit: contain !important;
      display: block !important;
    }
    .cover-bottom {
      flex-shrink: 0 !important;
      display: flex !important;
      border-top: 2px solid #c9a84c !important;
      print-color-adjust: exact !important;
      -webkit-print-color-adjust: exact !important;
    }
    .cover-bottom-sidebar {
      width: 175px !important;
      flex-shrink: 0 !important;
      background: #0f1f3d !important;
      padding: 20px 28px !important;
      print-color-adjust: exact !important;
      -webkit-print-color-adjust: exact !important;
    }
    .cover-bottom-main {
      flex: 1 !important;
      background: #f8f5ef !important;
      padding: 20px 40px !important;
      print-color-adjust: exact !important;
      -webkit-print-color-adjust: exact !important;
    }
    .cover-meta {
      display: grid !important;
      grid-template-columns: repeat(4, 1fr) !important;
    }
    .cover-meta-item label {
      display: block !important;
      font-size: 0.57rem !important;
      font-weight: 700 !important;
      text-transform: uppercase !important;
      letter-spacing: 0.14em !important;
      color: #0f1f3d !important;
      opacity: 0.5 !important;
      margin-bottom: 5px !important;
      font-family: Arial, sans-serif !important;
    }
    .cover-meta-item span {
      color: #0f1f3d !important;
      font-size: 0.88rem !important;
      font-weight: 600 !important;
      font-family: Arial, sans-serif !important;
    }
    .cover-logo-print {
      max-height: 44px !important;
      max-width: 150px !important;
      object-fit: contain !important;
      display: block !important;
      display: block !important;
    }

    /* ── Document body ── */
    .proposal-output, .proposal-output.visible {
      display: block !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }
    .doc-body {
      padding: 0 !important;
      gap: 32px !important;
      display: flex !important;
      flex-direction: column !important;
      width: 100% !important;
      max-width: 100% !important;
      box-sizing: border-box !important;
      overflow: visible !important;
    }
    .doc-section {
      width: 100% !important;
      max-width: 100% !important;
      box-sizing: border-box !important;
      overflow: visible !important;
    }
    /* Nuclear option: nothing inside doc-body can be wider than page */
    .doc-body * {
      max-width: 100% !important;
      box-sizing: border-box !important;
    }
    /* Exception: let table cells size themselves naturally */
    .doc-body td, .doc-body th { max-width: none !important; }

    /* ══════════════════════════════════
       SECTION HEADERS
    ══════════════════════════════════ */
    .doc-section-title {
      font-family: 'Playfair Display', Georgia, serif !important;
      font-size: 1.15rem !important;
      color: #0f1f3d !important;
      font-weight: 600 !important;
      margin-bottom: 14px !important;
      padding-bottom: 10px !important;
      border-bottom: 2px solid #ede8df !important;
      display: flex !important;
      align-items: center !important;
      gap: 10px !important;
      break-after: avoid !important;
      page-break-after: avoid !important;
    }
    .section-num {
      background-color: #0f1f3d !important;
      color: #c9a84c !important;
      font-size: 0.68rem !important;
      font-weight: 700 !important;
      width: 24px !important; height: 24px !important;
      border-radius: 50% !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      flex-shrink: 0 !important;
    }

    /* ══════════════════════════════════
       EXECUTIVE SUMMARY
    ══════════════════════════════════ */
    .exec-summary-box {
      background-color: #0f1f3d !important;
      border-radius: 10px !important;
      padding: 24px 28px !important;
      position: relative !important;
      overflow: visible !important;
      box-sizing: border-box !important;
      width: 100% !important;
      max-width: 100% !important;
    }
    .exec-summary-box::before {
      content: '\201C' !important;
      position: absolute !important;
      top: -10px !important; left: 16px !important;
      font-size: 7rem !important;
      color: rgba(201,168,76,0.15) !important;
      font-family: 'Playfair Display', Georgia, serif !important;
      line-height: 1 !important;
    }
    .exec-summary-box p {
      color: #ffffff !important;
      font-size: 0.92rem !important;
      line-height: 1.75 !important;
      position: relative !important;
      font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif !important;
      font-weight: 400 !important;
    }

    /* ══════════════════════════════════
       TEAM CARDS
    ══════════════════════════════════ */
    .team-grid {
      display: grid !important;
      grid-template-columns: repeat(3, 1fr) !important;
      gap: 14px !important;
      width: 100% !important;
      max-width: 100% !important;
      box-sizing: border-box !important;
    }
    .team-card {
      background-color: #f8f5ef !important;
      border-radius: 10px !important;
      padding: 16px 18px !important;
      border: 1.5px solid #ede8df !important;
      break-inside: avoid !important;
      min-width: 0 !important;
      overflow: visible !important;
      overflow-wrap: break-word !important;
      word-break: break-word !important;
      box-sizing: border-box !important;
    }
    .team-card .role {
      font-size: 0.64rem !important;
      font-weight: 700 !important;
      text-transform: uppercase !important;
      letter-spacing: 0.1em !important;
      color: #c9a84c !important;
      margin-bottom: 5px !important;
      display: block !important;
    }
    .team-card .name {
      font-weight: 600 !important;
      color: #0f1f3d !important;
      font-size: 0.93rem !important;
      margin-bottom: 4px !important;
    }
    .team-card .contact {
      font-size: 0.78rem !important;
      color: #4a5568 !important;
      line-height: 1.6 !important;
    }
    .team-blurb {
      font-size: 0.85rem !important;
      color: #4a5568 !important;
      line-height: 1.7 !important;
      margin-top: 14px !important;
    }

    /* ══════════════════════════════════
       COVERAGE TABLES
    ══════════════════════════════════ */
    .coverage-table {
      width: 100% !important;
      max-width: 100% !important;
      border-collapse: collapse !important;
      font-size: 0.84rem !important;
      table-layout: fixed !important;
    }
    .coverage-table thead tr {
      background-color: #0f1f3d !important;
    }
    .coverage-table thead th {
      color: #e8c97a !important;
      font-weight: 600 !important;
      padding: 11px 14px !important;
      text-align: left !important;
      font-size: 0.72rem !important;
      text-transform: uppercase !important;
      letter-spacing: 0.08em !important;
    }
    .coverage-table tbody tr {
      border-bottom: 1px solid #ede8df !important;
    }
    .coverage-table tbody tr:nth-child(even) {
      background-color: #faf8f5 !important;
    }
    .coverage-table tbody td {
      padding: 10px 14px !important;
      color: #4a5568 !important;
      vertical-align: top !important;
    }
    .coverage-table tbody td:first-child {
      font-weight: 500 !important;
      color: #0f1f3d !important;
    }
    .coverage-table .amount { font-weight: 600 !important; color: #0f1f3d !important; white-space: nowrap !important; }
    .coverage-table td:last-child:not(:first-child) { white-space: nowrap !important; }

    /* ── Property Schedule: allow coverage chips to wrap, kill nowrap for last col ── */
    .coverage-table.sov-table td:last-child { white-space: normal !important; }
    .coverage-table.sov-table td { padding: 8px 10px !important; vertical-align: top !important; }
    .coverage-table.sov-table td:first-child { text-align: center !important; font-weight: 700 !important; color: #c9a84c !important; white-space: nowrap !important; }
    /* SOV schedule table: fit all columns within page, allow rows to break across pages */
    table[style*="table-layout:fixed"] { width: 100% !important; max-width: 100% !important; }
    .doc-section table[style*="table-layout:fixed"] { page-break-inside: auto !important; }
    .doc-section table[style*="table-layout:fixed"] tr { page-break-inside: avoid; }
    .doc-section table[style*="table-layout:fixed"] thead { display: table-header-group; }

    /* ── SOV Editor Panel ─────────────────────────────────────────────────── */
    .sov-editor-header {
      display: flex; align-items: center; justify-content: space-between;
      background: #0f1f3d; border-radius: 8px 8px 0 0;
      padding: 10px 12px; gap: 8px;
    }
    .sov-editor-icon { font-size: 1.1rem; color: #c9a84c; flex-shrink: 0; }
    .sov-editor-title { font-size: 0.82rem; font-weight: 700; color: #fff; font-family: 'Playfair Display', serif; }
    .sov-editor-subtitle { font-size: 0.68rem; color: #8899bb; margin-top: 1px; }
    .sov-clear-btn {
      background: none; border: none; color: #8899bb; cursor: pointer;
      font-size: 0.85rem; padding: 2px 4px; border-radius: 4px; line-height: 1;
      transition: color 0.15s, background 0.15s;
    }
    .sov-clear-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }

    .sov-blanket-row {
      display: flex; align-items: center; gap: 8px;
      background: #f0fdf4; border: 1px solid #bbf7d0; border-top: none;
      padding: 7px 12px;
    }
    .sov-blanket-label { font-size: 0.7rem; font-weight: 600; color: #15803d; white-space: nowrap; flex-shrink: 0; }
    .sov-blanket-input {
      flex: 1; border: 1px solid #86efac; border-radius: 5px; padding: 4px 8px;
      font-size: 0.78rem; color: #0f1f3d; background: #fff; font-family: 'DM Sans', sans-serif;
      min-width: 0;
    }
    .sov-blanket-input:focus { outline: none; border-color: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,0.15); }

    .sov-table-wrap {
      overflow-x: auto; border: 1px solid #dce4f5; border-top: none;
      background: #fff; max-height: 320px; overflow-y: auto;
    }
    .sov-edit-table { width: 100%; border-collapse: collapse; font-family: 'DM Sans', sans-serif; font-size: 0.75rem; }
    .sov-th {
      background: #f1f5f9; color: #5a6a8a; font-size: 0.62rem; font-weight: 700;
      text-transform: uppercase; letter-spacing: 0.07em; padding: 7px 8px;
      border-bottom: 1.5px solid #dce4f5; white-space: nowrap; position: sticky; top: 0; z-index: 1;
    }
    .sov-th-num  { width: 28px; text-align: center; }
    .sov-th-addr { min-width: 160px; }
    .sov-th-val  { width: 100px; text-align: right; }
    .sov-th-del  { width: 28px; }
    .sov-edit-row { transition: background 0.12s; }
    .sov-edit-row:hover { background: #f8f9ff; }
    .sov-edit-row:nth-child(even) { background: #fafbff; }
    .sov-edit-row:nth-child(even):hover { background: #f0f4ff; }
    .sov-td { padding: 5px 6px; border-bottom: 1px solid #eef1f8; vertical-align: middle; }
    .sov-td-num { text-align: center; font-weight: 700; color: #c9a84c; font-size: 0.7rem; }
    .sov-cell-input {
      width: 100%; border: 1px solid transparent; border-radius: 4px;
      padding: 3px 6px; font-size: 0.75rem; font-family: 'DM Sans', sans-serif;
      color: #0f1f3d; background: transparent; transition: border-color 0.15s, background 0.15s;
      box-sizing: border-box;
    }
    .sov-cell-input:focus {
      outline: none; border-color: #c9a84c; background: #fffdf5;
      box-shadow: 0 0 0 2px rgba(201,168,76,0.15);
    }
    .sov-cell-input.addr-input { min-width: 150px; }
    .sov-cell-input.val-input { text-align: right; }
    .sov-del-btn {
      background: none; border: none; color: #ccd5e0; cursor: pointer;
      font-size: 0.8rem; padding: 2px 4px; border-radius: 3px; line-height: 1;
      transition: color 0.15s, background 0.15s;
    }
    .sov-del-btn:hover { color: #ef4444; background: #fef2f2; }

    .sov-editor-footer {
      display: flex; align-items: center; justify-content: space-between; gap: 8px;
      background: #f8f9ff; border: 1px solid #dce4f5; border-top: none;
      border-radius: 0 0 8px 8px; padding: 8px 10px;
    }
    .sov-add-btn {
      background: none; border: 1.5px dashed #c9a84c; color: #c9a84c;
      border-radius: 5px; padding: 5px 10px; font-size: 0.72rem; font-weight: 600;
      cursor: pointer; transition: background 0.15s, color 0.15s; font-family: 'DM Sans', sans-serif;
    }
    .sov-add-btn:hover { background: #fffdf0; color: #a07830; }
    .sov-apply-btn {
      background: #0f1f3d; color: #fff; border: none; border-radius: 5px;
      padding: 6px 14px; font-size: 0.75rem; font-weight: 700; cursor: pointer;
      transition: background 0.15s; font-family: 'DM Sans', sans-serif;
    }
    .sov-apply-btn:hover { background: #1a3560; }
    .sov-apply-btn.applied { background: #15803d; }
    .sov-totals-badge {
      font-size: 0.68rem; color: #5a6a8a; font-weight: 600;
      padding: 4px 8px; background: #eef1f8; border-radius: 4px; white-space: nowrap;
    }

    /* Carrier info row */
    .carrier-info-table {
      width: 100% !important;
      max-width: 100% !important;
      border-collapse: collapse !important;
      margin-bottom: 18px !important;
      font-size: 0.85rem !important;
      table-layout: fixed !important;
    }
    /* Carrier | Policy # | Policy Term | Total Premium — explicit column widths */
    .carrier-info-table col.col-carrier  { width: 32% !important; }
    .carrier-info-table col.col-polnum   { width: 26% !important; }
    .carrier-info-table col.col-term     { width: 22% !important; }
    .carrier-info-table col.col-premium  { width: 20% !important; }
    .carrier-info-table td { padding: 7px 12px !important; overflow-wrap: break-word !important; }
    .carrier-info-table tr:first-child td {
      background-color: #0f1f3d !important;
      color: #e8c97a !important;
      font-weight: 600 !important;
      font-size: 0.7rem !important;
      text-transform: uppercase !important;
      letter-spacing: 0.08em !important;
    }

    /* ══════════════════════════════════
       PREMIUM SUMMARY CARDS
    ══════════════════════════════════ */
    .premium-grid {
      display: grid !important;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
      gap: 12px !important;
      margin-bottom: 18px !important;
    }
    .premium-card {
      background-color: #f8f5ef !important;
      border-radius: 10px !important;
      padding: 16px 18px !important;
      border: 1.5px solid #ede8df !important;
    }
    .premium-card label {
      font-size: 0.66rem !important;
      font-weight: 700 !important;
      text-transform: uppercase !important;
      letter-spacing: 0.1em !important;
      color: #4a5568 !important;
      display: block !important;
      margin-bottom: 5px !important;
    }
    .premium-card .amount {
      font-family: 'Playfair Display', Georgia, serif !important;
      font-size: 1.4rem !important;
      font-weight: 700 !important;
      color: #0f1f3d !important;
    }
    .premium-card.total {
      background-color: #0f1f3d !important;
      border-color: #0f1f3d !important;
    }
    .premium-card.total label { color: #c9a84c !important; }
    .premium-card.total .amount { color: #ffffff !important; }

    /* Premium comparison table */
    .premium-comparison-table {
      width: 100% !important;
      border-collapse: collapse !important;
      font-size: 0.84rem !important;
      margin-top: 12px !important;
      table-layout: fixed !important;
    }
    /* Line of Coverage | New | Expiring | Change $ | Change % */
    .premium-comparison-table col.col-line    { width: 34% !important; }
    .premium-comparison-table col.col-new     { width: 17% !important; }
    .premium-comparison-table col.col-exp     { width: 17% !important; }
    .premium-comparison-table col.col-chgd    { width: 16% !important; }
    .premium-comparison-table col.col-chgp    { width: 16% !important; }
    .premium-comparison-table thead th,
    .premium-comparison-table tbody td,
    .premium-comparison-table tfoot td { overflow-wrap: normal !important; white-space: nowrap !important; }
    .premium-comparison-table td:first-child,
    .premium-comparison-table th:first-child { white-space: normal !important; overflow-wrap: break-word !important; }
    .premium-comparison-table thead tr {
      background-color: #0f1f3d !important;
    }
    .premium-comparison-table thead th {
      color: #e8c97a !important;
      padding: 10px 14px !important;
      font-size: 0.7rem !important;
      text-transform: uppercase !important;
      letter-spacing: 0.08em !important;
      font-weight: 600 !important;
    }
    .premium-comparison-table tbody td {
      padding: 10px 14px !important;
      border-bottom: 1px solid #ede8df !important;
    }
    .premium-comparison-table .total-row td {
      background-color: #0f1f3d !important;
      color: white !important;
      font-weight: 600 !important;
    }

    /* ══════════════════════════════════
       GL COVERAGE INDICATORS
    ══════════════════════════════════ */
    .gl-indicators { display: flex !important; flex-direction: column !important; gap: 10px !important; }
    .gl-indicator-row {
      display: flex !important;
      justify-content: space-between !important;
      align-items: center !important;
      padding: 12px 16px !important;
      background-color: #f8f5ef !important;
      border-radius: 8px !important;
      border: 1px solid #ede8df !important;
    }
    .gl-status-badge.included {
      background-color: #f0fdf4 !important;
      color: #16a34a !important;
      border: 1px solid #bbf7d0 !important;
      padding: 4px 12px !important;
      border-radius: 20px !important;
      font-size: 0.72rem !important;
      font-weight: 700 !important;
    }
    .gl-status-badge.excluded {
      background-color: #fef2f2 !important;
      color: #dc2626 !important;
      border: 1px solid #fecaca !important;
      padding: 4px 12px !important;
      border-radius: 20px !important;
      font-size: 0.72rem !important;
      font-weight: 700 !important;
    }

    /* ══════════════════════════════════
       RISK RECOMMENDATIONS
    ══════════════════════════════════ */
    .risk-recs { display: flex !important; flex-direction: column !important; gap: 10px !important; }
    .risk-item {
      display: flex !important;
      gap: 12px !important;
      align-items: flex-start !important;
      padding: 13px 16px !important;
      background-color: #f8f5ef !important;
      border-radius: 9px !important;
      border-left: 3px solid #c9a84c !important;
      break-inside: avoid !important;
    }
    .risk-icon { font-size: 1.1rem !important; flex-shrink: 0 !important; }
    .risk-item h4 { font-size: 0.86rem !important; font-weight: 600 !important; color: #0f1f3d !important; margin-bottom: 2px !important; }
    .risk-item p { font-size: 0.8rem !important; color: #4a5568 !important; line-height: 1.5 !important; }

    /* ══════════════════════════════════
       ADDITIONAL COVERAGES
    ══════════════════════════════════ */
    .additional-coverages {
      display: grid !important;
      grid-template-columns: 1fr 1fr !important;
      gap: 9px !important;
    }
    .add-cov-item {
      display: flex !important;
      align-items: flex-start !important;
      gap: 9px !important;
      padding: 10px 13px !important;
      background-color: #f8f5ef !important;
      border-radius: 8px !important;
      break-inside: avoid !important;
    }
    .add-cov-item .dot {
      width: 7px !important; height: 7px !important;
      border-radius: 50% !important;
      background-color: #c9a84c !important;
      flex-shrink: 0 !important;
      margin-top: 5px !important;
    }
    .add-cov-item strong { display: block !important; color: #0f1f3d !important; font-size: 0.8rem !important; margin-bottom: 2px !important; }
    .add-cov-item span { color: #4a5568 !important; font-size: 0.76rem !important; line-height: 1.4 !important; }

    /* Acknowledgment box */
    .ack-box {
      margin-top: 14px !important;
      padding: 14px 18px !important;
      background-color: #f8f5ef !important;
      border: 1.5px solid #ede8df !important;
      border-radius: 8px !important;
      font-size: 0.82rem !important;
      color: #4a5568 !important;
    }

    /* ══════════════════════════════════
       NEXT STEPS
    ══════════════════════════════════ */
    .next-steps { display: flex !important; flex-direction: column !important; gap: 9px !important; }
    .step-item {
      display: flex !important;
      align-items: flex-start !important;
      gap: 13px !important;
      padding: 12px 16px !important;
      background-color: #f8f5ef !important;
      border-radius: 9px !important;
      break-inside: avoid !important;
      overflow: hidden !important;
      box-sizing: border-box !important;
    }
    .step-item p {
      flex: 1 !important;
      min-width: 0 !important;
      overflow-wrap: break-word !important;
      word-break: break-word !important;
    }
    .step-num {
      width: 26px !important; height: 26px !important;
      background-color: #c9a84c !important;
      color: #0f1f3d !important;
      border-radius: 50% !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      font-weight: 700 !important;
      font-size: 0.78rem !important;
      flex-shrink: 0 !important;
    }
    .step-item p { font-size: 0.86rem !important; color: #4a5568 !important; line-height: 1.5 !important; }
    .step-item p strong { color: #0f1f3d !important; }

    /* ══════════════════════════════════
       HABITABILITY NOTICE
    ══════════════════════════════════ */
    .hab-notice {
      background-color: #fff8f8 !important;
      border: 2px solid #f87171 !important;
      border-radius: 10px !important;
      padding: 20px 24px !important;
      break-inside: avoid !important;
    }
    .hab-notice-title { color: white !important; font-weight: 700 !important; font-size: 1.05rem !important; }
    .hab-notice p { color: #4a5568 !important; font-size: 0.78rem !important; line-height: 1.5 !important; }
    .hab-notice-header { padding: 16px 28px !important; }
    .hab-notice-body { padding: 16px 28px !important; gap: 12px !important; }
    .hab-section-title { font-size: 0.82rem !important; margin-bottom: 4px !important; }
    .hab-text { font-size: 0.78rem !important; line-height: 1.5 !important; }
    .hab-verdict-card { padding: 8px 12px !important; }
    .hab-tip p { font-size: 0.78rem !important; }
    .hab-list-item { font-size: 0.78rem !important; }
    .hab-sig-block { padding: 12px 16px !important; break-inside: avoid !important; page-break-inside: avoid !important; }

    /* ══════════════════════════════════
       MARKETING EFFORTS TABLE
    ══════════════════════════════════ */
    .marketing-print-table {
      width: 100% !important;
      max-width: 100% !important;
      border-collapse: collapse !important;
      font-size: 0.84rem !important;
      table-layout: fixed !important;
      word-break: break-word !important;
    }
    .marketing-print-table thead tr { background-color: #0f1f3d !important; }
    .marketing-print-table thead th {
      color: #e8c97a !important;
      padding: 10px 14px !important;
      font-size: 0.7rem !important;
      text-transform: uppercase !important;
      letter-spacing: 0.08em !important;
      font-weight: 600 !important;
    }
    .marketing-print-table tbody tr:nth-child(even) { background-color: #faf8f5 !important; }
    .marketing-print-table tbody td { padding: 10px 14px !important; border-bottom: 1px solid #ede8df !important; color: #4a5568 !important; }

    /* ══════════════════════════════════
       DISCLAIMER & SIGNATURE
    ══════════════════════════════════ */
    .disclaimer-text {
      font-size: 0.8rem !important;
      color: #718096 !important;
      line-height: 1.65 !important;
    }
    .signature-block {
      background-color: #f8f5ef !important;
      border-radius: 10px !important;
      padding: 24px 28px !important;
      border: 1.5px solid #ede8df !important;
      break-inside: avoid !important;
    }
    .sig-field {
      border-bottom: 1.5px solid #0f1f3d !important;
      margin-bottom: 6px !important;
      height: 36px !important;
    }
    .sig-label { font-size: 0.72rem !important; color: #4a5568 !important; }

    /* ══════════════════════════════════
       NOTABLE EXCLUSIONS BOX
    ══════════════════════════════════ */
    .exclusions-box {
      background-color: #faf8f5 !important;
      border-radius: 8px !important;
      padding: 14px 18px !important;
      border: 1px solid #ede8df !important;
      font-size: 0.82rem !important;
      color: #4a5568 !important;
      line-height: 1.65 !important;
    }
    .exclusions-label {
      font-size: 0.65rem !important;
      font-weight: 700 !important;
      text-transform: uppercase !important;
      letter-spacing: 0.12em !important;
      color: #0f1f3d !important;
      margin-bottom: 8px !important;
    }

    /* ══════════════════════════════════
       RENEWAL NOTES CALLOUT
    ══════════════════════════════════ */
    .renewal-callout {
      border-left: 4px solid #c9a84c !important;
      background-color: #faf7f0 !important;
      padding: 14px 18px !important;
      border-radius: 0 8px 8px 0 !important;
      margin-bottom: 16px !important;
    }
    .renewal-callout p { color: #4a5568 !important; font-size: 0.86rem !important; line-height: 1.65 !important; }

    /* ══════════════════════════════════
       PAGE BREAKS — intelligent
    ══════════════════════════════════ */
    /* Let large sections flow across pages; only keep small atomic blocks together */
    .doc-section { break-inside: auto !important; page-break-inside: auto !important; }
    .doc-section-title { break-after: avoid !important; page-break-after: avoid !important; }
    .team-card, .risk-item, .step-item, .add-cov-item { break-inside: avoid !important; }
    .coverage-table, .premium-grid { break-inside: avoid !important; }
    .signature-block { break-inside: avoid !important; page-break-inside: avoid !important; }
    .disclaimer-box { break-inside: avoid !important; }

    /* ══════════════════════════════════
       TYPOGRAPHY — crisp & professional
    ══════════════════════════════════ */
    body, p, td, th, label, span, div, li {
      font-family: 'Helvetica Neue', Arial, sans-serif !important;
    }
    .cover-client, .doc-section-title, .section-title-text,
    h1, h2, h3, .premium-card .amount {
      font-family: Georgia, 'Times New Roman', serif !important;
    }
    .exec-summary-box p {
      font-family: 'Helvetica Neue', Arial, sans-serif !important;
      color: #ffffff !important;
    }
    p { margin: 0 !important; }
    .section-body {
      font-size: 0.88rem !important;
      line-height: 1.7 !important;
      color: #4a5568 !important;
    }
  }

  /* ══════════════════════════════════════════════════════
     CERT BUILDER TOOL
  ══════════════════════════════════════════════════════ */
  .cert-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    flex: 1;
    min-height: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
  }
  .cert-input-panel {
    background: white;
    border-right: 2px solid #ede8df;
    padding: 24px 22px;
    overflow-y: auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .cert-output-panel {
    background: var(--cream);
    padding: 28px 32px;
    overflow-y: auto;
    height: 100%;
  }
  .cert-upload-zone {
    border: 2px dashed #ede8df;
    border-radius: 10px;
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    background: white;
    transition: all 0.14s;
  }
  .cert-upload-zone:hover { border-color: #c9a84c; background: #fdf9f0; }
  .cert-upload-zone.uploaded { border-color: #16a34a; background: #f0fdf4; }
  .cert-upload-zone .upload-icon { font-size: 1.5rem; margin-bottom: 4px; }
  .cert-upload-zone .upload-label { font-size: 0.82rem; font-weight: 600; color: #0f1f3d; }
  .cert-upload-zone .upload-sub { font-size: 0.7rem; color: #4a5568; margin-top: 3px; }
  .cert-holder-card {
    background: #f8f9ff;
    border: 1.5px solid #dbeafe;
    border-radius: 10px;
    padding: 12px 14px;
    position: relative;
  }
  .cert-holder-card .holder-remove {
    position: absolute; top: 8px; right: 10px;
    background: none; border: none; cursor: pointer;
    font-size: 1rem; color: #9ca3af; line-height: 1;
  }
  .cert-holder-card .holder-remove:hover { color: #dc2626; }
  .cert-type-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
  }
  .cert-type-tab {
    flex: 1;
    min-width: 80px;
    padding: 8px 10px;
    border: 1.5px solid #ede8df;
    border-radius: 8px;
    background: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    text-align: center;
    transition: all 0.12s;
  }
  .cert-type-tab.active { background: #0f1f3d; color: #c9a84c; border-color: #0f1f3d; }
  .cert-loading {
    display: flex; align-items: center; gap: 12px;
    padding: 20px; background: white; border-radius: 12px;
    border: 1.5px solid #ede8df;
    font-size: 0.85rem; color: #0f1f3d;
  }
  .cert-empty-state {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 12px;
    min-height: 300px; text-align: center; color: #4a5568;
  }

  /* ── ACORD Form Styles ────────────────────────────── */
  .acord-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(15,31,61,0.10);
    margin-bottom: 24px;
    overflow: hidden;
  }
  .acord-form-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 20px;
    background: #0f1f3d;
    color: white;
  }
  .acord-form-header .form-title {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #c9a84c;
  }
  .acord-print-btn {
    background: #c9a84c;
    color: #0f1f3d;
    border: none;
    border-radius: 7px;
    padding: 7px 14px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; gap: 5px;
  }
  .acord-print-btn:hover { background: var(--gold-light); }

  /* The actual ACORD form */
  .acord-form {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 7.5pt;
    color: #000;
    padding: 0;
    width: 100%;
    border-collapse: collapse;
  }
  .acord-form * { box-sizing: border-box; }
  .acord-main-header {
    background: #d0d0d0;
    text-align: center;
    padding: 6px 8px;
    font-size: 11pt;
    font-weight: bold;
    letter-spacing: 0.08em;
    border-bottom: 2px solid #000;
  }
  .acord-row { display: flex; border-bottom: 1px solid #888; }
  .acord-cell {
    border-right: 1px solid #888;
    padding: 3px 5px;
    display: flex;
    flex-direction: column;
  }
  .acord-cell:last-child { border-right: none; }
  .acord-cell-label {
    font-size: 6pt;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
  }
  .acord-field {
    border: none;
    outline: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 7.5pt;
    color: #000;
    background: transparent;
    width: 100%;
    resize: none;
    padding: 0;
  }
  .acord-field:focus { background: #fffbea; }
  .acord-textarea {
    min-height: 48px;
    resize: vertical;
  }
  .acord-cov-table { width: 100%; border-collapse: collapse; }
  .acord-cov-table th {
    background: #d0d0d0;
    font-size: 6.5pt;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 4px;
    border: 1px solid #888;
    text-align: center;
  }
  .acord-cov-table td {
    border: 1px solid #888;
    padding: 2px 4px;
    vertical-align: middle;
    font-size: 7pt;
  }
  .acord-cov-table .cov-type-cell {
    font-size: 6.5pt;
    font-weight: bold;
    background: #f0f0f0;
    padding-left: 5px;
  }
  .acord-cov-table .cov-sub {
    font-size: 6pt;
    padding-left: 14px;
    font-weight: normal;
  }
  .acord-cov-table input {
    border: none; outline: none;
    font-family: Arial, sans-serif;
    font-size: 7pt; width: 100%;
    background: transparent;
    text-align: center;
  }
  .acord-cov-table input:focus { background: #fffbea; }
  .acord-checkbox-cell { text-align: center; }
  input[type="checkbox"].acord-chk { width: 11px; height: 11px; cursor: pointer; }
  .acord-section-label {
    background: #d0d0d0;
    font-size: 7pt;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 6px;
    border-bottom: 1px solid #888;
  }
  .acord-footer {
    background: #f0f0f0;
    padding: 4px 8px;
    font-size: 6pt;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #888;
  }
  .acord-border { border: 1.5px solid #555; }

  /* Gap Analysis */
  .gap-analysis-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(15,31,61,0.10);
    padding: 20px 24px;
    margin-bottom: 24px;
  }
  .gap-analysis-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: #0f1f3d;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .gap-item {
    display: flex;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    margin-bottom: 7px;
    font-size: 0.82rem;
    line-height: 1.5;
  }
  .gap-item.gap-ok { background: #f0fdf4; color: #15803d; }
  .gap-item.gap-warn { background: #fef3c7; color: #92400e; }
  .gap-item.gap-fail { background: #fef2f2; color: #991b1b; }
  .gap-item .gap-icon { flex-shrink: 0; font-size: 1rem; margin-top: 1px; }
  .gap-item .gap-text strong { display: block; }

  /* Print overrides for ACORD forms */
  @media print {
    .sidebar, .hamburger-btn, .cert-input-panel, .acord-form-header, .gap-analysis-box { display: none !important; }
    .ai-disclaimer { display: none !important; }
    .cert-layout { display: block !important; }
    .cert-output-panel { height: auto !important; overflow: visible !important; padding: 0 !important; }
    .acord-wrapper { box-shadow: none !important; border-radius: 0 !important; margin: 0 !important; page-break-after: always; }
    .acord-form { font-size: 8pt !important; }
    .acord-field:focus { background: transparent !important; }
    body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  }
  @media (max-width: 768px) {
    .cert-layout { grid-template-columns: 1fr; }
    .cert-input-panel { height: auto; position: static; }
    .cert-output-panel { height: auto; }
  }

  /* ═══════════════════════════════════════
     COVR AI SUPPORT CHAT WIDGET
  ═══════════════════════════════════════ */
  #covrChat { position: fixed; bottom: 24px; right: 24px; z-index: 80; font-family: 'DM Sans', sans-serif; }
  #covrChatBubble { width: 52px; height: 52px; border-radius: 50%; background: #0f1f3d; border: 2px solid rgba(201,168,76,0.4); box-shadow: 0 4px 20px rgba(15,31,61,0.28); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.18s ease, box-shadow 0.18s ease; position: relative; }
  #covrChatBubble:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(15,31,61,0.36); }
  #covrChatBubble svg { width: 22px; height: 22px; }
  #covrChatUnread { position: absolute; top: -3px; right: -3px; width: 16px; height: 16px; border-radius: 50%; background: #dc2626; border: 2px solid white; font-size: 0.55rem; font-weight: 800; color: white; display: none; align-items: center; justify-content: center; }
  #covrChatPanel { position: absolute; bottom: 64px; right: 0; width: 360px; max-height: 540px; background: white; border-radius: 14px; box-shadow: 0 8px 40px rgba(15,31,61,0.22); border: 1px solid #e4e0d8; display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(12px) scale(0.97); pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
  #covrChatPanel.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
  .chat-header { background: #0f1f3d; padding: 14px 16px 12px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
  .chat-header-avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(201,168,76,0.18); border: 1.5px solid rgba(201,168,76,0.4); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .chat-header-avatar svg { width: 16px; height: 16px; }
  .chat-header-info { flex: 1; }
  .chat-header-name { font-size: 0.82rem; font-weight: 700; color: white; line-height: 1.2; }
  .chat-header-status { font-size: 0.65rem; color: rgba(255,255,255,0.6); display: flex; align-items: center; gap: 4px; }
  .chat-header-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; flex-shrink: 0; }
  .chat-header-close { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.1); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.7); transition: background 0.15s; flex-shrink: 0; }
  .chat-header-close:hover { background: rgba(255,255,255,0.2); color: white; }
  #covrChatMessages { flex: 1; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
  #covrChatMessages::-webkit-scrollbar { width: 4px; }
  #covrChatMessages::-webkit-scrollbar-thumb { background: #e0dbd2; border-radius: 2px; }
  .chat-msg { display: flex; gap: 8px; align-items: flex-end; animation: chatMsgIn 0.18s ease; }
  @keyframes chatMsgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
  .chat-msg.user { flex-direction: row-reverse; }
  .chat-bubble { max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: 0.8rem; line-height: 1.55; }
  .chat-msg.ai .chat-bubble { background: #f3f1ec; color: #0f1f3d; border-bottom-left-radius: 4px; }
  .chat-msg.user .chat-bubble { background: #0f1f3d; color: white; border-bottom-right-radius: 4px; }
  .chat-msg-avatar { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 0.65rem; font-weight: 700; }
  .chat-msg.ai .chat-msg-avatar { background: #0f1f3d; color: #c9a84c; }
  .chat-msg.user .chat-msg-avatar { background: #ede8df; color: #0f1f3d; }
  .chat-typing { display: flex; gap: 4px; align-items: center; padding: 10px 12px; background: #f3f1ec; border-radius: 14px 14px 14px 4px; width: fit-content; }
  .chat-typing span { width: 6px; height: 6px; border-radius: 50%; background: #a09888; animation: typingDot 1.2s ease infinite; }
  .chat-typing span:nth-child(2) { animation-delay: 0.2s; }
  .chat-typing span:nth-child(3) { animation-delay: 0.4s; }
  @keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }
  .chat-issue-flag { background: #f0fdf4; border: 1px solid #86efac; border-radius: 8px; padding: 8px 12px; font-size: 0.73rem; color: #14532d; line-height: 1.5; margin: 2px 4px; }
  .chat-input-area { padding: 10px 12px 12px; border-top: 1px solid #ece9e2; display: flex; gap: 8px; align-items: flex-end; flex-shrink: 0; }
  #covrChatInput { flex: 1; border: 1.5px solid #ddd8ce; border-radius: 20px; padding: 8px 14px; font-family: 'DM Sans', sans-serif; font-size: 0.8rem; color: #0f1f3d; resize: none; max-height: 80px; min-height: 36px; outline: none; line-height: 1.4; transition: border-color 0.15s; background: #fdfcfa; }
  #covrChatInput:focus { border-color: #0f1f3d; }
  #covrChatInput::placeholder { color: #b0a898; }
  #covrChatSend { width: 36px; height: 36px; border-radius: 50%; background: #0f1f3d; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s, transform 0.12s; flex-shrink: 0; }
  #covrChatSend:hover { background: #1a3260; transform: scale(1.06); }
  #covrChatSend:disabled { background: #d0ccc4; cursor: not-allowed; transform: none; }
  #covrChatSend svg { width: 16px; height: 16px; }
  @media (max-width: 480px) { #covrChatPanel { width: calc(100vw - 32px); right: -8px; } #covrChat { bottom: 16px; right: 16px; } }
  @media print { #covrChat { display: none !important; } }

  /* ── SOV Shell ──────────────────────────────────────────────────────────── */
  .sov-shell { display:flex; flex-direction:column; flex:1; width:100%; min-height:0; background:#f4f3f0; overflow:hidden; }

  /* ── Topbar ─────────────────────────────────────────────────────────────── */
  .sov-topbar { background:#0f1f3d; padding:0 20px; height:54px; flex-shrink:0; display:flex; align-items:center; justify-content:space-between; gap:12px; }
  .sov-topbar-left { display:flex; align-items:center; gap:12px; min-width:0; }
  .sov-topbar-title { font-family:"Playfair Display",serif; font-size:1rem; font-weight:700; color:white; white-space:nowrap; }
  .sov-topbar-sub { font-size:0.68rem; color:rgba(255,255,255,0.45); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:340px; }
  .sov-topbar-actions { display:flex; gap:7px; align-items:center; flex-shrink:0; }
  .sov-btn-ghost { background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.18); color:rgba(255,255,255,0.85); border-radius:6px; padding:6px 13px; font-family:DM Sans,sans-serif; font-size:0.75rem; font-weight:600; cursor:pointer; transition:all 0.15s; display:flex; align-items:center; gap:6px; white-space:nowrap; }
  .sov-btn-ghost:hover { background:rgba(255,255,255,0.16); border-color:rgba(255,255,255,0.3); }
  .sov-btn-gold { background:#c9a84c; border:none; color:#0f1f3d; border-radius:6px; padding:6px 14px; font-family:DM Sans,sans-serif; font-size:0.75rem; font-weight:700; cursor:pointer; transition:all 0.15s; display:flex; align-items:center; gap:6px; white-space:nowrap; }
  .sov-btn-gold:hover { background:var(--gold-light); }
  .sov-btn-gold:disabled { opacity:0.5; cursor:not-allowed; }
  .sov-topbar-divider { width:1px; height:22px; background:rgba(255,255,255,0.15); flex-shrink:0; }

  /* ── Body: sidebar + table panel ───────────────────────────────────────── */
  .sov-body { display:flex; flex:1; min-height:0; }

  /* ── Sidebar ─────────────────────────────────────────────────────────────  */
  .sov-sidebar { width:280px; min-width:280px; max-width:280px; background:white; border-right:1px solid #e5e7eb; display:flex; flex-direction:column; flex-shrink:0; transition:width 0.25s, min-width 0.25s, max-width 0.25s; overflow:hidden; }
  .sov-sidebar.collapsed { width:0; min-width:0; max-width:0; border-right:none; }
  .sov-sidebar-inner { width:280px; padding:18px 16px; display:flex; flex-direction:column; gap:14px; overflow-y:auto; flex:1; }
  .sov-panel-title { font-family:"Playfair Display",serif; font-size:0.88rem; color:#0f1f3d; font-weight:700; }
  .sov-panel-sub { font-size:0.72rem; color:#6b7280; line-height:1.5; margin-top:2px; }
  .sov-drop-zone { border:2px dashed rgba(201,168,76,0.45); border-radius:9px; padding:20px 12px; text-align:center; cursor:pointer; transition:all 0.2s; background:rgba(201,168,76,0.03); }
  .sov-drop-zone:hover, .sov-drop-zone.drag-over { border-color:#c9a84c; background:rgba(201,168,76,0.08); }
  .sov-drop-text { font-size:0.78rem; color:#0f1f3d; font-weight:600; margin-bottom:3px; }
  .sov-drop-sub { font-size:0.67rem; color:#9ca3af; line-height:1.45; }
  .sov-file-input { display:none; }
  .sov-file-badge { display:flex; align-items:center; gap:7px; background:#f0f4ff; border-radius:6px; padding:7px 10px; font-size:0.72rem; color:#0f1f3d; font-weight:600; border:1px solid #dce6ff; }
  .sov-status-box { border-radius:7px; padding:10px 12px; font-size:0.73rem; color:#0f1f3d; line-height:1.5; }
  .sov-status-box.error { background:#fef2f2; color:#dc2626; border:1px solid #fecaca; }
  .sov-status-box.success { background:#f0fdf4; color:#15803d; border:1px solid #bbf7d0; }
  .sov-status-box:not(.error):not(.success) { background:#f8f5ef; border:1px solid #e8e0d0; }
  .sov-divider { border:none; border-top:1px solid #f0f0f0; }
  .sov-acct-label { font-size:0.67rem; font-weight:700; color:#6b7280; text-transform:uppercase; letter-spacing:0.07em; margin-bottom:4px; }
  .sov-acct-input { width:100%; box-sizing:border-box; border:1.5px solid #e5e7eb; border-radius:6px; padding:7px 10px; font-family:DM Sans,sans-serif; font-size:0.8rem; color:#0f1f3d; outline:none; transition:border 0.15s; }
  .sov-acct-input:focus { border-color:#c9a84c; }
  .sov-tip { font-size:0.68rem; color:#9ca3af; line-height:1.5; padding:7px 10px; background:#fafafa; border-radius:6px; border-left:3px solid #c9a84c; }

  /* Toggle sidebar button */
  .sov-sidebar-toggle { position:absolute; left:280px; top:50%; transform:translateY(-50%); width:18px; height:40px; background:white; border:1px solid #e5e7eb; border-left:none; border-radius:0 6px 6px 0; cursor:pointer; display:flex; align-items:center; justify-content:center; color:#9ca3af; z-index:10; transition:left 0.25s, background 0.15s; flex-shrink:0; }
  .sov-sidebar-toggle:hover { background:#f9f9f9; color:#0f1f3d; }
  .sov-sidebar-toggle.collapsed { left:0; }
  .sov-body-relative { position:relative; flex:1; display:flex; min-height:0; min-width:0; overflow:hidden; }

  /* ── Table Panel ──────────────────────────────────────────────────────── */
  .sov-table-panel { flex:1; display:flex; flex-direction:column; min-height:0; min-width:0; overflow:hidden; }
  .sov-table-header { background:white; border-bottom:2px solid #e5e7eb; padding:10px 16px; display:flex; align-items:center; justify-content:space-between; gap:10px; flex-shrink:0; }
  .sov-table-meta { font-size:0.82rem; color:#0f1f3d; font-weight:700; font-family:"Playfair Display",serif; }
  .sov-table-meta span { font-weight:400; color:#6b7280; margin-left:6px; font-family:DM Sans,sans-serif; font-size:0.75rem; }
  .sov-table-actions { display:flex; align-items:center; gap:8px; }
  .sov-add-btn { background:rgba(15,31,61,0.06); border:1px solid rgba(15,31,61,0.12); color:#0f1f3d; border-radius:5px; padding:5px 11px; font-family:DM Sans,sans-serif; font-size:0.73rem; font-weight:600; cursor:pointer; transition:all 0.15s; }
  .sov-add-btn:hover { background:rgba(15,31,61,0.1); }

  /* Table scroll wrapper - KEY: takes remaining space and scrolls */
  .sov-table-wrap { flex:1; overflow:auto; background:white; }
  .sov-table { border-collapse:collapse; width:100%; min-width:1300px; font-size:0.76rem; font-family:DM Sans,sans-serif; }
  .sov-table thead { position:sticky; top:0; z-index:5; }
  .sov-table thead tr { background:#0f1f3d; }
  .sov-table thead th { color:white; font-weight:700; padding:9px 10px; text-align:left; font-size:0.63rem; text-transform:uppercase; letter-spacing:0.08em; white-space:nowrap; border-right:1px solid rgba(255,255,255,0.08); }
  .sov-table thead th:first-child { width:36px; text-align:center; position:sticky; left:0; z-index:6; background:#0f1f3d; }
  .sov-table thead th.col-addr { position:sticky; left:36px; z-index:6; background:#0f1f3d; min-width:180px; }
  .sov-table thead th:last-child { border-right:none; width:36px; }
  .sov-table tbody tr { border-bottom:1px solid #f0f2f8; transition:background 0.1s; }
  .sov-table tbody tr:hover { background:#f5f8ff; }
  .sov-table tbody tr:nth-child(even) { background:#fafbfe; }
  .sov-table tbody tr:nth-child(even):hover { background:#f0f4ff; }
  .sov-table td { padding:4px 6px; vertical-align:middle; border-right:1px solid #f0f2f8; }
  .sov-table td:first-child { text-align:center; color:#c9a84c; font-weight:700; font-size:0.72rem; width:36px; position:sticky; left:0; background:inherit; z-index:4; border-right:2px solid #e5e7eb; }
  .sov-table td.col-addr { position:sticky; left:36px; background:inherit; z-index:4; border-right:2px solid #e5e7eb; min-width:180px; }
  .sov-table td:last-child { border-right:none; text-align:center; width:36px; }

  /* ── Branded document header ──────────────────────────────────────── */
  .sov-doc-header {
    background: white;
    border-bottom: 3px solid var(--sov-brand-color, #0f1f3d);
    padding: 16px 24px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-shrink: 0;
  }
  .sov-doc-header-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
  .sov-doc-logo {
    height: 40px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    flex-shrink: 0;
  }
  .sov-doc-logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 700;
    color: #0f1f3d;
    white-space: nowrap;
  }
  .sov-doc-agency-name {
    font-size: 0.72rem;
    color: #6b7280;
    margin-top: 2px;
  }
  .sov-doc-header-center {
    flex: 1;
    text-align: center;
  }
  .sov-doc-insured {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f1f3d;
    line-height: 1.2;
  }
  .sov-doc-meta {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }
  .sov-doc-meta-sep { color: #d1d5db; }
  .sov-doc-header-right {
    text-align: right;
    flex-shrink: 0;
  }
  .sov-doc-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-bottom: 2px;
  }
  .sov-doc-count {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sov-brand-color, #0f1f3d);
  }

  /* ── Column visibility toggle bar ─────────────────────────────────── */
  .sov-col-toggles {
    background: #f8f7f4;
    border-bottom: 1px solid #e8e4de;
    padding: 7px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
  }
  .sov-col-toggles-label {
    font-size: 0.62rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-right: 4px;
    flex-shrink: 0;
  }
  .sov-col-toggle {
    padding: 3px 10px;
    border-radius: 20px;
    border: 1.5px solid #ddd;
    background: white;
    font-size: 0.67rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.13s;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
    user-select: none;
  }
  .sov-col-toggle.active {
    background: #0f1f3d;
    border-color: #0f1f3d;
    color: white;
  }
  .sov-col-toggle:hover:not(.active) {
    border-color: #c9a84c;
    color: #0f1f3d;
  }
  /* Hidden column CSS — toggled by JS */
  .sov-col-hidden { display: none !important; }
  .sov-cell { width:100%; box-sizing:border-box; border:1.5px solid transparent; border-radius:4px; padding:4px 6px; font-family:DM Sans,sans-serif; font-size:0.76rem; color:#0f1f3d; background:transparent; outline:none; transition:border 0.12s,background 0.12s; }
  .sov-cell:focus { border-color:#c9a84c; background:white; box-shadow:0 0 0 2px rgba(201,168,76,0.15); }
  .sov-cell.limit { font-weight:600; text-align:right; color:#0f1f3d; }
  .sov-cell.addr-cell { min-width:170px; }
  .sov-select { width:100%; box-sizing:border-box; border:1.5px solid transparent; border-radius:4px; padding:4px 4px; font-family:DM Sans,sans-serif; font-size:0.73rem; color:#0f1f3d; background:transparent; outline:none; cursor:pointer; min-width:110px; }
  .sov-select:focus { border-color:#c9a84c; background:white; }
  .sov-del-btn { background:none; border:none; cursor:pointer; color:#d1d5db; padding:3px; border-radius:4px; transition:color 0.12s; display:flex; align-items:center; justify-content:center; margin:auto; }
  .sov-del-btn:hover { color:#ef4444; background:#fef2f2; }

  /* Totals bar */
  .sov-totals-bar { background:#0f1f3d; display:flex; gap:0; flex-shrink:0; }
  .sov-total-cell { flex:1; padding:8px 14px; border-right:1px solid rgba(255,255,255,0.08); }
  .sov-total-cell:last-child { border-right:none; }
  .sov-total-label { font-size:0.6rem; color:rgba(255,255,255,0.45); text-transform:uppercase; letter-spacing:0.08em; font-weight:600; }
  .sov-total-val { font-size:0.88rem; color:#c9a84c; font-weight:700; font-family:"Playfair Display",serif; margin-top:1px; }
  .sov-total-cell.tiv-cell { background:rgba(201,168,76,0.1); }
  .sov-total-cell.tiv-cell .sov-total-val { font-size:1rem; }

  /* ── Column visibility toggle bar ───────────────────────────────────── */
  .sov-col-toggle-bar { background:#f8f5ef; border-bottom:1px solid #e5e7eb; padding:6px 14px; display:flex; align-items:center; gap:6px; flex-shrink:0; flex-wrap:wrap; }
  .sov-col-toggle-label { font-size:0.6rem; font-weight:700; text-transform:uppercase; letter-spacing:0.1em; color:#9ca3af; margin-right:4px; white-space:nowrap; }
  .sov-col-pill { display:inline-flex; align-items:center; gap:4px; border:1.5px solid #d1d5db; border-radius:20px; padding:3px 9px; font-size:0.65rem; font-weight:600; color:#6b7280; background:white; cursor:pointer; transition:all 0.14s; user-select:none; white-space:nowrap; }
  .sov-col-pill:hover { border-color:#0f1f3d; color:#0f1f3d; }
  .sov-col-pill.active { background:#0f1f3d; border-color:#0f1f3d; color:white; }
  .sov-col-toggle-sep { width:1px; height:16px; background:#e5e7eb; flex-shrink:0; margin:0 2px; }
  .sov-col-hide-city          .col-city          { display:none; }
  .sov-col-hide-state         .col-state         { display:none; }
  .sov-col-hide-zip           .col-zip           { display:none; }
  .sov-col-hide-yearBuilt     .col-yearBuilt     { display:none; }
  .sov-col-hide-construction  .col-construction  { display:none; }
  .sov-col-hide-occupancy     .col-occupancy     { display:none; }
  .sov-col-hide-stories       .col-stories       { display:none; }
  .sov-col-hide-sqFootage     .col-sqFootage     { display:none; }
  .sov-col-hide-buildingLimit .col-buildingLimit { display:none; }
  .sov-col-hide-contents      .col-contents      { display:none; }
  .sov-col-hide-bi            .col-bi            { display:none; }
  .sov-col-hide-deductible    .col-deductible    { display:none; }
  .sov-col-hide-notes         .col-notes         { display:none; }
  @media print { .sov-col-toggle-bar { display:none; } }

  /* ── AI Command Bar ──────────────────────────────────────────────────── */
  .sov-cmd-bar { background:#0f1f3d; border-top:2px solid rgba(201,168,76,0.3); padding:8px 14px; flex-shrink:0; display:flex; flex-direction:column; gap:5px; }
  .sov-cmd-history { display:none; border-bottom:1px solid rgba(255,255,255,0.07); padding-bottom:6px; margin-bottom:2px; }
  .sov-cmd-hist-item { display:flex; align-items:flex-start; gap:7px; padding:2px 0; }
  .sov-cmd-hist-dot { width:4px; height:4px; border-radius:50%; background:rgba(201,168,76,0.5); flex-shrink:0; margin-top:5px; }
  .sov-cmd-hist-text { font-size:0.67rem; color:rgba(255,255,255,0.35); line-height:1.4; font-style:italic; }
  .sov-cmd-row { display:flex; align-items:center; gap:8px; }
  .sov-cmd-icon { flex-shrink:0; color:#c9a84c; opacity:0.9; }
  .sov-cmd-input { flex:1; background:rgba(255,255,255,0.07); border:1.5px solid rgba(255,255,255,0.12); border-radius:7px; padding:7px 12px; font-family:DM Sans,sans-serif; font-size:0.8rem; color:white; outline:none; transition:border 0.15s,background 0.15s; }
  .sov-cmd-input::placeholder { color:rgba(255,255,255,0.3); }
  .sov-cmd-input:focus { border-color:#c9a84c; background:rgba(255,255,255,0.1); }
  .sov-cmd-input:disabled { opacity:0.5; }
  .sov-cmd-send { background:#c9a84c; border:none; border-radius:6px; width:32px; height:32px; display:flex; align-items:center; justify-content:center; cursor:pointer; color:#0f1f3d; flex-shrink:0; transition:background 0.14s; }
  .sov-cmd-send:hover { background:var(--gold-light); }
  .sov-cmd-send:disabled { opacity:0.5; cursor:not-allowed; }
  .sov-cmd-status { font-size:0.68rem; font-weight:600; padding:2px 8px; border-radius:4px; display:none; }
  .sov-cmd-status-success { color:#d1fae5; }
  .sov-cmd-status-error   { color:#fca5a5; }
  .sov-cmd-status-warn    { color:#fde68a; }
  .sov-cmd-status-info    { color:rgba(255,255,255,0.5); }
  @media print { .sov-cmd-bar { display:none; } }

  /* ── Full-screen upload landing ─────────────────────────────────────── */
  .sov-upload-landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    min-height: 0;
    background: #f8f7f4;
    padding: 40px 24px 48px;
    overflow-y: auto;
  }
  .sov-landing-inner {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .sov-landing-eyebrow {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 6px;
    text-align: center;
  }
  .sov-landing-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f1f3d;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 6px;
  }
  .sov-landing-sub {
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 28px;
  }
  /* Drop zone */
  .sov-landing-dropzone {
    border: 2px dashed rgba(201,168,76,0.5);
    border-radius: 14px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    background: white;
    transition: all 0.18s;
    margin-bottom: 14px;
    position: relative;
  }
  .sov-landing-dropzone:hover,
  .sov-landing-dropzone.drag-over {
    border-color: #c9a84c;
    background: #fffdf7;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(201,168,76,0.12);
  }
  .sov-landing-drop-icon {
    color: #c9a84c;
    margin-bottom: 10px;
    opacity: 0.8;
  }
  .sov-landing-drop-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f1f3d;
    margin-bottom: 4px;
  }
  .sov-landing-drop-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.5;
  }
  .sov-landing-drop-types {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
  }
  .sov-type-pill {
    background: #f1f0ee;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.63rem;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  /* File badges */
  .sov-file-badges {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 14px;
  }
  .sov-file-badge-new {
    display: flex;
    align-items: center;
    gap: 9px;
    background: white;
    border: 1.5px solid #dce6ff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.78rem;
    color: #0f1f3d;
    font-weight: 600;
    animation: sovBadgeIn 0.18s ease;
  }
  @keyframes sovBadgeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
  .sov-file-badge-icon { color: #c9a84c; flex-shrink: 0; }
  .sov-file-badge-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sov-file-badge-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #d1d5db;
    padding: 2px;
    border-radius: 4px;
    line-height: 1;
    font-size: 0.9rem;
    transition: color 0.12s;
  }
  .sov-file-badge-remove:hover { color: #ef4444; }
  /* Section divider label */
  .sov-landing-section-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 7px;
    margin-top: 18px;
  }
  /* Instructions */
  .sov-instructions-wrap {
    background: white;
    border: 1.5px solid #e2ddd5;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
    transition: border-color 0.15s;
  }
  .sov-instructions-wrap:focus-within { border-color: #c9a84c; }
  .sov-instructions-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px 7px;
    border-bottom: 1px solid #f0ece6;
    background: #fafaf8;
  }
  .sov-instructions-header-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #0f1f3d;
    letter-spacing: 0.02em;
  }
  .sov-instructions-header-hint {
    font-size: 0.67rem;
    color: #94a3b8;
    margin-left: auto;
    font-style: italic;
  }
  .sov-instructions-textarea {
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    padding: 10px 12px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    color: #0f1f3d;
    line-height: 1.6;
    background: white;
    min-height: 72px;
    box-sizing: border-box;
  }
  .sov-instructions-textarea::placeholder { color: #b0bac8; }
  /* Account fields row */
  .sov-acct-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }
  .sov-acct-field { display: flex; flex-direction: column; gap: 4px; }
  .sov-acct-field-label {
    font-size: 0.67rem;
    font-weight: 700;
    color: #5a6a8a;
    text-transform: uppercase;
    letter-spacing: 0.07em;
  }
  .sov-acct-field-input {
    border: 1.5px solid #e2ddd5;
    border-radius: 7px;
    padding: 8px 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    color: #0f1f3d;
    background: white;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
    width: 100%;
  }
  .sov-acct-field-input:focus { border-color: #c9a84c; }
  .sov-acct-field-input::placeholder { color: #b0bac8; }
  /* Build button */
  .sov-build-btn {
    width: 100%;
    background: #0f1f3d;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 13px 20px;
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    transition: all 0.15s;
    letter-spacing: 0.01em;
  }
  .sov-build-btn:hover:not(:disabled) {
    background: #1a3260;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(15,31,61,0.2);
  }
  .sov-build-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
  }
  .sov-build-btn-gold-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #c9a84c;
    flex-shrink: 0;
  }

  /* Empty / Spinner states */
  .sov-empty-state { display:none; } /* replaced by sov-upload-landing */
  .sov-extract-spinner { display:flex; flex-direction:column; align-items:center; justify-content:center; height:100%; gap:16px; background:white; }
  .sov-spinner-ring { width:38px; height:38px; border:3px solid rgba(201,168,76,0.2); border-top-color:#c9a84c; border-radius:50%; animation:sovSpin 0.85s linear infinite; }
  @keyframes sovSpin { to { transform:rotate(360deg); } }
  .sov-spinner-label { font-size:0.82rem; color:#0f1f3d; font-weight:600; }
  .sov-spinner-sub { font-size:0.7rem; color:#9ca3af; }

  /* Premium Allocator */
  .sov-allocator-wrap { background:#fff; border-top:3px solid #c9a84c; flex-shrink:0; }
  .sov-alloc-header { display:flex; align-items:center; justify-content:space-between; padding:10px 18px; background:#0f1f3d; cursor:pointer; user-select:none; }
  .sov-alloc-header-left { display:flex; align-items:center; gap:10px; }
  .sov-alloc-title { font-family:"Playfair Display",serif; font-size:0.85rem; color:#c9a84c; font-weight:700; }
  .sov-alloc-subtitle { font-size:0.66rem; color:rgba(255,255,255,0.4); margin-top:1px; }
  .sov-alloc-chevron { color:rgba(255,255,255,0.4); transition:transform 0.2s; }
  .sov-alloc-chevron.open { transform:rotate(180deg); }
  .sov-alloc-body { display:none; padding:14px 18px 16px; }
  .sov-alloc-body.open { display:block; }
  .sov-alloc-inputs { display:flex; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
  .sov-alloc-input-group { display:flex; flex-direction:column; gap:4px; min-width:180px; flex:1; }
  .sov-alloc-input-label { font-size:0.65rem; font-weight:700; color:#0f1f3d; text-transform:uppercase; letter-spacing:0.07em; }
  .sov-alloc-input-sub { font-size:0.62rem; color:#9ca3af; }
  .sov-alloc-input-row { display:flex; align-items:center; border:1.5px solid #e5e7eb; border-radius:6px; overflow:hidden; background:#fffbeb; transition:border 0.15s; }
  .sov-alloc-input-row:focus-within { border-color:#c9a84c; }
  .sov-alloc-dollar { padding:7px 7px 7px 10px; font-size:0.8rem; color:#9ca3af; background:#fffbeb; font-weight:600; }
  .sov-alloc-input { border:none; outline:none; background:#fffbeb; padding:7px 10px 7px 2px; font-size:0.85rem; font-weight:700; color:#0f1f3d; font-family:DM Sans,sans-serif; width:100%; text-align:right; }
  .sov-alloc-table-wrap { overflow-x:auto; border-radius:7px; border:1px solid #e5e7eb; }
  .sov-alloc-table { border-collapse:collapse; width:100%; font-size:0.73rem; font-family:DM Sans,sans-serif; min-width:600px; }
  .sov-alloc-table thead tr { background:#0f1f3d; }
  .sov-alloc-table thead th { color:white; font-size:0.6rem; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; padding:7px 10px; text-align:right; white-space:nowrap; border-right:1px solid rgba(255,255,255,0.07); }
  .sov-alloc-table thead th:first-child,.sov-alloc-table thead th:nth-child(2) { text-align:left; }
  .sov-alloc-table thead th.th-prop { background:#0d4a2f; color:#d1fae5; }
  .sov-alloc-table thead th.th-gl   { background:#3d1654; color:#f3e8ff; }
  .sov-alloc-table thead th.th-pkg  { background:#4a3200; color:#fef3c7; }
  .sov-alloc-table thead th.th-tot  { color:#c9a84c; }
  .sov-alloc-table tbody tr { border-bottom:1px solid #f0f0f0; }
  .sov-alloc-table tbody tr:nth-child(even) { background:#f8f5ef55; }
  .sov-alloc-table td { padding:6px 10px; border-right:1px solid #f0f0f0; text-align:right; color:#0f1f3d; }
  .sov-alloc-table td:first-child { text-align:center; color:#c9a84c; font-weight:700; width:32px; }
  .sov-alloc-table td:nth-child(2) { text-align:left; }
  .sov-alloc-table td.td-pct { color:#6b7280; font-size:0.68rem; }
  .sov-alloc-table td.td-prop { background:#f0fdf499; font-weight:600; }
  .sov-alloc-table td.td-gl   { background:#faf5ff99; font-weight:600; }
  .sov-alloc-table td.td-pkg  { background:#fffbeb99; font-weight:600; }
  .sov-alloc-table td.td-tot  { font-weight:700; background:#eef1f8; }
  .sov-alloc-table td.td-dash { color:#d1d5db; }
  .sov-alloc-table tr.alloc-totals-row td { color:white; font-weight:700; background:#0f1f3d; border-right:1px solid rgba(255,255,255,0.08); font-size:0.76rem; }
  .sov-alloc-table tr.alloc-totals-row td.td-tot { color:#c9a84c; background:#0f1f3d; }
  .sov-alloc-verify { display:flex; gap:10px; margin-top:10px; flex-wrap:wrap; }
  .sov-alloc-check { padding:4px 11px; border-radius:5px; font-size:0.68rem; font-weight:600; }
  .sov-alloc-check.pass { background:#d1fae5; color:#065f46; }
  .sov-alloc-check.fail { background:#fee2e2; color:#991b1b; }
  .sov-alloc-check.na   { background:#f3f4f6; color:#9ca3af; }

  .sa-layout { display: flex; gap: 0; height: 100%; min-height: 0; }
  .sa-left { width: 340px; min-width: 300px; max-width: 380px; border-right: 1px solid #e8eaf0; padding: 24px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; flex-shrink: 0; }
  .sa-right { flex: 1; padding: 24px 28px; overflow-y: auto; background: #fafbfc; }
  .sa-section-title { font-family: 'Playfair Display', serif; font-size: 1rem; color: #0f1f3d; font-weight: 700; margin-bottom: 3px; }
  .sa-section-sub { font-size: 0.75rem; color: #6b7280; line-height: 1.5; margin-bottom: 10px; }
  .sa-optional-badge { display: inline-block; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; background: #f3f4f6; color: #9ca3af; border-radius: 4px; padding: 2px 6px; margin-left: 6px; vertical-align: middle; }
  .sa-upload-box { border: 2px dashed #d1d5db; border-radius: 10px; padding: 16px 14px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; background: white; position: relative; }
  .sa-upload-box:hover { border-color: #c9a84c; background: #fffdf7; }
  .sa-upload-box.has-file { border-color: #10b981; border-style: solid; background: #f0fdf4; }
  .sa-upload-box input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
  .sa-upload-icon { color: #9ca3af; margin-bottom: 6px; }
  .sa-upload-box.has-file .sa-upload-icon { color: #10b981; }
  .sa-upload-label { font-size: 0.78rem; font-weight: 600; color: #374151; }
  .sa-upload-hint { font-size: 0.7rem; color: #9ca3af; margin-top: 2px; }
  .sa-file-name { font-size: 0.72rem; color: #059669; font-weight: 600; margin-top: 5px; word-break: break-all; }
  .sa-run-btn { width: 100%; padding: 13px; background: #0f1f3d; color: white; border: none; border-radius: 10px; font-size: 0.88rem; font-weight: 600; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: background 0.2s; }
  .sa-run-btn:hover:not(:disabled) { background: #162d52; }
  .sa-run-btn:disabled { opacity: 0.5; cursor: not-allowed; }
  .sa-status { font-size: 0.75rem; color: #6b7280; text-align: center; font-style: italic; margin-top: -6px; min-height: 18px; }
  .sa-divider { border: none; border-top: 1px solid #e8eaf0; margin: 0; }
  .sa-results-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 300px; color: #9ca3af; text-align: center; gap: 14px; }
  .sa-results-empty svg { opacity: 0.25; }
  .sa-results-empty-title { font-family: 'Playfair Display', serif; font-size: 1rem; color: #0f1f3d; font-weight: 700; }
  .sa-results-empty p { font-size: 0.8rem; max-width: 300px; line-height: 1.7; }
  .sa-result-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; padding-bottom: 14px; border-bottom: 2px solid #f0f2f5; }
  .sa-result-title { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: #0f1f3d; font-weight: 700; }
  .sa-result-meta { font-size: 0.73rem; color: #6b7280; margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .sa-result-actions { display: flex; gap: 8px; flex-shrink: 0; }
  .sa-action-btn { padding: 7px 14px; border-radius: 8px; font-size: 0.76rem; font-weight: 600; cursor: pointer; border: 1.5px solid; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
  .sa-action-btn.primary { background: #0f1f3d; color: white; border-color: #0f1f3d; }
  .sa-action-btn.primary:hover { background: #162d52; }
  .sa-action-btn.secondary { background: white; color: #0f1f3d; border-color: #d1d5db; }
  .sa-action-btn.secondary:hover { border-color: #0f1f3d; }
  .sa-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
  .sa-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 0.65rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
  .sa-badge.favorable { background: #d1fae5; color: #065f46; }
  .sa-badge.from-doc  { background: #dbeafe; color: #1e40af; }
  .sa-badge.drafted   { background: #ede9fe; color: #5b21b6; }
  .sa-badge.needs-review { background: #fee2e2; color: #991b1b; }
  .sa-field-group { margin-bottom: 26px; }
  .sa-field-group-title { font-size: 0.67rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #c9a84c; margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid #f0f2f5; }
  .sa-field-wrap { margin-bottom: 14px; }
  .sa-field-question { font-size: 0.8rem; font-weight: 600; color: #0f1f3d; margin-bottom: 6px; line-height: 1.4; display: flex; align-items: flex-start; gap: 7px; justify-content: space-between; }
  .sa-field-question-text { flex: 1; }
  .sa-yn-toggle { display: flex; gap: 0; border-radius: 8px; overflow: hidden; border: 1.5px solid #e5e7eb; width: fit-content; }
  .sa-yn-btn { padding: 7px 18px; font-size: 0.8rem; font-weight: 600; cursor: pointer; border: none; background: #f9fafb; color: #6b7280; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
  .sa-yn-btn:first-child { border-right: 1px solid #e5e7eb; }
  .sa-yn-btn.active-yes { background: #d1fae5; color: #065f46; }
  .sa-yn-btn.active-no  { background: #fee2e2; color: #991b1b; }
  .sa-yn-btn:hover:not(.active-yes):not(.active-no) { background: #f3f4f6; color: #0f1f3d; }
  .sa-yn-toggle.edited { outline: 2px solid #fcd34d; outline-offset: 2px; border-radius: 9px; }
  .sa-field-input { width: 100%; box-sizing: border-box; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 8px 11px; font-size: 0.82rem; color: #0f1f3d; font-family: 'DM Sans', sans-serif; background: white; outline: none; transition: border 0.15s; }
  .sa-field-input:focus { border-color: #c9a84c; }
  .sa-field-textarea { width: 100%; box-sizing: border-box; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 9px 11px; font-size: 0.8rem; color: #0f1f3d; font-family: 'DM Sans', sans-serif; background: white; outline: none; resize: vertical; min-height: 80px; line-height: 1.55; transition: border 0.15s; }
  .sa-field-textarea:focus { border-color: #c9a84c; }
  .sa-field-input.from-doc, .sa-field-textarea.from-doc { border-color: #93c5fd; background: #eff6ff; }
  .sa-field-input.favorable { border-color: #6ee7b7; background: #f0fdf4; }
  .sa-field-textarea.drafted { border-color: #c4b5fd; background: #f5f3ff; }
  .sa-field-input.edited, .sa-field-textarea.edited { outline: 2px solid #fcd34d; outline-offset: 1px; }
  .sa-field-input.needs-review, .sa-field-textarea.needs-review { border-color: #fca5a5; background: #fff1f2; }
  .sa-agent-note { font-size: 0.7rem; color: #d97706; margin-top: 4px; font-style: italic; }
  .sa-gap-banner { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: 10px 14px; font-size: 0.77rem; color: #92400e; margin-bottom: 16px; line-height: 1.5; }
  .sa-gap-banner strong { display: block; margin-bottom: 2px; }
  @media (max-width: 768px) {
    .sa-layout { flex-direction: column; }
    .sa-left { width: 100%; max-width: 100%; border-right: none; border-bottom: 1px solid #e8eaf0; }
  }
