/* Helix — ACC Polymers Sale Recording System */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-0:          #0B1220;
  --bg-1:          #0F1729;
  --bg-2:          #162035;
  --bg-3:          #1D2A44;
  --fg-0:          #F4F6FB;
  --fg-1:          #D4D9E8;
  --fg-2:          #9AA3B8;
  --fg-3:          #828CA2;
  --fg-4:          #5A6178;
  --accent:        #10B981;
  --accent-line:   rgba(16,185,129,0.38);
  --accent-soft:   rgba(16,185,129,0.10);
  --accent-glow:   rgba(16,185,129,0.22);
  --line:          rgba(255,255,255,0.06);
  --line-strong:   rgba(255,255,255,0.10);
  --line-stronger: rgba(255,255,255,0.18);
  --red:           #EF4444;
  --red-soft:      rgba(239,68,68,0.12);
  --amber:         #F59E0B;
  --green:         #22C55E;
  --sidebar-w:     220px;
  --bottom-nav-h:  64px;
  --font:          'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono:          'JetBrains Mono', monospace;
}

:root.light {
  --bg-0:          #F0F4FB;
  --bg-1:          #FFFFFF;
  --bg-2:          #F4F7FC;
  --bg-3:          #E8EDF6;
  --fg-0:          #0B1220;
  --fg-1:          #1E2842;
  --fg-2:          #4A5168;
  --fg-3:          #6B7388;
  --fg-4:          #98A1B6;
  --accent:        #059669;
  --accent-line:   rgba(5,150,105,0.4);
  --accent-soft:   rgba(5,150,105,0.08);
  --accent-glow:   rgba(5,150,105,0.15);
  --line:          rgba(15,23,41,0.07);
  --line-strong:   rgba(15,23,41,0.11);
  --line-stronger: rgba(15,23,41,0.18);
  --red-soft:      rgba(239,68,68,0.08);
}

html, body { height: 100%; font-family: var(--font); background: var(--bg-0); color: var(--fg-0); font-size: 13px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow: hidden; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 2px; }

/* ── Layout ── */
.app-layout { display: flex; height: 100dvh; overflow: hidden; }
.sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--bg-1); border-right: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.scroll-area { flex: 1; overflow-y: auto; padding: 24px; }

/* ── Sidebar nav ── */
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px; border-bottom: 1px solid var(--line); }
.sidebar-logo-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-logo-name { font-size: 15px; font-weight: 700; color: var(--fg-0); letter-spacing: -0.02em; }
.sidebar-logo-sub { font-size: 10px; color: var(--fg-4); font-weight: 500; }
.sidebar-nav { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--fg-3); font-size: 13px; font-weight: 500; cursor: default; transition: background .12s, color .12s; text-decoration: none; }
.nav-item:hover { background: var(--bg-2); color: var(--fg-1); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item.active svg { color: var(--accent); }
.nav-item-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-new { background: var(--accent); color: #fff !important; border-radius: 8px; }
.nav-new:hover { background: #0ea574 !important; color: #fff !important; }
.sidebar-footer { padding: 12px 8px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 4px; }
.sidebar-user { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: default; flex: 1; min-width: 0; }
.sidebar-user:hover { background: var(--bg-2); }
.user-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; }
.user-name { font-size: 12px; font-weight: 500; color: var(--fg-1); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-signout { color: var(--fg-4); flex-shrink: 0; }

/* ── Page header ── */
.page-header { display: flex; align-items: center; gap: 12px; padding: 18px 24px 0; flex-shrink: 0; }
.page-title { font-size: 18px; font-weight: 700; color: var(--fg-0); letter-spacing: -0.02em; flex: 1; }
.page-actions { display: flex; gap: 8px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 8px; font-family: var(--font); font-size: 13px; font-weight: 500; cursor: default; border: none; transition: background .12s, opacity .12s, box-shadow .12s; white-space: nowrap; text-decoration: none; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 12px -4px var(--accent-glow); }
.btn-primary:hover { background: #0ea574; }
.btn-ghost { background: var(--bg-2); color: var(--fg-1); border: 1px solid var(--line-strong); }
.btn-ghost:hover { background: var(--bg-3); }
.btn-danger { background: var(--red-soft); color: var(--red); border: 1px solid rgba(239,68,68,0.22); }
.btn-danger:hover { background: rgba(239,68,68,0.18); }
.btn-icon { width: 34px; padding: 0; justify-content: center; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 6px; }
.btn-icon.btn-sm { width: 28px; padding: 0; }

/* ── Inputs ── */
.input { width: 100%; height: 36px; padding: 0 10px; background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--fg-0); font-family: var(--font); font-size: 13px; outline: none; transition: border-color .12s, box-shadow .12s; }
.input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--fg-4); }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; min-height: 72px; line-height: 1.5; }
select.input { cursor: default; 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='%235A6178' stroke-width='2.5' 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 10px center; padding-right: 30px; }
select.input option { background: var(--bg-1); }

