    :root {
      --ink: #18212f;
      --muted: #667085;
      --line: #d9e0e8;
      --panel: #ffffff;
      --page: #f4f6f8;
      --nav: #24313f;
      --nav-soft: #314356;
      --accent: #c9492d;
      --accent-dark: #a63c28;
      --teal: #167a73;
      --amber: #a76512;
      --green: #26724b;
      --shadow: 0 12px 28px rgba(22, 33, 47, 0.08);
    }
    * { box-sizing: border-box; }
    html, body {
      max-width: 100%;
      overflow-x: hidden;
    }
    body {
      margin: 0;
      font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
      background: var(--page);
      color: var(--ink);
      font-size: 14px;
      line-height: 1.45;
    }
    a { color: #1f6f9b; text-decoration: none; }
    a:hover { text-decoration: underline; }
    form { margin: 0; }
    h1, h2, h3, p { margin-top: 0; }
    h1 { font-size: 26px; line-height: 1.18; margin-bottom: 8px; overflow-wrap: anywhere; }
    h2 { font-size: 17px; line-height: 1.25; margin-bottom: 8px; }
    h3 { font-size: 14px; margin-bottom: 8px; }
    .app-shell { min-height: 100vh; display: block; }
    .sidebar {
      background: var(--nav);
      color: white;
      padding: 18px 14px;
      display: flex;
      flex-direction: column;
      gap: 22px;
      position: fixed;
      left: 0;
      top: 0;
      bottom: 0;
      width: 248px;
      height: 100vh;
      z-index: 20;
    }
    .brand {
      color: white;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 4px 6px;
    }
    .brand:hover { text-decoration: none; }
    .brand-mark {
      width: 34px;
      height: 34px;
      border-radius: 8px;
      background: #f2a541;
      color: #2a1b12;
      display: grid;
      place-items: center;
      font-weight: 800;
      font-size: 18px;
    }
    .brand strong { display: block; font-size: 15px; }
    .brand small { display: block; color: #b9c4d1; font-size: 12px; }
    .side-nav { display: grid; gap: 4px; }
    .nav-link {
      color: #d9e3ec;
      border-radius: 8px;
      padding: 10px 11px;
      font-weight: 650;
    }
    .nav-link:hover { background: var(--nav-soft); color: white; text-decoration: none; }
    .nav-link.active { background: white; color: var(--nav); }
    .sidebar-footer {
      margin-top: auto;
      color: #d1dbe6;
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 8px;
      border-top: 1px solid rgba(255,255,255,0.14);
      font-size: 12px;
    }
    .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #3dd17b; display: inline-block; }
    .workspace { min-width: 0; width: calc(100% - 248px); margin-left: 248px; }
    .topbar {
      height: 68px;
      background: rgba(255,255,255,0.92);
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 0 28px;
      position: sticky;
      top: 0;
      z-index: 5;
      backdrop-filter: blur(10px);
    }
    .topbar strong { display: block; font-size: 18px; }
    .topbar-kicker { display: block; color: var(--muted); font-size: 12px; }
    main { max-width: 1360px; margin: 0 auto; padding: 26px 28px 42px; }
    .auth-main {
      min-height: 100vh;
      display: grid;
      place-items: center;
      padding: 28px;
      background:
        linear-gradient(135deg, rgba(201,73,45,0.12), rgba(22,122,115,0.12)),
        var(--page);
    }
    .page-head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 18px;
    }
    .page-head p { color: var(--muted); margin-bottom: 0; max-width: 760px; }
    .kicker { color: var(--accent); font-weight: 750; font-size: 12px; margin-bottom: 5px; }
    .panel, .toolbar, .table-shell, .metric, .plan-card {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: var(--shadow);
    }
    .panel, .toolbar { padding: 18px; margin-bottom: 18px; }
    .panel-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 14px;
      margin-bottom: 14px;
    }
    .panel-header p { color: var(--muted); margin-bottom: 0; }
    .grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
    .saved-search-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-action { align-self: end; }
    .full-width { width: 100%; }
    .two-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr); gap: 18px; align-items: start; }
    .metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
    .metric { padding: 14px; }
    .metric span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
    .metric strong { display: block; font-size: 24px; line-height: 1.1; }
    .metric small { color: var(--muted); }
    label { display: block; font-size: 12px; font-weight: 750; color: #475467; margin-bottom: 5px; }
    label span { color: var(--muted); font-weight: 650; }
    .form-note {
      margin: 6px 0 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }
    input, select {
      width: 100%;
      min-height: 38px;
      padding: 8px 10px;
      border: 1px solid #c8d1dc;
      border-radius: 6px;
      background: white;
      color: var(--ink);
      font: inherit;
    }
    input:focus, select:focus { outline: 2px solid rgba(31,111,155,0.20); border-color: #1f6f9b; }
    button, .button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 38px;
      padding: 8px 12px;
      border: 1px solid var(--accent);
      border-radius: 6px;
      background: var(--accent);
      color: white;
      cursor: pointer;
      font-weight: 750;
      font: inherit;
      white-space: nowrap;
    }
    button:hover, .button:hover { background: var(--accent-dark); text-decoration: none; }
    button:disabled { cursor: default; background: #eef2f6; border-color: #d5dde7; color: #657487; }
    button:disabled:hover { background: #eef2f6; }
    .button.secondary, button.secondary { background: white; color: var(--accent); }
    .button.secondary:hover, button.secondary:hover { background: #fff4f1; }
    .button.ghost, button.ghost { background: white; border-color: #c8d1dc; color: var(--ink); }
    .button.ghost:hover, button.ghost:hover { background: #f7f9fb; }
    .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 0; }
    .category-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
    .check-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 7px 9px;
      background: #fbfcfd;
      color: #364152;
      margin: 0;
    }
    .check-pill input { width: auto; min-height: auto; }
    .table-shell { overflow: hidden; }
    .pagination {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      padding: 14px;
      border-top: 1px solid #e6ebf1;
      background: white;
    }
    .pagination-info {
      display: grid;
      gap: 2px;
    }
    .pagination-info span {
      color: var(--muted);
      font-size: 12px;
    }
    .pagination-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .button.disabled,
    .button.disabled:hover {
      cursor: default;
      background: #eef2f6;
      border-color: #d5dde7;
      color: #657487;
      pointer-events: none;
    }
    .featured-lead {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(260px, 0.34fr);
      gap: 18px;
      align-items: start;
    }
    .featured-lead h2 {
      font-size: 22px;
      margin-bottom: 8px;
    }
    .featured-lead h2 a { color: var(--ink); }
    .featured-lead p { color: var(--muted); max-width: 820px; margin-bottom: 10px; }
    .featured-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
    .featured-lead-side {
      border-left: 1px solid var(--line);
      padding-left: 18px;
      display: grid;
      gap: 6px;
    }
    .featured-lead-side span,
    .featured-lead-side small {
      color: var(--muted);
      font-size: 12px;
    }
    .featured-lead-side strong { font-size: 22px; line-height: 1.1; }
    .featured-lead-side .actions { margin-top: 8px; }
    .table-scroll { width: 100%; overflow-x: auto; }
    table { width: 100%; min-width: 1040px; border-collapse: collapse; background: white; }
    thead th { position: sticky; top: 0; z-index: 1; }
    th, td { padding: 12px 14px; border-bottom: 1px solid #e6ebf1; text-align: left; vertical-align: top; font-size: 13px; }
    th { background: #f7f9fb; color: #5b6675; font-size: 11px; text-transform: uppercase; font-weight: 800; }
    tr:hover td { background: #fbfcfd; }
    .lead-title { color: var(--ink); font-weight: 800; }
    .lead-meta, .date-stack, .muted { color: var(--muted); }
    .lead-meta { margin-top: 4px; font-size: 12px; }
    .row-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; font-size: 12px; font-weight: 750; }
    .date-stack { display: grid; gap: 3px; min-width: 132px; }
    .date-stack strong { color: var(--ink); }
    .pill, .score-chip, .status-chip {
      display: inline-flex;
      align-items: center;
      border-radius: 6px;
      padding: 4px 7px;
      margin: 0 4px 4px 0;
      font-size: 12px;
      font-weight: 750;
      border: 1px solid transparent;
      white-space: nowrap;
    }
    .pill { background: #edf4f7; color: #23505d; border-color: #d4e4ea; }
    .score-high { background: #ffe8e1; color: #9a341f; border-color: #ffc7ba; }
    .score-medium { background: #fff3d8; color: #8a4b05; border-color: #ffd99b; }
    .score-low { background: #e8f5ee; color: #246b49; border-color: #c7e8d6; }
    .status-active { background: #e8f5ee; color: var(--green); border-color: #c7e8d6; }
    .status-closed { background: #edf0f4; color: #566273; border-color: #d7dee8; }
    .status-warning { background: #fff3d8; color: var(--amber); border-color: #ffd99b; }
    .status-unknown { background: #f5f7fa; color: #6b7280; border-color: #e1e7ef; }
    .source-chip { background: #eef2ff; color: #38437a; border-color: #dce2ff; }
    summary { cursor: pointer; color: var(--ink); }
    .empty-state { padding: 28px; color: var(--muted); text-align: center; }
    .saved-list { display: grid; gap: 8px; }
    .saved-note {
      border: 1px dashed #c8d1dc;
      border-radius: 8px;
      color: var(--muted);
      padding: 14px;
      background: #fbfcfd;
    }
    .saved-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: #fbfcfd;
    }
    .saved-row strong { display: block; }
    .price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .plan-card { padding: 18px; display: grid; gap: 12px; }
    .plan-card.featured { border-color: rgba(201,73,45,0.45); }
    .price { font-size: 28px; font-weight: 850; }
    .price small { color: var(--muted); font-size: 13px; font-weight: 600; }
    dl.detail-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 10px 18px; margin: 16px 0 0; }
    dt { color: var(--muted); font-weight: 750; }
    dd { margin: 0; }
    pre { white-space: pre-wrap; background: #17202b; color: white; padding: 16px; border-radius: 8px; overflow: auto; }
    .login-panel {
      width: min(440px, 100%);
      background: white;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 28px;
      box-shadow: var(--shadow);
    }
    .login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
    .login-brand span:last-child { display: grid; }
    .login-brand small { color: var(--muted); }
    .notice-banner { padding: 12px 14px; border-radius: 8px; background: #fff8ea; border: 1px solid #f1d39a; color: #74470a; }
    .trial-banner {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
      margin-bottom: 18px;
    }
    .trial-banner span { margin-left: auto; font-size: 12px; }
    .success-banner { background: #ecfdf3; border-color: #b7ebc7; color: #17633a; margin-bottom: 18px; }
    code {
      background: rgba(255,255,255,0.72);
      border: 1px solid rgba(0,0,0,0.08);
      border-radius: 5px;
      padding: 2px 5px;
      font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    }
    .locked-row td { background: #fbfcfd; }
    .locked-row:hover td { background: #f7f9fb; }
    .locked-text {
      filter: blur(3px);
      user-select: none;
      display: inline-block;
    }
    @media (max-width: 1040px) {
      .app-shell { display: block; }
      .workspace { width: 100%; margin-left: 0; }
      .sidebar {
        position: static;
        height: auto;
        width: auto;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        overflow: visible;
      }
      .side-nav { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
      .sidebar-footer { display: none; }
      .metric-grid, .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
      .two-grid { grid-template-columns: 1fr; }
    }
    @media (max-width: 760px) {
      h1 { font-size: 24px; }
      .sidebar { grid-template-columns: 1fr; padding: 14px; }
      .side-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
      .nav-link { text-align: center; padding: 9px 7px; }
      main { padding: 18px 14px 34px; }
      .topbar { padding: 0 14px; }
      .grid, .metric-grid, .price-grid { grid-template-columns: 1fr; }
      .pagination { align-items: stretch; flex-direction: column; }
      .pagination-actions { width: 100%; }
      .pagination-actions .button { flex: 1; }
      .featured-lead { grid-template-columns: 1fr; }
      .featured-lead-side { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 14px; }
      .page-head { display: block; }
      dl.detail-grid { grid-template-columns: 1fr; }
      th, td { padding: 10px; }
    }

