:root {
  --ink: #172033;
  --muted: #697386;
  --line: #e3e8ef;
  --soft: #f6f8fb;
  --nav: #10192b;
  --nav-soft: #1b2942;
  --accent: #356ae6;
  --accent-soft: #e9efff;
  --green: #16794b;
  --amber: #a65f00;
  --red: #b42318;
  --shadow: 0 10px 30px rgba(26, 41, 68, .08);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--soft); font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { background: var(--nav); color: #dbe6f8; padding: 22px 14px; display: flex; flex-direction: column; gap: 20px; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 8px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 800; }
.brand strong { display: block; color: #fff; font-size: 16px; }
.brand small { color: #9fadc2; }
.nav { display: grid; gap: 4px; }
.nav button { border: 0; padding: 10px 12px; border-radius: 8px; color: #b8c5d9; background: transparent; text-align: left; font-weight: 600; }
.nav button:hover, .nav button.active { color: #fff; background: var(--nav-soft); }
.nav .nav-icon { display: inline-block; width: 23px; opacity: .9; }
.side-bottom { margin-top: auto; display: grid; gap: 12px; padding: 10px 8px 0; border-top: 1px solid #293852; }
.pilot { color: #f7ca77; font-size: 12px; }
.user-switch label { display: block; margin-bottom: 5px; font-size: 11px; color: #9fadc2; }
.user-switch select { width: 100%; color: #eaf0fa; background: #1b2942; border: 1px solid #33445e; border-radius: 7px; padding: 8px; }
.main { min-width: 0; }
.topbar { height: 72px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #fff; }
.crumb { color: var(--muted); font-size: 13px; }
.title-line { display: flex; align-items: center; gap: 10px; }
.title-line h1 { margin: 0; font-size: 22px; letter-spacing: -.3px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.sync { color: var(--muted); font-size: 12px; }
.view { padding: 28px 32px 44px; max-width: 1500px; }
.view-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.view-head h2 { margin: 0 0 4px; font-size: 20px; }
.view-head p { margin: 0; color: var(--muted); }
.btn { border: 1px solid transparent; border-radius: 8px; padding: 9px 13px; font-weight: 700; }
.btn.primary { color: #fff; background: var(--accent); }
.btn.primary:hover { background: #285ad1; }
.btn.secondary { color: #30415f; background: #fff; border-color: #cfd8e6; }
.btn.danger { color: var(--red); background: #fff0ef; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 16px; margin-bottom: 22px; }
.metric, .panel, .card { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.metric { padding: 18px; }
.metric span { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.metric strong { display: block; font-size: 27px; margin-top: 5px; letter-spacing: -.5px; }
.metric small { color: var(--muted); display: block; margin-top: 5px; }
.dashboard-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.panel { padding: 18px; }
.panel h3 { font-size: 15px; margin: 0 0 14px; }
.stage-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf0f4; }
.stage-row:last-child { border: 0; }
.stage-count { background: var(--accent-soft); color: #224fae; padding: 2px 8px; border-radius: 20px; font-weight: 800; }
.quick { display: grid; gap: 9px; }
.quick button { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 10px; color: #344155; font-weight: 600; }
.quick button:hover { border-color: #aabbda; background: #f9fbff; }
.table-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.search { width: min(380px, 100%); border: 1px solid #cfd8e6; padding: 10px 12px; border-radius: 8px; background: #fff; }
.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th { background: #f4f7fb; color: #536175; font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .04em; padding: 11px 12px; white-space: nowrap; }
td { padding: 12px; border-top: 1px solid #edf0f4; vertical-align: top; }
tr:hover td { background: #fafcff; }
.empty { padding: 36px 18px; color: var(--muted); text-align: center; }
.badge { display: inline-block; border-radius: 999px; padding: 3px 8px; white-space: nowrap; font-size: 12px; font-weight: 700; }
.badge.blue { color: #2253b5; background: #e7efff; }.badge.green { color: #146c45; background: #e4f5eb; }.badge.amber { color: #995704; background: #fff1d6; }.badge.red { color: #a5211a; background: #fee8e7; }.badge.gray { color: #5c6778; background: #eef1f5; }
.split { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr); gap: 20px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.form-card h3 { margin: 0 0 4px; }.form-card > p { color: var(--muted); margin: 0 0 17px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }.form-grid.one { grid-template-columns: 1fr; }
.field { display: grid; gap: 6px; }.field label { font-size: 12px; color: #4f5e73; font-weight: 700; }.field input, .field select, .field textarea { width: 100%; border: 1px solid #ccd6e3; border-radius: 7px; padding: 9px 10px; background: #fff; color: var(--ink); }.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid #dce7ff; border-color: var(--accent); }
.calc-result { border: 1px solid #cfe7d7; background: #f3fbf6; border-radius: 10px; padding: 16px; margin: 16px 0; }.calc-result .amount { font-size: 29px; font-weight: 800; color: #146c45; margin: 2px 0; }.calc-result small { color: #496155; }
.notice { border-radius: 8px; padding: 11px 12px; margin: 12px 0; font-size: 13px; }.notice.info { background: #eaf1ff; color: #214f9f; }.notice.warn { background: #fff4dd; color: #82520c; }.notice.danger { background: #fff0ef; color: #9a2921; }
.direction-box { display: grid; gap: 7px; padding: 12px; background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; margin: 12px 0; }.direction-box strong { font-size: 12px; }.direction-box span { color: var(--muted); font-size: 12px; }
.quote-list { display: grid; gap: 10px; }.quote { padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }.quote-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; }.quote small { color: var(--muted); }
.integrations { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 16px; }.integration { padding: 18px; }.integration .top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }.integration h3 { margin: 0; }.integration p { color: var(--muted); min-height: 40px; }.integration footer { border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); font-size: 12px; }
.docs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }.mini-list { display: grid; gap: 10px; }.mini-item { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf0f4; padding-bottom: 10px; }.mini-item:last-child { border: 0; padding-bottom: 0; }
.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(15, 25, 43, .48); z-index: 20; }.modal { width: min(600px, 100%); max-height: 92vh; overflow: auto; padding: 22px; background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(15, 25, 43, .25); }.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }.modal-head h3 { margin: 0; }.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }.toast { position: fixed; z-index: 50; right: 24px; bottom: 24px; max-width: 360px; padding: 12px 15px; color: #fff; border-radius: 9px; box-shadow: var(--shadow); background: #26384f; }.toast.error { background: #a5211a; }
@media (max-width: 960px) { .app-shell { grid-template-columns: 1fr; }.sidebar { display: none; }.topbar { padding: 0 18px; }.view { padding: 20px 18px; }.metrics { grid-template-columns: 1fr 1fr; }.dashboard-grid, .split, .docs-grid { grid-template-columns: 1fr; }.integrations { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .top-actions .sync { display: none; }.metrics { grid-template-columns: 1fr; }.form-grid { grid-template-columns: 1fr; }.view-head { align-items: stretch; flex-direction: column; } }