/* ── Form layout ── */
.lf  { display: flex; flex-direction: column; gap: 14px; }
.lr  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lr3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.lfd label { display: block; font-size: 10.5px; font-weight: 600; color: var(--fg-3); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .06em; }

/* ── Flex utils ── */
.flex { display: flex; } .flex-col { flex-direction: column; } .flex-1 { flex: 1; } .items-center { align-items: center; } .justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.min-w-0 { min-width: 0; }

/* ── Cards ── */
.card { background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.card-sm { background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }

/* ── Stat cards (dashboard) ── */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat-label { font-size: 10.5px; font-weight: 600; color: var(--fg-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--fg-0); letter-spacing: -0.03em; line-height: 1.1; }
.stat-sub { font-size: 11px; color: var(--fg-3); margin-top: 4px; }
.stat-accent { border-color: var(--accent-line); background: color-mix(in oklab, var(--accent) 6%, var(--bg-1)); }
.stat-accent .stat-value { color: var(--accent); }

/* ── Sales table ── */
.sales-table-wrap { flex: 1; overflow: auto; }
.sales-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sales-table th { position: sticky; top: 0; z-index: 2; background: var(--bg-2); padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line-strong); white-space: nowrap; font-weight: 600; font-size: 10.5px; color: var(--fg-3); text-transform: uppercase; letter-spacing: .05em; cursor: default; }
.sales-table td { padding: 0 10px; border-bottom: 1px solid var(--line); white-space: nowrap; height: 42px; color: var(--fg-1); max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.sales-table tr:hover td { background: var(--accent-soft); }
.sales-table tr.selected td { background: var(--accent-soft); }
.td-mono { font-family: var(--mono); font-size: 12px; color: var(--fg-0); }
.td-muted { color: var(--fg-3); font-size: 12px; }
.td-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-size: 10.5px; font-weight: 600; }
.badge-green  { background: rgba(34,197,94,.14); color: #4ADE80; }
.badge-gray   { background: var(--bg-3); color: var(--fg-3); }
.badge-amber  { background: rgba(245,158,11,.14); color: var(--amber); }
.badge-blue   { background: rgba(37,99,235,.14); color: #93C5FD; }

/* ── Toolbar / filter row ── */
.toolbar { display: flex; align-items: center; gap: 8px; padding: 14px 24px; border-bottom: 1px solid var(--line); flex-shrink: 0; flex-wrap: wrap; }
.toolbar-search { position: relative; flex: 1; min-width: 180px; max-width: 300px; }
.toolbar-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--fg-4); pointer-events: none; }
.toolbar-search input { padding-left: 32px; }
.toolbar-info { font-size: 12px; color: var(--fg-3); margin-left: auto; }

