:root{color-scheme:dark;--bg:#000;--panel:#111314;--text:#f4f4f4;--muted:#aaaeb0;--line:#383c3f;--blue:#1038b8;--yellow:#f4dc24}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font-family:Arial,Helvetica,sans-serif;font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased}
[hidden]{display:none!important}
button,input,select{font:inherit}
button,a,input,select{-webkit-tap-highlight-color:transparent}
button{cursor:pointer;color:inherit}
button:disabled{cursor:default;opacity:.45}
a{color:inherit;text-underline-offset:4px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid #fff;outline-offset:4px}
button:active:not(:disabled){transform:translateY(1px)}
.admin-page{max-width:1120px;margin:auto;padding:0 24px 40px}
.site-header{height:126px;position:relative;display:flex;align-items:center;justify-content:center;margin-bottom:22px}
.site-header::before{content:"";position:absolute;inset:11px;border-right:2px solid #f4f4f4;border-bottom:2px solid #f4f4f4;pointer-events:none}
.site-header::after{content:"";position:absolute;left:100px;right:11px;top:11px;height:2px;background:#f4f4f4;pointer-events:none}
.header-corner{position:absolute;bottom:11px;left:11px;width:2px;height:24px;background:#f4f4f4;pointer-events:none}
.brand{font-size:clamp(21px,4.8vw,32px);font-weight:700;letter-spacing:.18em;white-space:nowrap;margin:0;pointer-events:none}
.shop-link{position:absolute;top:14px;left:0;font-size:13px;min-height:40px;display:flex;align-items:center;padding:5px 8px;text-decoration:none}
.section-heading{position:relative;width:fit-content;max-width:100%;font-size:28px;line-height:1.2;margin:0;padding-bottom:13px}
.section-heading::after{content:"";position:absolute;left:0;right:0;bottom:0;height:4px;background:linear-gradient(to bottom,var(--blue) 0 3px,var(--yellow) 3px 4px)}
.eyebrow{text-transform:uppercase;letter-spacing:.18em;font-size:10px;color:var(--muted);margin:0 0 7px;font-weight:bold}
.muted{color:var(--muted)}
.auth-card{max-width:470px;margin:54px auto 80px;padding:28px;border:1px solid var(--line);border-radius:5px;background:var(--panel)}
.auth-card .section-heading{font-size:25px}
.auth-card>p.muted{margin:20px 0 26px}
.field{display:flex;flex-direction:column;gap:6px;min-width:0}
.field label{font-size:13px;color:#d3d6d7}
.auth-card .field{margin:18px 0}
input,select{width:100%;height:44px;padding:9px 11px;border:1px solid #63676a;border-radius:4px;background:#181b1d;color:#fff;min-width:0}
input::placeholder{color:#9b9fa1}
select{cursor:pointer;padding-right:28px}
select option{background:#181b1d;color:#fff}
.field-help{font-size:12px;color:var(--muted);margin:5px 0 0;line-height:1.5}
.button{display:inline-flex;justify-content:center;align-items:center;min-height:44px;border:1px solid #656a6d;border-radius:4px;background:#1b1e20;padding:10px 16px;color:#f4f4f4;font-size:13px;line-height:1.25;text-decoration:none;text-align:center;white-space:nowrap}
.button:hover:not(:disabled){background:#2b2f32;border-color:#a9afb2}
.button.primary{background:#f4f4f4;border-color:#f4f4f4;color:#101112;font-weight:bold}
.button.primary:hover:not(:disabled){background:#d7dbdd;border-color:#d7dbdd}
.full-width{width:100%}
.text-button{border:0;background:transparent;padding:10px 3px;min-height:44px;font-size:13px;color:#d1d5d7;text-decoration:underline;text-underline-offset:4px}
.message{font-size:13px;line-height:1.5;margin:14px 0;overflow-wrap:anywhere}
.message:empty{display:none}
.message.error{color:#ffb1ad}
.message.success{color:#c6e8d1}
.notice{background:#1c1b12;border:1px solid #6a6029;border-radius:4px;padding:13px 16px;font-size:13px;color:#eee3ad}
.account-bar{display:flex;justify-content:space-between;gap:16px;align-items:center;margin:0 0 28px;font-size:12px}
.account-bar p{margin:0;overflow-wrap:anywhere}
.section-top{display:flex;justify-content:space-between;align-items:center;gap:20px}
.small-heading{font-size:12px;color:var(--muted);font-weight:normal;margin:0 0 10px}
.summary-section{margin:28px 0}
.summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) minmax(155px,1.55fr);margin:0;border:1px solid var(--line);border-radius:4px;background:var(--panel)}
.summary-grid>div{padding:16px;border-right:1px solid var(--line)}
.summary-grid>div:last-child{border-right:0}
.summary-grid dt{color:var(--muted);font-size:12px;margin-bottom:5px}
.summary-grid dd{margin:0;font-size:25px;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.summary-grid .summary-money dd{font-size:24px}
.filter-form{display:grid;grid-template-columns:minmax(180px,1fr) minmax(135px,.5fr) 130px auto;gap:12px;align-items:end;padding-top:5px}
.filter-clear{grid-column:1/-1;justify-self:start;padding:0 2px;min-height:32px}
.list-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:20px 0 8px}
.list-toolbar p{font-size:13px;margin:0}
.print-help{margin:0 0 22px}
.orders-table{width:100%;border-collapse:collapse;font-size:13px;text-align:left}
.orders-table th{font-weight:normal;color:var(--muted);font-size:11px;letter-spacing:.03em;padding:11px 8px;border-bottom:1px solid #6c7175}
.orders-table td{padding:18px 8px;border-bottom:1px solid var(--line);vertical-align:top;max-width:230px;overflow-wrap:anywhere}
.orders-table th:first-child,.orders-table td:first-child{padding-left:0}
.orders-table th:last-child,.orders-table td:last-child{padding-right:0;text-align:right}
.order-reference{display:block;font-weight:bold;font-variant-numeric:tabular-nums;margin-bottom:4px}
.order-subline{display:block;color:var(--muted);font-size:11px;margin-top:3px;overflow-wrap:anywhere}
.money{white-space:nowrap;font-variant-numeric:tabular-nums}
.status-pill{display:inline-block;font-size:11px;font-weight:bold;line-height:1.3;border:1px solid #555d62;border-radius:3px;padding:5px 7px;white-space:nowrap;background:#191d20}
.status-new{border-color:#7897ef;color:#c2d0ff;background:#101b3c}
.status-processing{border-color:#8b7a30;color:#eadb9a;background:#24200f}
.status-completed{border-color:#517b60;color:#c0e0ca;background:#112219}
.status-cancelled{color:#b4b8bb;background:#1b1c1e;border-color:#515458}
.view-order{padding:8px 11px;min-height:38px}
.list-loading{padding:48px 0;color:var(--muted);text-align:center}
.empty-state{padding:50px 20px;text-align:center;border:1px dashed #3d4245;border-radius:4px;margin:10px 0}
.empty-state h2{font-size:19px;margin:0 0 10px}
.empty-state p{color:var(--muted);font-size:13px;margin:0 0 17px}
.pagination{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:24px}
.pagination p{font-size:12px;color:var(--muted);text-align:center}
.alerts-panel{border-top:1px solid var(--line);padding-top:30px;margin-top:45px}
.alerts-panel .section-heading{font-size:23px}
.alerts-panel p{font-size:13px}
.alert-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:18px}
.admin-footer{display:flex;justify-content:space-between;gap:20px;margin-top:50px;padding-top:18px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}
.order-dialog{padding:0;width:690px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 28px);border:1px solid #60666a;border-radius:5px;background:#0c0e0f;color:#f4f4f4;box-shadow:0 16px 80px #000c}
.order-dialog[open]{display:flex;flex-direction:column}
.order-dialog::backdrop{background:#000b}
.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 22px;border-bottom:1px solid var(--line);flex-shrink:0}
.dialog-heading h2{font-size:18px;margin:0;overflow-wrap:anywhere}
.close-button{display:flex;align-items:center;justify-content:center;font-size:29px;line-height:1;width:44px;height:44px;flex-shrink:0;border:0;background:transparent;margin-right:-9px}
.dialog-body{padding:22px;overflow:auto;overscroll-behavior:contain}
.detail-meta{display:grid;grid-template-columns:1fr 1fr;gap:13px 22px;margin:0 0 25px}
.detail-meta>div,.item-options>div{min-width:0}
.detail-meta dt,.item-options dt{color:var(--muted);font-size:11px;margin-bottom:3px}
.detail-meta dd,.item-options dd{margin:0;font-size:13px;overflow-wrap:anywhere;white-space:pre-wrap}
.detail-items-heading{font-size:16px;margin:22px 0 12px}
.line-item{border:1px solid var(--line);border-radius:4px;padding:15px;margin:12px 0;background:#151819}
.line-item h3{margin:0 0 4px;font-size:16px;overflow-wrap:anywhere}
.item-price{color:var(--muted);font-size:12px;margin:0 0 15px}
.item-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 18px;margin:0}
.item-total{font-size:13px;font-weight:bold;text-align:right;margin:15px 0 0}
.detail-total{display:flex;justify-content:space-between;gap:16px;padding-top:17px;margin-top:20px;border-top:1px solid #5b6165;font-size:17px}
.detail-total strong{white-space:nowrap}
.dialog-actions{display:flex;justify-content:space-between;align-items:end;gap:18px;padding:16px 22px 20px;border-top:1px solid var(--line);background:#111416;flex-shrink:0}
.dialog-actions form{display:flex;gap:10px;align-items:end;min-width:0}
.dialog-actions .field{min-width:135px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:fixed;top:8px;left:8px;transform:translateY(-200%);padding:10px;background:#fff;color:#000;z-index:20}
.skip-link:focus{transform:none}
.noscript-note{margin:20px}
#print-root{display:none}

@media(max-width:760px){
  .admin-page{padding-left:18px;padding-right:18px}
  .summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .summary-grid>div{padding:13px 11px}
  .summary-grid>div:nth-child(4){border-right:0}
  .summary-grid .summary-money{grid-column:1/-1;border-top:1px solid var(--line);display:flex;align-items:baseline;justify-content:space-between}
  .summary-grid .summary-money dt{margin:0}
  .summary-grid dd{font-size:22px}
  .summary-grid dt{font-size:11px}
  .filter-form{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .search-field{grid-column:1/-1}
  .filter-submit{grid-column:1}
  .filter-clear{grid-column:2;align-self:center;justify-self:end}
  .orders-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
  .orders-table,.orders-table tbody{display:block}
  .orders-table tr{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line);border-radius:4px;background:#101314;margin:12px 0;padding:15px;gap:14px}
  .orders-table td{display:block;max-width:none;padding:0!important;border:0}
  .orders-table td::before{content:attr(data-label);display:block;color:var(--muted);font-size:10px;margin-bottom:4px}
  .orders-table .customer-cell{grid-column:1/-1;grid-row:2}
  .orders-table .status-cell{grid-column:2;grid-row:1;text-align:right}
  .orders-table .order-cell{grid-column:1;grid-row:1}
  .orders-table .order-cell::before,.orders-table .status-cell::before,.orders-table .actions-cell::before{display:none}
  .orders-table .actions-cell{align-self:end}
  .orders-table .customer-cell .order-subline{font-size:12px}
}
@media(max-width:480px){
  .site-header{height:116px}
  .brand{letter-spacing:.13em;font-size:23px}
  .auth-card{padding:22px 18px;margin-top:32px}
  .section-heading{font-size:26px}
  .account-bar{margin-bottom:22px}
  .summary-grid dd{font-size:20px}
  .list-toolbar{align-items:flex-start;flex-direction:column;gap:12px}
  .list-toolbar .button{width:100%}
  .pagination .button{padding:10px 11px;min-width:97px}
  .alert-actions .button{flex:1}
  .alert-actions .text-button{flex-basis:100%;text-align:left}
  .admin-footer{flex-direction:column;gap:10px}
  .order-dialog{max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}
  .dialog-heading,.dialog-body{padding:14px 16px}
  .dialog-actions{padding:14px 16px 18px;flex-wrap:wrap;gap:12px}
  .dialog-actions form{width:100%}
  .dialog-actions form .field{flex:1}
  .dialog-actions>button{width:100%}
  .detail-meta{gap:12px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

/* Letter content area is 7.5 × 10 inches. Each summary sheet uses 9.9 inches:
   0.8 header + 0.35 column header + 8.4 rows + 0.35 footer.
   Rows are exactly 0.84in (10) or 0.42in (20), including borders/padding. */
@page{size:Letter portrait;margin:.5in}
@media print{
  :root{color-scheme:light}
  html,body{margin:0!important;padding:0!important;background:#fff!important;color:#111!important;width:auto!important;font-family:Arial,Helvetica,sans-serif}
  .screen-shell,dialog,dialog::backdrop{display:none!important}
  #print-root{display:block!important;margin:0;padding:0;color:#111;background:#fff}
  .print-summary-sheet{width:7.5in;height:9.9in;box-sizing:border-box;margin:0;padding:0;break-after:page;page-break-after:always;break-inside:avoid;page-break-inside:avoid}
  .print-summary-sheet:last-child{break-after:auto;page-break-after:auto}
  .print-summary-heading{height:.8in;box-sizing:border-box;overflow:hidden;padding:0 0 .08in}
  .print-summary-heading h1{font-size:15pt;line-height:1.15;margin:0 0 .05in;letter-spacing:.04em}
  .print-summary-heading p{font-size:8pt;line-height:1.2;margin:.025in 0;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
  .print-limit-note{font-weight:bold}
  .print-summary-table{height:8.75in;box-sizing:border-box}
  .print-summary-columns,.print-summary-row{display:grid;grid-template-columns:16% 11% 23% 18% 5% 13% 14%;width:100%;box-sizing:border-box}
  .print-summary-columns{height:.35in;align-items:center;border-top:1.2pt solid #111;border-bottom:1.2pt solid #111;font-size:8pt;font-weight:bold}
  .print-summary-rows{display:grid;grid-template-rows:repeat(10,.84in);height:8.4in}
  .print-summary-sheet[data-density="20"] .print-summary-rows{grid-template-rows:repeat(20,.42in)}
  .print-summary-row{min-height:0;height:100%;border-bottom:.5pt solid #a7a7a7;align-items:center;break-inside:avoid;page-break-inside:avoid;overflow:hidden;font-size:9pt;line-height:1.18}
  .print-summary-columns>span,.print-summary-row>span{min-width:0;padding:0 .045in;overflow:hidden;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;max-height:.68in}
  .print-summary-sheet[data-density="20"] .print-summary-row>span{-webkit-line-clamp:2;max-height:.31in}
  .print-summary-row .print-money,.print-summary-row .print-quantity{white-space:nowrap;font-variant-numeric:tabular-nums}
  .print-summary-footer{display:flex;justify-content:space-between;gap:.15in;height:.35in;align-items:center;font-size:7pt;line-height:1.15}
  .print-summary-footer span:last-child{white-space:nowrap}
  .print-order{width:7.5in;overflow-wrap:anywhere;font-size:10pt;line-height:1.4}
  .print-order h1{font-size:20pt;line-height:1.2;margin:0 0 .06in}
  .print-order h2{font-size:14pt;margin:.2in 0 .12in}
  .print-order .print-subtitle{font-size:10pt;margin:0 0 .2in}
  .print-order .detail-meta{grid-template-columns:1fr 1fr;gap:.12in .25in;margin:0 0 .2in}
  .print-order .detail-meta dt,.print-order .item-options dt{color:#555;font-size:8pt}
  .print-order .detail-meta dd,.print-order .item-options dd{font-size:10pt;color:#111;white-space:pre-wrap;overflow:visible}
  .print-order .line-item{break-inside:avoid-page;page-break-inside:avoid;border:.6pt solid #777;border-radius:0;background:#fff;color:#111;padding:.16in;margin:.14in 0}
  .print-order .line-item h3{font-size:12pt;margin:0 0 .03in}
  .print-order .item-price{font-size:9pt;color:#444;margin:0 0 .12in}
  .print-order .item-options{grid-template-columns:1fr 1fr;gap:.1in .2in}
  .print-order .item-total{font-size:10pt;margin:.12in 0 0}
  .print-order .detail-total{font-size:13pt;border-top:1pt solid #111;padding-top:.12in;margin-top:.2in;break-inside:avoid}
  .print-order .field-help{color:#555;font-size:8pt}
  .print-order .print-generated{font-size:8pt;margin:.22in 0 0;color:#555}
  .print-notice{font-size:12pt;line-height:1.5}
}
