:root {
      --bg: #f3f1ec;
      --surface: #ffffff;
      --text: #1a1f1c;
      --muted: #5c6560;
      --line: #e2e0db;
      --accent: #1a4d3e;
      --accent-hover: #143d32;
      --accent-soft: #e8f0ed;
      --warn-bg: #fdf8f3;
      --warn-border: #e8dcc8;
      --ok-bg: #eef6f1;
      --ok-border: #b8d4c4;
      --err-bg: #fdf2f2;
      --err-border: #e8c4c4;
      --radius: 10px;
      --shadow: 0 1px 2px rgba(26, 31, 28, 0.04), 0 12px 32px rgba(26, 31, 28, 0.08);
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      min-height: 100vh;
      font-family: "DM Sans", system-ui, -apple-system, sans-serif;
      font-size: 15px;
      line-height: 1.5;
      color: var(--text);
      background: var(--bg);
      background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(26, 77, 62, 0.06), transparent);
    }
    .page { padding: clamp(24px, 5vw, 48px) 20px 48px; }
    .shell {
      max-width: 1040px;
      margin: 0 auto;
      background: var(--surface);
      border-radius: 16px;
      box-shadow: var(--shadow);
      border: 1px solid rgba(226, 224, 219, 0.8);
      overflow: hidden;
    }
    .hero {
      padding: 28px 32px 24px;
      border-bottom: 1px solid var(--line);
      background: linear-gradient(180deg, #fafaf8 0%, var(--surface) 100%);
    }
    .eyebrow {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--accent);
      margin: 0 0 8px;
    }
    .hero h1 {
      margin: 0;
      font-size: clamp(22px, 4vw, 28px);
      font-weight: 600;
      letter-spacing: -0.02em;
      line-height: 1.2;
    }
    .hero p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
    .hero code {
      font-size: 13px;
      background: var(--accent-soft);
      color: var(--accent);
      padding: 2px 8px;
      border-radius: 6px;
      font-weight: 500;
    }
    .body { padding: 28px 32px 32px; }
    .section { margin-top: 28px; }
    .section:first-child { margin-top: 0; }
    .section-head {
      margin-bottom: 12px;
    }
    .section-title {
      margin: 0;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--muted);
    }
    .section-desc {
      margin: 6px 0 0;
      font-size: 13px;
      color: var(--muted);
      max-width: 62ch;
    }
    .section-desc code {
      font-size: 12px;
      background: #f4f3f0;
      padding: 1px 6px;
      border-radius: 4px;
    }
    .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
    .field { flex: 1 1 200px; }
    label { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
    input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
      width: 100%;
      font: inherit;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      padding: 11px 14px;
      background: #fdfdfc;
      color: var(--text);
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    select { cursor: pointer; }
    input:focus, textarea:focus, select:focus {
      outline: none;
      border-color: var(--accent);
      box-shadow: 0 0 0 3px rgba(26, 77, 62, 0.15);
    }
    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus {
      -webkit-text-fill-color: var(--text);
      -webkit-box-shadow: 0 0 0 1000px #fdfdfc inset;
      box-shadow: 0 0 0 1000px #fdfdfc inset;
      border: 1px solid var(--line);
      transition: background-color 9999s ease-out 0s;
    }
    textarea { min-height: 260px; resize: vertical; line-height: 1.45; font-size: 14px; }
    .file-row {
      display: flex;
      flex-wrap: wrap;
      gap: 12px;
      align-items: center;
    }
    .file-input-wrap {
      position: relative;
      flex: 1 1 220px;
      min-height: 44px;
      border: 1px dashed var(--line);
      border-radius: var(--radius);
      background: #fafaf8;
      display: flex;
      align-items: center;
      padding: 0 12px;
    }
    .file-input-wrap input[type="file"] {
      width: 100%;
      font-size: 13px;
      cursor: pointer;
    }
    .sheet-catalog-list,
    .pending-pdf-list {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: #fafaf8;
      max-height: min(36vh, 280px);
      overflow-y: auto;
    }
    .catalog-sheet-row,
    .pending-pdf-row {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 8px 12px;
      border-bottom: 1px solid var(--line);
      cursor: pointer;
      font-size: 13px;
    }
    .catalog-sheet-row:last-child,
    .pending-pdf-row:last-child { border-bottom: none; }
    .catalog-sheet-row:hover,
    .pending-pdf-row:hover { background: #f3f2ef; }
    .catalog-sheet-meta,
    .pending-pdf-meta { flex: 1; min-width: 0; word-break: break-word; }
    .catalog-sheet-row .catalog-sheet-delete,
    .pending-pdf-row .pending-pdf-remove { flex-shrink: 0; cursor: pointer; }
    .catalog-sheet-empty,
    .pending-pdf-empty {
      padding: 12px 14px;
      font-size: 13px;
      color: var(--muted);
    }
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      font: inherit;
      font-weight: 600;
      font-size: 14px;
      padding: 11px 18px;
      border-radius: var(--radius);
      border: none;
      cursor: pointer;
      transition: background 0.15s, transform 0.05s;
    }
    .btn:active { transform: scale(0.98); }
    .btn-primary { background: var(--accent); color: #fff; }
    .btn-primary:hover { background: var(--accent-hover); }
    .btn-secondary {
      background: var(--surface);
      color: var(--text);
      border: 1px solid var(--line);
    }
    .btn-secondary:hover { background: #f7f6f4; }
    .btn-quiet { background: #3d4540; color: #fff; }
    .btn-quiet:hover { background: #2d3330; }
    .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
    .login-panel {
      padding: 20px;
      border-radius: var(--radius);
      background: var(--warn-bg);
      border: 1px solid var(--warn-border);
    }
    .hidden { display: none !important; }
    .status {
      margin-top: 16px;
      padding: 12px 14px;
      border-radius: var(--radius);
      font-size: 13px;
      line-height: 1.45;
      min-height: 20px;
      border: 1px solid transparent;
    }
    .status:empty { display: none; }
    .status--pending { background: #f7f7f5; border-color: var(--line); color: var(--muted); }
    .status--ok { background: var(--ok-bg); border-color: var(--ok-border); color: #1e3d2f; }
    .status--err { background: var(--err-bg); border-color: var(--err-border); color: #6b2d2d; }
    .login-error { margin: 12px 0 0; font-size: 13px; color: #6b2d2d; }
    .cosmic-form {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #fafaf8;
      margin-bottom: 8px;
      overflow: hidden;
    }
    .cosmic-form > .cosmic-head {
      padding: 16px 18px;
      background: linear-gradient(135deg, #1a4d3e 0%, #143d32 100%);
      color: #f4faf7;
    }
    .cosmic-form > .cosmic-head h2 {
      margin: 0;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }
    .cosmic-form > .cosmic-head p { margin: 6px 0 0; font-size: 12px; opacity: 0.9; }
    .cosmic-scroll { max-height: min(70vh, 720px); overflow-y: auto; padding: 12px 14px 18px; }
    .c-block {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: var(--surface);
      margin-bottom: 10px;
    }
    .c-block summary {
      cursor: pointer;
      padding: 10px 14px;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: var(--muted);
      list-style: none;
    }
    .c-block summary::-webkit-details-marker { display: none; }
    .c-block summary::before { content: "▸ "; color: var(--accent); }
    .c-block[open] summary::before { content: "▾ "; }
    .c-inner { padding: 0 14px 14px; border-top: 1px solid var(--line); }
    .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
    .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 12px; }
    @media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
    .field-sm label { font-size: 11px; }
    .field-sm input, .field-sm select, .field-sm textarea { padding: 8px 10px; font-size: 13px; }
    .chk-line { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; font-size: 13px; }
    .chk-line label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; margin: 0; font-weight: 500; color: var(--text); }
    .repeater-row {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 8px;
      align-items: end;
      padding: 10px;
      margin-bottom: 8px;
      background: #f7f6f4;
      border-radius: 8px;
      border: 1px solid var(--line);
    }
    .repeater-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
    .btn-ghost {
      font: inherit;
      font-size: 13px;
      font-weight: 600;
      padding: 8px 12px;
      border-radius: 8px;
      border: 1px dashed var(--line);
      background: #fff;
      cursor: pointer;
      color: var(--accent);
    }
    .btn-ghost:hover { background: var(--accent-soft); }
    .form-msg { font-size: 13px; margin-top: 10px; padding: 10px 12px; border-radius: 8px; }
    .form-msg.err { background: var(--err-bg); border: 1px solid var(--err-border); color: #6b2d2d; }
    .form-msg.ok { background: var(--ok-bg); border: 1px solid var(--ok-border); color: #1e3d2f; }
    .internal-pack {
      margin-top: 12px;
      padding: 12px 14px;
      font-size: 12px;
      line-height: 1.5;
      background: #f0eeea;
      border: 1px solid var(--line);
      border-radius: var(--radius);
      color: var(--muted);
      max-height: 200px;
      overflow: auto;
      white-space: pre-wrap;
      font-family: ui-monospace, monospace;
    }
    .veh-calc { font-size: 13px; padding: 10px; background: var(--accent-soft); border-radius: 8px; margin-top: 8px; color: #143d32; }

    /* —— Product shell (auth, topbar, tabs) —— */
    .auth-screen {
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: clamp(20px, 4vw, 40px);
      position: relative;
      background:
        linear-gradient(135deg, rgba(15, 46, 38, 0.82) 0%, rgba(26, 77, 62, 0.72) 45%, rgba(20, 30, 28, 0.78) 100%),
        url("/images/auth-safari.webp") center center / cover no-repeat fixed;
    }
    .auth-screen-brand {
      position: absolute;
      top: clamp(22px, 4vw, 36px);
      left: clamp(24px, 5vw, 48px);
      z-index: 2;
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: clamp(18px, 2.5vw, 22px);
      font-weight: 700;
      letter-spacing: -0.03em;
      color: #fff;
      text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    }
    .brand-mark {
      display: block;
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    .auth-card {
      width: min(920px, 100%);
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0;
      background: var(--surface);
      border-radius: 20px;
      box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
      border: 1px solid rgba(255, 255, 255, 0.12);
      overflow: hidden;
      position: relative;
      z-index: 1;
    }
    @media (max-width: 820px) {
      .auth-card { grid-template-columns: 1fr; }
      .auth-brand { padding: 28px 24px 12px !important; }
    }
    .auth-brand {
      padding: 40px 36px;
      background: linear-gradient(160deg, rgba(26, 77, 62, 0.94) 0%, rgba(15, 46, 38, 0.88) 100%);
      color: #f5faf8;
      display: flex;
      flex-direction: column;
      justify-content: center;
      border-right: 1px solid rgba(255, 255, 255, 0.08);
    }
    .auth-brand .eyebrow { color: #a8d4c4; }
    .auth-brand h1 {
      margin: 0;
      font-size: clamp(24px, 4vw, 32px);
      font-weight: 600;
      letter-spacing: -0.02em;
      line-height: 1.15;
      color: #fff;
    }
    .auth-tagline { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: rgba(245, 250, 248, 0.82); }
    .login-panel { padding: 36px 32px; border: 0; background: var(--surface); }
    .login-panel .row {
      flex-direction: column;
      align-items: stretch;
      gap: 16px;
    }
    .login-panel .field {
      flex: 1 1 auto;
      width: 100%;
    }
    .auth-card-title {
      margin: 0 0 20px;
      font-size: 18px;
      font-weight: 600;
      letter-spacing: -0.01em;
    }
    .auth-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
    .btn-block { width: 100%; justify-content: center; }
    .auth-footnote { margin: 16px 0 0; font-size: 12px; color: var(--muted); }
    .auth-footnote code {
      font-size: 11px;
      background: var(--accent-soft);
      color: var(--accent);
      padding: 2px 6px;
      border-radius: 4px;
    }
    .register-fields { margin-top: 4px; }

    .app-layout {
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      background: var(--bg);
      position: relative;
      isolation: isolate;
    }
    .app-layout::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: 0;
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      transition: opacity 0.35s ease;
      pointer-events: none;
    }
    .app-layout[data-active-tab="rates"]::before {
      background-image:
        linear-gradient(165deg, rgba(243, 241, 236, 0.93) 0%, rgba(232, 240, 237, 0.86) 55%, rgba(243, 241, 236, 0.92) 100%),
        url("/images/tab-rates.webp");
    }
    .app-layout[data-active-tab="trip"]::before {
      background-image:
        linear-gradient(165deg, rgba(243, 241, 236, 0.94) 0%, rgba(245, 248, 246, 0.85) 50%, rgba(243, 241, 236, 0.93) 100%),
        url("/images/tab-trip.webp");
    }
    .app-layout[data-active-tab="output"]::before {
      background-image:
        linear-gradient(165deg, rgba(243, 241, 236, 0.92) 0%, rgba(253, 248, 243, 0.84) 45%, rgba(243, 241, 236, 0.94) 100%),
        url("/images/tab-output.webp");
    }
    .app-topbar {
      position: sticky;
      top: 0;
      z-index: 2;
      background: rgba(255, 255, 255, 0.92);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--line);
    }
    .app-topbar-inner {
      max-width: 1100px;
      margin: 0 auto;
      padding: 14px 20px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }
    .app-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
    .app-logo {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-weight: 700;
      font-size: 15px;
      letter-spacing: -0.02em;
      color: var(--accent);
    }
    .app-logo .brand-mark {
      box-shadow: none;
      border-radius: 6px;
    }
    .app-divider { width: 1px; height: 18px; background: var(--line); flex-shrink: 0; }
    .app-workspace {
      font-size: 14px;
      color: var(--muted);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .app-topbar-actions { display: flex; gap: 8px; flex-shrink: 0; }
    .app-topbar-actions #settingsTopBtn.is-active {
      color: var(--accent);
      border-color: rgba(26, 77, 62, 0.35);
      background: var(--accent-soft);
    }
    .btn-sm { padding: 7px 14px; font-size: 13px; }
    .btn-ghost.btn-sm { padding: 7px 12px; border-style: solid; border-color: var(--line); }

    .app-tabs {
      max-width: 1100px;
      margin: 0 auto;
      padding: 0 20px;
      display: flex;
      gap: 4px;
      border-bottom: 1px solid var(--line);
      background: rgba(255, 255, 255, 0.92);
      backdrop-filter: blur(10px);
      width: 100%;
      position: relative;
      z-index: 2;
    }
    .app-tab {
      font: inherit;
      font-size: 13px;
      font-weight: 600;
      padding: 12px 16px;
      margin-bottom: -1px;
      border: none;
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      border-bottom: 2px solid transparent;
      transition: color 0.15s, border-color 0.15s;
    }
    .app-tab:hover { color: var(--text); }
    .app-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }

    .app-main {
      flex: 1;
      max-width: 1100px;
      margin: 0 auto;
      width: 100%;
      padding: 0;
      position: relative;
      z-index: 1;
    }
    .tab-panel {
      display: none;
      animation: fadeIn 0.25s ease;
      min-height: calc(100vh - 108px);
      padding: 24px 20px 48px;
    }
    .tab-panel--trip .section,
    .tab-panel--output .section {
      background: rgba(255, 255, 255, 0.92);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 20px 22px 22px;
      box-shadow: 0 4px 20px rgba(26, 31, 28, 0.06);
      backdrop-filter: blur(8px);
    }
    .tab-panel--trip .cosmic-form {
      background: rgba(250, 250, 248, 0.96);
      box-shadow: 0 2px 12px rgba(26, 31, 28, 0.04);
    }
    .tab-panel--output .output-card {
      background: rgba(255, 255, 255, 0.94);
      backdrop-filter: blur(8px);
    }
    .tab-panel--settings .settings-panel {
      background: rgba(255, 255, 255, 0.94);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 20px 22px 22px;
      box-shadow: 0 4px 20px rgba(26, 31, 28, 0.06);
      backdrop-filter: blur(8px);
      max-width: 640px;
    }
    .app-layout[data-active-tab="settings"]::before {
      background-image:
        linear-gradient(165deg, rgba(243, 241, 236, 0.94) 0%, rgba(232, 240, 237, 0.88) 55%, rgba(243, 241, 236, 0.93) 100%),
        url("/images/tab-rates.webp");
    }
    .tab-panel.is-active { display: block; }
    .tab-panel[hidden] { display: none !important; }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .output-cards {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 16px;
      margin-top: 20px;
    }
    .output-card {
      padding: 20px 22px;
      background: var(--surface);
      border: 1px solid var(--line);
      border-radius: 14px;
      box-shadow: 0 1px 2px rgba(26, 31, 28, 0.04);
    }
    .output-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
    .output-card p { margin: 0 0 16px; font-size: 13px; color: var(--muted); line-height: 1.45; }
    .output-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .output-card--primary {
      border-color: rgba(26, 77, 62, 0.25);
      background: linear-gradient(180deg, #f8fbf9 0%, var(--surface) 100%);
    }
    .hidden-legacy { display: none !important; }

    .status.toast {
      position: fixed;
      bottom: 24px;
      right: 24px;
      left: auto;
      max-width: min(420px, calc(100vw - 48px));
      margin: 0;
      z-index: 200;
      box-shadow: 0 8px 24px rgba(26, 31, 28, 0.12);
      border-radius: 12px;
    }
    .status.toast:empty { display: none; }

    #prompt {
      min-height: 180px;
      font-family: ui-monospace, "Cascadia Code", monospace;
      font-size: 13px;
      line-height: 1.55;
    }

    .btn:disabled { opacity: 0.55; cursor: not-allowed; }
    .btn.is-loading { pointer-events: none; opacity: 0.75; }

    /* —— Rate catalog —— */
    .rates-page { display: flex; flex-direction: column; gap: 24px; }
    .rates-hero {
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      justify-content: space-between;
      gap: 20px;
      padding: 24px 26px;
      border-radius: 16px;
      background: linear-gradient(135deg, rgba(26, 77, 62, 0.94) 0%, rgba(20, 61, 50, 0.9) 55%, rgba(15, 46, 38, 0.92) 100%);
      color: #f5faf8;
      box-shadow: 0 8px 28px rgba(26, 77, 62, 0.22);
      backdrop-filter: blur(6px);
    }
    .rates-eyebrow {
      margin: 0 0 6px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: #a8d4c4;
    }
    .rates-title {
      margin: 0;
      font-size: clamp(22px, 3vw, 28px);
      font-weight: 600;
      letter-spacing: -0.02em;
      line-height: 1.15;
    }
    .rates-lead {
      margin: 10px 0 0;
      max-width: 58ch;
      font-size: 14px;
      line-height: 1.55;
      color: rgba(245, 250, 248, 0.85);
    }
    .rates-stat-card {
      min-width: 200px;
      padding: 16px 18px;
      border-radius: 12px;
      background: rgba(255, 255, 255, 0.1);
      border: 1px solid rgba(255, 255, 255, 0.14);
      backdrop-filter: blur(6px);
    }
    .rates-stat-label {
      display: block;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #a8d4c4;
      margin-bottom: 6px;
    }
    .rates-stat-value {
      display: block;
      font-size: 14px;
      font-weight: 600;
      line-height: 1.45;
      color: #fff;
    }
    .rates-layout {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 20px;
      align-items: start;
    }
    @media (max-width: 900px) {
      .rates-layout { grid-template-columns: 1fr; }
    }
    .rates-panel {
      background: rgba(255, 255, 255, 0.94);
      border: 1px solid var(--line);
      border-radius: 16px;
      padding: 20px 22px 22px;
      box-shadow: 0 4px 20px rgba(26, 31, 28, 0.06);
      backdrop-filter: blur(8px);
    }
    .rates-panel-head {
      display: flex;
      gap: 14px;
      align-items: flex-start;
      margin-bottom: 18px;
    }
    .rates-step {
      flex-shrink: 0;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 50%;
      background: var(--accent-soft);
      color: var(--accent);
      font-size: 14px;
      font-weight: 700;
    }
    .rates-panel-title {
      margin: 0;
      font-size: 16px;
      font-weight: 600;
      letter-spacing: -0.01em;
    }
    .rates-panel-desc {
      margin: 4px 0 0;
      font-size: 13px;
      color: var(--muted);
      line-height: 1.45;
    }
    .upload-zone {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 16px;
      padding: 18px 20px;
      margin-bottom: 20px;
      border-radius: 14px;
      border: 2px dashed rgba(26, 77, 62, 0.28);
      background: linear-gradient(180deg, #f8fbf9 0%, #f3f7f5 100%);
      transition: border-color 0.15s, background 0.15s;
    }
    .upload-zone:focus-within {
      border-color: var(--accent);
      background: #f0f7f4;
    }
    .upload-zone-icon {
      flex-shrink: 0;
      width: 48px;
      height: 48px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 12px;
      background: var(--accent);
      color: #fff;
      font-size: 11px;
      font-weight: 800;
      letter-spacing: 0.04em;
    }
    .upload-zone-body { flex: 1 1 180px; min-width: 0; }
    .upload-zone-label {
      display: block;
      font-size: 14px;
      font-weight: 600;
      color: var(--text);
      cursor: pointer;
    }
    .upload-zone-hint {
      margin: 4px 0 10px;
      font-size: 12px;
      color: var(--muted);
    }
    .upload-zone-input {
      width: 100%;
      font-size: 13px;
      padding: 8px 0;
      border: none;
      background: transparent;
      cursor: pointer;
    }
    .upload-zone-input::file-selector-button {
      font: inherit;
      font-size: 12px;
      font-weight: 600;
      padding: 8px 14px;
      margin-right: 10px;
      border-radius: 8px;
      border: 1px solid var(--line);
      background: #fff;
      color: var(--accent);
      cursor: pointer;
    }
    .upload-zone-input::file-selector-button:hover {
      background: var(--accent-soft);
    }
    .rates-subsection { margin-top: 4px; }
    .rates-subtitle {
      margin: 0 0 4px;
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
    }
    .rates-subdesc {
      margin: 0 0 10px;
      font-size: 12px;
      color: var(--muted);
      line-height: 1.4;
    }
    .rates-list {
      border-radius: 12px;
      border: 1px solid var(--line);
      background: #fafaf8;
      max-height: min(40vh, 320px);
      overflow-y: auto;
    }
    .rates-panel-foot {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid var(--line);
    }
    .catalog-sheet-row,
    .pending-pdf-row {
      padding: 10px 14px;
    }
    .catalog-sheet-empty,
    .pending-pdf-empty {
      padding: 20px 16px;
      text-align: center;
      font-size: 13px;
      color: var(--muted);
      line-height: 1.5;
    }
    .catalog-sheet-row:nth-child(even),
    .pending-pdf-row:nth-child(even) {
      background: rgba(255, 255, 255, 0.55);
    }