/* Atlas workspace: shared navigation and consistent section hierarchy. */
:root { --rail-width:232px; --header-height:80px; --nav-height:80px; --surface:#f5f7fb; }
html { scroll-padding-top:100px; scroll-padding-bottom:180px; }
body { background:#fff; }
button,a,input,textarea,select,summary { -webkit-tap-highlight-color:transparent; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:3px solid #92acd9; outline-offset:3px; }
.topbar { position:sticky; top:0; z-index:60; height:var(--header-height); padding:0 28px; background:#fffffffa; backdrop-filter:blur(14px); }
.brand { font-size:18px; }
.brand-mark { width:38px; height:43px; font-size:29px; }
.brand small { margin-top:4px; }
#app { max-width:1480px; padding:32px clamp(20px,3vw,48px) 64px; min-height:calc(100dvh - var(--header-height)); }
.page-top { gap:18px; margin-bottom:26px; align-items:center; }
.page-top h1 { font-size:clamp(23px,2.5vw,32px); line-height:1.5; margin:0; }
.page-top .eyebrow { margin-bottom:7px; }
.back-button { min-height:44px; }
#back-home { min-height:28px; padding:0; margin-bottom:7px; border:0; background:none; font-size:13px; }
.app-navigation { position:fixed; z-index:45; background:white; }
.app-navigation svg,.home-tools svg { display:block; width:23px; height:23px; flex-shrink:0; }
.nav-heading { display:grid; gap:8px; padding:8px 12px 24px; }
.nav-heading .mini-label { margin:0; font-size:12px; color:var(--muted); }
.nav-heading strong { font-size:19px; }
.nav-create { width:100%; margin-bottom:22px; min-height:49px; }
.nav-links { display:grid; gap:9px; }
.nav-links button { display:flex; align-items:center; gap:14px; text-align:right; padding:14px 16px; border-radius:13px; background:transparent; color:var(--muted); min-height:52px; font-size:15px; }
.nav-links button:hover { color:var(--ink); background:var(--surface); }
.nav-links button.active { color:white; background:var(--ink); box-shadow:0 7px 14px #1b2b5417; font-weight:700; }
.nav-links i { margin-inline-start:auto; width:5px; height:5px; border-radius:50%; background:currentColor; visibility:hidden; }
.nav-links .active i { visibility:visible; }
.nav-person { display:flex; align-items:center; gap:10px; margin-top:auto; padding:20px 10px 0; border-top:1px solid var(--line); }
.nav-person>span:last-child { display:grid; gap:7px; min-width:0; }
.nav-person strong { overflow-wrap:anywhere; }
.nav-person small { color:var(--muted); font-size:12px; }
.hero { margin-bottom:25px; gap:18px; }
.hero h1 { font-size:clamp(26px,3vw,35px); line-height:1.45; }
.hero p { margin:10px 0 0; }
.hero .eyebrow { margin-bottom:9px; }
.hero-date { border:1px solid var(--line); border-radius:16px; padding:12px 22px; }
.home-grid { grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:20px; margin-bottom:22px; }
.new-card { min-height:258px; border-radius:20px; }
.new-card h2 { line-height:1.45; }
.overview-card { border-radius:20px; display:flex; flex-direction:column; justify-content:center; box-shadow:none; background:var(--surface); }
.overview-card .stats { gap:16px; }
.home-tools { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:14px; margin-bottom:34px; }
.home-tools .secondary { display:grid; grid-template-columns:26px 1fr; align-items:center; gap:12px; text-align:right; padding:23px; background:white; border:1px solid var(--line); border-radius:17px; box-shadow:0 4px 10px #1b2b5405; color:var(--ink); }
.home-tools .secondary:hover { border-color:var(--ink); background:var(--surface); }
.home-tools strong { font-size:16px; }
.home-tools .secondary>span { grid-column:2; font-size:12px; color:var(--muted); line-height:1.7; margin:0; }
.orders-section { margin-top:8px; }
.section-heading { gap:16px; align-items:center; }
.section-heading h2 { font-size:20px; }
.tabs { background:var(--surface); padding:4px; }
.tabs button { min-height:41px; font-size:14px; padding:10px 20px; }
.draft-list { gap:12px; }
.draft-row { padding:17px 20px; border-radius:15px; box-shadow:none; }
.draft-open { gap:14px; }
.draft-open small { line-height:1.8; }
.status-pill { line-height:1.6; }
.workspace { grid-template-columns:minmax(0,1fr) 250px; gap:24px; }
.workspace>.main-panel { overflow:visible; }
.main-panel { border-radius:18px; box-shadow:0 8px 24px #1b2b5405; }
.stepper { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; padding:20px 24px; background:var(--surface); border-radius:18px 18px 0 0; }
.step-line { display:none; }
.stepper .step { white-space:normal; gap:9px; line-height:1.6; min-height:40px; }
.stepper .step span { width:30px; height:30px; font-size:13px; border-radius:9px; }
.form-body { padding:28px; min-width:0; }
.form-title { margin-bottom:24px; }
.form-title h2 { font-size:23px; line-height:1.6; }
.form-title .title-icon { font-size:26px; }
.fields { gap:23px 20px; }
.field { min-width:0; }
.field>label,.choice-field legend { font-size:15px; font-weight:700; }
.field input,.field textarea,.field select { min-height:52px; background:#fff; }
.field textarea { line-height:1.8; }
.field select { text-overflow:ellipsis; padding-inline-end:30px; }
.form-group { margin-top:28px; padding-top:24px; border-top:1px solid var(--line); }
.form-group>h3 { margin:0 0 20px; font-size:18px; }
.organizer-group .fields { grid-template-columns:minmax(0,1fr); }
.organizer-group .field { max-width:460px; }
.finance-group { margin-top:0; padding-top:0; border-top:0; }
.financial-items { padding:20px; border-color:var(--line); background:var(--surface); gap:16px; }
.financial-items>div { align-items:center; line-height:1.7; }
.financial-items strong { white-space:nowrap; }
.financial-total { font-size:20px; }
.financial-total strong { color:var(--ink); }
.item-stage,.item-content,.item-outline { min-width:0; }
.item-outline:has(.item-card:only-child) { display:none; }
.item-outline>h3 { font-size:15px; display:flex; align-items:center; gap:9px; margin:0 0 13px; }
.item-outline>h3 span { display:grid; place-items:center; width:25px; height:25px; border-radius:8px; background:var(--accent-soft); }
.item-cards { display:flex; gap:10px; overflow-x:auto; padding:3px 2px 12px; margin-bottom:16px; scroll-snap-type:x proximity; }
.item-card { min-width:230px; max-width:320px; flex-shrink:0; flex-direction:column; align-items:stretch; padding:5px 13px; border-color:var(--line); scroll-snap-align:start; }
.item-card.active { border-color:var(--ink); box-shadow:inset 0 3px var(--ink); }
.item-card .deleting { align-self:flex-end; padding:5px 0 10px; min-height:30px; }
.item-open { padding:13px 0 8px; }
.item-open strong { font-size:14px; line-height:1.7; }
.item-open small { font-size:12px; }
.item-editor { border:0; padding:0; }
.bag-options { border:1px solid var(--line); background:var(--surface); padding:22px; border-radius:15px; margin:3px 0; }
.bag-options h3 { font-size:18px; margin:0 0 22px; }
.bag-options .fields { gap:22px; }
.choice-options { gap:10px; }
.choice { padding:13px 16px; min-height:48px; background:white; }
.choice:has(input:checked) { background:var(--ink); color:#fff; }
.choice input { accent-color:var(--ink); }
.model-grid { max-height:340px; overflow-y:auto; padding:3px; grid-template-columns:repeat(auto-fill,minmax(115px,1fr)); }
.model-choice { min-height:85px; }
.field-divider { margin-top:8px; padding-top:18px; border-top:1px solid var(--line); }
.upload-zone { border-style:dashed; background:var(--surface); padding:20px; min-height:115px; }
.add-item-button { min-height:57px; font-size:18px; margin-top:20px; }
.form-footer { position:sticky; bottom:0; z-index:20; padding:18px 28px; border-radius:0 0 18px 18px; box-shadow:0 -8px 20px #1b2b5407; background:#fffffff5; backdrop-filter:blur(12px); }
.form-footer #next { min-width:180px; min-height:50px; font-size:17px; }
.aside { top:106px; }
.note-card { padding:16px 4px; font-size:12px; line-height:1.9; border:0; }
.summary-card { border-color:var(--line); box-shadow:none; }
.review-item { border-color:var(--line); padding:20px; }
.order-preview { background:var(--surface); border-color:var(--line); font-size:15px; line-height:1.95; }
.section-tabs { display:flex; gap:6px; background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:5px; margin:25px 0 20px; }
.section-tabs button { flex:1; background:none; color:var(--muted); padding:13px 16px; min-height:47px; border-radius:9px; font-size:15px; }
.section-tabs [aria-selected=true] { background:white; color:var(--ink); box-shadow:0 2px 7px #1b2b5410; font-weight:700; }
.sales-totals,.inventory-overview { gap:16px; margin:0 0 22px; }
.sales-totals>div,.inventory-overview>div { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:23px; }
.sales-totals span { line-height:1.7; }
.sales-totals strong { font-size:clamp(24px,2.6vw,32px); }
.account-search,.inventory-toolbar,.sales-toolbar { padding:20px; background:var(--surface); border:1px solid var(--line); border-radius:16px; margin-bottom:24px; }
.account-search label,.stock-search { font-weight:700; line-height:1.7; }
.account-list-row,.sales-employee { box-shadow:none; border-radius:15px; padding:22px; }
.account-list-row small { line-height:1.9; }
.account-identity { gap:12px 24px; padding:0 2px 22px; }
.account-overview { border:1px solid var(--line); border-radius:15px; padding:16px 22px; margin:0 0 20px; }
.account-overview p { line-height:1.8; }
.account-actions { gap:10px; margin:18px 0; }
.account-actions button,.account-actions a { min-height:47px; }
.account-event,.account-item { border-color:var(--line); border-radius:13px; padding:20px; background:white; }
.account-event small { line-height:1.9; }
.account-section .form-body>h2 { margin:0 0 23px; font-size:22px; }
.account-statement-panel .form-body>details>summary { display:none; }
.account-statement-panel .order-preview { margin-top:16px; }
.account-form-context { padding:20px; background:var(--surface); border:1px solid var(--line); border-radius:15px; }
.sales-plan { margin-bottom:0; }
.sales-tier { margin:20px 0; padding:20px; background:var(--surface); }
.sales-orders { padding:24px; border:1px solid var(--line); border-radius:18px; }
.stock-table-wrap { border-radius:16px; border-color:var(--line); }
.stock-table th { background:var(--surface); font-weight:700; padding:18px; }
.stock-table td { padding:18px; }
.inventory-actions { gap:12px; }
.stock-history { gap:13px; }
.stock-movement { border-color:var(--line); border-radius:14px; padding:22px; }
#toast { z-index:80; bottom:24px; max-width:min(520px,calc(100vw - 32px)); line-height:1.8; }
@media(min-width:1100px) {
  .app-navigation { top:var(--header-height); bottom:0; right:0; width:var(--rail-width); border-left:1px solid var(--line); padding:30px 18px 24px; display:flex; flex-direction:column; overflow-y:auto; }
  #app { margin-inline-start:var(--rail-width); margin-inline-end:auto; }
  .header-end { padding-inline-end:3px; }
}
@media(min-width:1730px) { #app { margin-inline-start:calc(var(--rail-width) + (100vw - var(--rail-width) - 1480px)/2); } }
@media(max-width:1249px) {
  .workspace { grid-template-columns:minmax(0,1fr); }
  .workspace>.aside { display:none; }
  .mobile-remaining { display:block; }
}
@media(max-width:1099px) {
  :root { --header-height:74px; }
  #app { padding-bottom:calc(var(--nav-height) + env(safe-area-inset-bottom) + 35px); }
  .app-navigation { bottom:0; left:0; right:0; height:calc(var(--nav-height) + env(safe-area-inset-bottom)); padding:7px 10px calc(7px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); box-shadow:0 -4px 22px #1b2b5408; }
  .nav-heading,.app-navigation .nav-create,.nav-person { display:none; }
  .nav-links { grid-template-columns:repeat(var(--nav-count),minmax(0,1fr)); gap:4px; max-width:680px; margin:auto; }
  .nav-links button { flex-direction:column; gap:6px; padding:8px 2px 7px; min-height:60px; font-size:12px; text-align:center; border-radius:12px; }
  .nav-links button.active { color:var(--ink); background:var(--accent-soft); box-shadow:none; }
  .nav-links i { display:none; }
  .nav-links svg { width:22px; height:22px; }
  .form-footer { bottom:calc(var(--nav-height) + env(safe-area-inset-bottom)); }
  #toast { bottom:calc(var(--nav-height) + env(safe-area-inset-bottom) + 15px); }
}
@media(max-width:760px) {
  .topbar { padding:0 18px; }
  .header-end { gap:12px; }
  #header-date { display:none; }
  #app { padding-top:24px; padding-inline:18px; }
  .home-grid { grid-template-columns:minmax(0,1fr); }
  .new-card { min-height:245px; padding:27px; }
  .new-card-copy { width:66%; }
  .new-card h2 { font-size:29px; }
  .paper-art { width:95px; height:138px; top:48px; left:25px; }
  .overview-card { padding:23px; }
  .overview-card .stats { gap:10px; }
  .overview-foot { display:none; }
  .home-tools { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:28px; }
  .home-tools .secondary { grid-template-columns:1fr; gap:12px; padding:18px 16px; }
  .home-tools strong { font-size:15px; line-height:1.5; }
  .home-tools .secondary>span { grid-column:1; font-size:12px; }
  .home-tools .secondary:last-child:nth-child(odd) { grid-column:1/-1; grid-template-columns:26px 1fr; }
  .home-tools .secondary:last-child:nth-child(odd)>span { grid-column:2; }
  .section-heading { flex-wrap:wrap; gap:13px; }
  .orders-section .tabs { width:100%; display:flex; }
  .orders-section .tabs button { flex:1; padding-inline:8px; }
  .draft-row { flex-wrap:wrap; gap:12px; padding:16px; }
  .draft-row .draft-open { flex:1 1 calc(100% - 80px); }
  .draft-row>.text-button { margin-inline-start:auto; }
  .form-body { padding:23px 20px; }
  .form-title h2 { font-size:21px; }
  .fields { grid-template-columns:minmax(0,1fr); gap:22px; }
  .field.wide,.field-divider { grid-column:auto; }
  .stepper { gap:7px; padding:16px 12px; }
  .stepper .step { display:flex; flex-direction:column; text-align:center; gap:7px; font-size:11px; }
  .stepper .step span { width:29px; height:29px; }
  .item-cards { margin-inline:-3px; }
  .item-card { min-width:222px; max-width:260px; }
  .bag-options { padding:18px 15px; }
  .choice-options { gap:9px; }
  .choice { padding:12px; flex-grow:1; justify-content:center; font-size:14px; }
  .model-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .form-footer { padding:15px 20px; flex-wrap:nowrap; }
  .form-footer #next { min-width:145px; font-size:16px; }
  .form-footer .back-button { padding-inline:0; }
  .section-tabs { margin-top:22px; gap:3px; }
  .section-tabs button { padding:11px 5px; font-size:14px; }
  .sales-totals,.inventory-overview { gap:10px; }
  .sales-totals>div,.inventory-overview>div { padding:18px; }
  .sales-totals { grid-template-columns:minmax(0,1fr); }
  .sales-totals>div { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; }
  .sales-totals strong { white-space:nowrap; font-size:23px; }
  .account-search,.inventory-toolbar,.sales-toolbar { padding:17px; gap:17px; }
  .account-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .account-actions>* { min-width:0; padding:12px 10px; font-size:14px; line-height:1.6; text-align:center; }
  .account-actions>:first-child:last-child { grid-column:1/-1; }
  .account-section .form-body { padding:20px 16px; }
  .account-overview { padding:15px 18px; }
  .account-event,.account-item { padding:17px; }
  .account-event-top { gap:12px; }
  .sales-orders { padding:20px 16px; }
  .stock-table-wrap { border:0; overflow:visible; }
  .stock-table,.stock-table tbody { display:block; width:100%; min-width:0; }
  .stock-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .stock-table tbody { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  .stock-table tr { display:grid; grid-template-columns:1fr 1fr; gap:16px 12px; border:1px solid var(--line); border-radius:16px; padding:18px; background:white; min-width:0; }
  .stock-table td { padding:0; border:0; min-width:0; line-height:1.6; overflow-wrap:anywhere; }
  .stock-table td::before { content:attr(data-label); display:block; color:var(--muted); font-size:12px; margin-bottom:6px; }
  .stock-table td:nth-child(3),.stock-table td:last-child { grid-column:1/-1; }
  .stock-table td:last-child button { width:100%; }
  .stock-table .stock-color { gap:10px; flex-wrap:wrap; }
  .stock-table .stock-thumbnail { max-width:120px; }
}
@media(max-width:480px) {
  .stock-table tbody { grid-template-columns:minmax(0,1fr); }
  .hero-date { display:none; }
  .inventory-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .inventory-overview>div:last-child { grid-column:1/-1; }
  .account-list-row { padding:18px; }
  .account-identity { display:grid; grid-template-columns:minmax(0,1fr); }
  .stock-table tr { gap:18px; }
}
@media(max-width:360px) {
  #app { padding-inline:12px; }
  .topbar { padding-inline:13px; }
  .header-end .avatar { display:none; }
  .new-card { padding:23px; }
  .new-card h2 { font-size:24px; }
  .new-card .primary { font-size:13px; padding:12px 10px; gap:10px; }
  .paper-art { width:78px; height:115px; left:17px; top:54px; }
  .form-body { padding:21px 15px; }
  .form-footer { padding-inline:15px; gap:10px; }
  .form-footer #next { min-width:130px; }
  .home-tools .secondary { padding:17px 13px; }
  .home-tools strong { font-size:14px; }
  .account-actions { grid-template-columns:minmax(0,1fr); }
  .account-event-top { flex-wrap:wrap; }
  .sales-totals>div { padding:16px 14px; }
  .sales-totals strong { font-size:21px; }
}
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

/* Admin-only cleanup of trial orders; live order entry remains in its own sections. */
.cleanup-notice { margin-bottom:24px; line-height:1.9; }
.cleanup-notice p:last-child { margin-bottom:0; }
.cleanup-selection { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.cleanup-toolbar { margin-bottom:24px; }
.cleanup-list { display:grid; gap:12px; }
.cleanup-row { display:flex; gap:17px; align-items:center; padding:22px; border:1px solid var(--line); border-radius:15px; cursor:pointer; }
.cleanup-row:has(input:checked) { background:var(--accent-soft); border-color:var(--ink); }
.cleanup-row input { width:23px; height:23px; flex-shrink:0; accent-color:var(--ink); }
.cleanup-row>span { display:grid; gap:8px; min-width:0; overflow-wrap:anywhere; }
.cleanup-row>span:nth-child(2) { flex:1; }
.cleanup-row>span:last-child { text-align:left; }
.cleanup-row small { color:var(--muted); line-height:1.8; }
.cleanup-history { margin-top:34px; }
.cleanup-history .account-event { margin:12px 0; }
.cleanup-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:30px; }
.cleanup-summary>div { display:grid; gap:7px; padding:20px; border-radius:14px; background:var(--surface); text-align:center; }
.cleanup-summary strong { font-size:28px; }
.cleanup-stock { display:grid; gap:12px; margin-bottom:25px; }
.cleanup-stock article { border:1px solid var(--line); border-radius:13px; padding:18px; }
.cleanup-stock article>div { display:flex; justify-content:space-between; gap:15px; flex-wrap:wrap; margin-bottom:10px; }
.cleanup-stock small { color:var(--muted); }
.page-actions { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.form-footer #cleanup-execute { flex:1; min-width:0; line-height:1.7; }
@media(max-width:1099px) { .app-navigation:has([data-nav=admin]) .nav-links button { font-size:11px; } }
@media(max-width:640px) {
  .cleanup-row { flex-wrap:wrap; padding:18px; gap:13px; }
  .cleanup-row>span:nth-child(2) { flex:1 1 calc(100% - 45px); }
  .cleanup-row>span:last-child { text-align:right; padding-inline-start:36px; }
  .cleanup-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .cleanup-summary>div { padding:17px; }
}

/* Shared confirmed orders and delivery dates. */
.board-actions,.board-detail-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-bottom:24px; }
.board-sections { display:flex; width:fit-content; max-width:100%; margin-bottom:22px; gap:5px; }
.board-sections button { display:flex; align-items:center; justify-content:center; gap:9px; min-height:49px; }
.board-sections b { display:grid; place-items:center; min-width:27px; height:27px; padding-inline:6px; border-radius:8px; background:#e4eaf5; font-size:13px; }
.board-sections .active b { background:var(--ink); color:white; }
.board-toolbar.is-delivered { grid-template-columns:minmax(0,1.5fr) minmax(170px,1fr); }
.board-toolbar.is-delivered .board-search { grid-column:auto; }
.board-balance { font-size:12px; font-weight:700; line-height:1.8; }
.board-toolbar { display:grid; grid-template-columns:minmax(240px,1.5fr) minmax(170px,1fr) minmax(170px,1fr); align-items:end; gap:15px; background:var(--surface); border:1px solid var(--line); padding:23px; border-radius:17px; }
.board-toolbar label { display:grid; gap:10px; font-size:14px; font-weight:700; min-width:0; }
.board-search>label { display:block; margin-bottom:10px; }
.board-search-control { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:9px; }
.board-search-control button { min-width:72px; min-height:50px; font-size:13px; padding:10px 12px; }
.board-toolbar input,.board-toolbar select { width:100%; min-height:50px; border:1px solid var(--ink); border-radius:12px; padding:12px 14px; font:inherit; color:var(--ink); background:white; }
.board-toolbar input:focus,.board-toolbar select:focus { outline:3px solid #c4d1e9; outline-offset:2px; }
.board-stats { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:22px 0 15px; }
.board-stats>span { display:flex; align-items:center; gap:9px; font-size:13px; padding:10px 15px; background:var(--surface); border-radius:11px; border:1px solid var(--line); }
.board-stats b { font-size:19px; font-variant-numeric:tabular-nums; }
.board-stats .board-late-count { background:#fff4f1; border-color:#f4d7d1; color:#a13b34; }
.board-rule { color:var(--muted); font-size:12px; line-height:1.9; margin:15px 0 28px; }
.board-list-heading { display:flex; justify-content:space-between; align-items:center; gap:15px; margin-bottom:18px; }
.board-list-heading h2 { margin:0; font-size:20px; }
.board-list-heading>span { color:var(--muted); font-size:13px; }
.board-list { display:grid; gap:13px; }
.board-order { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.85fr) minmax(0,1fr) 22px; gap:22px; align-items:center; text-align:right; width:100%; border:1px solid var(--line); border-radius:17px; background:white; padding:24px; color:var(--ink); transition:background .18s,border-color .18s; }
.board-order:hover { border-color:var(--ink); background:#fafbfe; }
.board-order>span { min-width:0; }
.board-order-customer,.board-order-date,.board-order-time { display:grid; gap:9px; }
.board-order-customer strong { font-size:18px; line-height:1.7; overflow-wrap:anywhere; }
.board-order-customer>span { overflow-wrap:anywhere; }
.board-order small { color:var(--muted); font-size:12px; line-height:1.8; overflow-wrap:anywhere; }
.board-order-date b { font-size:16px; font-variant-numeric:tabular-nums; }
.board-delivery-state { color:var(--muted); font-size:12px; }
.board-order-arrow { font-size:23px; }
.deadline-badge { display:inline-flex; align-items:center; justify-content:center; padding:9px 13px; width:fit-content; font-size:14px; line-height:1.8; border-radius:10px; }
.tone-normal { background:#edf7f1; color:#1a6542; }
.tone-warning { background:#fff7e4; color:#8b620c; }
.tone-urgent { background:#fff0ec; color:#a1372b; }
.tone-late { background:#ffeae5; color:#9e3027; }
.tone-delivered { background:#edf2fc; color:var(--ink); }
.tone-unknown { background:var(--surface); color:var(--muted); }
#board-more { width:100%; margin-top:20px; }
.board-deadline-card { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:22px; padding:24px; border-radius:16px; margin-bottom:22px; }
.board-deadline-card>div { display:grid; gap:10px; }
.board-deadline-card strong { font-size:23px; }
.board-deadline-card span { font-size:14px; }
.board-detail-actions .board-telegram { display:inline-flex; align-items:center; justify-content:center; padding:13px 20px; border:1px solid var(--line); border-radius:12px; text-decoration:none; color:var(--ink); min-height:48px; }
.board-customer-panel { margin-bottom:25px; }
.board-customer-panel h2 { margin-bottom:22px; font-size:22px; }
.board-customer-panel .sales-customer { margin:0; }
.board-workshop { margin:22px 0 0; border-top:1px solid var(--line); padding-top:18px; color:var(--muted); }
.board-items { display:grid; gap:15px; }
.board-item { border:1px solid var(--line); border-radius:16px; min-width:0; overflow:hidden; }
.board-item summary { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:23px; background:var(--surface); }
.board-item summary>span { display:grid; gap:9px; min-width:0; }
.board-item summary strong { font-size:18px; overflow-wrap:anywhere; }
.board-item summary small { font-size:12px; color:var(--muted); line-height:1.8; overflow-wrap:anywhere; }
.board-item summary>b { white-space:nowrap; font-size:15px; }
.board-item-body { padding:23px; }
.board-item-body>.order-preview { margin:0 0 20px; }
.board-item-body>p { color:var(--muted); font-size:14px; }
.board-records { display:grid; gap:16px; margin-top:30px; }
.board-records>details { border:1px solid var(--line); border-radius:15px; padding:22px; }
.board-records summary { font-size:18px; }
.board-records .account-ledger { margin-top:22px; }
@media(max-width:1400px) {
  .board-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .board-toolbar .board-search { grid-column:1/-1; }
  .board-toolbar>button { grid-column:1/-1; }
}
@media(max-width:760px) {
  .board-toolbar { padding:18px; gap:17px 12px; }
  .board-sections { width:100%; }
  .board-sections button { flex:1; font-size:13px; padding:10px 6px; gap:6px; }
  .board-toolbar.is-delivered { grid-template-columns:minmax(0,1fr); }
  .board-toolbar input,.board-toolbar select { font-size:15px; padding-inline:10px; }
  .board-actions>button { flex:1; padding-inline:12px; }
  .board-stats { gap:8px; }
  .board-stats>span { padding:9px 11px; font-size:12px; gap:7px; }
  .board-order { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:20px 13px; padding:21px 18px; }
  .board-order-customer strong { font-size:18px; }
  .board-order-date { grid-column:1/-1; display:flex; align-items:center; flex-wrap:wrap; gap:9px 15px; border-top:1px solid var(--line); padding-top:15px; order:1; }
  .board-order-time { justify-items:end; text-align:left; }
  .board-order .board-order-arrow { display:none; }
  .deadline-badge { max-width:100%; padding:8px 10px; font-size:13px; }
  .board-order small { font-size:12px; }
  .board-list-heading>span { font-size:12px; }
  .board-deadline-card { padding:22px; gap:20px; }
  .board-deadline-card strong { font-size:22px; }
  .board-detail-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .board-detail-actions>* { font-size:14px; padding:12px 10px; min-width:0; line-height:1.7; }
  .board-detail-actions .board-telegram { grid-column:1/-1; }
  .board-item summary { padding:20px 17px; flex-wrap:wrap; }
  .board-item-body { padding:20px 16px; }
  .board-customer-panel .sales-customer { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 16px; }
  .board-customer-panel .sales-customer>div:nth-child(4) { grid-column:1/-1; }
  .board-records>details { padding:20px 16px; }
}
@media(max-width:360px) {
  .board-toolbar { grid-template-columns:minmax(0,1fr); }
  .board-toolbar .board-search,.board-toolbar>button { grid-column:auto; }
  .board-actions { flex-direction:column; align-items:stretch; }
  .board-deadline-card strong { font-size:20px; }
  .deadline-badge { font-size:12px; }
}