/* ── Sale Form ── */
.sf-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.sf-header { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.sf-title { font-size: 16px; font-weight: 700; color: var(--fg-0); }
.sf-body { flex: 1; overflow-y: auto; padding: 24px 24px 32px; display: flex; flex-direction: column; gap: 16px; max-width: 760px; }
.sf-total { height: 36px; display: flex; align-items: center; padding: 0 10px; border-radius: 8px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 15px; font-weight: 700; color: var(--accent); font-family: var(--mono); }
.sf-toggles { display: flex; gap: 6px; }
.sf-toggle { flex: 1; height: 36px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--fg-2); font-family: var(--font); font-size: 12.5px; font-weight: 500; cursor: default; transition: all .12s; }
.sf-toggle.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.sf-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.sf-pill { height: 30px; padding: 0 12px; border-radius: 20px; border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--fg-2); font-family: var(--font); font-size: 12px; font-weight: 500; cursor: default; transition: all .12s; white-space: nowrap; }
.sf-pill.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); font-weight: 600; }
.sf-err { color: var(--red); font-size: 12.5px; padding: 8px 12px; background: var(--red-soft); border-radius: 8px; border: 1px solid rgba(239,68,68,0.22); }
.fa-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* ── Combobox dropdown ── */
.cb-drop { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--bg-1); border: 1px solid var(--line-strong); border-radius: 9px; box-shadow: 0 12px 32px rgba(0,0,0,.4); z-index: 200; max-height: 220px; overflow-y: auto; }
.cb-item { padding: 8px 12px; font-size: 13px; color: var(--fg-1); cursor: default; transition: background .1s; }
.cb-item:hover, .cb-item.focused { background: var(--accent-soft); color: var(--accent); }
.cb-item:first-child { border-radius: 9px 9px 0 0; }
.cb-item:last-child  { border-radius: 0 0 9px 9px; }

/* ── Toast ── */
.toast { position: fixed; bottom: 80px; right: 20px; background: var(--bg-1); border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 16px; font-size: 12.5px; z-index: 9999; box-shadow: 0 8px 24px rgba(0,0,0,.4); opacity: 0; transform: translateY(8px); transition: all .25s; pointer-events: none; max-width: calc(100vw - 40px); }
.toast.show { opacity: 1; transform: none; pointer-events: auto; }
.toast.ok  { border-left: 3px solid var(--green); }
.toast.err { border-left: 3px solid var(--red); }

/* ── Modal ── */
.modal-ov { position: fixed; inset: 0; background: rgba(5,8,16,.65); z-index: 500; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-box { background: var(--bg-1); border: 1px solid var(--line-strong); border-radius: 14px; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; padding: 24px; box-shadow: 0 32px 80px rgba(0,0,0,.45); }
.modal-box h2 { font-size: 16px; font-weight: 700; color: var(--fg-0); margin-bottom: 18px; letter-spacing: -.02em; }

/* ── Masters page ── */
.tab-bar { display: flex; gap: 2px; padding: 14px 24px 0; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.tab-btn { height: 34px; padding: 0 14px; border: none; background: transparent; color: var(--fg-3); font-family: var(--font); font-size: 13px; font-weight: 500; cursor: default; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .12s, border-color .12s; }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.masters-list { display: flex; flex-direction: column; gap: 6px; }
.masters-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg-2); border-radius: 8px; border: 1px solid var(--line); font-size: 13px; color: var(--fg-0); }
.masters-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.masters-item .del-btn { opacity: 0; }
.masters-item:hover .del-btn { opacity: 1; }
.masters-add { display: flex; gap: 8px; margin-bottom: 12px; }

