    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    :root {
      --brand: #2980b9;
      --brand-dark: #1f6391;
      --dark: #1a1a2e;
      --grey-light: #f4f5f7;
      --grey: #e2e4e9;
      --grey-mid: #9ba3b2;
      --text: #1a1a2e;
      --text-sub: #555;
      --radius: 10px;
      --shadow: 0 2px 12px rgba(0,0,0,0.08);
    }
    body {
      font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
      background: var(--grey-light);
      color: var(--text);
      min-height: 100vh;
    }

    /* ── App header ───────────────────────────────────── */
    .dev-env .app-header { background: #fffe00 !important; }
    .app-header {
      background: white;
      color: var(--dark);
      padding: 0 40px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 64px;
      position: sticky;
      top: 0;
      z-index: 100;
      box-shadow: 0 2px 12px rgba(0,0,0,0.10);
      border-bottom: 1px solid var(--grey);
    }
    .logo {
      display: flex;
      align-items: center;
      gap: 12px;
      font-weight: 700;
      font-size: 20px;
      letter-spacing: 0.04em;
      color: var(--dark);
      min-width: 0;
      flex: 1;
    }
    .logo > div { min-width: 0; overflow: hidden; }
    .logo svg { display: block; }
    .header-actions { display: flex; gap: 10px; flex-shrink: 0; }

    /* ── Buttons ─────────────────────────────────────── */
    .btn {
      display: inline-flex; align-items: center; gap: 7px;
      padding: 9px 18px; border-radius: 7px;
      font-size: 14px; font-weight: 600;
      cursor: pointer; border: none; transition: all 0.15s;
    }
    .btn-primary { background: var(--brand); color: white; }
    .btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
    .btn-ghost { background: var(--grey-light); color: var(--dark); border: 1px solid var(--grey); }
    .btn-ghost:hover { background: var(--grey); }
    .btn-muted { background: transparent; color: var(--dark); border: 1px solid transparent; }
    .btn-muted:hover { background: var(--grey-light); }
    .btn-outline { background: white; color: var(--dark); border: 1.5px solid var(--grey); }
    .btn-outline:hover { border-color: var(--brand); color: var(--brand); }
    .btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 6px; }
    .btn-danger-ghost {
      background: none; border: none; color: #bbb;
      cursor: pointer; padding: 4px 6px; border-radius: 4px;
      font-size: 16px; line-height: 1; transition: color 0.15s, background 0.15s;
    }
    .btn-danger-ghost:hover { color: #e84040; background: #fff0f0; }

    /* ── Main layout ─────────────────────────────────── */
    .main { max-width: 1100px; margin: 0 auto; padding: 36px 24px 80px; }

    /* ── Card / form ─────────────────────────────────── */
    .card {
      background: white; border-radius: var(--radius);
      box-shadow: var(--shadow); padding: 28px 32px; margin-bottom: 24px;
    }
    .card-title {
      font-size: 13px; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.08em; color: var(--grey-mid); margin-bottom: 18px;
      display: flex; align-items: center; gap: 10px;
    }
    .copy-link-btn {
      font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0;
      color: var(--text-sub); background: var(--grey-light); border: 1.5px solid var(--grey);
      border-radius: 5px; padding: 3px 9px; cursor: pointer; transition: background 0.15s, color 0.15s;
      margin-left: auto;
    }
    .copy-link-btn:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
    .copy-link-btn.copied { background: #27ae60; color: #fff; border-color: #27ae60; }
    .form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
    .form-group { display: flex; flex-direction: column; gap: 6px; }
    .form-group.span-2 { grid-column: span 2; }
    label { font-size: 12px; font-weight: 600; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.06em; }
    input[type="text"], input[type="number"], input[type="date"], textarea, select {
      border: 1.5px solid var(--grey); border-radius: 7px; padding: 9px 13px;
      font-size: 14px; color: var(--text); background: white;
      transition: border-color 0.15s; font-family: inherit; width: 100%;
    }
    input:focus, textarea:focus, select:focus {
      outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(232,64,26,0.1);
    }
    textarea { resize: vertical; min-height: 70px; }

    /* ── WYSIWYG editor ──────────────────────────────── */
    .wysiwyg-wrap { border: 1.5px solid var(--grey); border-radius: 7px; overflow: hidden; }
    .wysiwyg-wrap:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(41,128,185,0.12); }
    .wysiwyg-toolbar {
      display: flex; gap: 3px; align-items: center;
      padding: 5px 8px; background: var(--grey-light);
      border-bottom: 1.5px solid var(--grey);
    }
    .wysiwyg-toolbar button {
      background: white; border: 1px solid var(--grey); border-radius: 4px;
      padding: 2px 8px; font-size: 13px; cursor: pointer; color: var(--text);
      font-family: inherit; line-height: 1.5; transition: background 0.12s, color 0.12s;
    }
    .wysiwyg-toolbar button:hover { background: var(--brand); color: white; border-color: var(--brand); }
    .wysiwyg-toolbar .tb-sep { width: 1px; height: 18px; background: var(--grey); margin: 0 3px; }
    .wysiwyg-body {
      min-height: 110px; padding: 11px 13px;
      font-size: 14px; color: var(--text); line-height: 1.65;
      outline: none; background: white;
    }
    .wysiwyg-body ul, .wysiwyg-body ol { margin: 4px 0; padding-left: 1.5em; }
    .wysiwyg-body li { margin-bottom: 2px; }
    .wysiwyg-body p { margin: 0 0 4px; }
    .wysiwyg-body:empty::before { content: attr(data-placeholder); color: #aaa; pointer-events: none; }

    /* ── Contingency bar ─────────────────────────────── */
    .contingency-bar {
      background: white; border-radius: var(--radius);
      border: 1.5px solid var(--grey);
      padding: 8px 20px; display: flex; align-items: center;
      justify-content: flex-end; gap: 16px; margin-bottom: 10px;
    }
    .contingency-bar-label {
      font-size: 13px; font-weight: 600; color: var(--text-sub);
      text-transform: uppercase; letter-spacing: 0.07em;
    }
    .contingency-bar-label strong { color: var(--dark); margin-left: 4px; }
    .cb-input-wrap {
      display: flex; align-items: center; gap: 0;
      background: var(--grey-light); border-radius: 7px;
      overflow: hidden; border: 1.5px solid var(--grey);
    }
    .cb-input-wrap input {
      background: transparent; border: none; color: var(--dark);
      font-weight: 700; font-size: 16px; width: 60px;
      padding: 8px 12px; text-align: center;
    }
    .cb-input-wrap input:focus { outline: none; box-shadow: none; }
    .cb-suffix { padding: 8px 12px; color: var(--text-sub); font-size: 14px; font-weight: 600; }

    /* ── Section cards ───────────────────────────────── */
    .section-card {
      background: white; border-radius: var(--radius);
      box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden;
    }
    .section-header {
      display: flex; align-items: center;
      padding: 14px 20px; gap: 12px;
      border-bottom: 1px solid var(--grey);
      cursor: pointer; user-select: none;
    }
    .section-icon {
      width: 34px; height: 34px; border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      font-size: 17px; flex-shrink: 0;
    }
    /* Icon colors per section */
    .sec-discovery      .section-icon { background: #eef2ff; }
    .sec-design         .section-icon { background: #fff0eb; }
    .sec-dev            .section-icon { background: #e8f5e9; }
    .sec-erp            .section-icon { background: #fff8e8; }
    .sec-qa             .section-icon { background: #e8f4fd; }
    .sec-pm             .section-icon { background: #f3e8fd; }
    .sec-content-writing   .section-icon { background: #fffce8; }
    .sec-content-migration .section-icon { background: #fff0eb; }
    .sec-seo               .section-icon { background: #e8f4fd; }
    .sec-tags-tracking     .section-icon { background: #f3e8fd; }
    .sec-training          .section-icon { background: #e8fdf4; }
    .sec-ongoing-support   .section-icon { background: #fde8e8; }
    .sec-shopify-costs     .section-icon { background: #e8fdf4; }
    .sec-partner-costs     .section-icon { background: #f0f0f8; }

    /* ── Login overlay ───────────────────────────────── */
    #login-overlay {
      position: fixed; inset: 0; z-index: 9999;
      background: #f0f4f8;
      display: flex; align-items: center; justify-content: center;
      flex-direction: column; gap: 24px;
    }
    #login-overlay .login-box {
      background: white; border-radius: 14px;
      padding: 48px 56px; text-align: center;
      box-shadow: 0 4px 24px rgba(0,0,0,0.10);
      border: 1px solid var(--grey);
      max-width: 400px; width: 90%;
    }
    #login-overlay .login-logo {
      display: flex; align-items: center; justify-content: center;
      margin: 0 auto 20px;
    }
    #login-overlay h2 {
      font-size: 20px; font-weight: 800; color: var(--dark);
      margin-bottom: 6px;
    }
    #login-overlay p {
      font-size: 14px; color: var(--text-sub); margin-bottom: 28px;
    }
    #login-overlay #g_id_signin {
      text-align: center; width: 100%;
    }
    /* ── User avatar in header ───────────────────────── */
    .user-pill {
      display: flex; align-items: center; gap: 8px;
      background: var(--grey-light); border-radius: 30px;
      padding: 4px 12px 4px 4px; cursor: default;
      border: 1px solid var(--grey);
    }
    .user-pill img {
      width: 28px; height: 28px; border-radius: 50%;
      border: 2px solid var(--grey);
    }
    .user-pill span {
      font-size: 13px; font-weight: 600; color: var(--dark);
    }
    /* ── User dropdown ───────────────────────────────── */
    .user-pill { position: relative; cursor: pointer; margin-left: auto; }
    .user-dropdown {
      display: none; position: absolute; top: calc(100% + 10px); right: 0;
      background: white; border: 1.5px solid var(--grey);
      border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
      min-width: 200px; overflow: hidden; z-index: 200;
    }
    .user-dropdown.open { display: block; }
    .user-dropdown-info {
      padding: 12px 16px; border-bottom: 1px solid var(--grey);
      font-size: 12px; color: var(--text-sub);
    }
    .user-dropdown-item {
      display: block; width: 100%; text-align: left;
      padding: 11px 16px; background: none; border: none;
      font-size: 14px; font-weight: 600; color: var(--dark);
      cursor: pointer; transition: background 0.12s;
    }
    .user-dropdown-item:hover { background: var(--grey-light); color: #e84040; }

    /* ── Drag & drop ─────────────────────────────────── */
    .drag-handle {
      cursor: grab; color: var(--grey-mid); font-size: 18px;
      padding: 0 2px 0 0; user-select: none; flex-shrink: 0;
      line-height: 1; letter-spacing: -1px;
    }
    .drag-handle:active { cursor: grabbing; }
    .section-card.dragging { opacity: 0.35; box-shadow: none; }
    .section-card.drag-over-top    { border-top: 3px solid var(--brand); }
    .section-card.drag-over-bottom { border-bottom: 3px solid var(--brand); }
    /* Row handles */
    .row-handle-cell { width: 24px; padding: 0 4px !important; }
    .row-drag-handle {
      cursor: grab; color: #ccc; font-size: 14px;
      user-select: none; display: block; text-align: center;
      line-height: 1; letter-spacing: -1px;
    }
    .row-drag-handle:hover { color: var(--grey-mid); }
    .row-drag-handle:active { cursor: grabbing; }
    tr.dragging { opacity: 0.4; }
    tr.drag-over-top    { border-top: 2px solid var(--brand); }
    tr.drag-over-bottom { border-bottom: 2px solid var(--brand); }

    /* ── Remove section button ───────────────────────── */
    .btn-remove-section {
      background: none; border: 1.5px solid var(--grey);
      color: var(--grey-mid); cursor: pointer;
      width: 24px; height: 24px; border-radius: 50%;
      font-size: 16px; font-weight: 400;
      display: flex; align-items: center; justify-content: center;
      transition: all 0.15s; flex-shrink: 0; line-height: 1;
      padding: 0;
    }
    .btn-remove-section:hover { background: #fff0f0; border-color: #e84040; color: #e84040; }

    /* ── Hidden sections tray ────────────────────────── */
    .hidden-tray {
      display: none; align-items: center; gap: 10px; flex-wrap: wrap;
      padding: 13px 20px; background: white;
      border-radius: var(--radius); box-shadow: var(--shadow);
      margin-bottom: 20px; border: 1.5px dashed var(--grey);
    }
    .tray-label {
      font-size: 11px; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.07em; color: var(--grey-mid); white-space: nowrap;
    }
    .tray-chip {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 5px 12px; background: var(--grey-light);
      border: 1.5px solid var(--grey); border-radius: 20px;
      font-size: 13px; font-weight: 600; color: var(--text-sub);
      cursor: pointer; transition: all 0.15s;
    }
    .tray-chip:hover { border-color: var(--brand); color: var(--brand); background: #fff8f6; }
    .tray-add { font-size: 12px; font-weight: 700; color: var(--brand); }

    /* ── Estimate team bar ────────────────────────────── */
    #team-bar-wrap {
      display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
      padding: 11px 32px 13px;
      margin: 20px -32px -28px;
      border-top: 1px solid #c8dff2;
      background: #eef5ff;
      border-radius: 0 0 var(--radius) var(--radius);
    }
    .team-bar-label {
      font-size: 11px; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.07em; color: var(--grey-mid); flex-shrink: 0;
      margin-right: 2px; white-space: nowrap;
    }
    .est-team-bar {
      display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1;
    }
    .est-team-chip {
      display: inline-flex; align-items: center; gap: 7px;
      padding: 4px 12px 4px 5px; background: white;
      border: 1.5px solid #b8d4ef; border-radius: 24px;
      font-size: 13px; font-weight: 600; color: var(--dark);
      transition: border-color 0.15s;
    }
    .est-team-chip:hover { border-color: var(--brand); }
    .est-team-av {
      width: 30px; height: 30px; border-radius: 50%;
      font-size: 11px; font-weight: 700; flex-shrink: 0;
      display: inline-flex; align-items: center; justify-content: center;
      overflow: hidden; color: white;
    }
    .est-team-av img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; display: block; }
    .est-team-chip-name {
      max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .est-team-chip-info {
      display: flex; flex-direction: column; line-height: 1.15;
    }
    .est-team-chip-online {
      font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
      text-transform: uppercase; color: #16a34a;
      display: flex; align-items: center; gap: 3px;
    }
    .est-team-chip-online::before {
      content: '';
      display: inline-block; width: 6px; height: 6px;
      border-radius: 50%; background: #22c55e;
      flex-shrink: 0;
    }
    .est-team-chip-remove {
      background: none; border: none; cursor: pointer;
      padding: 0; margin-left: 2px; color: #bbb;
      font-size: 17px; line-height: 1; transition: color 0.12s;
    }
    .est-team-chip-remove:hover { color: #e84040; }
    /* Online / active-in-estimate indicator */
    .est-team-chip--active {
      border-color: #6ee7b7;
    }
    .est-team-add-wrap { position: relative; }
    .est-team-add-btn {
      display: inline-flex; align-items: center; gap: 4px;
      padding: 4px 14px; height: 40px; background: white;
      border: 1.5px dashed #a8c8e8; border-radius: 24px;
      font-size: 13px; font-weight: 600; color: var(--brand);
      cursor: pointer; transition: all 0.15s;
    }
    .est-team-add-btn:hover { border-color: var(--brand); background: white; box-shadow: 0 0 0 3px rgba(41,128,185,0.10); }
    .est-team-form {
      display: flex; align-items: center; gap: 5px; flex-wrap: nowrap;
    }
    .est-team-field {
      border: 1.5px solid var(--grey); border-radius: 6px;
      padding: 4px 10px; font-size: 12px; font-family: inherit;
      color: var(--text); outline: none; background: white;
      transition: border-color 0.15s; height: 28px;
    }
    .est-team-field:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(41,128,185,0.10); }
    #etf-email { width: 200px; }
    .est-team-submit {
      padding: 4px 12px; background: var(--brand); color: white;
      border: none; border-radius: 6px; font-size: 12px; font-weight: 600;
      cursor: pointer; white-space: nowrap; height: 28px; transition: background 0.15s;
    }
    .est-team-submit:hover { background: #1f6da8; }
    .est-team-cancel {
      background: none; border: 1.5px solid var(--grey); border-radius: 6px;
      cursor: pointer; font-size: 14px; line-height: 1; padding: 0 6px;
      color: var(--grey-mid); height: 28px; transition: all 0.15s;
    }
    .est-team-cancel:hover { border-color: #e84040; color: #e84040; background: #fff0f0; }
    /* ── Team member autocomplete dropdown ───────── */
    .team-ac-dropdown {
      display: none; position: absolute; top: calc(100% + 4px); left: 0;
      background: white; border: 1.5px solid var(--grey); border-radius: 8px;
      box-shadow: 0 6px 20px rgba(0,0,0,0.14); z-index: 9999;
      min-width: 260px; max-height: 220px; overflow-y: auto;
    }
    .team-ac-dropdown.open { display: block; }
    .team-ac-opt {
      display: flex; align-items: center; gap: 9px;
      padding: 7px 12px; cursor: pointer; transition: background 0.12s;
    }
    .team-ac-opt:hover, .team-ac-opt.active { background: var(--grey-light); }
    .team-ac-name { font-size: 13px; font-weight: 600; color: var(--dark); }
    .team-ac-email { font-size: 11px; color: var(--grey-mid); }
    body.dark .team-ac-dropdown { background: #1e2235; border-color: #2e3347; }
    body.dark .team-ac-opt:hover, body.dark .team-ac-opt.active { background: #2b3255; }
    body.dark .team-ac-name { color: #e8eaf0; }

    /* ── New Group button ─────────────────────────── */
    #new-group-btn {
      display: flex; align-items: center; justify-content: center; gap: 8px;
      width: 100%; padding: 11px 18px; margin-bottom: 20px;
      background: white; border: 1.5px dashed var(--grey); border-radius: var(--radius);
      font-size: 13px; font-weight: 600; color: var(--grey-mid);
      cursor: pointer; transition: all 0.15s;
    }
    #new-group-btn:hover { border-color: var(--brand); color: var(--brand); background: #f0f7ff; }

    /* ── New Group modal ──────────────────────────── */
    #ng-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.45); z-index: 1000;
      align-items: center; justify-content: center;
    }
    #ng-overlay.show { display: flex; }
    #ng-modal {
      background: white; border-radius: 14px; width: 440px; max-width: 95vw;
      box-shadow: 0 24px 60px rgba(0,0,0,0.3); padding: 24px;
    }
    #ng-modal h3 { font-size: 17px; font-weight: 700; color: var(--dark); margin-bottom: 20px; }
    .ng-field { margin-bottom: 16px; }
    .ng-label { font-size: 12px; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.06em; color: var(--grey-mid); margin-bottom: 6px; display: block; }
    .ng-input { width: 100%; padding: 9px 12px; border: 1.5px solid var(--grey);
      border-radius: 8px; font-size: 14px; outline: none; font-family: inherit; }
    .ng-input:focus { border-color: var(--brand); }
    .ng-icon-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
    .ng-icon-btn {
      width: 38px; height: 38px; border: 1.5px solid var(--grey);
      border-radius: 8px; background: var(--grey-light); font-size: 18px;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      transition: all 0.13s;
    }
    .ng-icon-btn:hover, .ng-icon-btn.selected { border-color: var(--brand); background: #eef6ff; }
    .ng-type-row { display: flex; gap: 10px; }
    .ng-type-btn {
      flex: 1; padding: 10px 12px; border: 1.5px solid var(--grey);
      border-radius: 8px; background: white; cursor: pointer;
      font-size: 13px; font-weight: 600; color: var(--text-sub);
      text-align: center; transition: all 0.13s; font-family: inherit;
    }
    .ng-type-btn:hover, .ng-type-btn.selected { border-color: var(--brand); background: #eef6ff; color: var(--brand); }
    .ng-type-desc { font-size: 11px; font-weight: 400; margin-top: 3px; color: var(--grey-mid); }
    .ng-footer { margin-top: 20px; display: flex; gap: 10px; justify-content: flex-end; }

    .section-title { font-size: 15px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* Inline rate input */
    .rate-inline {
      display: flex; align-items: center; gap: 0;
      border: 1.5px solid var(--grey); border-radius: 6px;
      overflow: hidden; flex-shrink: 0;
    }
    .rate-inline-sym {
      padding: 5px 8px; font-size: 12px; font-weight: 600;
      color: var(--grey-mid); background: var(--grey-light);
      border-right: 1px solid var(--grey);
    }
    .rate-inline input {
      border: none !important; box-shadow: none !important;
      width: 58px; padding: 5px 6px !important;
      font-size: 13px !important; font-weight: 700;
      color: var(--text); background: white;
      text-align: right;
    }
    .rate-inline input:focus { background: #f0f4ff !important; }
    .rate-inline-sfx {
      padding: 5px 8px; font-size: 11px; color: var(--grey-mid);
      background: var(--grey-light); border-left: 1px solid var(--grey);
      white-space: nowrap;
    }

    .section-meta {
      font-size: 13px; color: var(--grey-mid);
      display: flex; gap: 14px; align-items: center; flex-shrink: 0;
    }
    .section-hrs { font-weight: 700; color: var(--text); font-size: 13px; }
    .section-cost { font-weight: 700; color: var(--brand); font-size: 14px; }
    .chevron { color: var(--grey-mid); font-size: 18px; transition: transform 0.2s; flex-shrink: 0; }
    .section-card.collapsed .chevron { transform: rotate(-90deg); }
    .section-body { overflow: hidden; transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1); }
    .section-card.collapsed .section-body { max-height: 0 !important; }

    /* ── Task table ──────────────────────────────────── */
    .task-table { width: 100%; border-collapse: collapse; }
    .task-table th {
      background: var(--grey-light); font-size: 11px; font-weight: 700;
      text-transform: uppercase; letter-spacing: 0.07em;
      color: var(--grey-mid); padding: 9px 14px;
      text-align: left; border-bottom: 1px solid var(--grey);
    }
    .task-table td { padding: 7px 14px; border-bottom: 1px solid var(--grey-light); vertical-align: middle; }
    .task-table tr:last-child td { border-bottom: none; }
    .task-table tr:hover td { background: var(--grey-light); }
    .task-table td input {
      border: none; background: transparent; padding: 4px 6px;
      font-size: 14px; color: var(--text); width: 100%;
    }
    .task-table td input:focus { outline: none; background: #f8f9ff; border-radius: 4px; padding: 4px 6px; }
    .task-table td.num-cell { width: 90px; }
    .task-table td.num-cell input { text-align: right; font-weight: 600; }
    .task-table td.num2-cell { width: 80px; }
    .task-table td.num2-cell input { text-align: right; font-weight: 600; }
    .task-table td.cost-cell { width: 120px; font-weight: 600; color: var(--text-sub); font-size: 14px; text-align: right; }
    .task-table td.del-cell { width: 40px; text-align: center; }
    .task-table th.right { text-align: right; }
    .task-table th.center { text-align: center; }
    .task-table td.dept-cell { width: 44px; padding: 2px 6px; text-align: center; }

    /* Department picker */
    .dept-picker { position: relative; display: inline-block; }
    .dept-avatar {
      width: 28px; height: 28px; border-radius: 50%; position: relative;
      border: none; background: #d1d5db;
      cursor: pointer; display: flex; align-items: center; justify-content: center;
      transition: background 0.15s; padding: 0;
    }
    .dept-avatar:hover { background: #b0b7c3; }
    .dept-avatar.has-dept { background: transparent; }
    .dept-avatar-text { font-size: 9px; font-weight: 800; color: #fff; letter-spacing: 0.02em; }
    .dept-avatar-arrow { display: none; }
    #dept-floating-dropdown {
      display: none; position: fixed; z-index: 9999;
      background: #fff; border: 1px solid var(--grey); border-radius: 10px;
      box-shadow: 0 6px 20px rgba(0,0,0,0.13); min-width: 155px; padding: 4px;
    }
    #dept-floating-dropdown.open { display: block; }
    .dept-opt {
      display: flex; align-items: center; gap: 8px; padding: 6px 9px;
      border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 500;
      color: var(--text); position: relative;
    }
    .dept-opt:hover { background: var(--grey-light); }
    .dept-opt.selected { font-weight: 700; }
    .dept-swatch {
      width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
      display: flex; align-items: center; justify-content: center;
      font-size: 8px; font-weight: 800; color: #fff;
    }
    .dept-swatch-none { background: var(--grey-mid); color: var(--text-sub); font-size: 11px; font-weight: 400; }
    .dept-check { margin-left: auto; font-size: 11px; color: #6366f1; }

    .add-row-bar {
      padding: 11px 20px; border-top: 1px solid var(--grey);
      display: flex; justify-content: space-between; align-items: center;
      background: var(--grey-light);
    }
    .section-subtotal { font-size: 13px; color: var(--text-sub); }
    .section-subtotal strong { color: var(--text); font-weight: 700; }

    /* ── Summary ─────────────────────────────────────── */
    /* ── Department Breakdown Card ─────────────────── */
    .dept-breakdown-card {
      background: white; border-radius: var(--radius);
      border: 1.5px solid var(--grey);
      padding: 28px 32px; margin-bottom: 24px;
    }
    .dept-breakdown-title {
      font-size: 13px; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.08em; color: var(--grey-mid); margin-bottom: 16px;
    }
    .dbd-header {
      display: grid; grid-template-columns: 36px 1fr 110px 120px 130px;
      padding: 0 0 8px; border-bottom: 1px solid var(--grey);
      font-size: 11px; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.06em; color: var(--grey-mid);
    }
    .dbd-header span:nth-child(3) { text-align: right; }
    .dbd-header span:nth-child(4) { text-align: center; }
    .dbd-header span:nth-child(5) { text-align: right; }
    .dbd-row {
      display: grid; grid-template-columns: 36px 1fr 110px 120px 130px;
      align-items: center; padding: 10px 0;
      border-bottom: 1px solid var(--grey);
    }
    .dbd-row:last-child { border-bottom: none; }
    .dbd-avatar {
      width: 28px; height: 28px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 9px; font-weight: 800; color: #fff;
    }
    .dbd-label { font-size: 14px; font-weight: 600; color: var(--text); }
    .dbd-hrs {
      font-size: 13px; font-weight: 600; color: var(--text);
      text-align: right; padding-right: 20px;
    }
    .dbd-rate-wrap {
      display: flex; align-items: center; gap: 3px;
      background: var(--grey-light); border-radius: 8px; padding: 4px 8px;
      width: fit-content; margin: 0 auto;
    }
    .dbd-rate-sym { font-size: 13px; color: var(--text-sub); }
    .dbd-rate-input {
      width: 30px; min-width: 0; border: none; background: transparent; font-size: 14px;
      font-weight: 600; color: var(--text); outline: none; text-align: left;
      -moz-appearance: textfield; appearance: textfield;
    }
    .dbd-rate-input::-webkit-outer-spin-button,
    .dbd-rate-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
    .dbd-rate-sfx { font-size: 12px; color: var(--text-sub); }
    .dbd-cost { font-size: 15px; font-weight: 700; color: var(--brand); text-align: right; }
    .dbd-empty { font-size: 13px; color: var(--text-sub); padding: 12px 0; font-style: italic; }

    .summary-card {
      background: white; border-radius: var(--radius);
      border: 1.5px solid var(--grey);
      color: var(--dark); padding: 28px 32px; margin-bottom: 24px;
    }
    .summary-title {
      font-size: 13px; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.08em; color: var(--grey-mid); margin-bottom: 20px;
    }
    .summary-row {
      display: flex; align-items: center; padding: 11px 0;
      border-bottom: 1px solid var(--grey);
      cursor: pointer; transition: background 0.15s; border-radius: 4px;
    }
    .summary-row:hover { background: var(--grey-light); }
    .summary-row:last-child { border-bottom: none; }
    .sum-icon { font-size: 16px; width: 28px; flex-shrink: 0; }
    .sum-label { flex: 1; font-size: 14px; color: var(--text); }
    .sum-unit { width: 90px; text-align: right; font-size: 13px; color: var(--grey-mid); margin-right: 20px; }
    .sum-cost { width: 120px; text-align: right; font-size: 15px; font-weight: 700; color: var(--brand); }
    .summary-contingency-row {
      display: flex; align-items: center; padding: 9px 0;
      border-top: 1px solid var(--grey);
    }
    .contingency-label { flex: 1; font-size: 13px; color: var(--text-sub); font-style: italic; }
    .contingency-cost { width: 120px; text-align: right; font-size: 14px; color: var(--text-sub); }
    .summary-total-row {
      display: flex; align-items: center;
      padding: 18px 0 4px; margin-top: 6px;
      border-top: 2px solid var(--brand);
    }
    .sum-total-label { flex: 1; font-size: 16px; font-weight: 700; color: var(--dark); }
    .sum-total-unit { width: 90px; text-align: right; font-size: 13px; color: var(--grey-mid); margin-right: 20px; }
    .sum-total-cost { font-size: 28px; font-weight: 800; color: var(--brand); width: 160px; text-align: right; }

    /* ── Empty state ─────────────────────────────────── */
    .empty-row td { text-align: center; color: var(--grey-mid); font-size: 13px; padding: 18px; font-style: italic; }

    /* ── Divider rows ────────────────────────────────── */
    .divider-row td {
      background: var(--grey-light) !important;
      font-size: 11px; font-weight: 700; text-transform: uppercase;
      letter-spacing: 0.08em; color: var(--grey-mid);
      padding: 7px 14px !important; border-top: 1px solid var(--grey);
    }

    /* ── Autosave indicator ───────────────────────────── */
    #autosave-indicator { display: none; }

    /* ── Field hint ──────────────────────────────────────── */
    .field-hint {
      font-size: 11px; font-weight: 400; color: var(--grey-mid);
      margin-left: 6px; font-style: italic;
    }

    /* ── Notes tooltip ──────────────────────────────────── */
    .notes-tooltip {
      position: fixed;
      z-index: 9999;
      background: #1a1a2e;
      color: #fff;
      padding: 7px 11px;
      border-radius: 7px;
      font-size: 13px;
      line-height: 1.5;
      max-width: 340px;
      white-space: pre-wrap;
      word-break: break-word;
      pointer-events: none;
      box-shadow: 0 3px 12px rgba(0,0,0,0.28);
      display: none;
    }

    /* ── Print ───────────────────────────────────────── */
    @media print {
      body, body.dark {
        background: white !important; color: #1a1a2e !important;
        --dark: #1a1a2e; --grey-light: #f4f5f7; --grey: #e2e4e9;
        --grey-mid: #9ba3b2; --text: #1a1a2e; --text-sub: #555;
        --shadow: 0 2px 12px rgba(0,0,0,0.08);
        font-size: 11px;
      }
      body.dark .app-header, body.dark .card, body.dark .section-card,
      body.dark .summary-card, body.dark .contingency-bar,
      body.dark input, body.dark textarea, body.dark select,
      body.dark .wysiwyg-body, body.dark .section-header {
        background: white !important; color: #1a1a2e !important;
        border-color: #e2e4e9 !important;
      }
      .app-header, .no-print { display: none !important; }
      .main { max-width: 100%; padding: 0; margin: 0; }
      .card { padding: 16px 20px; margin-bottom: 10px; }
      .card, .section-card, .summary-card {
        box-shadow: none; border: 1px solid #e0e0e0;
        page-break-inside: avoid; margin-bottom: 10px;
      }
      .rate-inline, .add-row-bar { display: none !important; }
      .contingency-bar { background: white !important; padding: 8px 20px; margin-bottom: 10px; }
      .summary-card { background: white !important; border: 1.5px solid #e2e4e9 !important; margin-top: 24px; }
      .section-card.collapsed .section-body { max-height: none !important; }
      .section-header { padding: 10px 16px !important; }
      .section-body { max-height: none !important; overflow: visible !important; }
      .print-header { display: flex !important; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid #1a1a2e; }
      input, textarea { border: none !important; background: transparent !important; padding: 0 !important; }
      .wysiwyg-toolbar { display: none !important; }
      .wysiwyg-wrap { border: none !important; }
      .wysiwyg-body { padding: 0 !important; }
      .chevron, .row-handle-cell, .del-cell, .cmt-cell { display: none !important; }
      .task-table th { font-size: 9px; padding: 5px 8px !important; }
      .task-table td { padding: 5px 8px !important; font-size: 11px; }
      .task-table td input { font-size: 11px !important; }
      .section-icon { width: 26px !important; height: 26px !important; font-size: 13px !important; }
      h2, .section-title { font-size: 13px !important; }
      .sum-total-cost { font-size: 20px !important; }
      .summary-row { padding: 7px 0 !important; }
      .summary-contingency-row { border-top: none !important; }
    }
    .print-header { display: none; }

    /* ── Comment button ──────────────────────────────── */
    .cmt-cell { width: 36px; text-align: center; }
    .btn-comment {
      background: none; border: none; cursor: pointer;
      padding: 3px 5px; border-radius: 4px;
      font-size: 15px; line-height: 1; color: #ccc;
      transition: color 0.15s, background 0.15s;
      position: relative; display: inline-flex; align-items: center; justify-content: center;
    }
    .btn-comment:hover { color: var(--brand); background: #eef5ff; }
    .btn-comment.has-comments { color: var(--brand); }
    .comment-badge {
      position: absolute; top: -3px; right: -3px;
      background: var(--brand); color: white;
      border-radius: 9px; font-size: 9px; font-weight: 700;
      min-width: 14px; height: 14px;
      display: flex; align-items: center; justify-content: center;
      padding: 0 2px; pointer-events: none;
    }
    /* ── Comment modal (Google Docs–style) ───────────── */
    #comment-modal {
      position: fixed; z-index: 500;
      width: 320px; background: white; border-radius: 10px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.16), 0 2px 8px rgba(0,0,0,0.08);
      border: 1px solid #dde1e9;
      display: none; flex-direction: column;
      overflow: hidden; max-height: 480px;
    }
    #comment-modal.open { display: flex; }
    .cm-header {
      display: flex; align-items: center; gap: 8px;
      padding: 10px 14px 9px; border-bottom: 1px solid var(--grey);
      background: var(--grey-light);
    }
    .cm-task-name {
      flex: 1; font-size: 12px; font-weight: 600; color: var(--dark);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .cm-close {
      background: none; border: none; cursor: pointer;
      font-size: 20px; line-height: 1; color: var(--grey-mid);
      padding: 0; transition: color 0.15s; flex-shrink: 0;
    }
    .cm-close:hover { color: var(--dark); }
    .cm-thread {
      flex: 1; overflow-y: auto;
      padding: 12px 14px; display: flex;
      flex-direction: column; gap: 16px; min-height: 80px;
    }
    .cm-empty {
      text-align: center; color: var(--grey-mid);
      font-size: 13px; font-style: italic; padding: 18px 0;
    }
    .cm-comment { display: flex; flex-direction: row; gap: 9px; align-items: flex-start; }
    .cm-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
    .cm-meta-top { display: flex; align-items: center; gap: 6px; }
    .cm-avatar {
      width: 28px; height: 28px; border-radius: 50%;
      border: 1.5px solid var(--grey); object-fit: cover; flex-shrink: 0; margin-top: 2px;
    }
    .cm-avatar-init {
      width: 28px; height: 28px; border-radius: 50%;
      background: var(--brand); color: white;
      font-size: 11px; font-weight: 700;
      display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px;
    }
    .cm-author { font-size: 13px; font-weight: 700; color: var(--dark); }
    .cm-time { font-size: 11px; color: var(--grey-mid); margin-top: 1px; }
    .cm-del {
      background: none; border: none; cursor: pointer;
      color: #ccc; font-size: 13px; padding: 1px 4px;
      border-radius: 3px; transition: color 0.12s, background 0.12s; margin-left: auto;
    }
    .cm-del:hover { color: #e84040; background: #fff0f0; }
    .cm-text {
      font-size: 13px; color: var(--text); line-height: 1.55;
      margin-top: 4px; word-break: break-word; white-space: pre-wrap;
    }
    .cm-input-area {
      border-top: 1px solid var(--grey);
      padding: 10px 14px 12px;
      display: flex; flex-direction: column; gap: 8px;
      background: #fafbfc;
    }
    .cm-textarea {
      border: 1.5px solid var(--grey); border-radius: 8px;
      padding: 8px 10px; font-size: 13px; font-family: inherit;
      resize: none; min-height: 58px; line-height: 1.5;
      color: var(--text); transition: border-color 0.15s; width: 100%;
    }
    .cm-textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(41,128,185,0.10); }
    .cm-actions { display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
    .cm-hint { font-size: 11px; color: var(--grey-mid); flex: 1; }
    /* ── @mention shared avatar ──────────────────────── */
    .cm-av-sm {
      width: 22px; height: 22px; border-radius: 50%;
      background: var(--brand); color: white;
      font-size: 10px; font-weight: 700; flex-shrink: 0;
      display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
    }
    .cm-av-sm img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; display: block; }
    /* ── Resolve row ────────────────────────────────────── */
    .cm-resolve-row {
      display: flex; align-items: center; justify-content: flex-end;
      padding: 5px 14px 7px; background: white; flex-shrink: 0;
      border-bottom: 1px solid var(--grey);
    }
    .cm-resolve-btn {
      background: none; border: 1.5px solid var(--grey); border-radius: 6px;
      padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer;
      color: var(--text-sub); white-space: nowrap; transition: all 0.15s;
      display: flex; align-items: center; gap: 4px;
    }
    .cm-resolve-btn:hover { border-color: #27ae60; color: #27ae60; background: #edfaf4; }
    .cm-resolve-btn.resolved { border-color: #27ae60; color: #27ae60; background: #edfaf4; }
    .cm-resolved-banner {
      display: flex; align-items: center; gap: 6px;
      background: #edfaf4; border-bottom: 1px solid #b2dfc8;
      padding: 7px 14px; font-size: 12px; font-weight: 600; color: #1e7e48; flex-shrink: 0;
    }
    .cm-resolved-banner button {
      margin-left: auto; background: none; border: none; cursor: pointer;
      color: #1e7e48; font-size: 12px; font-weight: 600; text-decoration: underline;
    }
    .btn-comment.resolved { color: #27ae60; }
    .btn-comment.resolved:hover { background: #edfaf4; color: #27ae60; }
    .comment-badge.resolved-badge { background: #27ae60; font-size: 10px; }
    /* ── Unread indicator ────────────────────────────────── */
    .unread-dot {
      position: absolute; top: -2px; left: -2px;
      width: 8px; height: 8px; border-radius: 50%;
      background: #e84040; border: 1.5px solid white;
      pointer-events: none;
      animation: unread-pulse 1.8s ease-in-out infinite;
    }
    @keyframes unread-pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.65; transform: scale(1.3); }
    }
    /* ── @mention highlight ──────────────────────────────── */
    .cm-mention {
      background: #dbeafe; color: #1d4ed8;
      border-radius: 3px; padding: 0 3px; font-weight: 600;
    }
    .cm-mention.cm-mention-all { background: #fde8d0; color: #b45309; }
    /* ── @mention autocomplete dropdown ─────────────────── */
    .cm-mention-dropdown {
      position: absolute; bottom: calc(100% + 4px); left: 0; right: 0; z-index: 640;
      background: white; border: 1.5px solid var(--grey); border-radius: 8px;
      box-shadow: 0 -4px 18px rgba(0,0,0,0.13);
      display: none; overflow: hidden; max-height: 200px; overflow-y: auto;
    }
    .cm-mention-dropdown.open { display: block; }
    .cm-mention-option {
      display: flex; align-items: center; gap: 8px;
      padding: 7px 12px; cursor: pointer; font-size: 13px; color: var(--text);
      transition: background 0.1s;
    }
    .cm-mention-option:hover, .cm-mention-option.active { background: #eef5ff; }
    .cm-mention-option.mention-all { color: #b45309; font-weight: 600; }
    .cm-textarea-wrap { position: relative; }
    /* ── Email preview overlay ──────────────────────────── */
    #email-preview-overlay {
      position: fixed; inset: 0; z-index: 900;
      background: rgba(0,0,0,0.45);
      display: none; align-items: center; justify-content: center;
    }
    #email-preview-overlay.open { display: flex; }
    .ep-modal {
      background: white; border-radius: 12px;
      width: 660px; max-width: 96vw; max-height: 92vh;
      display: flex; flex-direction: column;
      box-shadow: 0 20px 60px rgba(0,0,0,0.28); overflow: hidden;
    }
    .ep-toolbar {
      display: flex; align-items: center; gap: 10px;
      padding: 12px 18px; border-bottom: 1px solid var(--grey); flex-shrink: 0;
    }
    .ep-title { font-weight: 700; font-size: 14px; flex: 1; }
    .ep-to { font-size: 12px; color: var(--grey-mid); }
    .ep-close {
      background: none; border: none; cursor: pointer; font-size: 22px;
      line-height: 1; color: var(--grey-mid); padding: 0; transition: color 0.15s;
    }
    .ep-close:hover { color: var(--dark); }
    .ep-body { flex: 1; overflow-y: auto; padding: 20px 24px; background: #f4f5f7; }
    .ep-footer {
      padding: 12px 18px; border-top: 1px solid var(--grey);
      display: flex; gap: 10px; justify-content: flex-end; flex-shrink: 0;
    }
    @media print { #comment-modal, #email-preview-overlay { display: none !important; } }

    /* ── Responsive ──────────────────────────────────── */
    @media (max-width: 700px) {
      .form-grid { grid-template-columns: 1fr; }
      .form-group.span-2 { grid-column: span 1; }
      .main { padding: 20px 12px 60px; }
      .section-header { flex-wrap: wrap; gap: 8px; }
    }

    /* ── Estimates modal ──────────────────────────────── */
    .est-modal-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.45);
      display: flex; align-items: flex-start; justify-content: center;
      z-index: 9000; padding-top: 90px;
    }
    .est-modal {
      background: white; border-radius: 14px; width: 860px; max-width: 96vw;
      max-height: 90vh; display: flex; flex-direction: column;
      box-shadow: 0 24px 60px rgba(0,0,0,0.3);
    }
    .est-modal-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 20px 24px 16px; border-bottom: 1px solid var(--grey);
    }
    .est-modal-header h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--dark); }
    .est-modal-close { background: none; border: none; font-size: 22px; cursor: pointer;
      color: var(--grey-mid); padding: 4px 8px; border-radius: 6px; line-height: 1; }
    .est-modal-close:hover { background: var(--grey-light); color: var(--dark); }
    .est-modal-actions { padding: 14px 24px; border-bottom: 1px solid var(--grey); display: flex; gap: 10px; }
    .est-list { overflow-y: auto; padding: 8px 0; flex: 1; }
    .est-filter-wrap {
      padding: 12px 16px 8px; border-bottom: 1px solid var(--grey);
    }
    .est-filter-input {
      width: 100%; box-sizing: border-box;
      padding: 8px 12px 8px 34px; border: 1.5px solid var(--grey);
      border-radius: 8px; font-size: 13px; font-family: inherit;
      background: var(--grey-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 11px center;
      color: var(--text); transition: border-color 0.15s;
    }
    .est-filter-input:focus { outline: none; border-color: var(--brand); background-color: white; }
    .est-filter-input::placeholder { color: var(--grey-mid); }
    .est-row {
      display: flex; align-items: center; gap: 8px;
      padding: 11px 24px; cursor: pointer; transition: background 0.13s;
    }
    .est-row:hover { background: var(--grey-light); }
    .est-row.active { background: #eef6ff; }
    .est-row-main { flex: 1; min-width: 0; }
    .est-row-name { font-weight: 600; font-size: 14px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .est-row.active .est-row-name::before { content: '● '; color: var(--brand); font-size: 9px; vertical-align: middle; }
    .est-row-meta { font-size: 12px; color: var(--grey-mid); margin-top: 2px; }
    .est-del-btn { background: none; border: 1px solid transparent; border-radius: 6px;
      cursor: pointer; padding: 5px 9px; font-size: 15px; opacity: 0.35;
      transition: opacity 0.13s, background 0.13s; flex-shrink: 0; }
    .est-row:hover .est-del-btn { opacity: 0.8; }
    .est-del-btn:hover { background: #fee2e2; border-color: #fca5a5; opacity: 1 !important; }
    .est-dl-btn { background: none; border: 1px solid transparent; border-radius: 6px;
      cursor: pointer; padding: 5px 9px; font-size: 15px; opacity: 0;
      transition: opacity 0.13s, background 0.13s; flex-shrink: 0; }
    .est-row:hover .est-dl-btn { opacity: 0.6; }
    .est-dl-btn:hover { background: #e8f4ff; border-color: #90caf9; opacity: 1 !important; }
    .est-loading, .est-empty { padding: 36px 24px; text-align: center; color: var(--grey-mid); font-size: 14px; }
    .current-estimate-label {
      font-size: 11px; color: var(--grey-mid); font-weight: 400;
      display: block; margin-top: 1px;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    /* ── Modal tabs ─────────────────────────────────── */
    .est-modal-tabs {
      display: flex; border-bottom: 1px solid var(--grey); overflow-x: auto; overflow-y: hidden;
    }
    .est-modal-tab {
      flex: 1; padding: 9px 6px; font-size: 11.5px; font-weight: 600; min-width: 0;
      text-align: center; cursor: pointer; border: none; background: none;
      color: var(--grey-mid); border-bottom: 3px solid transparent; white-space: nowrap;
      transition: color 0.15s, border-color 0.15s; margin-bottom: -1px;
    }
    .est-modal-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
    .est-modal-tab:hover:not(.active) { color: var(--dark); }
    /* ── Estimate status badges ──────────────────────── */
    .est-badge {
      display: inline-block; font-size: 10px; font-weight: 700;
      padding: 2px 6px; border-radius: 4px; vertical-align: middle;
      text-transform: uppercase; letter-spacing: 0.05em; margin-left: 6px;
    }
    .est-badge-tpl { background: #eef2ff; color: #4f46e5; }
    .est-status-badge {
      display: inline-block; font-size: 9px; font-weight: 700;
      padding: 1px 5px; border-radius: 4px; vertical-align: middle;
      text-transform: uppercase; letter-spacing: 0.05em; margin-left: 7px;
    }
    .est-status-active       { background: #16a34a; color: #fff; }
    .est-status-ready-to-send{ background: #fef9c3; color: #854d0e; }
    .est-status-sent         { background: #dbeafe; color: #1e40af; }
    .est-status-approved     { background: #d1fae5; color: #065f46; }
    .est-status-rejected     { background: #fee2e2; color: #991b1b; }
    .est-status-deleted      { background: #f3f4f6; color: #6b7280; }
    /* ── Action buttons in estimate list ────────────── */
    .est-action-btn {
      background: none; border: 1px solid var(--grey); border-radius: 6px;
      cursor: pointer; padding: 4px 9px; font-size: 12px; font-weight: 600;
      color: var(--text-sub); opacity: 0; transition: opacity 0.13s, background 0.13s;
      flex-shrink: 0; white-space: nowrap;
    }
    .est-row:hover .est-action-btn { opacity: 1; }
    .est-action-btn:hover { background: var(--grey-light); color: var(--dark); border-color: var(--grey-mid); }
    .est-action-ready:hover  { background: #dcfce7; border-color: #16a34a; color: #14532d; }
    .est-action-sent:hover   { background: #dbeafe; border-color: #3b82f6; color: #1e40af; }
    .est-action-approve:hover{ background: #d1fae5; border-color: #10b981; color: #065f46; }
    .est-action-reject:hover { background: #fee2e2; border-color: #f87171; color: #991b1b; }
    /* ── Lock overlay ────────────────────────────────── */
    .est-lock-overlay {
      position: fixed; inset: 0; z-index: 90;
      background: rgba(255,255,255,0.35); cursor: not-allowed;
    }
    body.dark .est-lock-overlay { background: rgba(0,0,0,0.35); }
    /* ── Status bar ──────────────────────────────────── */
    .est-status-bar {
      position: relative; z-index: 95;
      background: var(--grey-light); border: 1px solid var(--grey); border-radius: 10px;
      padding: 12px 18px; margin-bottom: 12px;
    }
    .est-status-bar.esb-active { background: #f0fdf4; border-color: #86efac; }
    .est-status-bar.esb-locked { background: #fffbeb; border-color: #fcd34d; }
    .esb-header {
      display: flex; align-items: center; justify-content: space-between; gap: 12px;
    }
    .esb-left { display: flex; align-items: center; gap: 10px; }
    .esb-label {
      font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
      color: var(--text-sub);
    }
    .esb-badge {
      font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 6px;
      text-transform: uppercase; letter-spacing: 0.05em;
    }
    .esb-lock { font-size: 12px; font-weight: 600; color: #92400e; }
    .esb-actions { display: flex; gap: 6px; flex-shrink: 0; }
    .esb-action-btn {
      background: white; border: 1px solid var(--grey); border-radius: 6px;
      cursor: pointer; padding: 5px 12px; font-size: 12px; font-weight: 600;
      color: var(--text); transition: background 0.13s, border-color 0.13s;
    }
    .esb-action-btn:hover             { background: var(--grey-light); border-color: var(--grey-mid); }
    .esb-action-btn.act-ready:hover   { background: #dcfce7; border-color: #16a34a; color: #14532d; }
    .esb-action-btn.act-sent:hover    { background: #dbeafe; border-color: #3b82f6; color: #1e40af; }
    .esb-action-btn.act-approve:hover { background: #d1fae5; border-color: #10b981; color: #065f46; }
    .esb-action-btn.act-reject:hover  { background: #fee2e2; border-color: #f87171; color: #991b1b; }
    .esb-meta {
      margin-top: 6px; font-size: 12px; color: var(--text-sub);
    }
    .esb-meta-by { font-weight: 600; color: var(--text); }
    .esb-history {
      margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--grey);
      display: flex; flex-direction: column; gap: 5px;
    }
    .esb-hist-row {
      display: flex; align-items: center; gap: 8px; font-size: 12px;
    }
    .esb-hist-badge {
      font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px;
      text-transform: uppercase; letter-spacing: 0.04em;
    }
    .esb-hist-by { font-weight: 600; color: var(--text); }
    .esb-hist-date { color: var(--text-sub); margin-left: auto; }
    /* ── Radio pills (project type) ─────────────────── */
    .radio-pills { display: flex; gap: 8px; flex-wrap: wrap; }
    .radio-pill {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 6px 14px; border-radius: 20px; cursor: pointer;
      border: 1.5px solid var(--grey); background: var(--grey-light);
      font-size: 13px; font-weight: 500; color: var(--text-sub);
      transition: border-color 0.15s, background 0.15s, color 0.15s;
      user-select: none;
    }
    .radio-pill input[type="radio"] { display: none; }
    .radio-pill:hover { border-color: var(--brand); color: var(--brand); background: #f0f7ff; }
    .radio-pill:has(input:checked) {
      border-color: var(--brand); background: #e8f2ff; color: var(--brand); font-weight: 600;
    }
    /* ── AI Generate tab ────────────────────────────── */
    .ai-generate-hint {
      font-size: 13px; color: var(--text-sub); margin: 0 0 14px;
    }
    .ai-prompt-input {
      width: 100%; box-sizing: border-box;
      min-height: 100px; resize: vertical;
      border: 1.5px solid var(--grey); border-radius: 8px;
      padding: 10px 12px; font-size: 14px; color: var(--text);
      background: var(--grey-light); font-family: inherit; line-height: 1.5;
      transition: border-color 0.15s;
    }
    .ai-prompt-input:focus { outline: none; border-color: var(--brand); }
    .ai-model-row {
      display: flex; align-items: center; gap: 10px; margin-top: 10px;
    }
    .ai-model-label {
      font-size: 13px; font-weight: 500; color: var(--text-muted); white-space: nowrap;
    }
    .ai-model-select {
      flex: 1; padding: 7px 10px; border: 1.5px solid var(--grey);
      border-radius: 7px; font-size: 13px; font-family: inherit;
      background: var(--grey-light); color: var(--text);
      cursor: pointer; transition: border-color 0.15s;
    }
    .ai-model-select:focus { outline: none; border-color: var(--brand); }
    .ai-generate-actions {
      display: flex; justify-content: flex-end; margin-top: 12px;
    }
    .ai-generate-status {
      margin-top: 14px; padding: 10px 14px; border-radius: 8px;
      font-size: 13px; font-weight: 500;
    }
    .ai-status-loading {
      background: #eef5ff; color: var(--brand);
      display: flex; align-items: center; gap: 8px;
    }
    .ai-status-error { background: #fff2f2; color: #c0392b; }
    @keyframes ai-spin { to { transform: rotate(360deg); } }
    .ai-spinner {
      display: inline-block; width: 14px; height: 14px; flex-shrink: 0;
      border: 2px solid var(--brand); border-top-color: transparent;
      border-radius: 50%; animation: ai-spin 0.7s linear infinite;
    }
    /* ── Create New tab ─────────────────────────────── */
    .create-cards {
      display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;
      padding: 20px 24px;
    }
    .create-card {
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      padding: 18px 12px; border: 1.5px solid var(--grey); border-radius: 10px;
      cursor: pointer; background: none; font-family: inherit;
      transition: border-color 0.15s, background 0.15s; gap: 5px; text-align: center;
    }
    .create-card:hover, .create-card.active {
      border-color: var(--brand); background: #eef5ff;
    }
    .create-card-icon { font-size: 24px; line-height: 1.3; }
    .create-card-label { font-size: 13px; font-weight: 700; color: var(--dark); }
    .create-card-desc  { font-size: 11px; color: var(--grey-mid); }
    /* ── AI card — full-width featured ─────────────── */
    .create-card-ai {
      grid-column: span 3;
      background: linear-gradient(135deg, #4f46e5 0%, #2563eb 60%, #0ea5e9 100%);
      border-color: transparent;
      padding: 20px 24px; flex-direction: row; justify-content: flex-start; gap: 16px;
    }
    .create-card-ai:hover, .create-card-ai.active {
      background: linear-gradient(135deg, #4338ca 0%, #1d4ed8 60%, #0284c7 100%);
      border-color: transparent;
    }
    .create-card-ai .create-card-label { color: white; font-size: 14px; }
    .create-card-ai .create-card-desc  { color: rgba(255,255,255,0.72); font-size: 12px; }
    .create-card-ai-glow {
      font-size: 30px; line-height: 1;
      filter: drop-shadow(0 0 8px rgba(255,255,255,0.6));
      flex-shrink: 0;
    }
    .create-card-ai > div {
      display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
    }
    .create-sub-panel {
      margin: 0 24px 20px; border: 1.5px solid var(--grey);
      border-radius: 10px; overflow: hidden;
    }
    .create-sub-panel .est-list { max-height: 220px; }
    .create-sub-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 10px 16px; border-bottom: 1px solid var(--grey);
      background: var(--grey-light);
    }
    .create-sub-title { font-size: 13px; font-weight: 600; color: var(--text-sub); margin: 0; }
    .ai-generate-body { padding: 16px; }
    .file-load-options { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
    /* ── Template rows ──────────────────────────────── */
    /* ── Template card grid ─────────────────────────── */
    .tpl-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 14px; padding: 20px 24px; overflow-y: auto;
    }
    .tpl-card {
      display: flex; flex-direction: column; gap: 6px;
      background: white; border: 1.5px solid var(--grey); border-radius: 12px;
      padding: 16px; cursor: pointer;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .tpl-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(0,0,0,0.09); }
    .tpl-card.active { border-color: var(--brand); background: #f0f7ff; }
    .tpl-card-name { font-weight: 700; font-size: 14px; color: var(--dark); }
    .tpl-card-desc { font-size: 12px; color: var(--grey-mid); flex: 1; line-height: 1.4; }
    .tpl-card-actions {
      display: flex; gap: 6px; margin-top: 8px; padding-top: 10px;
      border-top: 1px solid var(--grey);
    }
    .tpl-btn {
      background: none; border: 1.5px solid var(--grey); border-radius: 6px;
      cursor: pointer; padding: 5px 11px; font-size: 12px; font-weight: 600;
      color: var(--text-sub); white-space: nowrap; flex-shrink: 0;
      transition: all 0.13s;
    }
    .tpl-btn:hover { border-color: var(--brand); color: var(--brand); background: #eef5ff; }
    .tpl-btn-use { flex: 1; border-color: var(--brand); color: var(--brand); }
    .tpl-btn-use:hover { background: var(--brand); color: white; }
    /* ── Template editing mode banner ───────────────── */
    #tpl-edit-banner {
      display: none; background: #fff8e1; border-bottom: 2px solid #f6c900;
      padding: 8px 24px; gap: 12px; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 600; color: #7a5800;
    }
    #tpl-edit-banner.show { display: flex; }
    #tpl-edit-banner button {
      background: #f6c900; border: none; border-radius: 6px;
      padding: 4px 12px; font-size: 12px; font-weight: 700;
      color: #4a3800; cursor: pointer; transition: background 0.15s;
    }
    #tpl-edit-banner button:hover { background: #e0b800; }

    /* ── Dark mode ───────────────────────────────────── */
    body.dark {
      --dark: #e8eaf0;
      --grey-light: #181c2a;
      --grey: #2e3347;
      --grey-mid: #6b7280;
      --text: #e8eaf0;
      --text-sub: #8b95b0;
      --shadow: 0 2px 16px rgba(0,0,0,0.5);
      background: #0f1117;
      color: #e8eaf0;
    }
    body.dark .app-header { background: #1a1d27; border-bottom-color: #2e3347; box-shadow: 0 2px 12px rgba(0,0,0,0.4); }
    body.dark .card { background: #1a1d27; }
    body.dark input[type="text"], body.dark input[type="number"],
    body.dark input[type="date"], body.dark textarea, body.dark select {
      background: #22263a; color: #e8eaf0; border-color: #2e3347;
    }
    body.dark .wysiwyg-body { background: #22263a; color: #e8eaf0; }
    body.dark .wysiwyg-toolbar { background: #181c2a; border-bottom-color: #2e3347; }
    body.dark .wysiwyg-toolbar button { background: #22263a; border-color: #2e3347; color: #e8eaf0; }
    body.dark .contingency-bar { background: #1a1d27; border-color: #2e3347; }
    body.dark .section-card { background: #1a1d27; }
    body.dark .section-header { border-bottom-color: #2e3347; }
    body.dark [class*="sec-"] .section-icon { background: #22263a; }
    body.dark .est-row { border-bottom-color: #2e3347; }
    body.dark .est-row:hover { background: #1e2235; }
    body.dark .btn-ghost { background: #22263a; color: #e8eaf0; border-color: #2e3347; }
    body.dark .btn-ghost:hover { background: #2e3347; }
    body.dark .btn-outline { background: #22263a; color: #e8eaf0; border-color: #2e3347; }
    body.dark .btn-muted { color: #8b95b0; }
    body.dark .btn-muted:hover { background: #22263a; color: #e8eaf0; }
    body.dark .user-pill { background: #22263a; border-color: #2e3347; color: #e8eaf0; }
    body.dark .user-dropdown { background: #1e2235; border-color: #2e3347; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
    body.dark .user-dropdown-info { border-bottom-color: #2e3347; }
    body.dark .user-dropdown-item { color: #e8eaf0; }
    body.dark .user-dropdown-item:hover { background: #2e3347; color: #e84040; }
    body.dark .est-team-chip { background: #22263a; border-color: #2e3347; color: #e8eaf0; }
    body.dark .est-team-chip--active { border-color: #16a34a; }
    body.dark .est-team-add-btn { background: #22263a; border-color: #2e3347; color: #e8eaf0; }
    body.dark .est-team-field { background: #1a1d27; color: #e8eaf0; border-color: #2e3347; }
    body.dark .est-team-bar { background: rgba(26,29,39,0.97); border-top-color: #2e3347; }
    body.dark .task-table td input:focus { background: #22263a; }
    body.dark #dept-floating-dropdown { background: #1e2235; border-color: #2e3347; }
    body.dark .dept-opt:hover { background: #22263a; }
    body.dark .dept-avatar { border-color: #2e3347; }
    body.dark .dept-avatar-arrow { color: #9ba3b2; }
    body.dark .add-row-bar { background: #181c2a; border-top-color: #2e3347; }
    body.dark #team-bar-wrap { background: #181c2a; border-top-color: #2e3347; }
    body.dark #new-group-btn { background: #1a1d27; border-color: #2e3347; color: var(--grey-mid); }
    body.dark #new-group-btn:hover { background: #22263a; border-color: var(--brand); color: var(--brand); }
    body.dark #comment-modal { background: #1e2235; border-color: #2e3347; }
    body.dark .cm-header { background: #1a1d27; border-bottom-color: #2e3347; }
    body.dark .cm-task-name { color: #e8eaf0; }
    body.dark .cm-resolve-row { background: #1e2235; border-bottom-color: #2e3347; }
    body.dark .cm-resolve-btn { border-color: #2e3347; color: #9ba3b2; }
    body.dark .cm-resolve-btn:hover { border-color: #27ae60; color: #27ae60; background: #0e2a1a; }
    body.dark .cm-resolve-btn.resolved { border-color: #27ae60; color: #27ae60; background: #0e2a1a; }
    body.dark .cm-thread { background: #1e2235; }
    body.dark .cm-empty { color: #6b7494; }
    body.dark .cm-author { color: #e8eaf0; }
    body.dark .cm-text { color: #c8ccd8; }
    body.dark .cm-avatar { border-color: #2e3347; }
    body.dark .cm-resolved-banner { background: #0e2a1a; border-bottom-color: #1a5c34; color: #4ade80; }
    body.dark .cm-resolved-banner button { color: #4ade80; }
    body.dark .cm-input-area { background: #1a1d27; border-top-color: #2e3347; }
    body.dark .cm-textarea { background: #22263a; border-color: #2e3347; color: #e8eaf0; }
    body.dark .cm-textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(41,128,185,0.18); }
    body.dark .cm-hint { color: #6b7494; }
    body.dark .unread-dot { border-color: #0f1117; }
    body.dark .cm-mention { background: #1e3a5f; color: #7dc3f5; }
    body.dark .cm-mention.cm-mention-all { background: #3d2a0e; color: #f0a050; }
    body.dark .cm-mention-dropdown { background: #1e2235; border-color: #2e3350; }
    body.dark .cm-mention-option:hover, body.dark .cm-mention-option.active { background: #2b3255; }
    body.dark .cm-mention-option { color: #e8eaf0; }
    body.dark .cm-mention-option.mention-all { color: #f0a050; }
    body.dark .ep-body { background: #0f1117; }
    body.dark .ep-footer { background: #1a1d27; border-top-color: #2e3347; }
    .confirm-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.5);
      display: flex; align-items: center; justify-content: center;
      z-index: 9100;
    }
    .confirm-dialog {
      background: white; border-radius: 12px; padding: 24px 28px;
      width: 400px; max-width: 90vw;
      box-shadow: 0 24px 60px rgba(0,0,0,0.3);
    }
    .confirm-msg {
      margin: 0 0 20px; font-size: 14px; line-height: 1.6;
      color: var(--dark); white-space: pre-wrap;
    }
    .confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
    .btn-danger { background: #e84040; color: white; border: none; }
    .btn-danger:hover { background: #c0392b; }

    body.dark .confirm-dialog { background: #1e2235; }
    body.dark .confirm-msg { color: #e8eaf0; }
    body.dark .est-modal { background: #1e2235; }
    body.dark .est-modal-header { border-bottom-color: #2e3347; }
    body.dark .est-modal-tabs { border-bottom-color: #2e3347; }
    body.dark .est-row.active { background: #132238; }
    body.dark .est-badge-tpl { background: #1e1a4f; color: #a5b4fc; }
    body.dark .est-status-active        { background: #16a34a; color: #fff; }
    body.dark .est-status-ready-to-send { background: #451a03; color: #fde68a; }
    body.dark .est-status-sent          { background: #1e3a8a; color: #93c5fd; }
    body.dark .est-status-approved      { background: #064e3b; color: #6ee7b7; }
    body.dark .est-status-rejected      { background: #7f1d1d; color: #fca5a5; }
    body.dark .est-status-deleted       { background: #374151; color: #9ca3af; }
    body.dark .est-status-bar { background: #1e2235; border-color: #2e3347; }
    body.dark .est-status-bar.esb-active { background: #052e16; border-color: #16a34a; }
    body.dark .est-status-bar.esb-locked { background: #2d1e00; border-color: #d97706; }
    body.dark .esb-lock { color: #fde68a; }
    body.dark .esb-action-btn { background: #22263a; border-color: #2e3347; color: #e0e0e0; }
    body.dark .esb-action-btn:hover { background: #2e3347; }
    body.dark .esb-history { border-top-color: #2e3347; }
    body.dark .radio-pill { border-color: #2e3347; background: #22263a; color: #9ca3af; }
    body.dark .radio-pill:hover { border-color: var(--brand); color: var(--brand); background: #1a2a3a; }
    body.dark .radio-pill:has(input:checked) { border-color: var(--brand); background: #1a2a3a; color: var(--brand); }
    body.dark .tpl-btn:hover { background: #1a263a; border-color: var(--brand); color: var(--brand); }
    body.dark .tpl-card { background: #1e2235; border-color: #2e3347; }
    body.dark .tpl-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(0,0,0,0.3); }
    body.dark .tpl-card.active { background: #132238; border-color: var(--brand); }
    body.dark .tpl-card-actions { border-top-color: #2e3347; }
    body.dark .ai-prompt-input { background: #22263a; color: #e8eaf0; border-color: #2e3347; }
    body.dark .ai-status-loading { background: #1a263a; }
    body.dark .ai-status-error { background: #2a1515; color: #f08080; }
    body.dark .est-filter-input { background: #22263a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 11px center; border-color: #2e3347; color: #e0e0e0; }
    body.dark .est-filter-input:focus { background-color: #1a1d27; }
    body.dark .est-filter-wrap { border-bottom-color: #2e3347; }
    body.dark .create-card { border-color: #2e3347; }
    body.dark .create-card:hover, body.dark .create-card.active { background: #1a263a; border-color: var(--brand); }
    body.dark .create-card-ai, body.dark .create-card-ai:hover, body.dark .create-card-ai.active { background: linear-gradient(135deg, #3730a3 0%, #1e40af 60%, #0369a1 100%); border-color: transparent; }
    body.dark .create-card-label { color: #e8eaf0; }
    body.dark .create-sub-panel { border-color: #2e3347; }
    body.dark .create-sub-header { background: #181c2a; border-bottom-color: #2e3347; }
    body.dark .est-row-meta { background: #181c2a; border-top-color: #2e3347; }
    body.dark .est-row-meta textarea { background: #1a1d27; }
    body.dark .new-group-modal { background: #1e2235; }
    body.dark .dept-breakdown-card { background: #1a1d27 !important; border-color: #2e3347 !important; }
    body.dark .dbd-rate-wrap { background: #22263a; }
    body.dark .dbd-rate-input { color: #e8eaf0; }
    body.dark .summary-card { background: #1a1d27 !important; border-color: #2e3347 !important; }
    body.dark .section-add-tray { background: #1a1d27; }
    body.dark .tray-chip { background: #22263a; border-color: #2e3347; color: #e8eaf0; }
    body.dark #tpl-edit-banner { background: #2a2200; border-bottom-color: #6b5000; color: #f0d060; }
    body.dark .login-box { background: #1e2235; }
    body.dark .ep-panel { background: #1e2235; border-color: #2e3347; }
    body.dark .ep-header { background: #1a1d27; border-bottom-color: #2e3347; }
    body.dark .print-header { display: none; }

    /* ── Print overrides (must come after dark mode to win) ─── */
    @media print {
      body.dark *, body.dark *::before, body.dark *::after {
        background: white !important;
        color: #1a1a2e !important;
        border-color: #e2e4e9 !important;
        box-shadow: none !important;
      }
      /* Re-apply brand color to prices */
      body.dark .sum-total-cost,
      body.dark .sum-cost,
      body.dark .cost-cell,
      body.dark #grand-total { color: #2980b9 !important; }
      /* Explicit overrides for high-specificity dark rules */
      body.dark .summary-card,
      body.dark .section-card,
      body.dark .card,
      body.dark .contingency-bar,
      body.dark .add-row-bar,
      body.dark .section-header,
      body.dark .task-table td,
      body.dark .task-table th,
      body.dark input,
      body.dark textarea { background: white !important; color: #1a1a2e !important; border-color: #e2e4e9 !important; }
      body.dark .summary-title { color: #9ba3b2 !important; }
      /* Always hide chevrons — sections always print expanded */
      .chevron { display: none !important; }
    }
