:root {
  --blue:#153e6f;
  --blue2:#235a92;
  --light:#f4f7fb;
  --border:#dce4ee;
  --text:#18212c;
  --muted:#677487;
  --green:#1c8a62;
  --danger:#b23a48;
}
* { box-sizing:border-box; }
body {
  margin:0;
  font-family:Segoe UI, Arial, sans-serif;
  color:var(--text);
  background:var(--light);
}
.topbar {
  min-height:72px;
  background:white;
  border-bottom:1px solid var(--border);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 28px;
  position:sticky;
  top:0;
  z-index:10;
}
.topbar nav { display:flex; gap:18px; align-items:center; }
.topbar a { color:var(--blue); text-decoration:none; font-weight:600; }
.brand-mark {
  font-size:30px;
  font-weight:900;
  letter-spacing:2px;
  color:var(--blue);
}
.brand-mark.small { font-size:20px; }
.subtitle { font-size:13px; color:var(--muted); margin-top:2px; }
.beta-pill {
  display:inline-block;
  padding:3px 7px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  color:white;
  background:var(--blue2);
  letter-spacing:.4px;
}
.count {
  display:inline-flex;
  min-width:20px;
  height:20px;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:var(--blue);
  color:white;
  font-size:11px;
}
.container { max-width:1180px; margin:0 auto; padding:28px 20px 50px; }
.hero {
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-end;
  margin-bottom:18px;
}
h1 { margin:0 0 6px; font-size:30px; }
h2 { margin:0 0 18px; font-size:18px; }
h3 { font-size:14px; margin:0 0 10px; }
p { margin:0; }
.muted { color:var(--muted); }
.sync-status {
  color:var(--muted);
  font-size:12px;
  background:white;
  padding:9px 12px;
  border:1px solid var(--border);
  border-radius:8px;
}
.dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--green); margin-right:6px; }
.grid-two { display:grid; grid-template-columns:1.45fr .8fr; gap:20px; align-items:start; }
.card {
  background:white;
  border:1px solid var(--border);
  border-radius:14px;
  padding:22px;
  box-shadow:0 4px 14px rgba(22,45,77,.04);
}
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.span-2 { grid-column:1 / -1; }
label { display:block; font-size:12px; font-weight:700; color:#465365; margin-bottom:6px; }
input, select {
  width:100%;
  min-height:42px;
  border:1px solid #cbd6e2;
  border-radius:8px;
  background:white;
  padding:8px 10px;
  font-size:14px;
  color:var(--text);
}
input:focus, select:focus { outline:2px solid rgba(35,90,146,.14); border-color:var(--blue2); }
button {
  border:0;
  border-radius:8px;
  cursor:pointer;
  font-weight:800;
  padding:11px 16px;
}
button:disabled { opacity:.6; cursor:wait; }
.primary { background:var(--blue); color:white; }
.secondary { background:#e8f0f9; color:var(--blue); }
.danger { background:#f7e8ea; color:var(--danger); }
.big { width:100%; min-height:48px; margin-top:18px; font-size:14px; }
.full { width:100%; }
.choice-box {
  border-top:1px solid var(--border);
  margin-top:18px;
  padding-top:16px;
}
.choice-row {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  border:1px solid var(--border);
  border-radius:9px;
  padding:10px 11px;
  margin:7px 0;
  font-weight:400;
}
.choice-row > span:first-child { display:grid; grid-template-columns:22px 1fr; column-gap:6px; align-items:center; }
.choice-row input[type=checkbox] { width:18px; min-height:18px; grid-row:1 / 3; }
.choice-row small { display:block; color:var(--muted); font-weight:400; }
.qty-mini { white-space:nowrap; font-size:11px; color:var(--muted); }
.qty-mini input { width:68px; min-height:32px; padding:4px 6px; margin-left:5px; }
.result-card { position:sticky; top:94px; }
.empty-state { color:var(--muted); padding:34px 10px; text-align:center; line-height:1.6; }
.result-title { font-size:22px; font-weight:800; color:var(--blue); }
.price-block {
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-top:1px solid var(--border);
  margin-top:20px;
  padding-top:18px;
}
.price-block strong { font-size:24px; }
.price-block.total strong { font-size:30px; color:var(--blue); }
.customer-note { font-size:11px; color:var(--muted); line-height:1.45; margin-top:16px; }
.alert { border-radius:8px; padding:10px 12px; margin-top:12px; font-size:13px; }
.alert.error { color:#8d2432; background:#fdecee; border:1px solid #f4cbd0; }
.hidden { display:none !important; }

.login-body { min-height:100vh; display:grid; place-items:center; padding:20px; }
.login-card {
  width:min(420px,100%);
  background:white;
  border:1px solid var(--border);
  border-radius:16px;
  padding:30px;
  box-shadow:0 10px 35px rgba(22,45,77,.10);
}
.login-card h1 { margin-top:12px; font-size:26px; }
.login-card form { margin-top:22px; }
.login-card input { margin-bottom:14px; }

.quote-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:18px; }
.actions { display:flex; gap:8px; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th, td { padding:12px 10px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top; }
th { color:#5a6878; font-size:11px; text-transform:uppercase; letter-spacing:.4px; }
td small { color:var(--muted); }
.money { text-align:right; white-space:nowrap; }
.right { text-align:right; }
.grand { font-size:18px; color:var(--blue); }
.link-danger { background:none; color:var(--danger); padding:0; }
.print-brand { display:none; }

@media (max-width:850px) {
  .grid-two { grid-template-columns:1fr; }
  .result-card { position:static; }
  .hero { align-items:flex-start; flex-direction:column; }
}
@media (max-width:600px) {
  .form-grid { grid-template-columns:1fr; }
  .span-2 { grid-column:auto; }
  .topbar { padding:12px 16px; }
  .container { padding:20px 12px 40px; }
}
@media print {
  body { background:white; }
  .no-print, .topbar { display:none !important; }
  .container { max-width:none; padding:0; }
  .card { box-shadow:none; border:0; padding:0; }
  .print-brand { display:block; }
  table { font-size:11px; }
  th, td { padding:8px 5px; }
}


.quote-meta { margin-bottom:18px; }
.meta-actions { margin-top:12px; }
.row-actions { white-space:nowrap; }
.link-action {
  background:none;
  color:var(--blue2);
  padding:0;
  margin-right:10px;
}
tfoot td {
  border-top:2px solid var(--border);
  border-bottom:0;
}
.grand strong {
  display:inline-block;
  padding:7px 10px;
  border-radius:8px;
  background:#eef4fb;
}
@media print {
  .quote-meta { display:block !important; }
  .quote-meta .meta-actions { display:none !important; }
  .quote-meta input {
    border:0;
    padding:0;
    min-height:auto;
    font-weight:600;
  }
}

.page-version {
  display:inline-block;
  margin-bottom:7px;
  padding:4px 8px;
  border-radius:999px;
  background:#e8f0f9;
  color:#153e6f;
  font-size:11px;
  font-weight:800;
  letter-spacing:.4px;
}