/* ── Connect / auth screen ── */
.auth-wrap { position: fixed; inset: 0; background: var(--bg-0); display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; background: var(--bg-1); border: 1px solid var(--line-strong); border-radius: 18px; padding: 36px 32px 28px; box-shadow: 0 24px 60px rgba(0,0,0,.5); text-align: center; }
.auth-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 24px; }
.auth-logo-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.auth-logo-name { font-size: 22px; font-weight: 800; color: var(--fg-0); letter-spacing: -0.04em; }
.auth-subtitle { font-size: 13.5px; color: var(--fg-3); margin-bottom: 24px; }
.auth-btn-google { width: 100%; height: 48px; border-radius: 10px; border: none; background: linear-gradient(180deg, #3b7af7, #2563EB); color: #fff; font-family: var(--font); font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: default; box-shadow: 0 6px 16px -6px rgba(37,99,235,0.7); transition: filter .12s; }
.auth-btn-google:hover { filter: brightness(1.08); }
.auth-google-icon { width: 22px; height: 22px; border-radius: 5px; background: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.auth-divider span { flex: 1; height: 1px; background: var(--line); }
.auth-divider em { font-size: 10px; font-weight: 600; color: var(--fg-4); text-transform: uppercase; letter-spacing: .15em; font-style: normal; }
.auth-email-btn { background: none; border: none; color: var(--fg-3); font-family: var(--font); font-size: 13px; cursor: default; text-decoration: underline; text-underline-offset: 3px; }
.auth-email-form { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; text-align: left; }
.auth-email-form input { text-align: left; }
.auth-err { margin-top: 14px; padding: 10px 12px; background: var(--red-soft); border: 1px solid rgba(239,68,68,0.3); border-radius: 8px; font-size: 12px; color: #f87171; line-height: 1.5; }
.auth-footer { margin-top: 20px; font-size: 11.5px; color: var(--fg-4); display: flex; align-items: center; justify-content: center; gap: 5px; }

/* ── Loading ── */
.page-loading { flex: 1; display: flex; align-items: center; justify-content: center; color: var(--fg-3); font-size: 13px; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ── */
.empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--fg-3); padding: 48px; text-align: center; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--fg-2); }
.empty-state p  { font-size: 13px; max-width: 280px; line-height: 1.6; }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 10px; border-top: 1px solid var(--line); flex-shrink: 0; }
.pag-btn { height: 28px; min-width: 28px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg-2); color: var(--fg-2); font-family: var(--font); font-size: 12px; cursor: default; display: flex; align-items: center; justify-content: center; }
.pag-btn:hover { border-color: var(--accent-line); color: var(--accent); }
.pag-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pag-btn:disabled { opacity: .4; pointer-events: none; }
.pag-info { font-size: 11.5px; color: var(--fg-3); padding: 0 6px; }

/* ── Mobile bottom nav ── */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: var(--bottom-nav-h); background: var(--bg-1); border-top: 1px solid var(--line); display: flex; align-items: center; z-index: 100; padding-bottom: env(safe-area-inset-bottom, 0); }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--fg-3); font-size: 10px; font-weight: 500; cursor: default; height: 100%; padding-top: 4px; transition: color .12s; }
.bn-item.active { color: var(--accent); }
.bn-item-new { color: var(--accent) !important; }

/* ── Responsive ── */
@media (max-width: 899px) {
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .content { padding-bottom: var(--bottom-nav-h); }
  .toast { bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 8px); right: 12px; left: 12px; text-align: center; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .lr, .lr3 { grid-template-columns: 1fr; }
  .scroll-area { padding: 16px; }
  .sf-body { padding: 16px 16px 24px; }
  .page-header { padding: 14px 16px 0; }
  .toolbar { padding: 10px 16px; }
  input, select, textarea { font-size: 16px !important; }
  .modal-ov { align-items: flex-end; padding: 0; }
  .modal-box { border-radius: 18px 18px 0 0; max-width: 100%; max-height: calc(100dvh - 48px); padding-bottom: calc(20px + env(safe-area-inset-bottom, 0)); }
  .fa-row .btn { flex: 1; justify-content: center; }
}

@media (max-width: 599px) {
  .stat-grid { grid-template-columns: 1fr; }
  .sales-table th:nth-child(n+6), .sales-table td:nth-child(n+6) { display: none; }
}

/* ── Theme toggle button ── */
.theme-toggle { position: fixed; top: 16px; right: 16px; z-index: 400; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--bg-1); color: var(--fg-3); display: flex; align-items: center; justify-content: center; cursor: default; }
.theme-toggle:hover { background: var(--bg-2); }

