/* ============================================================
   TrailerDesk — design system
   ============================================================ */
:root {
  --ink: #0b1a2b;
  --body: #334155;
  --muted: #66758a;
  --line: #e4e8ef;
  --line-strong: #d3dae4;
  --bg: #f4f6f9;
  --card: #ffffff;
  --brand: #123a5a;
  --brand-dark: #0c2c46;
  --brand-soft: #eaf1f7;
  --accent: #e39a37;
  --accent-soft: #fdf3e3;
  --green: #0f7b57;
  --red: #b42318;
  --amber: #9a5b06;
  --blue: #1c4f9c;
  --slate: #475569;
  --sidebar: #0b1f33;
  --sidebar-2: #0e273f;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, .08);
  --radius: 12px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 12px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.icon { width: 18px; height: 18px; flex: none; }
.icon-sm { width: 15px; height: 15px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 650; color: var(--ink); }
.nowrap { white-space: nowrap; }
.pre-line { white-space: pre-line; }
.right { text-align: right; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95em; }
.hidden { display: none !important; }

/* ---------- shell ---------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 250px;
  background: linear-gradient(180deg, var(--sidebar) 0%, #081827 100%);
  color: #a9bacd; display: flex; flex-direction: column;
  padding: 20px 14px 16px; z-index: 60; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 18px 20px 16px; margin: -20px -14px 18px; background: #fff; border-bottom: 1px solid #e6ebf1; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  background: var(--accent); color: #221604; display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(227, 154, 55, .28); overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand-logo-box { width: 100%; display: flex; align-items: center; justify-content: flex-start; }
.brand-logo-box img { width: 172px; max-width: 100%; height: auto; object-fit: contain; background: transparent; }
.brand-text { min-width: 0; }
.brand-name { color: #fff; font-weight: 650; font-size: 14.5px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #64748b; margin-top: 2px; }
.nav-section { margin-bottom: 15px; }
.nav-label { font-size: 10px; text-transform: uppercase; letter-spacing: .13em; color: #6b8097; padding: 0 11px; margin-bottom: 6px; font-weight: 600; }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 8px;
  color: #a9bacd; font-size: 13.5px; font-weight: 500; margin-bottom: 1px; position: relative;
  transition: background .12s, color .12s;
}
.nav-link .icon { width: 17px; height: 17px; opacity: .85; }
.nav-link:hover { background: rgba(255, 255, 255, .055); color: #fff; }
.nav-link.active { background: rgba(255, 255, 255, .085); color: #fff; }
.nav-link.active::before {
  content: ""; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px;
  background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-link .count {
  margin-left: auto; font-size: 10.5px; background: rgba(255, 255, 255, .1);
  color: #dbe6f1; padding: 1px 7px; border-radius: 20px; font-weight: 600;
}
.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.sidebar-foot .nav-link { font-size: 13px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 12px 10px 2px; }
.sidebar-user .avatar { background: rgba(255, 255, 255, .12); color: #fff; }
.sidebar-user .who { min-width: 0; flex: 1; }
.sidebar-user .who .strong { display: block; color: #fff; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user small { display: block; color: #7f93a9; font-size: 11px; }
.logout-form { margin: 0; flex: none; }
.logout-btn { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: #8fa3b8; cursor: pointer; padding: 0; }
.logout-btn:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.logout-btn .icon { width: 16px; height: 16px; }

.main { margin-left: 250px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 62px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  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: 40;
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.crumb { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand); }
.crumb .sep { opacity: .5; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
button.menu-toggle { display: none; }
.content { padding: 26px 28px 70px; width: 100%; max-width: 1440px; }

/* ---------- page head ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 23px; line-height: 1.25; }
.page-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 37px; padding: 0 14px; border-radius: 8px; font-family: inherit;
  font-size: 13.5px; font-weight: 600; border: 1px solid transparent; cursor: pointer;
  white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s;
  text-decoration: none;
}
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #241704; }
.btn-accent:hover { background: #d18a2b; color: #241704; }
.btn-secondary { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { background: #f8fafc; border-color: #bcc7d4; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--body); }
.btn-ghost:hover { background: rgba(15, 23, 42, .05); color: var(--ink); }
.btn-danger { background: #fff; border-color: #f0c6c1; color: var(--red); }
.btn-danger:hover { background: #fdf2f0; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; gap: 5px; }
.btn-sm .icon { width: 14px; height: 14px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14.5px; border-radius: 9px; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: 7px; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }
.link { font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.link .icon { width: 14px; height: 14px; }

.quick-actions { display: flex; gap: 8px; }
.quick-menu { position: relative; }
.quick-menu summary { list-style: none; }
.quick-menu summary::-webkit-details-marker { display: none; }
.quick-menu .menu {
  position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow-md); min-width: 190px; padding: 6px; z-index: 50;
}
.quick-menu .menu a { display: flex; gap: 9px; align-items: center; padding: 8px 10px; border-radius: 6px; color: var(--body); font-size: 13px; }
.quick-menu .menu a:hover { background: var(--bg); color: var(--ink); }

/* ---------- cards / stats ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 14.5px; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }
.card-foot { padding: 13px 20px; border-top: 1px solid var(--line); background: #fbfcfe; border-radius: 0 0 var(--radius) var(--radius); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { padding: 17px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.stat .stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat .label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.stat .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.stat .ico .icon { width: 16px; height: 16px; }
.stat .value { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -.025em; margin-top: 10px; line-height: 1.15; }
.stat .hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat .hint.good { color: var(--green); }
.stat .hint.bad { color: var(--red); }
.stat.accent .ico { background: var(--accent-soft); color: #8a5a08; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 620px; }
table.data.inventory-table { min-width: 900px; }
table.data.srt-table { min-width: 740px; }
table.data.srt-table td:first-child { white-space: nowrap; }
table.data .row-link { white-space: nowrap; }
table.data.inventory-table td:first-child { min-width: 250px; }
table.data.inventory-table td:nth-child(2) { min-width: 110px; }
@media (max-width: 1280px) { .col-fob, .col-type, .col-notes { display: none; } }
th.col-type, td.col-type { white-space: nowrap; }
table.data th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 650; padding: 10px 16px; background: #fafbfd;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 12px 16px; border-bottom: 1px solid #eef1f5; vertical-align: middle; color: var(--body); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fbfcfe; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data .primary { font-weight: 600; color: var(--ink); }
table.data .sub { font-size: 12px; color: var(--muted); margin-top: 1px; }
.row-link { color: var(--ink); font-weight: 600; }
.row-link:hover { color: var(--brand); }
.thumb { width: 46px; height: 36px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #f1f4f8; }
.thumb-lg { width: 60px; height: 46px; }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.row-actions .btn-icon { color: var(--muted); }
.row-actions .btn-icon:hover { color: var(--ink); background: #eef2f7; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge.green { background: #e8f6ef; color: #0b6b4a; }
.badge.amber { background: #fdf3e2; color: #91560a; }
.badge.red { background: #fdecea; color: #a52a1c; }
.badge.blue { background: #eaf1fb; color: #1c4f9c; }
.badge.slate { background: #eef1f5; color: #475569; }
.badge.plain::before { display: none; }
.badge.soft { background: var(--brand-soft); color: var(--brand); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: #f1f4f8; color: var(--muted); font-weight: 600; }
.tag-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label, .label { display: block; font-size: 12.5px; font-weight: 600; color: #3b4657; margin-bottom: 5px; }
.field .help { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.field .required { color: var(--red); margin-left: 2px; }
input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"])),
select, textarea {
  width: 100%; font-family: inherit; font-size: 13.8px; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 8px 11px; min-height: 37px; transition: border-color .12s, box-shadow .12s;
}
textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: #7d9cba; box-shadow: 0 0 0 3px rgba(18, 58, 90, .10);
}
input::placeholder, textarea::placeholder { color: #9aa8ba; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7a8d' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 14px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.form-section { padding: 20px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section > h3 { font-size: 14px; margin-bottom: 4px; }
.form-section > .section-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 15px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--body); cursor: pointer; }
.check input { width: 15px; height: 15px; min-height: 0; margin-top: 2px; accent-color: var(--brand); }
.check.tile { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fbfcfe; }
.check.tile:hover { border-color: var(--line-strong); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 20px; background: #fbfcfe; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
.form-actions .left { margin-right: auto; }
.input-group { display: flex; align-items: center; }
.input-prefix { border: 1px solid var(--line-strong); border-right: 0; background: #f6f8fb; color: var(--muted); border-radius: 8px 0 0 8px; padding: 0 10px; height: 37px; display: grid; place-items: center; font-size: 13px; }
.input-group input { border-radius: 0 8px 8px 0; }
.search-field { position: relative; }
.search-field .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #8b98a9; width: 16px; height: 16px; }
.search-field input { padding-left: 34px; }
.form-note { background: var(--accent-soft); border: 1px solid #f5e2c4; color: #7a4a06; border-radius: 8px; padding: 10px 13px; font-size: 12.5px; display: flex; gap: 8px; }
.form-note .icon { flex: none; margin-top: 1px; }

/* ---------- filters / tabs ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; flex: 1; }
.filters input, .filters select { height: 34px; min-height: 34px; font-size: 13px; padding-top: 5px; padding-bottom: 5px; }
.filters .search-field { min-width: 230px; flex: 0 1 280px; }
.filters select { width: auto; min-width: 120px; }
.filters .btn { height: 34px; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tab { padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab .count { font-size: 11px; background: #eef2f7; border-radius: 20px; padding: 1px 6px; margin-left: 4px; color: var(--muted); }
.tab.active .count { background: var(--brand-soft); color: var(--brand); }
.seg { display: inline-flex; background: #eef2f7; border-radius: 8px; padding: 3px; gap: 2px; }
.seg a, .seg button { padding: 5px 11px; border-radius: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); border: 0; background: transparent; cursor: pointer; }
.seg a.active, .seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }

/* ---------- empty / avatar ---------- */
.empty { text-align: center; padding: 52px 24px; }
.empty .empty-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .empty-ico .icon { width: 24px; height: 24px; }
.empty h3 { font-size: 15px; margin-bottom: 5px; }
.empty p { color: var(--muted); font-size: 13px; max-width: 420px; margin: 0 auto 16px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.avatar.lg { width: 54px; height: 54px; font-size: 17px; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }

/* ---------- photos ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-tile { position: relative; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); background: #eef2f7; aspect-ratio: 4 / 3; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile .primary-tag { position: absolute; top: 6px; left: 6px; background: rgba(11, 26, 43, .82); color: #fff; font-size: 10px; font-weight: 600; border-radius: 4px; padding: 2px 6px; letter-spacing: .03em; }
.photo-tile .photo-actions { position: absolute; inset: auto 0 0 0; display: flex; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(8, 19, 32, .72)); justify-content: flex-end; opacity: 0; transition: opacity .15s; }
.photo-tile:hover .photo-actions { opacity: 1; }
.photo-tile .photo-actions button { width: 26px; height: 26px; border-radius: 5px; border: 0; background: rgba(255, 255, 255, .92); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.hero-photo { border-radius: 12px; overflow: hidden; background: #eef2f7; border: 1px solid var(--line); aspect-ratio: 16 / 10; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.gallery { display: grid; grid-template-columns: 1fr; gap: 8px; }
.gallery-main { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: #eef2f7; border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.gallery-thumbs button { border: 2px solid transparent; padding: 0; border-radius: 7px; overflow: hidden; width: 76px; height: 56px; flex: none; cursor: pointer; background: #eef2f7; }
.gallery-thumbs button.active { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: #9aa9ba; background: repeating-linear-gradient(45deg, #f1f4f8, #f1f4f8 10px, #eaeef4 10px, #eaeef4 20px); }
.photo-placeholder .icon { width: 30px; height: 30px; }

/* ---------- dashboard extras ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.two-col > *, .doc-layout > *, .grid > * { min-width: 0; }
.chart { display: flex; align-items: flex-end; gap: 12px; height: 160px; padding: 6px 4px 0; }
.chart .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.chart .bar { width: 100%; max-width: 44px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #2a5c85, #123a5a); min-height: 4px; transition: height .3s; position: relative; }
.chart .bar:hover { background: var(--brand); }
.chart .bar-label { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.chart .bar-value { font-size: 11px; color: var(--ink); font-weight: 600; }
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { display: flex; gap: 11px; padding: 12px 20px; border-bottom: 1px solid #eef1f5; align-items: flex-start; }
.list-clean li:last-child { border-bottom: 0; }
.list-clean .li-ico { width: 30px; height: 30px; border-radius: 8px; background: #f1f4f8; color: var(--muted); display: grid; place-items: center; flex: none; }
.list-clean .li-ico .icon { width: 15px; height: 15px; }
.list-clean .li-title { font-size: 13px; color: var(--ink); font-weight: 500; }
.list-clean .li-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.activity { font-size: 12.5px; color: var(--muted); }
.activity time { color: #8b98a9; font-size: 11.5px; }

/* ---------- document builder ---------- */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.line-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.line-table th { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.line-table td { padding: 6px 4px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
.line-table input, .line-table select { min-height: 33px; font-size: 13px; padding: 5px 8px; border-color: #e2e8f0; }
.line-table .qty-input { width: 68px; text-align: right; }
.line-table .price-input { width: 110px; text-align: right; }
.line-table .line-total { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); white-space: nowrap; padding-right: 10px; }
.line-table .drag { color: #a8b4c2; cursor: grab; }
.line-row-actions { display: flex; gap: 2px; }
.total-box { padding: 16px 20px; }
.total-row { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; padding: 6px 0; }
.total-row.grand { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 16px; font-weight: 700; color: var(--ink); }
.total-row .label { color: var(--muted); font-weight: 500; }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sidebar-note { font-size: 12px; color: var(--muted); }
.attach-unit { display: flex; gap: 8px; }
.attach-unit select { flex: 1; min-width: 0; }

/* ---------- invoice status strip ---------- */
.status-strip { display: flex; align-items: center; gap: 22px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; background: #fcfdfe; }
.status-strip .item .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; }
.status-strip .item .v { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 1px; }
.progress { height: 6px; background: #e9eef4; border-radius: 10px; overflow: hidden; margin-top: 6px; }
.progress span { display: block; height: 100%; background: var(--green); border-radius: 10px; }

/* ---------- print sheet ---------- */
.sheet-wrap { background: #e8ecf2; padding: 28px 18px 50px; min-height: calc(100vh - 62px); }
.sheet {
  width: 8.5in; min-height: 11in; margin: 0 auto; background: #fff; color: #1a2433;
  padding: 0.55in 0.6in; box-shadow: 0 12px 40px rgba(15, 23, 42, .16); font-size: 11.5px; line-height: 1.45;
  display: flex; flex-direction: column;
}
.sheet h1, .sheet h2, .sheet h3 { color: #0b1a2b; }
.sheet-head { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 20px; border-bottom: 2px solid #123a5a; }
.sheet-brand { display: flex; gap: 14px; align-items: flex-start; }
.sheet-logo { max-height: 74px; max-width: 200px; object-fit: contain; }
.sheet-logo-text { font-size: 21px; font-weight: 700; letter-spacing: -.02em; color: #123a5a; }
.sheet-company { font-size: 10.5px; color: #5b6879; line-height: 1.55; margin-top: 4px; }
.sheet-doc { text-align: right; min-width: 190px; }
.sheet-doc .doc-title { font-size: 25px; letter-spacing: .04em; text-transform: uppercase; color: #123a5a; font-weight: 700; line-height: 1.1; }
.sheet-doc .doc-number { font-size: 12px; font-weight: 600; color: #445266; margin-top: 4px; }
.sheet-doc .doc-meta { margin-top: 10px; font-size: 10.5px; color: #5b6879; }
.sheet-doc .doc-meta div { display: flex; justify-content: flex-end; gap: 12px; }
.sheet-doc .doc-meta b { color: #23303f; font-weight: 600; }
.sheet-bill { display: flex; justify-content: space-between; gap: 30px; padding: 18px 0 14px; }
.sheet-bill .label { font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: #7a8797; font-weight: 700; margin-bottom: 4px; }
.sheet-bill .customer { font-size: 13px; font-weight: 700; color: #16202e; }
.sheet-bill .lines { font-size: 10.5px; color: #4d5a6b; line-height: 1.5; }
.sheet-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.sheet-table th { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: #fff; background: #123a5a; padding: 7px 9px; text-align: left; }
.sheet-table th.num, .sheet-table td.num { text-align: right; }
.sheet-table td { padding: 8px 9px; border-bottom: 1px solid #e3e8ef; vertical-align: top; font-size: 10.8px; }
.sheet-table .desc { font-weight: 600; color: #16202e; }
.sheet-table .desc-sub { font-size: 9.5px; color: #778394; margin-top: 2px; }
.sheet-totals { display: flex; justify-content: flex-end; margin-top: 14px; }
.sheet-totals .box { width: 2.9in; }
.sheet-totals .r { display: flex; justify-content: space-between; padding: 4px 0; font-size: 10.8px; color: #445266; }
.sheet-totals .r.total { border-top: 2px solid #123a5a; margin-top: 5px; padding-top: 7px; font-size: 14px; font-weight: 700; color: #0b1a2b; }
.sheet-totals .r.paid { color: #0f7b57; font-weight: 600; }
.sheet-totals .r.balance { font-size: 12px; font-weight: 700; }
.sheet-notes { display: flex; gap: 30px; margin-top: 24px; padding-top: 14px; border-top: 1px solid #e3e8ef; }
.sheet-notes .block { flex: 1; }
.sheet-notes .label { font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: #7a8797; font-weight: 700; margin-bottom: 4px; }
.sheet-notes .text { font-size: 10px; color: #4d5a6b; line-height: 1.55; white-space: pre-line; }
.sheet-sign { display: flex; gap: 40px; margin-top: 29px; }
.sheet-sign .sig { flex: 1; border-top: 1px solid #7a8797; padding-top: 5px; font-size: 9.5px; color: #7a8797; }
.sheet-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid #e3e8ef; display: flex; justify-content: space-between; gap: 20px; font-size: 9px; color: #7a8797; }
.sheet-watermark { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #b42318; font-weight: 700; }
.print-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 8.5in; margin: 0 auto 14px; }
.paid-stamp { display: inline-block; border: 2px solid #0f7b57; color: #0f7b57; font-weight: 800; letter-spacing: .12em; font-size: 13px; padding: 3px 10px; border-radius: 4px; transform: rotate(-4deg); text-transform: uppercase; }

/* ---------- equipment evaluation sheet ---------- */
.eval-unit { display: flex; gap: 26px; flex-wrap: wrap; padding: 16px 0 14px; border-bottom: 1px solid #e3e8ef; }
.eval-unit > div { min-width: 80px; }
.eval-unit b { font-size: 12px; color: #16202e; }
.eval-label { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: #7a8797; font-weight: 700; margin-bottom: 3px; }
.eval-section-title { margin: 18px 0 9px; font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #123a5a; padding-bottom: 4px; border-bottom: 1px solid #dfe5ec; }
.eval-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 16px; }
.eval-item { border: 1px solid #e3e8ef; border-radius: 5px; padding: 7px 9px; min-height: 54px; background: #fbfcfe; break-inside: avoid; }
.eval-text { font-size: 10.5px; color: #3c4859; white-space: pre-line; line-height: 1.45; }
.eval-summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-top: 14px; padding: 11px 14px; border: 1px solid #dbe3ec; border-radius: 6px; background: #f6f8fb; }
.eval-checks { display: flex; gap: 18px; font-size: 11.5px; color: #5b6879; font-weight: 600; }
.eval-checks .on { color: #0f7b57; }
.eval-estimate { font-size: 18px; font-weight: 700; color: #16202e; }
.eval-notes { margin-top: 14px; font-size: 10.5px; color: #3c4859; white-space: pre-line; line-height: 1.5; }
.eval-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.eval-photos figure { margin: 0; }
.eval-photos img { width: 100%; height: 1.35in; object-fit: cover; border-radius: 4px; border: 1px solid #e3e8ef; }

/* ---------- flash ---------- */
.flash-stack { position: fixed; top: 74px; right: 24px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.flash {
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--green);
  box-shadow: var(--shadow-md); border-radius: 9px; padding: 11px 14px; font-size: 13px;
  color: var(--ink); display: flex; gap: 9px; align-items: flex-start;
  animation: slideIn .25s ease;
}
.flash.error { border-left-color: var(--red); }
.flash .icon { width: 16px; height: 16px; color: var(--green); margin-top: 1px; }
.flash.error .icon { color: var(--red); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ============================================================
   Public website
   ============================================================ */
.public-body { background: #fff; }
.public-nav { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.public-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 26px; height: 106px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.public-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 700; font-size: 16.5px; letter-spacing: -.02em; }
.public-brand img { height: 92px; max-width: 180px; width: auto; object-fit: contain; }
.public-brand .brand-mark { width: 36px; height: 36px; }
.public-nav-links { display: flex; align-items: center; gap: 26px; }
.public-nav-links a { color: #445266; font-size: 14px; font-weight: 500; }
.public-nav-links a:hover { color: var(--brand); }
.public-nav-cta { display: flex; align-items: center; gap: 10px; }
.public-wrap { max-width: 1200px; margin: 0 auto; padding: 0 26px; }
.hero-public { background: #0b1f33; color: #e8eef5; position: relative; overflow: hidden; }
.hero-public::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 340px at 82% 18%, rgba(227, 154, 55, .18), transparent 65%),
              radial-gradient(600px 320px at 6% 90%, rgba(58, 116, 165, .22), transparent 65%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: center; padding: 74px 0 80px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: #f0b45f; font-weight: 650; margin-bottom: 16px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.hero-inner h1 { color: #fff; font-size: 46px; line-height: 1.08; letter-spacing: -.03em; font-weight: 700; margin-bottom: 16px; max-width: 560px; }
.hero-inner p { color: #b7c6d6; font-size: 16px; line-height: 1.6; max-width: 500px; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .k { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.hero-stats .l { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: #8fa3b8; margin-top: 2px; }
.hero-visual { position: relative; }
.hero-visual .frame { border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #1a3b57, #0d2236); border: 1px solid rgba(255, 255, 255, .12); box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
.hero-visual .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-visual .floating { position: absolute; left: -18px; bottom: 22px; background: #fff; color: var(--ink); border-radius: 11px; padding: 11px 15px; box-shadow: 0 14px 34px rgba(0, 0, 0, .22); display: flex; gap: 10px; align-items: center; }
.hero-visual .floating .icon { color: var(--green); width: 20px; height: 20px; }
.hero-visual .floating b { display: block; font-size: 13px; }
.hero-visual .floating span { font-size: 11px; color: var(--muted); }
.section { padding: 64px 0; }
.section.tint { background: #f7f9fb; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head .eyebrow { color: var(--brand); margin-bottom: 8px; }
.section-head .eyebrow::before { background: var(--brand); }
.section-head h2 { font-size: 29px; letter-spacing: -.025em; }
.section-head p { color: var(--muted); margin: 6px 0 0; max-width: 560px; }
.public-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.unit-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; transition: transform .16s, box-shadow .16s, border-color .16s; display: flex; flex-direction: column; }
.unit-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(15, 23, 42, .09); border-color: #d7e0ea; }
.unit-card .u-media { position: relative; aspect-ratio: 16 / 10; background: #eef2f7; overflow: hidden; }
.unit-card .u-media img { width: 100%; height: 100%; object-fit: cover; }
.unit-card .u-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.unit-card .u-badges .badge { background: rgba(255, 255, 255, .95); box-shadow: 0 2px 8px rgba(15, 23, 42, .14); }
.unit-card .u-body { padding: 15px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.unit-card .u-type { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 650; }
.unit-card h3 { font-size: 16px; margin: 3px 0 2px; }
.unit-card h3 a { color: var(--ink); }
.unit-card h3 a:hover { color: var(--brand); }
.unit-card .u-meta { font-size: 12.5px; color: var(--muted); }
.unit-card .u-facts { display: flex; gap: 14px; margin-top: 10px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.unit-card .u-facts span { display: inline-flex; align-items: center; gap: 4px; }
.unit-card .u-facts .icon { width: 13px; height: 13px; }
.unit-card .u-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 13px; }
.unit-card .u-price { font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.unit-card .u-price small { font-size: 11px; font-weight: 500; color: var(--muted); display: block; letter-spacing: 0; }
.unit-card .u-cta { font-size: 12.5px; font-weight: 650; color: var(--brand); display: inline-flex; align-items: center; gap: 4px; }
.unit-card .u-cta .icon { width: 14px; height: 14px; }
.filters-public { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr auto; gap: 8px; align-items: end; box-shadow: var(--shadow-sm); }
.filters-public .field { margin: 0; }
.filters-public label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.feature-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 26px 0; }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature .f-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.feature b { display: block; color: var(--ink); font-size: 13.5px; margin-bottom: 2px; }
.feature span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.public-footer { background: #0b1f33; color: #93a7bb; padding: 48px 0 26px; margin-top: 0; }
.public-footer .footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.public-footer h4 { color: #fff; font-size: 13px; margin-bottom: 12px; letter-spacing: .02em; }
.public-footer a { color: #a9bacd; font-size: 13px; display: block; margin-bottom: 8px; }
.public-footer a:hover { color: #fff; }
.public-footer .brand-name { color: #fff; }
.public-footer .foot-brand p { font-size: 13px; line-height: 1.6; max-width: 340px; color: #93a7bb; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 34px; padding-top: 18px; display: flex; justify-content: space-between; gap: 16px; font-size: 11.5px; color: #73879c; flex-wrap: wrap; }
.public-detail { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 30px; align-items: start; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.spec-table td { padding: 9px 0; border-bottom: 1px solid #eef1f5; }
.spec-table td:first-child { color: var(--muted); width: 42%; }
.spec-table td:last-child { font-weight: 600; color: var(--ink); }
.detail-title h1 { font-size: 30px; margin-bottom: 4px; }
.detail-title .sub { color: var(--muted); font-size: 14px; }
.price-box { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 20px; box-shadow: var(--shadow-sm); }
.price-box .price { font-size: 30px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; }
.price-box .price small { font-size: 12px; color: var(--muted); font-weight: 500; }
.inquiry-form { display: grid; gap: 10px; }
.inquiry-form input, .inquiry-form textarea { font-size: 13.5px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: var(--shadow-sm); }
.notice { border-radius: 9px; padding: 12px 15px; font-size: 13px; display: flex; gap: 9px; background: #e8f6ef; color: #0b6b4a; border: 1px solid #c5e8d8; }
.notice.error { background: #fdecea; color: #a52a1c; border-color: #f5cec9; }

/* responsive */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col, .doc-layout, .public-detail { grid-template-columns: 1fr; }
  .doc-form > div:nth-child(2) { order: -1; }
  .public-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters-public { grid-template-columns: 1fr 1fr 1fr; }
  .filters-public .btn { align-self: end; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .4); }
  .main { margin-left: 0; }
  button.menu-toggle { display: inline-flex; }
  .topbar, .content { padding-left: 18px; padding-right: 18px; }
  .hero-inner { grid-template-columns: 1fr; padding: 52px 0 56px; }
  .hero-inner h1 { font-size: 36px; }
  .hero-visual { display: none; }
  .public-nav-links { display: none; }
  .feature-strip { grid-template-columns: 1fr 1fr; }
  .public-footer .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .form-grid, .form-grid-3, .meta-grid { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: auto; }
}
@media (max-width: 640px) {
  .public-nav-inner { height: auto; min-height: 64px; padding: 10px 16px; gap: 12px; }
  .public-brand { font-size: 14px; gap: 8px; }
  .public-brand img { height: 50px; max-width: 110px; }
  .public-brand .brand-mark { width: 32px; height: 32px; }
  .public-nav-cta > .btn-ghost { display: none; }
  .public-nav-cta .btn { height: 34px; padding: 0 11px; font-size: 12.5px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .value { font-size: 20px; }
  .public-grid { grid-template-columns: 1fr; }
  .section { padding: 42px 0; }
  .hero-inner h1 { font-size: 31px; }
  .page-head { flex-direction: column; gap: 12px; }
  .filters-public { grid-template-columns: 1fr 1fr; }
  .filters-public .btn { grid-column: span 2; }
  .feature-strip { grid-template-columns: 1fr; }
  .public-footer .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .sheet { width: 100%; padding: 24px; min-height: 0; }
  .print-toolbar { width: 100%; }
  .sheet-head, .sheet-bill, .sheet-notes { flex-direction: column; }
  .sheet-doc { text-align: left; }
  .sheet-doc .doc-meta div { justify-content: flex-start; }
  .flash-stack { left: 16px; right: 16px; top: 70px; }
}

/* print */
@media print {
  @page { size: letter; margin: 0.45in; }
  body { background: #fff !important; }
  .sidebar, .topbar, .public-nav, .print-toolbar, .flash-stack, .no-print { display: none !important; }
  .main { margin: 0 !important; }
  .content { padding: 0 !important; max-width: none; }
  .sheet-wrap { background: #fff; padding: 0; min-height: 0; }
  .sheet { width: 100%; min-height: 0; padding: 0; box-shadow: none; margin: 0; font-size: 11px; }
  .sheet-table th { background: #123a5a !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge, .paid-stamp { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
  .card { break-inside: avoid; }
}

/* ============================================================
   Authentication
   ============================================================ */
.auth-body {
  min-height: 100vh; display: grid; place-items: center; padding: 30px;
  background:
    radial-gradient(700px 420px at 12% 8%, rgba(28, 79, 156, .10), transparent 65%),
    radial-gradient(600px 400px at 92% 92%, rgba(227, 154, 55, .10), transparent 65%),
    #eef2f7;
}
.auth-shell {
  width: min(100%, 1040px); min-height: 640px; display: grid; grid-template-columns: .92fr 1.08fr;
  background: #fff; border: 1px solid rgba(255, 255, 255, .8); border-radius: 20px; overflow: hidden;
  box-shadow: 0 34px 80px rgba(11, 31, 51, .18);
}
.auth-story {
  position: relative; overflow: hidden; padding: 38px 40px;
  background: linear-gradient(155deg, #0b1f33 0%, #103453 58%, #123a5a 100%);
  color: #c7d7e5; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.auth-story::before {
  content: ""; position: absolute; width: 470px; height: 470px; border-radius: 50%;
  right: -180px; top: -160px; border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: 0 0 0 55px rgba(255, 255, 255, .035), 0 0 0 110px rgba(255, 255, 255, .02);
}
.auth-story > * { position: relative; z-index: 1; }
.auth-story-top { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 650; font-size: 14px; letter-spacing: -.01em; }
.auth-story .eyebrow { color: #f0b45f; margin-bottom: 14px; }
.auth-story h1 { color: #fff; font-size: 42px; line-height: 1.05; letter-spacing: -.035em; margin-bottom: 16px; }
.auth-story p { color: #a9bed0; font-size: 14px; line-height: 1.65; max-width: 310px; margin: 0; }
.auth-features { display: grid; gap: 11px; margin-top: 28px; }
.auth-feature { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: #b8cadb; line-height: 1.45; }
.auth-feature .icon { width: 16px; height: 16px; color: #f0b45f; margin-top: 1px; }
.auth-story-foot { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #7f95a9; }
.auth-story-foot .icon { width: 14px; height: 14px; }

/* Portal login: brand-only story panel */
.auth-login .auth-story {
  align-items: center; justify-content: center; padding: 48px 40px;
  background:
    radial-gradient(420px 340px at 50% 108%, rgba(227, 154, 55, .18), transparent 70%),
    linear-gradient(155deg, #07192b 0%, #0e304d 55%, #123a5a 100%);
}
.auth-brand-panel {
  position: relative; z-index: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.auth-brand-plate {
  width: min(100%, 320px); padding: 26px 28px; border-radius: 18px; background: #fff;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .28), inset 0 1px 0 #fff;
}
.auth-brand-plate img { display: block; width: 100%; height: auto; }
.auth-brand-word { display: block; color: var(--brand); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.auth-brand-rule {
  width: 44px; height: 2px; margin: 34px 0 20px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(240, 180, 95, .25), #f0b45f, rgba(240, 180, 95, .25));
}
.auth-brand-label { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; }
@media (min-width: 901px) {
  .auth-login .auth-card > .auth-logo,
  .auth-login .auth-card > .auth-wordmark { display: none; }
}

.auth-main { padding: 48px 56px; display: flex; flex-direction: column; justify-content: center; background: #fff; }
.auth-card { width: 100%; max-width: 390px; margin: 0 auto; }
.auth-logo { width: 152px; height: auto; margin-bottom: 26px; }
.auth-wordmark { font-size: 20px; font-weight: 700; color: var(--brand); letter-spacing: -.02em; margin-bottom: 26px; }
.auth-kicker { font-size: 10.5px; text-transform: uppercase; letter-spacing: .13em; font-weight: 700; color: var(--accent); margin-bottom: 7px; }
.auth-card h1 { font-size: 28px; letter-spacing: -.03em; line-height: 1.15; }
.auth-card > p { font-size: 13.5px; margin: 8px 0 0; }
.auth-flashes { display: grid; gap: 8px; margin-bottom: 18px; }
.auth-flashes .notice { align-items: flex-start; }
.auth-flashes .notice .icon { width: 16px; height: 16px; margin-top: 1px; }
.auth-form { margin-top: 24px; }
.auth-form .field { margin-bottom: 16px; }
.auth-form .field label { font-size: 12px; }
.auth-form .btn { width: 100%; margin-top: 4px; }
.auth-help { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 18px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.auth-help strong { color: var(--body); }
.auth-legal { text-align: center; margin-top: 30px; font-size: 11px; color: #8b98a9; }

@media (max-width: 900px) {
  .auth-body { padding: 18px; }
  .auth-shell { grid-template-columns: 1fr; width: min(100%, 480px); min-height: 0; }
  .auth-story { display: none; }
  .auth-main { padding: 40px 34px; }
  .auth-card { max-width: none; }
}
@media (max-width: 480px) {
  .auth-body { padding: 0; background: #fff; place-items: stretch; }
  .auth-shell { border: 0; border-radius: 0; box-shadow: none; min-height: 100vh; }
  .auth-main { padding: 32px 22px; justify-content: flex-start; }
  .auth-logo { width: 132px; }
  .auth-card h1 { font-size: 25px; }
  .auth-legal { margin-top: auto; padding-top: 30px; }
}

/* ---- Modal dialogs ---- */
.modal { border: 0; padding: 0; width: min(540px, calc(100vw - 32px)); background: var(--card); color: var(--body); border-radius: var(--radius); box-shadow: 0 30px 80px rgba(15, 23, 42, .3); }
.modal::backdrop { background: rgba(11, 26, 43, .55); }
.modal form { margin: 0; }
.modal-head { display: flex; gap: 13px; padding: 22px 22px 0; }
.modal-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: #fdecea; color: var(--red); }
.modal-icon .icon { width: 20px; height: 20px; }
.modal-head h2 { margin: 0 0 7px; font-size: 18px; letter-spacing: -.01em; color: var(--ink); }
.modal-head p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.modal-head p strong { color: var(--red); }
.modal-body { padding: 18px 22px 6px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px 20px; border-top: 1px solid var(--line); margin-top: 8px; }
.btn-solid-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-solid-danger:hover { background: #941c12; border-color: #941c12; color: #fff; }
