:root {
  color-scheme: light;
  --ink: #142436;
  --muted: #54657a;
  --nav: #111f32;
  --nav-text: #d4dfeb;
  --paper: #fff;
  --canvas: #f3f6fa;
  --line: #dce4ed;
  --accent: #086451;
  --accent-dark: #074c3e;
  --accent-light: #e1f3eb;
  --amber: #83500b;
  font-family: "Geist", "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #277dc1; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -.04em; line-height: 1.12; overflow-wrap: anywhere; }
h2 { font-size: 1.12rem; letter-spacing: -.02em; }
h3 { font-size: 1rem; margin: 1.35rem 0 .65rem; }
p { line-height: 1.55; }
small { color: var(--muted); }
.skip-link { position: fixed; top: 0; left: 10px; transform: translateY(-110%); z-index: 2; background: white; padding: 10px; }
.skip-link:focus { transform: translateY(0); }
.layout { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { display: flex; flex-direction: column; padding: 26px 15px 18px; color: var(--nav-text); background: var(--nav); }
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 10px 27px; color: #fff; font-weight: 780; letter-spacing: .13em; text-decoration: none; }
.brand img { width: 43px; height: 43px; object-fit: contain; border-radius: 8px; background: white; }
.brand small { display: block; color: #a9bdce; font-weight: 500; letter-spacing: .03em; margin-top: 3px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { color: var(--nav-text); text-decoration: none; padding: 12px; border-radius: 8px; font-weight: 560; }
.sidebar nav a span { display: inline-block; width: 23px; color: #8cb7c5; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: #25394e; color: white; }
.sidebar nav a[aria-current] span { color: #82e0bd; }
.account { margin-top: auto; border-top: 1px solid #3a4b5e; padding: 16px 9px 3px; overflow-wrap: anywhere; }
.account small { display: block; color: #b0c5d8; margin-top: 4px; }
.account div { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 13px; align-items: center; }
.account a, .account button { color: var(--nav-text); background: none; border: 0; padding: 0; text-decoration: underline; font: inherit; font-size: .77rem; cursor: pointer; }
.workspace { width: 100%; max-width: 1520px; margin-inline: auto; padding: 26px clamp(18px, 3vw, 48px) 46px; }
.environment { display: inline-block; background: #fff0d8; color: #744402; border: 1px solid #ebd7b5; border-radius: 5px; font-size: .76rem; padding: 5px 9px; margin-bottom: 16px; font-weight: 680; }
.page-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: 9px 0 24px; }
.page-heading p { margin-top: 8px; color: var(--muted); }
.page-heading .eyebrow { margin: 0 0 8px; font-size: .8rem; color: var(--accent-dark); font-weight: 680; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; text-decoration: none; border: 1px solid transparent; border-radius: 8px; padding: 8px 15px; font: inherit; font-weight: 660; cursor: pointer; line-height: 1.25; }
.button:disabled { cursor: default; opacity: .5; }
.primary { color: white; background: var(--accent); }
.primary:hover { background: var(--accent-dark); }
.secondary { color: var(--ink); background: white; border-color: #b9c9d8; }
.secondary:hover { background: #edf3f8; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.metric, .panel { border: 1px solid var(--line); background: var(--paper); border-radius: 12px; box-shadow: 0 2px 5px #152c4710; }
.metric { text-decoration: none; color: var(--ink); display: grid; gap: 10px; padding: 17px; border-top: 3px solid #7ca1bd; }
.metric:hover { border-color: #89b0a6; }
.metric span { font-weight: 640; font-size: .86rem; }
.metric strong { font-size: 2rem; line-height: 1; letter-spacing: -.05em; }
.metric small { font-size: .78rem; color: var(--accent-dark); }
.metric-warn { border-top-color: #bc8432; }
.metric-renew { border-top-color: #3c927d; }
.dashboard-grid, .detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel { min-width: 0; }
.panel-title { padding: 17px 18px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.panel-title a { font-size: .8rem; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f5f8fb; color: #485a70; font-size: .76rem; font-weight: 720; }
td { font-size: .87rem; overflow-wrap: anywhere; }
td small, .queue small, .activity small { display: block; margin-top: 5px; font-size: .75rem; }
.row-title { color: var(--ink); font-weight: 690; text-decoration: none; }
.row-title:hover { text-decoration: underline; }
.pill { display: inline-block; font-size: .72rem; font-weight: 680; border-radius: 999px; background: #ebf0f5; color: #3c526b; padding: 4px 8px; white-space: nowrap; }
.pill.active, .pill.won, .pill.accepted { background: var(--accent-light); color: #09563e; }
.pill.qualified, .pill.quoted, .pill.sent { background: #e6effe; color: #294978; }
.pill.expired, .pill.suspended, .pill.declined { background: #fff0da; color: #784b0b; }
.queue { border-top: 1px solid var(--line); }
.queue > a, .queue > p { padding: 14px 17px; }
.queue > a { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.queue > a:hover { background: #f5f8fb; }
.queue > a:last-child { border-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 16px; }
.filters label, .field label, .login-card label, .form-panel > form label { display: grid; gap: 6px; font-weight: 650; font-size: .84rem; }
.filters > a { align-self: center; }
input:not([type=checkbox]), select, textarea { width: 100%; padding: 9px 10px; min-height: 42px; border: 1px solid #b5c5d5; border-radius: 7px; font: inherit; color: var(--ink); background: white; }
input:disabled, select:disabled { background: #edf1f6; }
textarea { resize: vertical; }
.pagination { display: flex; justify-content: space-between; padding: 12px 16px; font-size: .8rem; color: var(--muted); }
.pagination div, .actions, .form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-panel, .detail-panel { padding: clamp(15px, 3vw, 24px); }
.form-panel { max-width: 930px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field small { display: block; margin-top: 5px; }
.field:has(textarea), .field.wide { grid-column: 1 / -1; }
.form-actions { margin-top: 24px; }
.line-items { margin-top: 24px; }
.line-items p { margin: 6px 0 12px; color: var(--muted); }
.item-row { padding: 12px; background: #f6f8fb; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.item-row .field-grid { grid-template-columns: 2fr 1fr 1fr auto; align-items: end; gap: 10px; }
.item-row .field:has(input[type=checkbox]) { align-self: center; }
.back { display: inline-block; margin-bottom: 9px; font-size: .84rem; }
.detail-side { display: grid; gap: 16px; }
dl { display: grid; grid-template-columns: minmax(85px, .8fr) minmax(0, 1.4fr); gap: 9px 12px; margin: 14px 0 16px; font-size: .88rem; }
dt { color: var(--muted); }
dd { margin: 0; overflow-wrap: anywhere; }
.preline { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 12px; }
.activity { list-style: none; padding: 0; margin: 10px 0 0; font-size: .88rem; }
.activity li { padding: 10px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.activity li p { margin: 5px 0; }
.notice { background: var(--accent-light); color: var(--accent-dark); border-radius: 7px; padding: 10px 12px; margin-bottom: 14px; }
.errorlist { color: #982e27; font-size: .85rem; padding-left: 18px; }
.nowrap { white-space: nowrap; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #142840; }
.login-card { background: #fff; padding: clamp(23px, 5vw, 40px); width: min(100%, 450px); border-radius: 14px; }
.login-card img { width: 66px; margin-bottom: 12px; }
.login-card > p { color: var(--muted); margin: 10px 0 20px; }
.login-card form p, .form-panel > p { margin-bottom: 13px; }
.login-card button { width: 100%; margin-top: 8px; }
.print-actions { max-width: 820px; margin: 20px auto; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-inline: 10px; }
.quote-sheet { max-width: 820px; background: white; border: 1px solid var(--line); margin: 0 auto 24px; padding: clamp(18px, 5vw, 42px); font-family: Arial, sans-serif; color: #17191c; }
.quote-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 14px; border-bottom: 1px solid #cbd0d5; }
.quote-header img { width: min(35%, 178px); height: auto; }
.quote-seller { text-align: right; }
.quote-seller h1 { font-size: clamp(1.45rem, 4vw, 2.25rem); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; }
.quote-tax { color: #595e64; font-size: .78rem; margin: 4px 0 12px; }
.quote-sheet address { font-style: normal; font-size: .85rem; line-height: 1.38; overflow-wrap: anywhere; }
.quote-parties { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr); gap: 18px; padding: 14px 0 17px; }
.quote-label { display: block; text-transform: uppercase; color: #5b626a; font-size: .73rem; }
.quote-address { white-space: pre-line; }
.quote-meta { grid-template-columns: minmax(0, 1fr) minmax(0, .92fr); gap: 5px 8px; margin: 0; align-self: start; font-size: .82rem; }
.quote-meta dt { text-align: right; color: #17191c; font-weight: bold; overflow-wrap: anywhere; }
.quote-total { background: #f0f2f4; padding: 5px; font-weight: bold; }
.quote-subject { margin: 3px 0 7px; }
.quote-sheet h3 { margin: 15px 0 5px; font-size: .88rem; }
.quote-sheet .preline { font-size: .85rem; }
.quote-prices th { color: white; background: #3e538d; }
.quote-prices :is(th, td) { padding: 8px 9px; }
.quote-prices :is(th, td):not(:first-child) { text-align: right; }
.quote-prices tfoot th { text-align: right; background: white; color: #17191c; }
.quote-prices tfoot td { font-weight: bold; }
.draft-mark { margin: 9px 0; font-size: .8rem; font-weight: 720; color: #7b4708; }
@media (max-width: 520px) { .quote-parties { grid-template-columns: 1fr; } .quote-meta dt { text-align: left; } }
@media (max-width: 1050px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 740px) {
  .layout, .detail-grid { grid-template-columns: 1fr; }
  .sidebar { padding: 10px; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .sidebar nav a { padding: 9px; }
  .sidebar nav a span { width: auto; }
  .brand { padding: 3px 8px 9px; }
  .account { padding: 8px 8px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 7px; }
  .account div, .account small { margin-top: 0; }
  .item-row .field-grid { grid-template-columns: 1fr 1fr; }
  .item-row .field:first-of-type { grid-column: 1 / -1; }
}
@media (max-width: 425px) { .workspace { padding-inline: 12px; } .field-grid { grid-template-columns: 1fr; } .metric { padding: 12px; } }
@media print {
  @page { size: Letter; margin: 12mm; }
  :root, .print-body { background: white; font-size: 11pt; }
  .print-actions { display: none; }
  .quote-sheet { border: 0; max-width: none; margin: 0; padding: 0; }
  .quote-sheet { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .quote-seller h1 { font-size: 26pt; }
  tr, .quote-header, .quote-parties { break-inside: avoid; }
  h2 { break-after: avoid; }
}

.button.danger { background: #8e2825; color: white; }
.button.danger:hover { background: #6c1e1c; }
.access-fields, .account-status { margin-top: 1.25rem; }
.access-fields fieldset { margin: 0; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 8px; }
.access-fields legend { font-weight: 650; }
.access-fields fieldset label { display: flex; align-items: center; gap: .45rem; padding: .2rem 0; }
.access-fields ul { padding-left: 1.2rem; }
.account-status p { margin-top: .5rem; }

.imei-photo { display: block; max-width: 100%; max-height: 370px; border: 1px solid var(--line); border-radius: 8px; }