/* ── Delivery Challan ── */
.dc-overlay { position: fixed; inset: 0; background: rgba(5,8,16,.75); z-index: 600; display: flex; flex-direction: column; align-items: center; padding: 16px 16px 32px; overflow-y: auto; gap: 12px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dc-controls { width: 100%; max-width: 794px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.dc-seller-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dc-seller-label { font-size: 12px; color: var(--fg-3); }

/* DC seller picker popup */
.dc-pick-overlay { position: fixed; inset: 0; z-index: 700; display: flex; align-items: center; justify-content: center; background: rgba(5,8,16,.5); }
.dc-pick-box { background: var(--bg-1); border: 1px solid var(--line-strong); border-radius: 14px; padding: 20px; width: 260px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.dc-pick-title { font-size: 13px; font-weight: 700; color: var(--fg-0); margin-bottom: 12px; text-align: center; }
.dc-pick-item { display: block; width: 100%; padding: 10px 14px; margin-bottom: 6px; background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 8px; color: var(--fg-0); font-family: var(--font); font-size: 13px; font-weight: 500; text-align: left; cursor: default; transition: background .12s, border-color .12s; }
.dc-pick-item:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

/* DC Paper — always white/light regardless of app theme */
.dc-paper { background: #fff; color: #000; width: 794px; max-width: 100%; border-radius: 4px; padding: 36px 40px 32px; font-size: 12px; font-family: 'Inter', Arial, sans-serif; box-shadow: 0 8px 40px rgba(0,0,0,.5); flex-shrink: 0; }

/* DC Header */
.dc-hdr { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; border-bottom: 2px solid #111; padding-bottom: 14px; }
.dc-hdr-left { flex: 1; }
.dc-co-name { font-size: 22px; font-weight: 800; color: #111; letter-spacing: -0.03em; line-height: 1.1; }
.dc-co-sub { font-size: 12px; font-weight: 600; color: #444; margin-top: 3px; text-transform: uppercase; letter-spacing: .1em; }
.dc-meta { font-size: 11.5px; border-collapse: collapse; }
.dc-meta td { padding: 2px 6px 2px 0; vertical-align: top; white-space: nowrap; }
.dc-meta td:first-child { color: #555; padding-right: 10px; }

/* DC Addresses */
.dc-addrs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 16px; border: 1px solid #ccc; }
.dc-addr-col:first-child { border-right: 1px solid #ccc; }
.dc-addr-hdr { background: #222; color: #fff; font-size: 11px; font-weight: 700; padding: 5px 10px; text-transform: uppercase; letter-spacing: .08em; }
.dc-addr-body { padding: 10px; font-size: 12px; min-height: 60px; }

/* DC Items Table */
.dc-tbl { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 12px; }
.dc-tbl th { background: #222; color: #fff; padding: 7px 10px; text-align: left; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; border: 1px solid #222; }
.dc-tbl td { padding: 7px 10px; border: 1px solid #ddd; vertical-align: top; }
.dc-row-alt td { background: #f7f7f7; }
.dc-c-sr  { width: 52px; }
.dc-c-qty { width: 100px; text-align: right !important; }
.dc-tfoot td { background: #f0f0f0; border: 1px solid #bbb; }

/* DC Signatures */
.dc-sign-row { display: flex; margin-bottom: 16px; border: 1px solid #ccc; }
.dc-sign-col { flex: 1; padding: 10px; }
.dc-sign-col:first-child { border-right: 1px solid #ccc; }
.dc-sign-blank { height: 38px; }
.dc-sign-label { font-size: 11px; font-weight: 600; color: #333; text-transform: uppercase; letter-spacing: .08em; border-top: 1px solid #999; padding-top: 4px; margin-top: 4px; }

/* DC Acknowledgement */
.dc-ack { border: 1px solid #ccc; margin-bottom: 14px; }
.dc-ack-top { background: #222; color: #fff; font-size: 11px; font-weight: 700; padding: 5px 10px; text-transform: uppercase; letter-spacing: .08em; }
.dc-ack-space { height: 52px; }
.dc-ack-footer { display: flex; justify-content: space-between; border-top: 1px solid #ccc; padding: 6px 10px; font-size: 11px; color: #444; font-weight: 600; }
.dc-thanks { text-align: center; font-size: 12px; font-weight: 600; color: #555; letter-spacing: .05em; }

/* ── Print: isolate only the DC paper ── */
@media print {
  body * { visibility: hidden !important; }
  .dc-paper, .dc-paper * { visibility: visible !important; }
  .dc-paper { position: fixed; inset: 0; margin: 0; padding: 24px 28px; border-radius: 0; box-shadow: none; width: 100%; }
  .no-print { display: none !important; }
}
