:root {
  --gold: #0077e6;
  --gold-2: #3da9f4;
  --gold-ink: #ffffff;
  --navy: #0d2137;
  --muted: #5b6b7c;
  --bg: #f5f8fc;
  --card: #ffffff;
  --line: rgba(13, 33, 55, 0.1);
  --sans: "Segoe UI", Calibri, "Noto Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: auto;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--navy);
  overflow-x: clip;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
img, svg, video, canvas { max-width: 100%; height: auto; }
button, a, input, select, textarea { touch-action: manipulation; }
button, .btn, .ch-btn, .seg button, .chip, .panel-link { min-height: 2.75rem; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
@media (max-width: 1023px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]),
  select, textarea { font-size: 16px; }
}

.container, .wrap {
  width: min(72rem, calc(100% - 2 * max(1rem, env(safe-area-inset-left, 0px))));
  margin-inline: auto;
}
.kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
h1 { margin: 0.35rem 0 0; font-size: clamp(1.55rem, 2.8vw, 2.25rem); letter-spacing: -0.03em; line-height: 1.15; }
.muted { color: var(--muted); }
.lead { max-width: 36rem; margin: 0.8rem 0 0; line-height: 1.7; color: var(--muted); }
.page-hero { padding: 1.75rem 0 1.5rem; }
.section-title { margin: 0 0 1rem; }
.grid-2 { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1.2fr 0.8fr; align-items: center; } }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.stat, .card, .brand-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.stat { display: flex; flex-direction: column; justify-content: center; min-height: 5.25rem; padding: 1rem 1.05rem; }
.stat strong { display: block; font-size: 1.45rem; line-height: 1.1; }
.stat span { display: block; margin-top: 0.35rem; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.35rem; }
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.5rem; padding: 0 1rem; border-radius: 0.5rem;
  border: 1px solid transparent; background: var(--gold); color: var(--gold-ink);
  font-size: 0.9rem; font-weight: 600; cursor: pointer;
}
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-danger { background: #b91c1c; color: #fff; }
.btn.btn-ghost, button.btn-ghost {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn.btn-danger, button.btn-danger {
  background: #b91c1c;
  color: #fff;
}
.btn-navy { background: var(--navy); color: #fff; }
.site-header {
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  padding-top: env(safe-area-inset-top);
}
.header-inner { padding: 0.35rem 0; }
.header-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.75rem;
  min-width: 0;
}
.logo-link {
  display: flex; align-items: center; align-self: center;
  line-height: 0; margin-left: -0.1rem;
}
.logo-link img {
  display: block; height: 2.6rem; width: auto; max-width: 11rem;
  object-fit: contain; object-position: left center;
}
.nav-desktop {
  display: flex; min-width: 0; align-self: center;
  flex-wrap: nowrap; align-items: center; justify-content: center;
  gap: 0.05rem; overflow-x: auto; color: var(--muted);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.nav-desktop::-webkit-scrollbar { display: none; }
.nav-desktop a {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2.4rem; min-height: 2.4rem; padding: 0 0.45rem; border-radius: 0.4rem;
  font-size: 0.82rem; font-weight: 500; white-space: nowrap; line-height: 1;
}
.nav-desktop a:hover { color: var(--gold); background: rgba(0, 119, 230, 0.08); }
.header-tools {
  display: flex; align-items: center; justify-content: flex-end; align-self: center;
  gap: 0.55rem;
}
.net-status {
  display: inline-flex; align-items: center; gap: 0.35rem;
  max-width: 15.5rem; min-height: 2.15rem; padding: 0.15rem 0.55rem;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--muted); font-size: 11px; font-weight: 650; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.net-status .net-dot {
  width: 0.48rem; height: 0.48rem; border-radius: 50%; flex-shrink: 0; background: #16a34a;
}
.net-status.is-on { color: #047857; }
.net-status.is-on .net-dot { background: #16a34a; }
.net-status.is-off { color: #b91c1c; }
.net-status.is-off .net-dot { background: #dc2626; }
.net-status.is-sync { color: #b45309; }
.net-status.is-sync .net-dot { background: #d97706; }
@media print { .net-status { display: none !important; } }
.site-header .panel-link {
  display: inline-flex; height: 2.4rem; min-height: 2.4rem; align-items: center; justify-content: center;
  flex-shrink: 0; border: 1px solid var(--line); border-radius: 0.5rem; padding: 0 0.7rem;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  line-height: 1;
}
@media (min-width: 768px) {
  .logo-link img { height: 3rem; max-width: 13.5rem; }
  .nav-desktop { gap: 0.2rem; }
  .nav-desktop a { height: 2.5rem; min-height: 2.5rem; padding: 0 0.75rem; font-size: 0.9rem; }
  .site-header .panel-link { height: 2.5rem; min-height: 2.5rem; padding: 0 0.85rem; }
}
@media (min-width: 1024px) {
  .logo-link img { height: 3.15rem; max-width: 14.5rem; }
}
.site-footer { margin-top: 3rem; padding: 2rem 1rem; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 12px; }
.brand-grid { display: grid; gap: 1rem; }
@media (min-width: 640px) { .brand-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .brand-grid { grid-template-columns: 1fr 1fr 1fr; } }
.brand-card { display: flex; flex-direction: column; height: 100%; padding: 1.25rem 1.3rem 1.15rem; }
.brand-card:hover { border-color: var(--gold); }
.brand-top { display: flex; justify-content: space-between; align-items: center; }
.brand-count { font-size: 12px; color: var(--muted); }
.brand-card h3 { margin: 0.9rem 0 0.2rem; font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.2; }
.brand-card .kicker { margin: 0; }
.brand-blurb { margin: 0.65rem 0 0; line-height: 1.6; color: var(--muted); flex: 1; }
.brand-go { margin: 1rem 0 0; color: var(--gold); font-weight: 600; font-size: 0.9rem; }
.dot { width: 0.65rem; height: 0.65rem; border-radius: 99px; flex-shrink: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.chip {
  display: inline-flex; min-height: 2.5rem; align-items: center; border-radius: 999px;
  padding: 0 1rem; border: 1px solid var(--line); color: var(--muted); font-size: 0.9rem;
}
.chip.is-active { background: var(--gold); color: #fff; border-color: var(--gold); }
.price-block { margin-top: 2rem; }
.price-group { margin-bottom: 2.2rem; }
.price-group h2 { margin: 0 0 0.7rem; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.table-card { overflow: hidden; border: 1px solid var(--line); border-radius: 0.9rem; background: #fff; }
.mobile-list { display: block; }
.mobile-row { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.8rem 0.85rem; border-top: 1px solid var(--line); }
.mobile-row:first-child { border-top: 0; }
.data-table { display: none; width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th { background: #f4f8fc; text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0.6rem 1rem; }
.data-table td { padding: 0.6rem 1rem; border-top: 1px solid var(--line); }
.data-table th.num, .data-table td.num, .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.data-table th.col-brand, .data-table td.col-brand { text-align: left; white-space: nowrap; width: 8.5rem; }
.data-table th.qty, .data-table td.qty { text-align: center; }
.data-table td.qty input {
  display: block; box-sizing: border-box; width: 6.25rem; height: 2.75rem;
  margin: 0 auto; padding: 0 0.65rem; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; color: var(--navy);
  text-align: center; font-size: 1rem; font-weight: 600; line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.data-table td.qty input:focus { outline: none; border-color: var(--gold); }
.data-table td select {
  width: 100%; max-width: 28rem; height: 2.65rem; min-height: 2.65rem;
  border: 1px solid var(--line); border-radius: 0.55rem; padding: 0 2.25rem 0 0.9rem;
  background-color: #fff; color: var(--navy); font-size: 1rem; font-weight: 600; line-height: 2.65rem;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235b6b7c' d='M1.2 1.5 6 6.3 10.8 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 0.75rem;
}
.data-table td select:focus { outline: none; border-color: var(--gold); }
.data-table td.qty input::-webkit-outer-spin-button,
.data-table td.qty input::-webkit-inner-spin-button {
  appearance: none; -webkit-appearance: none; margin: 0;
}
@media (min-width: 768px) {
  .mobile-list { display: none; }
  .data-table { display: table; }
}
.product-hero { display: grid; gap: 2rem; margin-top: 2rem; }
@media (min-width: 768px) { .product-hero { grid-template-columns: minmax(0,280px) 1fr; } }
.product-photo, .product-photo-empty {
  width: 100%; border-radius: 1rem; border: 1px solid var(--line); background: #fff; object-fit: contain;
}
.product-photo-empty { aspect-ratio: 1; display: grid; place-items: center; color: var(--muted); }
body.page-login {
  display: flex; flex-direction: column; min-height: 100dvh;
}
body.page-login .site-header { flex-shrink: 0; }
.login-wrap {
  flex: 1 0 auto;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 1.25rem 1rem 2rem;
}
.login-card {
  width: min(24rem, 100%);
  background: #fff; border: 1px solid var(--line); border-radius: 1.1rem;
  padding: 1.25rem 1.35rem 1.2rem;
}
.login-card .kicker { margin: 0; }
.login-card h1 { margin: 0.2rem 0 0; font-size: clamp(1.4rem, 2.4vw, 1.7rem); }
.login-card > .muted { margin: 0.4rem 0 0; line-height: 1.55; }
.login-card form { margin-top: 1.05rem; display: grid; gap: 0.7rem; }
.login-card .login-back { margin: 0.9rem 0 0; }
body.page-login .site-footer { margin-top: auto; padding-top: 1.15rem; padding-bottom: 1.35rem; }
.field {
  display: flex; flex-direction: column; gap: 0.45rem;
  font-size: 0.875rem; font-weight: 600; letter-spacing: 0.01em; color: #4a5c6e;
}
.field input:not([type="checkbox"]):not([type="radio"]),
.field select, .field textarea, .input, .select {
  width: 100%; height: 2.65rem; min-height: 2.65rem; border: 1px solid var(--line);
  border-radius: 0.55rem; padding: 0 0.9rem; background: #fff; color: var(--navy);
  font-size: 1rem; font-weight: 600; line-height: 2.65rem;
}
.field select {
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235b6b7c' d='M1.2 1.5 6 6.3 10.8 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 0.75rem;
  padding-right: 2.25rem;
}
.field textarea { height: auto; min-height: 8rem; line-height: 1.5; padding: 0.7rem 0.9rem; resize: vertical; font-weight: 500; }
.testi-grid { display: grid; gap: 1.25rem; margin-top: 2rem; }
@media (min-width: 700px) { .testi-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .testi-grid { grid-template-columns: 1fr 1fr 1fr; } }
.testi-card { overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.testi-photo {
  position: relative; overflow: hidden; aspect-ratio: 4 / 5;
  background: #eef3f8; border-bottom: 1px solid var(--line);
}
.testi-zoom {
  position: absolute; inset: 0; display: block; padding: 0; border: 0; background: #eef3f8; cursor: zoom-in;
}
.testi-photo img {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: center;
}
.zoom-overlay {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  margin: 0; border: 0; background: rgba(13, 33, 55, 0.82); cursor: zoom-out;
  padding: max(0.65rem, env(safe-area-inset-top, 0px))
    max(0.65rem, env(safe-area-inset-right, 0px))
    max(0.65rem, env(safe-area-inset-bottom, 0px))
    max(0.65rem, env(safe-area-inset-left, 0px));
}
.zoom-overlay img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(96vw, 1920px);
  max-height: min(92dvh, 92vh);
  object-fit: contain;
  background: #111;
  border-radius: 0.4rem;
  cursor: default;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.testi-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.testi-quote { margin: 0; font-size: 0.95rem; line-height: 1.65; color: var(--navy); }
.testi-name { margin: 0; font-weight: 650; font-size: 0.92rem; }
.admin-testi-photo { width: 3.6rem; height: 4.5rem; object-fit: cover; object-position: center; background: #eef3f8; border: 1px solid var(--line); border-radius: 0.4rem; }
.upload-progress { margin-top: 0.15rem; }
.upload-progress-track {
  height: 0.5rem; background: #e8eef5; border-radius: 999px; overflow: hidden;
}
.upload-progress-fill {
  display: block; height: 100%; width: 0;
  background: var(--gold); border-radius: 999px; transition: width 0.12s linear;
}
.upload-progress-label { margin: 0.4rem 0 0; font-size: 0.92rem; font-weight: 650; color: var(--navy); }
.check-list { display: grid; gap: 0.55rem; margin-top: 1rem; }
.check {
  display: flex; align-items: center; gap: 0.55rem;
  margin: 0; font-size: 1rem; font-weight: 500; line-height: 1.4; color: var(--navy); cursor: pointer;
}
.check input[type="checkbox"] {
  width: 1.05rem; height: 1.05rem; min-height: 0; margin: 0; flex-shrink: 0;
  accent-color: var(--gold); cursor: pointer;
}
.error { color: #b91c1c; }
.ok { color: #047857; }
.admin-body { display: flex; min-height: 100dvh; background: var(--bg); }
.admin-aside {
  display: none; width: 15.25rem; flex-shrink: 0; background: var(--navy); color: #fff; flex-direction: column;
}
.admin-brand {
  display: block;
  padding: 1rem 1rem 1.05rem; border-bottom: 1px solid rgba(255,255,255,.1); color: #fff;
}
.admin-brand span { display: grid; gap: 0.12rem; min-width: 0; font-weight: 700; line-height: 1.2; }
.admin-brand small { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.admin-nav { display: flex; flex-direction: column; gap: 2px; padding: 0.7rem 0.55rem; flex: 1; overflow: auto; }
.admin-nav a { padding: 0.62rem 0.8rem; border-radius: 0.55rem; color: rgba(255,255,255,.78); font-size: 0.9rem; font-weight: 500; }
.admin-nav a.is-active, .admin-nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.admin-aside-foot { display: grid; gap: 0.55rem; padding: 0.9rem; border-top: 1px solid rgba(255,255,255,.1); }
.admin-aside-foot a { color: rgba(255,255,255,.7); font-size: 0.85rem; }
.admin-aside-foot .btn { width: 100%; min-height: 2.35rem; background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.16); }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top {
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  padding: 0.55rem max(0.9rem, env(safe-area-inset-right)) 0.55rem max(0.9rem, env(safe-area-inset-left));
  background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px);
}
.admin-top-brand { display: flex; align-items: center; min-width: 0; }
.admin-top-brand img { display: block; height: 2.6rem; width: auto; max-width: 11rem; object-fit: contain; object-position: left center; }
.admin-top-actions { display: flex; align-items: center; gap: 0.45rem; flex-shrink: 0; }
.admin-top-actions .net-status { max-width: 13.5rem; min-height: 2.15rem; }
.admin-aside-foot .net-status {
  width: 100%; justify-content: flex-start; max-width: none;
  background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: rgba(255,255,255,.82);
}
.admin-aside-foot .net-status.is-on { color: #86efac; }
.admin-aside-foot .net-status.is-off { color: #fca5a5; }
.admin-aside-foot .net-status.is-sync { color: #fde68a; }
.admin-top-actions .btn { min-height: 2.35rem; padding: 0 0.8rem; font-size: 0.82rem; }
.admin-mobile-nav {
  display: flex; gap: 0.2rem; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line);
  padding: 0.45rem max(0.7rem, env(safe-area-inset-right)) 0.55rem max(0.7rem, env(safe-area-inset-left));
  scrollbar-width: none;
}
.admin-mobile-nav::-webkit-scrollbar { display: none; }
.admin-mobile-nav a {
  display: inline-flex; min-height: 2.2rem; align-items: center; padding: 0 0.75rem;
  border-radius: 0.45rem; white-space: nowrap; color: var(--muted); font-size: 0.84rem; font-weight: 500;
}
.admin-mobile-nav a:hover { color: var(--gold); background: rgba(0, 119, 230, 0.08); }
.admin-mobile-nav a.is-active { background: var(--gold); color: #fff; font-weight: 600; }
.admin-content { padding: 1rem; flex: 1; overflow: auto; }
@media (min-width: 1024px) {
  .admin-aside { display: flex; }
  .admin-top, .admin-mobile-nav { display: none; }
  .admin-content { padding: 1.5rem; }
  .admin-body { height: 100dvh; }
}
.toolbar, .filters { display: grid; gap: 0.6rem; }
@media (min-width: 800px) { .filters { grid-template-columns: repeat(7, minmax(0,1fr)); align-items: end; } }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 0.9rem; overflow: auto; }
.form-grid { display: grid; gap: 1rem; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .form-grid { grid-template-columns: 1fr 1fr 1fr; } }
.sim-grid { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .sim-grid { grid-template-columns: minmax(0,1fr) 17.5rem; align-items: start; } }
.quote-layout { display: grid; gap: 1rem; }
.quote-side { min-width: 0; }
.quote-side .quote-actions { margin-top: 0; }
.quote-side .box > .ok,
.quote-side .box > .error { margin: 0 0 0.75rem; }
.quote-side .box h2 {
  margin: 1.15rem 0 0;
  font-size: 1.15rem;
}
.quote-saved {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: grid;
  gap: 0.5rem;
}
.quote-saved li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: stretch;
}
.quote-saved li .btn-ghost {
  flex: 1 1 8.5rem;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
}
.quote-saved li .btn-danger { flex: 0 0 auto; }
.admin-content .sim-lines {
  width: 100%;
  max-width: 100%;
}
.box { background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: 1rem; padding: 1.35rem 1.4rem 1.45rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.box h2 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.25; }
.quote-side .box h2 {
  margin: 1.15rem 0 0;
  font-size: 1.15rem;
}
.box > .muted { margin: 0.4rem 0 0; font-size: 0.95rem; line-height: 1.5; font-weight: 400; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: rgba(0,0,0,.04); border-radius: 0.65rem; padding: 0.2rem; }
.seg button {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; height: 2.5rem; min-height: 2.5rem; border-radius: 0.5rem; cursor: pointer;
  font-size: 1rem; font-weight: 600; color: var(--navy); line-height: 1; letter-spacing: -0.01em;
}
.seg button.is-on { background: var(--gold); color: #fff; }
.ch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
@media (min-width: 640px) { .ch-grid { grid-template-columns: repeat(5, minmax(0,1fr)); } }
.ch-btn, .ch-grid input {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2.65rem; min-height: 2.65rem; border: 1px solid var(--line); background: #fff; border-radius: 0.55rem; cursor: pointer;
  font-size: 0.9375rem; font-weight: 600; color: var(--navy); line-height: 1; padding: 0 0.4rem; text-align: center;
  letter-spacing: -0.015em;
}
.ch-grid input { cursor: text; font-weight: 600; font-size: 1rem; }
.ch-btn.is-on { background: var(--gold); color: #fff; border-color: var(--gold); }
.sim-form .form-grid { gap: 1rem; }
.sim-add {
  margin-top: 1.2rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.sim-add .field {
  font-size: 0.95rem;
  color: var(--navy);
}
.sim-add .field input {
  font-size: 1.02rem;
}
.summary-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1rem 0; }
.summary-chips span { border: 1px solid var(--line); border-radius: 999px; padding: 0.25rem 0.65rem; font-size: 11px; color: var(--muted); }
.summary-actions { display: grid; gap: 0.5rem; margin-top: 1rem; }
.summary-actions .btn { width: 100%; }
.btn-wa {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.15rem; min-height: 3.25rem; padding: 0.5rem 0.65rem;
  line-height: 1.2; text-align: center; white-space: normal;
}
.btn-wa span, .btn-wa small { display: block; width: 100%; }
.btn-wa small { font-size: 0.75rem; font-weight: 500; opacity: 0.92; }
.modal {
  position: fixed; inset: 0; z-index: 50; overflow: auto; background: rgba(0,0,0,.5); padding: 1rem;
}
.modal-card { width: min(48rem, 100%); margin: 1rem auto; background: #fff; border-radius: 1rem; padding: 1.25rem; }
.print-a4 { width: 210mm; min-height: 297mm; max-width: 100%; padding: 12mm 14mm; box-sizing: border-box; }
.modal-card.print-sheet { width: min(52rem, 100%); }
.quote-head {
  display: flex; flex-direction: column; align-items: flex-start;
  margin: 0 0 1.15rem;
}
.quote-logo {
  display: block; height: 3.5rem; width: auto; max-width: 15rem;
  object-fit: contain; object-position: left center; margin: 0 0 0.3rem;
}
.quote-sheet { color: #1c1c1c; font-size: 10.5pt; line-height: 1.55; }
.quote-sheet .kicker {
  margin: 0; font-size: 0.7rem; letter-spacing: 0.06em; line-height: 1.2;
  width: fit-content; max-width: 100%;
}
.quote-meta { margin: 0.22rem 0 0; color: #3d4d5c; }
.quote-sheet table { width: 100%; border-collapse: collapse; margin-top: 0.9rem; }
.quote-sheet th, .quote-sheet td {
  padding: 0.5rem 0.75rem; vertical-align: middle; text-align: left;
}
.quote-sheet thead th {
  background: #0d2137; color: #fff; font-size: 8pt; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; border: 0;
}
.quote-sheet tbody td { border-bottom: 1px solid #e6edf4; }
.quote-sheet tbody tr:nth-child(even) td { background: #f7fafc; }
.quote-sheet tbody tr:last-child td { border-bottom: 0; }
.quote-sheet th.no, .quote-sheet td.no { width: 2.4rem; text-align: center; color: #5b6b7c; }
.quote-sheet thead th.no { color: #c5d4e2; }
.quote-sheet th.qty, .quote-sheet td.qty { width: 3.4rem; text-align: center; }
.quote-sheet th.col-brand, .quote-sheet td.col-brand {
  width: 8.5rem; text-align: left; white-space: nowrap;
}
.quote-sheet thead th.num, .quote-sheet td.num {
  width: 9.5rem; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.quote-sheet td.num .rp { margin-left: auto; margin-right: 0; }
.quote-total {
  display: flex; justify-content: flex-end; align-items: baseline; gap: 1.4rem;
  margin: 0; padding: 0.85rem 0.85rem 0.85rem 1rem;
  background: #f3f7fb; border-top: 2px solid #0d2137;
  font-size: 16pt; font-weight: 700; color: #0d2137;
}
.quote-total span { font-size: 10pt; letter-spacing: 0.12em; text-transform: uppercase; color: #5b6b7c; font-weight: 700; }
.quote-total .rp { margin: 0; }
.quote-note {
  margin: 1.15rem 0 0; padding: 0.55rem 0.75rem;
  font-size: 8.5pt; line-height: 1.45; color: #7a3340;
  background: #fdf6f6; border-left: 3px solid #b91c1c;
}
.quote-letter {
  color: #111; background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10.5pt; line-height: 1.45;
}
.print-a4.quote-letter { box-shadow: 0 0 0 1px #e2e2e2, 0 10px 28px rgba(0,0,0,.08); }
.ql-top { display: flex; justify-content: space-between; gap: 1.25rem; align-items: flex-start; }
.ql-logo { display: block; height: 4.1rem; width: auto; max-width: 16rem; object-fit: contain; object-position: left center; }
.ql-brand { display: flex; flex-direction: column; align-items: center; width: max-content; max-width: 16rem; }
.ql-tag {
  margin: 0.08rem 0 0;
  font-size: 8pt;
  line-height: 1.2;
  color: #444;
  text-align: center;
  white-space: nowrap;
}
.ql-contact { text-align: right; font-size: 8.5pt; line-height: 1.4; color: #333; min-width: 0; }
.ql-contact p { margin: 0; }
.ql-title {
  margin: 1.45rem 0 1.2rem; text-align: center;
  font-size: 12.5pt; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase; text-decoration: underline; text-underline-offset: 0.28em;
}
.ql-meta { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.ql-name { font-weight: 700; }
.ql-date { white-space: nowrap; }
.ql-intro { margin: 1rem 0 0.85rem; white-space: pre-line; }
.quote-letter table { width: 100%; border-collapse: collapse; margin-top: 0.35rem; }
.ql-table { position: relative; margin-top: 0.35rem; }
.quote-letter .ql-table table { margin-top: 0; }
.doc-mark-host { position: relative; }
.doc-mark {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.doc-mark canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.quote-letter thead th {
  background: transparent; color: #111; text-transform: none; letter-spacing: 0;
  font-size: 10.5pt; font-weight: 700; border: 0; border-bottom: 1px solid #111;
  padding: 0.4rem 0.45rem; text-align: left; vertical-align: bottom;
}
.quote-letter td { border-bottom: 1px solid #cfcfcf; padding: 0.4rem 0.45rem; vertical-align: top; background: transparent; }
.quote-letter tbody tr:nth-child(even) td { background: transparent; }
.quote-letter .ql-sub { display: block; margin-top: 0.08rem; font-size: 8.5pt; color: #777; font-weight: 400; }
.quote-letter th.no, .quote-letter td.no { width: 2rem; text-align: left; color: #111; }
.quote-letter th.qty, .quote-letter td.qty { width: 5.8rem; text-align: left; white-space: nowrap; }
.quote-letter th.num, .quote-letter td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.quote-letter tfoot td { border-bottom: 0; border-top: 1px solid #111; font-weight: 700; padding-top: 0.55rem; }
.ql-terms { margin-top: 1.15rem; font-size: 9pt; line-height: 1.5; white-space: pre-line; }
.ql-pay { margin: 0.7rem 0 0; color: #c1121f; font-weight: 700; font-size: 9.5pt; }
.ql-sign {
  margin: 2.4rem 3.2rem 0 auto;
  width: max-content;
  max-width: calc(100% - 3.2rem);
  text-align: center;
}
.ql-sign-space { height: 3.4rem; }
.ql-foot { margin-top: 2rem; border-top: 1px solid #111; padding-top: 0.4rem; text-align: center; font-size: 8.5pt; }
@media (max-width: 700px) {
  .ql-top, .ql-meta { flex-direction: column; }
  .ql-contact, .ql-date { text-align: left; }
  .ql-sign { margin-right: 0; max-width: 100%; }
  .quote-letter { overflow-x: auto; }
}
.rp {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rp-k { flex: none; }
.rp-v { text-align: right; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 0.9rem; }
.filters { display: grid; gap: 0.6rem; }
@media (min-width: 700px) { .filters { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; } }
@media (min-width: 1280px) { .filters { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.form-grid { display: grid; gap: 0.8rem; }
.form-grid > * { min-width: 0; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .sim-form .form-grid { grid-template-columns: 1fr 1fr; } }
.error { color: #b91c1c; }
.ok { color: #047857; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.btn-danger { background: #b91c1c; color: #fff; }
.btn.btn-danger, button.btn-danger { background: #b91c1c; color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn.btn-ghost, button.btn-ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.table-wrap, .table-card { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 0.9rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 0.55rem 0.75rem; border-top: 1px solid var(--line); text-align: left; }
.data-table thead th { background: #f4f8fc; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.data-table th.num,
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table th.col-brand,
.data-table td.col-brand { text-align: left; white-space: nowrap; }
.data-table th.col-center,
.data-table td.col-center { text-align: center; }
.data-table td.col-center input {
  display: block; box-sizing: border-box; width: 8.2rem; height: 2.5rem;
  margin: 0 auto; text-align: center;
  border: 1px solid var(--line); border-radius: 0.55rem;
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.data-table td.col-center select {
  display: block; margin: 0 auto; text-align: center; text-align-last: center;
}
.data-table td.col-center .rp { margin-inline: auto; }
.data-table th.qty,
.data-table td.qty { text-align: center; }
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: start center; overflow: auto; background: rgba(0,0,0,.45); padding: 1rem; }
.modal-card { width: min(32rem, 100%); background: #fff; border-radius: 1rem; padding: 1.25rem; }
.empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }
code { font-family: ui-monospace, Consolas, monospace; }
.suggest-list { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.45rem; }
.suggest-list button { width: 100%; min-height: 2.75rem; text-align: left; }
.sim-lines { overflow-x: clip; }
.sim-lines .table-wrap.doc-mark-host,
.sim-lines .table-wrap { position: relative; }
.sim-lines .doc-mark {
  z-index: 2;
  opacity: 0.9;
  pointer-events: none;
}
.sim-lines .data-table thead { display: none; }
.sim-lines .data-table,
.sim-lines .data-table tbody {
  display: block;
  position: relative;
  z-index: 0;
  width: 100%;
  max-width: 100%;
}
.sim-lines .data-table tr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  column-gap: 0.7rem;
  row-gap: 0.35rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0 0 0.5rem;
  padding: 0.7rem 0.9rem;
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0.875rem;
  box-shadow: 0 1px 2px rgba(13, 33, 55, 0.04);
}
.sim-lines .data-table.has-modal tr {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sim-lines .data-table tr:last-child { margin-bottom: 0; }
.sim-lines .data-table td {
  border: 0;
  padding: 0;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  vertical-align: top;
}
.sim-lines .data-table.has-del tr { position: relative; }
.sim-lines .data-table td[data-col="name"] {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sim-lines .data-table.has-del td[data-col="name"] {
  padding-right: 4.75rem;
}
.sim-lines .data-table td[data-col="name"] .item-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: 2.2rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
.sim-lines .data-table td[data-col="name"] select {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: none;
  height: 2.2rem;
  min-height: 2.2rem;
  margin: 0;
  padding: 0.28rem 2.1rem 0.28rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
  background-position: right 0.8rem center;
}
.sim-lines .data-table td[data-col="name"] .muted,
.sim-lines .data-table td[data-col="name"] .item-sub {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.3;
}
.sim-lines .data-table td[data-col="del"] {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: flex-start;
  align-self: start;
  justify-content: flex-end;
  z-index: 2;
  pointer-events: none;
  padding-top: 0;
  height: 2.2rem;
}
.sim-lines .data-table td[data-col="del"] .btn { pointer-events: auto; }
.sim-lines .data-table td[data-col="qty"],
.sim-lines .data-table td[data-col="modal"],
.sim-lines .data-table td[data-col="price"],
.sim-lines .data-table td[data-col="total"] {
  display: grid;
  grid-template-rows: 0.95rem 2.2rem;
  align-items: center;
  justify-items: start;
  row-gap: 0.12rem;
  min-width: 0;
  line-height: 1.25;
}
.sim-lines .data-table td[data-col="qty"] {
  grid-column: 1;
  grid-row: 2;
}
.sim-lines .data-table td[data-col="modal"] { grid-column: 2; grid-row: 2; }
.sim-lines .data-table.has-modal td[data-col="price"] { grid-column: 3; grid-row: 2; }
.sim-lines .data-table.has-modal td[data-col="total"] { grid-column: 4; grid-row: 2; }
.sim-lines .data-table:not(.has-modal) td[data-col="price"] { grid-column: 2; grid-row: 2; }
.sim-lines .data-table:not(.has-modal) td[data-col="total"] { grid-column: 3; grid-row: 2; }
.sim-lines .data-table td[data-col="total"] { justify-items: end; text-align: right; }
.sim-lines .data-table td[data-col="modal"] .rp,
.sim-lines .data-table td[data-col="price"] .rp,
.sim-lines .data-table td[data-col="total"] .rp {
  grid-row: 2;
  margin: 0;
  height: 2.2rem;
  min-height: 2.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  max-width: 100%;
  gap: 0.16em;
  align-items: center;
}
.sim-lines .data-table td[data-label]::before {
  content: attr(data-label);
  grid-row: 1;
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.sim-lines .data-table td.num { text-align: inherit; line-height: 1.35; white-space: nowrap; }
.sim-lines .data-table td.qty { text-align: left; line-height: 1.35; width: auto; }
.sim-lines .data-table td.qty input {
  grid-row: 2;
  display: block;
  box-sizing: border-box;
  margin: 0;
  width: 4.1rem;
  min-width: 3.9rem;
  max-width: 4.35rem;
  height: 2.2rem;
  min-height: 2.2rem;
  flex: none;
  padding: 0;
  border-radius: 999px;
  text-align: center;
  line-height: 2.2rem;
}
.sim-lines .data-table td[data-col="del"] .btn {
  background: var(--gold);
  color: #fff;
  border-color: transparent;
  box-sizing: border-box;
  min-height: 2.2rem;
  height: 2.2rem;
  padding: 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  border-radius: 0.5rem;
  white-space: nowrap;
  flex: none;
}
.sim-lines .table-wrap {
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 0;
  width: 100%;
  max-width: 100%;
}
.sim-lines-foot {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 0.35rem;
  padding: 0.95rem 0.2rem 0.15rem;
  border-top: 1px solid var(--line);
  font-weight: 700;
}
.sim-lines-foot > span:first-child {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.sim-lines-foot .rp {
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  gap: 0.32em;
}
.sim-grid > aside { min-width: 0; }
.field select, .field input, .data-table select { max-width: 100%; }
.site-footer { padding-bottom: max(2rem, env(safe-area-inset-bottom)); }

@media (max-width: 379px) {
  .logo-link img { height: 2.6rem; max-width: 9.5rem; }
  .box { padding: 1rem 0.9rem 1.1rem; }
  .rp { font-size: 0.92rem; }
  .ch-btn, .ch-grid input { font-size: 0.82rem; padding: 0 0.25rem; }
}
@media (max-width: 639px) {
  .logo-link img { height: 2.5rem; max-width: 8.75rem; }
  .nav-desktop a { height: 2.2rem; min-height: 2.2rem; padding: 0 0.38rem; font-size: 0.78rem; }
  .site-header .panel-link { height: 2.2rem; min-height: 2.2rem; padding: 0 0.55rem; font-size: 10px; letter-spacing: 0.08em; }
  .page-hero { padding: 1.15rem 0 1rem; }
  .box { padding: 1.1rem 1rem 1.2rem; }
  .box h2 { font-size: 1.15rem; }
  .ch-grid { grid-template-columns: 1fr 1fr; }
  .ch-grid input { grid-column: 1 / -1; }
  .data-table td.qty input { width: 5.4rem; height: 2.55rem; }
  .sim-lines .data-table tr {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: 0.5rem;
    column-gap: 0.55rem;
    padding: 0.85rem 0.85rem 0.8rem;
    margin-bottom: 0.65rem;
  }
  .sim-lines .data-table.has-modal tr {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  }
  .sim-lines .data-table.has-del td[data-col="name"] { padding-right: 0; }
  .sim-lines .data-table td[data-col="name"] .item-name {
    min-height: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    padding-right: 0;
  }
  .sim-lines .data-table td[data-col="name"] select {
    width: 100%;
    max-width: 100%;
    height: 2.5rem;
    min-height: 2.5rem;
    padding: 0.4rem 2rem 0.4rem 0.7rem;
    line-height: 1.2;
  }
  .sim-lines .data-table td[data-col="name"] .item-sub { margin-top: 0.25rem; padding-right: 0; }
  .sim-lines .data-table td[data-col="del"] {
    grid-column: -2 / -1;
    grid-row: 2;
    height: auto;
    min-height: 0;
    align-items: end;
    align-self: end;
    padding-top: 0;
  }
  .sim-lines .data-table td[data-col="del"] .btn {
    min-height: 2.5rem;
    height: 2.5rem;
    padding: 0 0.7rem;
    font-size: 0.8rem;
  }
  .sim-lines .data-table td[data-col="qty"],
  .sim-lines .data-table td[data-col="modal"],
  .sim-lines .data-table td[data-col="price"],
  .sim-lines .data-table td[data-col="total"] {
    grid-template-rows: 1rem 2.35rem;
    row-gap: 0.2rem;
  }
  .sim-lines .data-table td[data-col="qty"],
  .sim-lines .data-table td[data-col="price"] {
    justify-items: start;
    text-align: left;
  }
  .sim-lines .data-table td[data-col="total"] {
    justify-items: end;
    text-align: right;
  }
  .sim-lines .data-table td[data-col="qty"] { grid-column: 1; grid-row: 2; }
  .sim-lines .data-table.has-modal td[data-col="price"] { grid-column: 1; grid-row: 3; }
  .sim-lines .data-table.has-modal td[data-col="modal"] {
    grid-column: 2;
    grid-row: 3;
    justify-items: center;
    text-align: center;
  }
  .sim-lines .data-table.has-modal td[data-col="total"] { grid-column: 3; grid-row: 3; }
  .sim-lines .data-table:not(.has-modal) td[data-col="price"] { grid-column: 1; grid-row: 3; }
  .sim-lines .data-table:not(.has-modal) td[data-col="total"] { grid-column: 2; grid-row: 3; }
  .sim-lines .data-table td[data-col="qty"][data-label]::before,
  .sim-lines .data-table td[data-col="price"][data-label]::before {
    justify-content: flex-start;
    width: 100%;
  }
  .sim-lines .data-table.has-modal td[data-col="modal"][data-label]::before {
    justify-content: center;
    width: 100%;
    text-align: center;
  }
  .sim-lines .data-table td[data-col="total"][data-label]::before {
    justify-content: flex-end;
    width: 100%;
    text-align: right;
  }
  .sim-lines .data-table td.qty input {
    width: 3.85rem;
    min-width: 3.6rem;
    max-width: 4.1rem;
    height: 2.35rem;
    min-height: 2.35rem;
    line-height: 2.35rem;
  }
  .sim-lines .data-table td[data-col="modal"] .rp,
  .sim-lines .data-table td[data-col="price"] .rp,
  .sim-lines .data-table td[data-col="total"] .rp {
    height: 2.35rem;
    min-height: 2.35rem;
    font-size: 0.84rem;
  }
  .modal { padding: max(0.75rem, env(safe-area-inset-top)) 0.65rem max(0.75rem, env(safe-area-inset-bottom)); align-items: start; }
  .modal-card, .modal-card.print-sheet { width: min(52rem, 100%); margin: 0 auto; }
  .quote-logo { height: 2.6rem; }
  .admin-content { padding: 0.85rem 0.75rem 1.25rem; }
}
@media (max-width: 379px) {
  .sim-lines .data-table tr { padding: 0.8rem 0.75rem; row-gap: 0.45rem; column-gap: 0.6rem; }
  .sim-lines .data-table.has-del td[data-col="name"] { padding-right: 0; }
  .sim-lines .data-table td[data-col="name"] .item-name { font-size: 0.92rem; }
  .sim-lines .data-table td[data-label]::before { font-size: 9px; letter-spacing: 0.04em; }
  .sim-lines .data-table td[data-col="modal"] .rp,
  .sim-lines .data-table td[data-col="price"] .rp,
  .sim-lines .data-table td[data-col="total"] .rp { font-size: 0.8rem; }
  .sim-lines .data-table td.qty input { width: 3.5rem; min-width: 3.35rem; max-width: 3.7rem; }
}
@media (min-width: 480px) and (max-width: 639px) {
  .ch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .sim-grid { gap: 1.15rem; }
  .box { padding: 1.2rem 1.15rem 1.3rem; }
}
@media (min-width: 640px) {
  .sim-lines .data-table.has-modal tr { column-gap: 1.35rem; }
  .sim-lines .data-table td[data-col="name"] select {
    width: min(100%, 26rem);
    max-width: 100%;
  }
}
@media (min-width: 900px) and (max-width: 1023px) {
  .sim-grid { grid-template-columns: minmax(0, 1fr) 16.5rem; align-items: start; }
  .quote-layout:has(.quote-pkg) {
    grid-template-columns: minmax(0, 1fr) 16.5rem;
    align-items: start;
    gap: 1.15rem;
  }
  .quote-layout:has(.quote-pkg) > .quote-cust { grid-column: 1 / -1; }
  .quote-layout:has(.quote-pkg) > .quote-pkg { grid-column: 1; grid-row: 2; }
  .quote-layout:has(.quote-pkg) > .quote-side { grid-column: 2; grid-row: 2; }
  .quote-layout:has(.quote-pkg) > .quote-lines { grid-column: 1 / -1; }
  .quote-layout > .modal { grid-column: 1 / -1; }
  .quote-side .quote-actions { display: grid; gap: 0.5rem; }
  .quote-side .quote-actions .btn { width: 100%; }
  .quote-saved li { display: grid; gap: 0.35rem; }
  .quote-saved li .btn { width: 100%; justify-content: center; }
  .quote-saved li .btn-ghost { justify-content: flex-start; }
}
@media (min-width: 1024px) {
  .sim-grid > aside .box { position: sticky; top: 5.25rem; }
  .quote-layout:has(.quote-pkg) {
    grid-template-columns: minmax(0, 1fr) 17.5rem;
    align-items: start;
    gap: 1.5rem;
  }
  .quote-layout:has(.quote-pkg) > .quote-cust { grid-column: 1 / -1; }
  .quote-layout:has(.quote-pkg) > .quote-pkg { grid-column: 1; grid-row: 2; }
  .quote-layout:has(.quote-pkg) > .quote-side { grid-column: 2; grid-row: 2; }
  .quote-layout:has(.quote-pkg) > .quote-lines { grid-column: 1 / -1; }
  .quote-layout > .modal { grid-column: 1 / -1; }
  .quote-side .box { position: sticky; top: 5.25rem; }
  .quote-side .quote-actions { display: grid; gap: 0.5rem; }
  .quote-side .quote-actions .btn { width: 100%; }
  .quote-saved li { display: grid; gap: 0.35rem; }
  .quote-saved li .btn { width: 100%; justify-content: center; }
  .quote-saved li .btn-ghost { justify-content: flex-start; }
}
@media (min-width: 1440px) {
  .container, .wrap { width: min(80rem, calc(100% - 2 * max(1.5rem, env(safe-area-inset-left, 0px)))); }
}

@media print {
  .no-print { display: none !important; }
  body, .admin-body, .admin-main, .admin-content { background: #fff !important; padding: 0; margin: 0; overflow: visible; }
  .print-sheet, .print-sheet * { visibility: visible; }
  .print-preview-backdrop { position: static !important; background: transparent !important; padding: 0 !important; }
  .print-sheet, .print-a4.quote-letter { box-shadow: none !important; }
  .print-a4 { width: 210mm; min-height: auto; max-width: none; padding: 12mm 14mm; }
  .ql-top, .ql-meta { flex-direction: row !important; }
  .ql-contact, .ql-date { text-align: right !important; }
  .ql-sign { text-align: center !important; }
  .quote-letter { overflow: visible !important; }
  .doc-mark, .doc-mark canvas {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
