/* OVPL Portal styles — extracted from index.html (Batch A modularization).
   Block 1: main stylesheet. Block 2: Lucide icon glyph map. */

  :root {
    --ink: #0B0F14;
    --electric: #0028FF;
    --electric-soft: #E8ECFF;
    --fog: #E5E7E9;
    --paper: #FFFFFF;
    --muted: #5F646A;
    --divider: #D8DBDE;
    --bg-soft: #FAFAFB;
    --dark-card: #1A1F26;
    --dark-muted: #8A9099;
    --dark-line: #2A2F36;
    --warn-bg: #FFF1E5;
    --warn-fg: #B84A00;
    --amber-bg: #FFF8DB;
    --amber-fg: #8A6400;
    --r-pill: 9999px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 20px;
    --r-2xl: 24px;
    --font-sans: 'Inter', -apple-system, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  }

  * { box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
  html, body { margin: 0; padding: 0; }
  body {
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
  }
  button { font-family: inherit; cursor: pointer; }
  button:focus-visible { outline: 2px solid var(--electric); outline-offset: 2px; }
  input:focus { outline: none; }
  a { color: inherit; text-decoration: none; cursor: pointer; }
  .mono { font-family: var(--font-mono); }
  .hidden { display: none !important; }

  /* ===== TOP BAR ===== */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, #F8F9FA 0%, #FFFFFF 100%);
    border-bottom: 1px solid var(--fog);
  }
  .topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  .brand {
    display: flex;
    align-items: baseline;
    gap: 4px;
    background: none;
    border: 0;
    padding: 0;
  }
  .brand-text {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--ink);
  }
  .brand-dot {
    width: 7px;
    height: 7px;
    background: var(--electric);
    border-radius: 50%;
    display: inline-block;
  }
  .nav-group { display: flex; align-items: center; gap: 36px; }
  .nav { display: flex; gap: 26px; }
  @media (max-width: 768px) { .nav { display: none; } }
  .nav-item {
    background: none;
    border: 0;
    padding: 4px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
  }
  .nav-item.active {
    font-weight: 700;
    color: var(--electric);
    border-bottom-color: var(--electric);
  }
  .topbar-right { display: flex; align-items: center; gap: 12px; }
  .search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #F1F2F4;
    border-radius: var(--r-pill);
    font-size: 12px;
    color: var(--muted);
    min-width: 220px;
  }
  @media (max-width: 1024px) { .search-bar { display: none; } }
  .search-bar input {
    background: transparent;
    border: 0;
    flex: 1;
    font-size: 12px;
    color: var(--ink);
    font-family: inherit;
  }
  .kbd {
    font-family: var(--font-mono);
    font-size: 10px;
    padding: 1px 6px;
    background: white;
    border-radius: 4px;
    color: var(--ink);
  }
  .icon-btn {
    position: relative;
    background: transparent;
    border: 0;
    padding: 8px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .icon-btn .dot-indicator {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    background: var(--electric);
    border-radius: 50%;
  }
  .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ink);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
  }

  /* ===== PILL BUTTONS ===== */
  .pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--r-pill);
    font-weight: 700;
    border: 0;
    transition: all 0.15s ease;
  }
  .pill-sm { font-size: 11px; padding: 6px 12px; }
  .pill-md { font-size: 13px; padding: 9px 18px; }
  .pill-lg { font-size: 14px; padding: 11px 22px; }
  .pill-primary { background: var(--electric); color: white; }
  .pill-primary:hover { opacity: 0.9; }
  .pill-secondary { background: white; color: var(--ink); border: 1.5px solid var(--ink); }
  .pill-secondary:hover { background: #F1F2F4; }
  .pill-dark { background: var(--ink); color: white; }
  .pill-dark:hover { opacity: 0.9; }
  .pill-ghost { background: transparent; color: var(--ink); }
  .pill-ghost:hover { background: #F1F2F4; }
  .pill-outline-white { background: transparent; color: white; border: 1.5px solid white; }
  .pill-outline-white:hover { background: rgba(255,255,255,0.08); }
  .pill-icon-only { padding: 6px; }
  .pill .arrow { font-size: 14px; line-height: 1; }

  /* ===== EYEBROW ===== */
  .eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
  }
  .eyebrow-dot {
    width: 6px;
    height: 6px;
    background: var(--electric);
    border-radius: 50%;
    flex-shrink: 0;
  }
  .eyebrow-text {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--electric);
    letter-spacing: 2px;
    font-weight: 500;
  }
  .eyebrow-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
  }
  .eyebrow-row .eyebrow { margin-bottom: 0; }
  .view-all-link {
    background: none;
    border: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
  }

  /* ===== PAGE HERO ===== */
  .page-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 28px 80px;
  }
  .page-hero { margin-bottom: 28px; }
  .page-hero h1 {
    font-size: 44px;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.04em;
    line-height: 0.95;
    text-transform: uppercase;
    color: var(--ink);
  }
  .page-hero .subtitle {
    font-size: 14px;
    color: var(--muted);
    margin: 12px 0 0;
    line-height: 1.6;
    max-width: 540px;
  }
  @media (max-width: 640px) {
    .page-hero h1 { font-size: 32px; }
  }

  /* ===== STATUS BADGE ===== */
  .status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
  }
  .status-missing { background: var(--warn-bg); color: var(--warn-fg); }
  .status-estimate { background: var(--amber-bg); color: var(--amber-fg); }
  .status-production { background: #E8ECFF; color: var(--electric); }

  /* ===== CARDS ===== */
  .card {
    background: white;
    border: 1px solid var(--fog);
    border-radius: var(--r-xl);
    padding: 22px;
  }
  .card-no-pad {
    background: white;
    border: 1px solid var(--fog);
    border-radius: var(--r-xl);
    overflow: hidden;
  }
  .card-dark {
    background: var(--ink);
    border-radius: var(--r-2xl);
    padding: 26px;
    color: white;
    position: relative;
    overflow: hidden;
  }
  /* ===== PLAN HERO ===== */
  .plan-hero { margin-bottom: 28px; }
  .plan-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
  }
  .plan-title {
    font-size: 32px;
    font-weight: 900;
    color: white;
    margin: 0;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    line-height: 1;
  }
  .plan-meta {
    font-size: 13px;
    color: var(--dark-muted);
    margin: 6px 0 0;
  }
  .usage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  @media (max-width: 640px) {
    .usage-grid { grid-template-columns: 1fr; }
  }
  .usage-card {
    background: var(--dark-card);
    border-radius: var(--r-lg);
    padding: 16px;
    position: relative;
  }
  .usage-label {
    font-size: 10px;
    color: var(--dark-muted);
    margin: 0 0 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  .usage-value {
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 4px;
  }
  .usage-value .big {
    font-size: 36px;
    font-weight: 900;
    color: white;
    letter-spacing: -0.03em;
  }
  .usage-value .total {
    font-size: 14px;
    color: var(--muted);
    font-family: var(--font-mono);
  }
  .usage-bar {
    margin-top: 12px;
    height: 3px;
    background: var(--dark-line);
    border-radius: 2px;
    overflow: hidden;
  }
  .usage-bar .fill {
    height: 100%;
    background: var(--electric);
  }
  .near-limit-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--electric);
    color: white;
    padding: 3px 9px;
    border-radius: var(--r-pill);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
  }

  /* ===== SERVICE QUICK CARDS ===== */
  .services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 40px;
  }
  @media (max-width: 1024px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 640px) { .services-grid { grid-template-columns: 1fr; } }
  .service-card {
    background: white;
    border: 1px solid var(--fog);
    border-radius: var(--r-lg);
    padding: 18px;
    text-align: left;
    transition: border-color 0.15s ease;
  }
  .service-card:hover { border-color: var(--ink); }
  .service-card i { font-size: 22px; color: var(--ink); display: block; margin-bottom: 12px; }
  .service-eyebrow {
    font-size: 10px;
    font-weight: 700;
    color: var(--electric);
    margin: 0 0 4px;
    letter-spacing: 1.5px;
  }
  .service-title {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 2px;
    letter-spacing: -0.02em;
    color: var(--ink);
  }
  .service-from {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
  }

  /* ===== DASHBOARD LAYOUT ===== */
  .dash-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
  }
  @media (max-width: 1024px) { .dash-grid { grid-template-columns: 1fr; } }

  /* ===== NEEDS INPUT / READY DOWNLOAD ===== */
  .list-row {
    padding: 18px 20px;
    border-bottom: 1px solid var(--fog);
  }
  .list-row:last-child { border-bottom: 0; }
  .list-row-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }
  .list-row-main { flex: 1; min-width: 0; }
  .list-row-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
  }
  .list-row-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
  }
  .list-row-title {
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
  }
  .list-row-note {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
  }
  .ready-row {
    padding: 14px 16px;
    border-bottom: 1px solid var(--fog);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
  }
  .ready-row:last-child { border-bottom: 0; }
  .ready-row-main { flex: 1; min-width: 0; }
  .ready-row-id {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    display: block;
    margin-bottom: 2px;
  }
  .ready-row-title {
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .show-closed-link {
    padding: 12px 20px;
    background: var(--bg-soft);
    background: var(--bg-soft);
  }
  .show-closed-link a {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
  }

  /* ===== PRODUCTION TABLE ===== */
  .prod-table-head, .prod-table-row {
    display: grid;
    grid-template-columns: 100px 1.4fr 1fr 160px 100px;
    align-items: center;
    padding: 16px 20px;
  }
  @media (max-width: 768px) {
    .prod-table-head { display: none; }
    .prod-table-row { grid-template-columns: 1fr; gap: 4px; }
  }
  .prod-table-head {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--fog);
    padding: 14px 20px;
  }
  .prod-table-head span {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 1.5px;
  }
  .prod-table-head .right { text-align: right; }
  .prod-table-row {
    border-bottom: 1px solid var(--fog);
    cursor: pointer;
    background: white;
    border-left: 0; border-right: 0; border-top: 0;
    font-size: 13px;
    text-align: left;
    width: 100%;
  }
  .prod-table-row:last-child { border-bottom: 0; }
  .prod-table-row:hover { background: var(--bg-soft); }
  .prod-table-row .id-cell {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
  }
  .prod-table-row .title-cell {
    font-weight: 700;
    letter-spacing: -0.01em;
  }
  .prod-table-row .service-cell { color: var(--muted); }
  .prod-table-row .stage-cell {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .prod-table-row .stage-cell .bar {
    flex: 1;
    height: 3px;
    background: var(--fog);
    border-radius: 2px;
    overflow: hidden;
  }
  .prod-table-row .stage-cell .bar-fill {
    height: 100%;
    background: var(--electric);
  }
  .prod-table-row .due-cell {
    font-family: var(--font-mono);
    font-size: 11px;
    text-align: right;
    color: var(--muted);
  }
  .prod-table-row .due-cell.urgent {
    color: var(--ink);
    font-weight: 700;
  }

  /* ===== REQUESTS VIEW TABS ===== */
  .tabs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
  }
  .tab-pill {
    background: white;
    color: var(--ink);
    border: 1.5px solid var(--divider);
    padding: 8px 16px;
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
  }
  .tab-pill.active {
    background: var(--ink);
    color: white;
    border-color: var(--ink);
  }
  .tab-pill .count {
    font-family: var(--font-mono);
    margin-left: 4px;
    opacity: 0.6;
  }

  /* ===== REQUEST DETAIL ===== */
  .back-link {
    background: transparent;
    border: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.5px;
    margin-bottom: 24px;
    padding: 0;
  }
  .detail-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
  }
  .detail-hero h1 {
    font-size: 38px;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.04em;
    line-height: 0.95;
    text-transform: uppercase;
    color: var(--ink);
  }
  .detail-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .detail-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
  }
  @media (max-width: 1024px) { .detail-grid { grid-template-columns: 1fr; } }
  .timeline-step {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
  }
  .timeline-step:last-child { margin-bottom: 0; }
  .timeline-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--divider);
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .timeline-circle.done {
    border: 0;
    background: var(--electric);
  }
  .timeline-circle.current {
    border: 1.5px solid var(--electric);
    background: white;
  }
  .timeline-circle.current::after {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--electric);
    border-radius: 50%;
  }
  .timeline-circle.done::after {
    content: "";
    width: 8px;
    height: 8px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
    margin-top: -2px;
  }
  .timeline-label {
    flex: 1;
    font-size: 14px;
    margin: 0;
    letter-spacing: -0.01em;
    color: var(--muted);
  }
  .timeline-label.done { font-weight: 600; color: var(--ink); }
  .timeline-label.current { font-weight: 800; color: var(--ink); }
  .timeline-date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
  }

  .files-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  @media (max-width: 640px) { .files-grid { grid-template-columns: repeat(2, 1fr); } }
  .file-chip {
    background: var(--bg-soft);
    border: 1px solid var(--fog);
    border-radius: var(--r-md);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .file-chip i { color: var(--muted); font-size: 16px; flex-shrink: 0; }

  .msg-thread { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
  .msg-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
  }
  .msg-avatar {
    width: 24px; height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
  }
  .msg-avatar.ovpl { background: var(--ink); }
  .msg-avatar.me { background: var(--electric); }
  .msg-author { font-size: 13px; font-weight: 700; }
  .msg-date { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
  .msg-body {
    font-size: 14px;
    color: var(--ink);
    margin: 0 0 0 32px;
    line-height: 1.6;
  }

  /* Chat bubbles (Messages v2) — left = them, right = me */
  .msg-row { display: flex; }
  .msg-row.me { justify-content: flex-end; }
  .msg-row.them { justify-content: flex-start; }
  .msg-bubble {
    max-width: 78%;
    padding: 9px 12px;
    border-radius: 14px;
  }
  .msg-bubble.them {
    background: var(--bg-soft);
    border: 1px solid var(--fog);
    border-bottom-left-radius: 4px;
  }
  .msg-bubble.me {
    background: var(--electric);
    color: #fff;
    border-bottom-right-radius: 4px;
  }
  .msg-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
  .msg-bubble .msg-author { font-size: 12px; font-weight: 700; }
  .msg-bubble.me .msg-author { color: rgba(255, 255, 255, 0.95); }
  .msg-bubble .msg-date { font-family: var(--font-mono); font-size: 9px; color: var(--muted); }
  .msg-bubble.me .msg-date { color: rgba(255, 255, 255, 0.7); }
  .msg-bubble .msg-body {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;       /* preserve the client's line breaks */
    overflow-wrap: anywhere;
    color: inherit;
  }
  .msg-empty {
    font-size: 12px; color: var(--muted); margin: 0;
    padding: 16px 0; text-align: center; font-style: italic;
  }

  .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
  }
  .detail-row:last-child { margin-bottom: 0; }
  .detail-row .label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
  }
  .detail-row .value {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    text-align: right;
  }
  .detail-row .value.mono-blue {
    font-family: var(--font-mono);
    color: var(--electric);
  }

  /* ===== NEW REQUEST WIZARD ===== */
  .wizard-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
  }
  .wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .wizard-step .num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 1.5px solid var(--divider);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
  }
  .wizard-step.current .num, .wizard-step.done .num {
    background: var(--electric);
    color: white;
    border-color: var(--electric);
  }
  .wizard-step.done .num::before {
    content: "";
    width: 8px;
    height: 8px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
    display: inline-block;
    margin-top: -2px;
  }
  .wizard-step.done .num { font-size: 0; }
  .wizard-step .label {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }
  .wizard-step.current .label {
    font-weight: 800;
    color: var(--ink);
  }
  .wizard-connector {
    flex: 1;
    height: 1px;
    background: var(--fog);
    max-width: 60px;
  }

  .wizard-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
  }
  @media (max-width: 1024px) { .wizard-grid { grid-template-columns: 1fr; } }

  .service-pick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  @media (max-width: 640px) { .service-pick-grid { grid-template-columns: 1fr; } }
  .service-pick {
    background: white;
    color: var(--ink);
    border: 1px solid var(--fog);
    border-radius: var(--r-lg);
    padding: 20px;
    text-align: left;
  }
  .service-pick.selected {
    background: var(--ink);
    color: white;
    border: 2px solid var(--ink);
  }
  .service-pick i { font-size: 24px; display: block; margin-bottom: 12px; }
  .service-pick .eyebrow-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--electric);
    margin: 0 0 4px;
    letter-spacing: 1.5px;
  }
  .service-pick.selected .eyebrow-label { color: #85B7EB; }
  .service-pick .title {
    font-size: 18px;
    font-weight: 900;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
  }
  .service-pick .blurb {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
  }
  .service-pick.selected .blurb { color: var(--dark-muted); }

  .dropzone {
    border: 2px dashed var(--divider);
    border-radius: var(--r-lg);
    padding: 40px;
    text-align: center;
    background: var(--bg-soft);
  }
  .dropzone i { font-size: 28px; color: var(--muted); display: block; margin: 0 auto 12px; }
  .dropzone .title {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
  }
  .dropzone .sub {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 16px;
  }

  .file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-soft);
    border: 1px solid var(--fog);
    border-radius: var(--r-md);
    padding: 12px;
  }
  .file-item + .file-item { margin-top: 8px; }
  .file-item i { color: var(--muted); font-size: 16px; }
  .file-item .meta { flex: 1; }
  .file-item .name {
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
  }
  .file-item .size {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
  }
  .file-item .remove {
    background: none;
    border: 0;
    color: var(--muted);
    padding: 4px;
  }

  .spec-group { margin-bottom: 24px; }
  .spec-group:last-child { margin-bottom: 0; }
  .spec-group-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 10px;
    text-transform: uppercase;
  }
  .spec-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .spec-chip {
    background: white;
    color: var(--ink);
    border: 1.5px solid var(--divider);
    padding: 8px 14px;
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
  }
  .spec-chip.selected {
    background: var(--ink);
    color: white;
    border-color: var(--ink);
  }

  .review-block {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--fog);
  }
  .review-block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
  .review-block .label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 1.5px;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
  }
  .review-block .value {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
  }

  .wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--fog);
  }

  .estimate-card {
    background: var(--ink);
    border-radius: var(--r-xl);
    padding: 22px;
    color: white;
  }
  .estimate-card .label {
    font-size: 12px;
    color: var(--dark-muted);
    margin: 8px 0 4px;
  }
  .estimate-card .amount {
    font-size: 32px;
    font-weight: 900;
    color: white;
    margin: 0;
    letter-spacing: -0.03em;
  }
  .estimate-card .note {
    font-size: 11px;
    color: var(--muted);
    margin: 8px 0 0;
  }
  .estimate-card .note .extra {
    color: white;
    font-weight: 700;
  }

  .tip-card {
    background: var(--electric-soft);
    border-radius: var(--r-lg);
    padding: 16px;
  }
  .tip-card i {
    font-size: 16px;
    color: var(--electric);
    display: block;
    margin-bottom: 8px;
  }
  .tip-card .label {
    font-size: 12px;
    font-weight: 700;
    color: var(--electric);
    margin: 0 0 4px;
    letter-spacing: 0.5px;
  }
  .tip-card .body {
    font-size: 12px;
    color: var(--ink);
    margin: 0;
    line-height: 1.5;
  }

  /* ===== LIBRARY ===== */
  .library-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  @media (max-width: 1024px) { .library-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 640px) { .library-grid { grid-template-columns: 1fr; } }
  .library-card {
    background: white;
    border: 1px solid var(--fog);
    border-radius: var(--r-xl);
    padding: 20px;
    text-align: left;
    transition: border-color 0.15s ease;
  }
  .library-card:hover { border-color: var(--ink); }
  .library-preview {
    aspect-ratio: 4 / 3;
    background: #F1F2F4;
    border-radius: var(--r-md);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .library-preview i { font-size: 32px; color: #A1A1AA; }
  .library-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--electric);
    letter-spacing: 1.5px;
  }
  .library-title {
    font-size: 16px;
    font-weight: 800;
    margin: 6px 0 4px;
    letter-spacing: -0.02em;
    line-height: 1.2;
  }
  .library-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
  }
  .library-foot .service-name { font-size: 12px; color: var(--muted); }
  .library-foot .files-count {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
  }

  /* ===== BILLING ===== */
  .pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
  }
  @media (max-width: 1024px) { .pricing-grid { grid-template-columns: 1fr; } }
  .plan-card {
    background: var(--fog);
    border: 2px solid transparent;
    border-radius: var(--r-2xl);
    padding: 28px;
    position: relative;
  }
  .plan-card.featured {
    background: white;
    border: 2px solid var(--electric);
  }
  .plan-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
  }
  .plan-num-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
  }
  .plan-num-dot {
    width: 10px;
    height: 10px;
    background: var(--electric);
    border-radius: 50%;
    display: inline-block;
  }
  .plan-num {
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--ink);
  }
  .plan-label-pill {
    background: white;
    color: var(--ink);
    padding: 4px 12px;
    border-radius: var(--r-pill);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
  }
  .plan-card.featured .plan-label-pill {
    background: var(--electric);
    color: white;
  }
  .plan-card h3 {
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 14px;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--ink);
  }
  .plan-price {
    margin: 0 0 14px;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 4px;
  }
  .plan-price .amount {
    font-size: 36px;
    font-weight: 900;
    color: var(--electric);
    letter-spacing: -0.03em;
  }
  .plan-price .per {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink);
  }
  .plan-blurb {
    font-size: 13px;
    color: var(--ink);
    margin: 0 0 18px;
    line-height: 1.5;
  }
  .plan-card:not(.featured) .plan-blurb { opacity: 0.75; }
  .plan-features {
    border-top: 1px solid var(--divider);
    padding-top: 16px;
    margin-bottom: 18px;
    list-style: none;
    padding-left: 0;
  }
  .plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--ink);
    font-weight: 600;
    letter-spacing: -0.01em;
  }
  .plan-features li::before {
    content: "✓";
    color: var(--electric);
    font-weight: 900;
    flex-shrink: 0;
  }
  .plan-cta {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .billing-foot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  @media (max-width: 768px) { .billing-foot-grid { grid-template-columns: 1fr; } }
  .billing-foot-card {
    background: white;
    border: 1px solid var(--fog);
    border-radius: var(--r-xl);
    padding: 24px;
  }
  .billing-foot-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    gap: 12px;
  }
  .billing-foot-inner .main p:first-child {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
  }
  .billing-foot-inner .main .sub {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
  }

  /* ===== HELP ===== */
  .help-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
  }
  @media (max-width: 1024px) { .help-grid { grid-template-columns: 1fr; } }
  .faq-card {
    background: white;
    border: 1px solid var(--fog);
    border-radius: var(--r-xl);
    padding: 6px;
  }
  .faq-item {
    width: 100%;
    background: white;
    border: 0;
    padding: 20px 22px;
    border-radius: var(--r-lg);
    text-align: left;
    display: block;
  }
  .faq-item.open { background: var(--bg-soft); }
  .faq-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }
  .faq-q {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
  }
  .faq-chev {
    font-size: 18px;
    color: var(--electric);
    transition: transform 0.2s ease;
  }
  .faq-item.open .faq-chev { transform: rotate(180deg); }
  .faq-a {
    font-size: 14px;
    color: var(--muted);
    margin: 10px 0 0;
    line-height: 1.6;
    max-width: 90%;
  }

  .specialist-card {
    background: var(--ink);
    border-radius: var(--r-xl);
    padding: 24px;
    color: white;
  }
  .specialist-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 16px;
  }
  .specialist-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--electric);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
  }
  .specialist-name {
    font-size: 16px;
    font-weight: 800;
    color: white;
    margin: 0;
  }
  .specialist-role {
    font-size: 12px;
    color: var(--dark-muted);
    margin: 0;
  }

  /* ===== TOASTS ===== */
  .toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
  }
  .toast {
    background: var(--ink);
    color: white;
    padding: 12px 18px;
    border-radius: var(--r-pill);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(11, 15, 20, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: toast-in 0.25s ease;
    max-width: 90vw;
  }
  .toast.success { background: var(--ink); }
  .toast.success::before { content: "✓"; color: var(--electric); font-weight: 900; }
  .toast.info { background: var(--ink); }
  .toast.info::before { content: "·"; color: var(--electric); font-size: 20px; line-height: 0; }
  @keyframes toast-in {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  /* ===== MODAL ===== */
  .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(11, 15, 20, 0.5);
    z-index: 150;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .modal-backdrop.open { display: flex; }
  .modal {
    background: white;
    border-radius: var(--r-2xl);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    animation: modal-in 0.2s ease;
    position: relative;
  }
  .modal-lg { max-width: 720px; }
  @keyframes modal-in {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }
  .modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: 0;
    color: var(--muted);
    padding: 6px;
    border-radius: 50%;
    cursor: pointer;
  }
  .modal-close:hover { background: var(--bg-soft); }
  .modal-title {
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 6px;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    line-height: 1;
  }
  .modal-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 20px;
    line-height: 1.5;
  }
  .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--fog);
  }
  .form-field { margin-bottom: 16px; }
  .form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    text-transform: uppercase;
  }
  .form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--divider);
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: 14px;
    color: var(--ink);
    background: white;
    transition: border-color 0.15s;
  }
  .form-input:focus { border-color: var(--electric); }
  textarea.form-input { resize: vertical; min-height: 80px; font-family: inherit; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

  .invoice-row {
    display: grid;
    grid-template-columns: 110px 1fr auto auto;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--fog);
    gap: 12px;
  }
  .invoice-row:last-child { border-bottom: 0; }

  /* ===== DROPDOWN MENUS ===== */
  .dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid var(--fog);
    border-radius: var(--r-lg);
    min-width: 280px;
    box-shadow: 0 12px 32px rgba(11, 15, 20, 0.12);
    z-index: 100;
    overflow: hidden;
    animation: dropdown-in 0.15s ease;
  }
  @keyframes dropdown-in {
    from { transform: translateY(-4px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  .dropdown-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--fog);
  }
  .dropdown-header-title {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--electric);
    letter-spacing: 2px;
    margin: 0;
  }
  .dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: 0;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid var(--fog);
    font-family: inherit;
  }
  .dropdown-item:last-child { border-bottom: 0; }
  .dropdown-item:hover { background: var(--bg-soft); }
  .dropdown-item .notif-dot {
    width: 6px;
    height: 6px;
    background: var(--electric);
    border-radius: 50%;
    margin-top: 7px;
    flex-shrink: 0;
  }
  .dropdown-item.read .notif-dot { background: var(--divider); }
  .dropdown-item-text {
    flex: 1;
    font-size: 13px;
    color: var(--ink);
    line-height: 1.4;
    font-weight: 500;
  }
  .dropdown-item-meta {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    margin-top: 4px;
    letter-spacing: 0.5px;
  }
  .topbar-right { position: relative; }
  .has-dropdown { position: relative; }

  /* Avatar menu */
  .avatar-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: 0;
    padding: 11px 16px;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: var(--ink);
    font-weight: 500;
  }
  .avatar-menu-item:hover { background: var(--bg-soft); }
  .avatar-menu-item i { color: var(--muted); font-size: 14px; }
  .avatar-menu-divider { height: 1px; background: var(--fog); margin: 4px 0; }
  .avatar-menu-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--fog);
  }
  .avatar-menu-name { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; margin: 0; }
  .avatar-menu-email { font-size: 12px; color: var(--muted); margin: 2px 0 0; font-family: var(--font-mono); }

  /* Search results dropdown */
  .search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--fog);
    border-radius: var(--r-lg);
    box-shadow: 0 12px 32px rgba(11, 15, 20, 0.12);
    z-index: 100;
    max-height: 360px;
    overflow-y: auto;
  }
  .search-bar { position: relative; }
  .search-empty { padding: 16px; font-size: 12px; color: var(--muted); text-align: center; }
  .notif-empty { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: 0.03em; }
  .icon-btn .dot-indicator.hidden { display: none; }

  /* ===== ROLE SWITCHER ===== */
  .role-switcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
  }
  .role-switcher-btn {
    background: var(--ink);
    color: white;
    border: 0;
    padding: 12px 18px;
    border-radius: var(--r-pill);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(11, 15, 20, 0.2);
  }
  .role-switcher-btn:hover { transform: translateY(-1px); transition: transform 0.15s; }
  .role-switcher-btn .role-dot {
    width: 7px;
    height: 7px;
    background: var(--electric);
    border-radius: 50%;
  }
  .role-switcher-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid var(--fog);
    border-radius: var(--r-lg);
    min-width: 260px;
    box-shadow: 0 12px 32px rgba(11, 15, 20, 0.15);
    overflow: hidden;
    display: none;
  }
  .role-switcher-menu.open { display: block; }
  .role-option {
    width: 100%;
    background: white;
    border: 0;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    border-bottom: 1px solid var(--fog);
    font-family: inherit;
    display: flex;
    align-items: flex-start;
    gap: 10px;
  }
  .role-option:last-child { border-bottom: 0; }
  .role-option:hover { background: var(--bg-soft); }
  .role-option.active { background: var(--electric-soft); }
  .role-option-icon {
    width: 8px;
    height: 8px;
    background: var(--electric);
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
  }
  .role-option.active .role-option-icon { background: var(--ink); }
  .role-option-name { font-size: 13px; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
  .role-option-desc { font-size: 11px; color: var(--muted); margin: 2px 0 0; line-height: 1.4; }

  /* Impersonation banner */
  .impersonate-mode .role-switcher-btn {
    background: var(--electric);
  }
  .admin-overlay-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99;
    background: white;
    border: 1.5px solid var(--ink);
    padding: 10px 16px;
    border-radius: var(--r-pill);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--ink);
    display: none;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateX(calc(-100% - 36px));
  }
  .impersonate-mode .admin-overlay-toggle { display: inline-flex; }
  .admin-overlay-toggle .toggle-switch {
    width: 28px;
    height: 16px;
    background: var(--divider);
    border-radius: 9999px;
    position: relative;
    transition: background 0.15s;
  }
  .admin-overlay-toggle .toggle-switch::after {
    content: "";
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: left 0.15s;
  }
  .admin-overlay-on .toggle-switch { background: var(--electric); }
  .admin-overlay-on .toggle-switch::after { left: 14px; }

  /* Admin overlay buttons (hidden by default, shown when admin overlay is ON) */
  .admin-only { display: none !important; }
  .admin-overlay-on .admin-only { display: inline-flex !important; }
  .admin-overlay-on .admin-only-block { display: block !important; }

  /* ===== INTERNAL VIEW HEADERS ===== */
  .role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: var(--ink);
    color: white;
    border-radius: var(--r-pill);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
  }
  .role-badge.assigned { background: #5B21B6; }
  .role-badge.portal { background: #065F46; }
  .role-badge.ops { background: var(--electric); }

  /* ===== KPI CARDS (Operations) ===== */
  .kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
  }
  @media (max-width: 1024px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 640px) { .kpi-grid { grid-template-columns: 1fr; } }
  .kpi-card {
    background: white;
    border: 1px solid var(--fog);
    border-radius: var(--r-lg);
    padding: 18px;
  }
  .kpi-label {
    font-size: 10px;
    color: var(--muted);
    margin: 0 0 12px;
    letter-spacing: 1.5px;
    font-family: var(--font-mono);
    text-transform: uppercase;
  }
  .kpi-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1;
  }
  .kpi-delta {
    font-size: 12px;
    font-weight: 600;
    color: #16A34A;
    margin-top: 8px;
    display: inline-block;
    font-family: var(--font-mono);
  }
  .kpi-delta.negative { color: #DC2626; }

  /* ===== CAPACITY LIST ===== */
  .capacity-row {
    display: grid;
    grid-template-columns: 200px 1fr 80px 100px;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--fog);
    gap: 16px;
  }
  .capacity-row:last-child { border-bottom: 0; }
  @media (max-width: 768px) {
    .capacity-row { grid-template-columns: 1fr; gap: 8px; }
  }
  .specialist-info { display: flex; align-items: center; gap: 10px; }
  .specialist-info-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--ink);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
  }
  .specialist-info-name { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; margin: 0; }
  .specialist-info-role { font-size: 11px; color: var(--muted); margin: 0; font-family: var(--font-mono); letter-spacing: 0.5px; }

  /* ===== AUDIT LOG ===== */
  .audit-row {
    display: grid;
    grid-template-columns: 120px 140px 1fr;
    padding: 14px 20px;
    gap: 16px;
    border-bottom: 1px solid var(--fog);
    align-items: baseline;
  }
  .audit-row:last-child { border-bottom: 0; }
  @media (max-width: 768px) {
    .audit-row { grid-template-columns: 1fr; gap: 4px; }
  }
  .audit-date { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.5px; }
  .audit-user { font-size: 13px; font-weight: 700; letter-spacing: -0.01em; }
  .audit-action { font-size: 13px; color: var(--ink); }
  .audit-action strong { font-weight: 700; }

  /* Internal view custom header bar */
  .internal-banner {
    background: var(--ink);
    color: white;
    padding: 10px 20px;
    border-radius: var(--r-md);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
  }
  .internal-banner-text {
    font-size: 12px;
    margin: 0;
    color: var(--dark-muted);
  }
  .internal-banner-text strong { color: white; font-weight: 700; }

  /* ===== PORTAL DESK FEATURES ===== */

  /* Preflight checklist items */
  .preflight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    cursor: pointer;
    font-size: 13px;
    color: var(--ink);
    margin-bottom: 4px;
  }
  .preflight-item:hover { background: var(--bg-soft); }
  .preflight-item input[type=checkbox] {
    width: 16px; height: 16px;
    accent-color: var(--electric);
    cursor: pointer;
  }

  /* Currently working on (Portal Desk dashboard) */
  .focus-bar {
    background: var(--ink);
    color: white;
    border-radius: var(--r-xl);
    padding: 18px 24px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
  }
  .focus-bar::after {
    content: "";
    position: absolute;
    top: 16px;
    right: 24px;
    width: 8px;
    height: 8px;
    background: var(--electric);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
  }
  .focus-bar-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--electric);
    letter-spacing: 2px;
    margin: 0 0 4px;
  }
  .focus-bar-title { font-size: 18px; font-weight: 900; margin: 0; color: white; letter-spacing: -0.02em; }
  .focus-bar-meta { font-size: 12px; color: var(--dark-muted); margin: 4px 0 0; font-family: var(--font-mono); letter-spacing: 0.5px; }
  .focus-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

  /* Time tracker */
  .time-tracker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1.5px solid var(--ink);
    color: var(--ink);
    padding: 8px 14px;
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
  }
  .time-tracker.running { background: var(--electric); border-color: var(--electric); color: white; }
  .time-tracker .tracker-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ink);
  }
  .time-tracker.running .tracker-dot {
    background: white;
    animation: pulse 1.5s ease-in-out infinite;
  }

  /* SLA countdown */
  .sla-countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--r-pill);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
  }
  .sla-countdown.healthy { background: #DCFCE7; color: #15803D; }
  .sla-countdown.warning { background: #FEF3C7; color: #B45309; }
  .sla-countdown.critical { background: #FEE2E2; color: #991B1B; }
  .sla-countdown.critical .sla-dot { animation: pulse 1s ease-in-out infinite; }
  .sla-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
  }

  /* Weekly capacity */
  .capacity-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 12px;
  }
  .capacity-day {
    text-align: center;
  }
  .capacity-day-label {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 1px;
    margin: 0 0 6px;
  }
  .capacity-day-bar {
    height: 40px;
    background: var(--fog);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
  }
  .capacity-day-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--electric);
    border-radius: 4px 4px 0 0;
  }
  .capacity-day-fill.over { background: #DC2626; }
  .capacity-day-hours {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--ink);
    margin: 4px 0 0;
    font-weight: 700;
  }
  .capacity-day.today .capacity-day-label { color: var(--electric); font-weight: 700; }

  /* Internal team chat */
  .team-chat {
    background: white;
    border: 1px solid var(--fog);
    border-radius: var(--r-xl);
    padding: 20px;
  }
  .chat-msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
  }
  .chat-msg:last-child { margin-bottom: 0; }
  .chat-msg-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--ink);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
  }
  .chat-msg-avatar.green { background: #065F46; }
  .chat-msg-avatar.purple { background: #5B21B6; }
  .chat-msg-content {
    background: var(--bg-soft);
    border-radius: var(--r-md);
    padding: 8px 12px;
    flex: 1;
  }
  .chat-msg-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
  }
  .chat-msg-author { font-size: 12px; font-weight: 700; }
  .chat-msg-time { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
  .chat-msg-body { font-size: 13px; color: var(--ink); margin: 0; line-height: 1.5; }
  .chat-msg-mention { color: var(--electric); font-weight: 700; }

  /* Versions panel */
  .versions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }
  .version-card {
    border: 1.5px solid var(--fog);
    border-radius: var(--r-md);
    padding: 10px;
    background: white;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s;
  }
  .version-card:hover { border-color: var(--ink); }
  .version-card.current { border-color: var(--electric); }
  .version-preview {
    aspect-ratio: 4 / 3;
    background: var(--fog);
    border-radius: var(--r-md);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
  }
  .version-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
  }
  .version-name {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
  }
  .version-current-pill {
    background: var(--electric);
    color: white;
    padding: 2px 6px;
    border-radius: 9999px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
  }
  .version-meta {
    font-size: 10px;
    color: var(--muted);
    font-family: var(--font-mono);
  }

  /* Side-by-side compare */
  .compare-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: var(--fog);
    padding: 10px;
    border-radius: var(--r-md);
  }
  .compare-panel {
    background: white;
    border-radius: var(--r-md);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    flex-direction: column;
    gap: 8px;
    position: relative;
  }
  .compare-panel .compare-label {
    position: absolute;
    top: 8px;
    left: 8px;
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--ink);
    background: white;
    padding: 3px 8px;
    border-radius: 9999px;
    letter-spacing: 1px;
    font-weight: 700;
    border: 1px solid var(--fog);
  }

  /* Annotations overlay */
  .annotation-canvas {
    position: relative;
    background: var(--fog);
    border-radius: var(--r-md);
    aspect-ratio: 16 / 9;
    overflow: hidden;
  }
  .annotation-dot {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--electric);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--font-mono);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 40, 255, 0.4);
  }
  .annotation-list {
    margin-top: 12px;
  }
  .annotation-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--fog);
  }
  .annotation-item:last-child { border-bottom: 0; }
  .annotation-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--electric);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    flex-shrink: 0;
  }
  .annotation-text { font-size: 13px; color: var(--ink); }

  /* Color picker */
  .pantone-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
  }
  .pantone-chip {
    aspect-ratio: 1;
    border-radius: var(--r-md);
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transition: transform 0.1s;
  }
  .pantone-chip:hover { transform: scale(1.08); border-color: var(--ink); }
  .pantone-chip.selected { border-color: var(--ink); }
  .pantone-chip::after {
    content: attr(data-name);
    position: absolute;
    bottom: -18px;
    left: 0;
    right: 0;
    font-family: var(--font-mono);
    font-size: 8px;
    color: var(--muted);
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.5px;
  }

  /* Quick templates */
  .template-list { display: flex; flex-direction: column; gap: 6px; }
  .template-item {
    background: var(--bg-soft);
    border: 1px solid var(--fog);
    border-radius: var(--r-md);
    padding: 10px 12px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font-family: inherit;
  }
  .template-item:hover { background: white; border-color: var(--ink); }
  .template-item .preview {
    font-size: 12px;
    color: var(--ink);
    margin: 0;
    line-height: 1.5;
  }

  /* Auto-naming preview */
  .auto-name {
    background: var(--ink);
    color: white;
    padding: 14px 16px;
    border-radius: var(--r-md);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.5px;
    word-break: break-all;
  }

  /* Request Detail tabs (Portal Desk) */
  .detail-tabs-row {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--fog);
    padding-bottom: 0;
  }
  .detail-tab {
    background: transparent;
    border: 0;
    padding: 10px 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.5px;
    cursor: pointer;
    font-family: inherit;
  }
  .detail-tab.active {
    color: var(--electric);
    border-bottom-color: var(--electric);
  }
  .detail-tab .badge {
    background: var(--electric);
    color: white;
    padding: 1px 7px;
    border-radius: 9999px;
    font-size: 9px;
    margin-left: 6px;
    font-family: var(--font-mono);
  }
  .detail-tab.active .badge { background: var(--electric); }

  /* Quick private notes */
  .private-notes {
    background: #FFFBEB;
    border: 1px solid #FBBF24;
    border-radius: var(--r-lg);
    padding: 16px;
  }
  .private-notes-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: #B45309;
    letter-spacing: 1.5px;
    margin: 0 0 8px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .private-notes-label::before {
    content: "🔒";
    font-size: 11px;
  }
  .private-notes-textarea {
    background: white;
    border: 1px solid #FBBF24;
    border-radius: var(--r-md);
    width: 100%;
    padding: 10px;
    font-family: inherit;
    font-size: 13px;
    color: var(--ink);
    resize: vertical;
    min-height: 80px;
  }
  .private-notes-textarea:focus { outline: none; border-color: #B45309; }

  /* ===== STAGE STEPPER (en header del detail) ===== */
  .stage-stepper {
    background: white;
    border: 1px solid var(--fog);
    border-radius: var(--r-xl);
    padding: 20px 24px;
    margin-bottom: 20px;
  }
  .stage-stepper-track {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
  }
  .stage-node {
    background: transparent;
    border: 0;
    padding: 0 4px;
    cursor: default;
    flex: 0 0 auto;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-family: inherit;
    transition: opacity 0.15s;
  }
  /* Portal Desk: stage nodes clickeables */
  body.role-portal .stage-node { cursor: pointer; }
  body.role-portal .stage-node:hover { opacity: 0.7; }
  .stage-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--divider);
    background: white;
    margin-bottom: 8px;
    position: relative;
    flex-shrink: 0;
  }
  .stage-node.done .stage-circle {
    background: var(--electric);
    border-color: var(--electric);
  }
  .stage-node.done .stage-circle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: translate(-50%, -65%) rotate(-45deg);
  }
  .stage-node.current .stage-circle {
    border-color: var(--electric);
    background: white;
  }
  .stage-node.current .stage-circle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--electric);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s ease-in-out infinite;
  }
  .stage-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: -0.01em;
    display: block;
    margin-bottom: 2px;
    white-space: nowrap;
  }
  .stage-node.done .stage-label { color: var(--ink); }
  .stage-node.current .stage-label { color: var(--ink); font-weight: 800; }
  .stage-meta {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 0.5px;
  }
  .stage-node.current .stage-meta { color: var(--electric); font-weight: 700; }
  .stage-line {
    flex: 1;
    height: 2px;
    background: var(--fog);
    margin-top: 12px;
    min-width: 20px;
  }
  .stage-line.done { background: var(--electric); }
  .stage-hint {
    font-size: 11px;
    color: var(--muted);
    margin: 14px 0 0;
    text-align: center;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
  }
  @media (max-width: 768px) {
    .stage-stepper { padding: 14px; }
    .stage-stepper-track { gap: 4px; }
    .stage-node { min-width: 80px; }
    .stage-label { font-size: 10px; }
    .stage-meta { font-size: 8px; }
  }

  /* Sessions breakdown */
  .session-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--fog);
    gap: 12px;
  }
  .session-row:last-child { border-bottom: 0; }
  .session-date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.5px;
  }
  .session-stage {
    font-size: 12px;
    color: var(--ink);
    font-weight: 600;
  }
  .session-duration {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
  }
  .session-row.active {
    background: var(--electric-soft);
    border-radius: var(--r-md);
    padding: 10px 12px;
    border-bottom: 0;
  }
  .session-row.active .session-stage,
  .session-row.active .session-duration { color: var(--electric); }

  /* Hide client-only buttons when role is not client */
  body.role-portal .client-only,
  body.role-ops .client-only,
  body.role-assigned .client-only { display: none !important; }

  /* ===== TIMER VISIBILITY POLICY ===== */
  /* El Portal Desk NO ve elementos de medición de tiempo (privacidad anti-vigilancia).
     El timer sigue corriendo invisible para captura de datos (Operations los ve aparte).
     SLA countdown SÍ se muestra al Portal Desk (es plazo del cliente, no medición personal). */
  body.role-portal .timer-hidden-from-portal { display: none !important; }
  /* Hint informativo cuando un elemento fue ocultado por privacidad */
  body.role-portal .timer-privacy-note { display: block !important; }
  .timer-privacy-note { display: none; }

  /* ===== ANNOTATION MODE ===== */
  .annotation-canvas.add-mode {
    cursor: crosshair;
  }
  .annotation-canvas.add-mode::after {
    content: "CLICK TO PLACE";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--electric);
    color: white;
    padding: 6px 14px;
    border-radius: 9999px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    pointer-events: none;
    animation: pulse 2s ease-in-out infinite;
  }
  .annotation-item {
    position: relative;
    cursor: pointer;
  }
  .annotation-item.highlight {
    background: var(--electric-soft);
    border-radius: var(--r-md);
    padding: 8px 12px !important;
    margin: 0 -12px;
  }
  .anno-remove {
    background: transparent;
    border: 0;
    color: var(--muted);
    font-size: 18px;
    padding: 0 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    margin-left: auto;
    line-height: 1;
  }
  .annotation-item:hover .anno-remove { opacity: 1; }
  .anno-remove:hover { color: #DC2626; }
  .annotation-dot.highlight {
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(0, 40, 255, 0.3), 0 8px 24px rgba(0, 40, 255, 0.6);
    z-index: 5;
  }
  .annotation-dot {
    transition: transform 0.15s, box-shadow 0.15s;
  }

  /* Toggle button "active" state for add-mode */
  .pill.pill-ghost.is-active {
    background: var(--electric);
    color: white;
  }

  /* Version "switching" animation */
  .version-card.switching {
    animation: version-switch 0.3s ease;
  }
  @keyframes version-switch {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
  }

  /* Chat message just sent */
  .chat-msg.just-sent {
    animation: chat-msg-in 0.3s ease;
  }
  @keyframes chat-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Audit log new entry */
  .audit-row.new-entry {
    background: var(--electric-soft);
    animation: audit-highlight 1.5s ease;
  }
  @keyframes audit-highlight {
    0% { background: var(--electric-soft); }
    100% { background: transparent; }
  }

  /* Private notes save indicator */
  .private-notes-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: #16A34A;
    letter-spacing: 0.5px;
    margin-left: 8px;
  }
  .private-notes-status.saving { color: var(--muted); }
  .private-notes-status.saving::before {
    content: "⋯";
    animation: pulse 1s ease-in-out infinite;
  }
  .private-notes-status.saved::before { content: "✓"; font-weight: 900; }

  /* Pantone selected counter */
  .pantone-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  /* ===== EXIT TO MARKETING SITE (floating pill, bottom-LEFT to avoid colliding with role switcher) ===== */
  #exitToMarketing {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: var(--paper);
    color: var(--ink);
    border: 1.5px solid var(--ink);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(8,17,22,.18);
    transition: transform .15s ease, box-shadow .15s ease;
  }
  #exitToMarketing:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(8,17,22,.28); }
  #exitToMarketing .arr-back { color: var(--electric); font-weight: 900; }
  @media (max-width: 520px) {
    #exitToMarketing { padding: 10px 14px; font-size: 11px; bottom: 14px; left: 14px; }
    #exitToMarketing .et-text { display: none; }
  }

/* ===== Lucide icon glyph map (was a second inline <style>) ===== */
  /* Lucide font glyph mapping using lucide-static font */
  /* The CDN provides classes like .icon-arrow-right. We use those directly via the markup */
  /* For our aliased names, we map them below */
  .icon { font-family: 'lucide'; font-style: normal; font-weight: normal; display: inline-block; line-height: 1; }
  .icon-search::before { content: "\ea1c"; }
  .icon-bell::before { content: "\ea64"; }
  .icon-palette::before { content: "\eb01"; }
  .icon-scissors::before { content: "\eb14"; }
  .icon-layers::before { content: "\ea93"; }
  .icon-needle::before { content: "\f1f8"; }
  .icon-download::before { content: "\ea7e"; }
  .icon-upload::before { content: "\eb50"; }
  .icon-image::before { content: "\ea8b"; }
  .icon-file::before { content: "\ea85"; }
  .icon-x::before { content: "\eb5b"; }
  .icon-message::before { content: "\eaa6"; }
  .icon-sparkles::before { content: "\eb21"; }
  .icon-chevron-right::before { content: "\ea6e"; }
