/* orders/module.css: the Orders tab, the order form and the order block. */

/* The tabs and the list's tools on one line, over one hairline. */
.orders-bar{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:0 16px;border-bottom:1px solid var(--line);margin-bottom:4px;}
.orders-bar .list-tabs{flex:0 0 auto;max-width:100%;margin-bottom:-1px;border-bottom:0;}
/* Tight for the line, the tools drop under the tabs at the right rather than hide a tab. */
.orders-bar #orders-toolbar{margin-left:auto;}
.orders-bar .toolbar{margin:0 0 6px;gap:8px;flex-wrap:nowrap;}
.orders-bar .toolbar .btn{white-space:nowrap;}

/* The list's rows: the client over its lines, the status over the date, the
   total, then four fixed icon slots so the icons line up down the list. Only
   the first track gives, so a long name cannot move its neighbours. */
.row.order-row{grid-template-columns:minmax(0,1fr) 112px 104px 168px;gap:16px;min-height:68px;}
.order-who{min-width:0;}
.order-who .primary-text{font-size:15px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.order-skus{margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.order-state{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:0;}
.order-state .sub-text{font-size:12px;}
.order-sum{font-size:15px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;}
.order-pill{display:inline-block;padding:2px 9px;border:1px solid var(--line-strong);border-radius:10px;font-size:12px;line-height:1.35;white-space:nowrap;color:var(--ink-soft);}
.order-pill.active{border-color:var(--mustard);color:var(--mustard);}
.order-pill.delivered{border-color:var(--ink-soft);color:var(--ink);}
.order-icons{display:flex;gap:6px;justify-content:flex-end;align-items:center;}
.order-icon{display:flex;align-items:center;justify-content:center;flex:0 0 36px;width:36px;height:36px;padding:0;border:1px solid var(--line-strong);border-radius:var(--btn-radius);background:var(--paper);color:var(--ink);cursor:pointer;}
.order-icon:hover{background:var(--subtle-bg);}
.order-icon:focus-visible{outline:2px solid var(--mustard);outline-offset:1px;}
.order-icon .ic{width:16px;height:16px;}
.order-icon.next{color:var(--mustard);}
.order-icon-spacer{flex:0 0 36px;width:36px;height:36px;}
/* Edit moves into the menu on a phone, so a row with nothing else there has one only on a phone. */
.order-icon.phone{display:none;}
.order-more-menu{min-width:200px;}
/* A menu's items read as words, not the font set's uppercase button labels. */
.acct-menu.order-more-menu .btn{width:100%;justify-content:flex-start;min-height:0;padding:8px 10px;border:0;background:transparent;font-size:13px;font-weight:400;letter-spacing:0;text-transform:none;}
.acct-menu.order-more-menu .btn:hover, .acct-menu.order-more-menu .btn:focus-visible{background:var(--subtle-bg);}
.acct-menu.order-more-menu .btn .ic{margin-right:0;}
/* An entry from another module may bring no icon: its words still line up. */
.acct-menu.order-more-menu .btn:not(:has(.ic)){padding-left:36px;}
#orders-body > .day-group:first-child, #orders-body > div:first-child:not(.card-list):not(.day-group){margin-top:14px;}

/* The form's line is the core's .priced-line. */
/* The read-only block's line: no remove column. */
.line-item-row.order-view{grid-template-columns:minmax(0,1.6fr) minmax(0,0.6fr) minmax(0,0.8fr) minmax(0,0.8fr);}

.order-block{border:1px solid var(--line);border-radius:8px;background:var(--paper-raised);margin-bottom:12px;overflow:hidden;}
.order-block-head{display:flex;justify-content:space-between;align-items:center;padding:11px 14px;border-bottom:1px solid var(--line);background:var(--subtle-bg);flex-wrap:wrap;gap:8px;}
.order-block-meta{display:flex;align-items:center;gap:10px;font-size:13px;flex-wrap:wrap;}
.order-total{font-family:var(--font-mono);font-weight:500;}
.order-actions{display:flex;gap:6px;flex-wrap:wrap;}
.order-total-line{display:flex;justify-content:flex-end;gap:8px;margin-top:10px;font-size:14px;font-weight:500;}
.checkbox-group{display:flex;gap:14px;flex-wrap:wrap;}

/* Due-date groups. Also defined by cadences; either module may be off. */
.day-group{margin-bottom:16px;}
.day-group-head{font-family:var(--font-mono);font-size:11px;text-transform:uppercase;letter-spacing:0.05em;color:var(--text-muted);margin-bottom:6px;}
.day-group-head.overdue{color:var(--brick);}
.day-group-head.today{color:var(--mustard);}

/* The calendar's due-date pill. */
.cal-orders{background:var(--brick-soft);color:#5A2A26;}
html[data-scheme="dark"] .cal-orders{color:#F0C4BE;}

@media (max-width:760px){
  .line-item-row.order-view{grid-template-columns:1fr 1fr;}
}
/* A phone: the client and total, the lines under them, then the status and the
   icons at a thumb's width. The tools drop under the tabs. */
@media (max-width:820px){
  .orders-sub:not(.sold){display:none;}
  .orders-bar{flex-direction:column;flex-wrap:nowrap;align-items:stretch;border-bottom:0;margin-bottom:0;}
  .orders-bar #orders-toolbar{margin-left:0;}
  .orders-bar .list-tabs{flex:none;margin-bottom:0;border-bottom:1px solid var(--line);}
  .orders-bar .toolbar{margin:8px 0 2px;gap:6px;flex-wrap:wrap;}
  .orders-bar .toolbar > *{flex:1 1 auto;}
  .orders-bar .toolbar .btn{min-height:44px;padding-left:6px;padding-right:6px;white-space:nowrap;}
  .orders-bar .toolbar .filter-menu > .btn{width:100%;}
  .orders-bar .toolbar .btn .ic{display:none;}
  .row.order-row:not(.head){grid-template-columns:minmax(0,1fr) auto !important;gap:2px 12px;align-items:baseline;min-height:0;padding-top:14px;padding-bottom:14px;}
  .order-who{display:contents;}
  .order-who .primary-text{grid-column:1;grid-row:1;font-size:17px;}
  .order-sum{grid-column:2;grid-row:1;font-size:16px;}
  #app-shell .order-skus{grid-column:1 / -1;grid-row:2;font-size:15px;}
  .order-state{grid-column:1;grid-row:3;flex-direction:row;flex-wrap:wrap;align-items:center;align-self:center;gap:4px 8px;margin-top:8px;}
  #app-shell .order-state .sub-text{font-size:14px;}
  .order-pill{font-size:13px;}
  .row.order-row .order-actions{grid-column:2;grid-row:3;align-self:center;margin-top:8px;}
  .order-icon{flex-basis:44px;width:44px;height:44px;}
  .order-icon .ic{width:18px;height:18px;}
  .order-icon-spacer{flex-basis:44px;width:44px;height:44px;}
  .order-icon.edit, .order-icon-spacer.edit, .order-icon-spacer.next, .order-icon-spacer.wide{display:none;}
  .order-icon.phone{display:flex;}
  .acct-menu.order-more-menu .btn{min-height:44px;font-size:15px;}
}

/* Bars or a line beside the company sales chart's ranges. */
.sales-chart-type{ display:inline-flex; align-items:center; gap:8px; margin-left:auto; }

/* The dashboard's order panels (2026-10-01). */
.ord-book-figs{ display:grid; grid-template-columns:1fr 1fr; border-bottom:1px solid var(--line); }
.ord-book-fig{ display:flex; flex-direction:column; gap:2px; padding:10px 16px; min-width:0; }
.ord-book-fig + .ord-book-fig{ border-left:1px solid var(--line); }
.ord-book-label{ font-size:12px; color:var(--ink-soft); }
.ord-book-value{ font-family:var(--font-display); font-size:22px; font-weight:600; font-variant-numeric:tabular-nums; }
.ord-book-sub{ font-size:11px; color:var(--ink-soft); }
.ord-book-sub.up, .ord-top-change.up{ color:var(--sage-ink, var(--ink)); font-weight:600; }
.ord-book-sub.down, .ord-top-change.down{ color:var(--brick); font-weight:600; }
.ord-book-day{ flex:none; width:92px; font-size:12px; color:var(--ink-soft); }
.ord-top-rank{ flex:none; width:16px; font-size:12px; color:var(--ink-soft); text-align:right; }
.ord-top-change{ flex:none; width:52px; text-align:right; font-size:11px; color:var(--ink-soft); }
.dp-ord-top .dp-head .dp-range + .dp-range{ margin-left:6px; }
@container (max-width:600px){ .dp-ord-top .dp-head{ flex-wrap:wrap; } .dp-ord-top .dp-head .dp-title{ flex:1 0 100%; } .dp-ord-top .dp-head .dp-range{ margin-left:0; } }

/* A client's story, beneath its Overview's sections: the sentences, then the line by month. */
.co-story{display:flex;flex-direction:column;gap:16px;margin-top:14px;}
.co-story-says{margin:0;max-width:860px;font-size:15.2px;line-height:1.55;color:var(--ink-soft);}
.co-story-withheld{margin:6px 0 0;}
.co-story-kicker{display:block;font-size:11px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-soft);}
/* The line: calendar months of equal width, a dot for each event, labels above and
   below it where they fit. A dot is a 21px target around a 9px mark. */
.co-story-line{position:relative;height:104px;margin:2px 20px 0;}
.co-story-rail{position:absolute;left:0;right:0;top:50px;height:1px;background:var(--line-strong);}
.co-story-dot{position:absolute;top:40px;width:21px;height:21px;margin-left:-10.5px;padding:0;border:0;background:none;cursor:pointer;}
.co-story-dot::after{content:'';position:absolute;left:6px;top:6px;width:9px;height:9px;box-sizing:border-box;border-radius:50%;background:var(--mustard);}
.co-story-dot:hover::after{transform:scale(1.4);}
.co-story-dot:focus-visible{outline:2px solid var(--mustard);outline-offset:-2px;border-radius:50%;}
.co-story-dot.minor::after{left:7px;top:7px;width:7px;height:7px;background:var(--ink-soft);}
.co-story-dot.ahead::after{background:var(--paper);border:1px solid var(--mustard);}
.co-story-dot.late::after{background:var(--brick);}
.co-story-dot.now{cursor:default;}
.co-story-dot.now::after{background:var(--ink);transform:none;}
.co-story-ev{position:absolute;font-size:12px;color:var(--ink);white-space:nowrap;transform:translateX(-50%);cursor:pointer;}
.co-story-ev:hover{text-decoration:underline;}
.co-story-ev.top{top:22px;}
.co-story-ev.bottom{top:64px;}
.co-story-ev.start{transform:none;}
.co-story-ev.end{transform:translateX(-100%);}
.co-story-ev.now{color:var(--ink-soft);cursor:default;text-decoration:none;}
.co-story-month{position:absolute;top:86px;height:18px;padding:0;border:0;background:none;font:inherit;font-size:11px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;text-align:left;white-space:nowrap;color:var(--ink-soft);}
button.co-story-month{cursor:pointer;}
button.co-story-month:hover{color:var(--ink);}
button.co-story-month.on{color:var(--mustard);}
button.co-story-month:focus-visible{outline:2px solid var(--mustard);outline-offset:2px;}
/* The month picked, opened under the line. */
.co-story-pick{border-top:1px solid var(--line);}
.co-story-pick-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;}
.co-story-pick-acts{display:flex;align-items:center;gap:8px;}
.co-story-mon > .btn{margin:8px 0 12px;min-height:44px;}
.co-story-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:40px;padding:8px 0;border:0;border-top:1px solid var(--line);background:none;color:var(--ink);font:inherit;font-size:14px;text-align:left;cursor:pointer;}
.co-story-row:hover > span:first-child{text-decoration:underline;}
.co-story-row > .sub-text{flex:none;}
/* A phone has no room for the line: the same events, a month at a time. */
.co-story-bymonth{display:none;}
.co-story-mon summary{display:flex;align-items:center;justify-content:space-between;min-height:44px;border-top:1px solid var(--line);font-size:12px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-soft);cursor:pointer;}
.co-story-mon summary::-webkit-details-marker{display:none;}
.co-story-mon summary{list-style:none;}
/* The sprite's arrow: right when shut, down when open. */
.co-story-mon .co-story-chev{width:13px;height:13px;flex:0 0 auto;transition:transform .15s ease;}
.co-story-mon[open] .co-story-chev{transform:rotate(90deg);}
@media (max-width:820px){
  .co-story-line, .co-story-pick{display:none;}
  .co-story-bymonth{display:block;}
  .co-story{gap:12px;}
  .co-story-says{font-size:15px;line-height:1.5;}
  .co-story-row{min-height:44px;font-size:15px;}
}
/* Area 5a: Engagements in the system. The status is a word in the label
   style (Active in the accent, Delivered in the ink, Paid quiet), the row's
   icons stand bare as the bar's do, and the by-line blocks and day groups are
   hairline sections, never tiles. */
html:is([data-theme="plasmodium"],[data-theme="oat"]) .orders-bar{border-bottom:0;box-shadow:inset 0 -1px 0 var(--line);margin-bottom:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .orders-bar .list-tabs{box-shadow:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .orders-bar .toolbar{margin:0 0 8px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .order-pill{padding:0;border:0;border-radius:0;font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;line-height:1.5;color:var(--text-muted);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .order-pill.active{color:var(--mustard);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .order-pill.delivered{color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .order-state .sub-text{font-size:14.4px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .order-icon{border:0;border-radius:0;background:none;color:var(--ink-soft);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .order-icon:hover{background:none;color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .order-icon.next{color:var(--mustard);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .order-icon:focus-visible{outline:1px solid var(--mustard);outline-offset:-1px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .order-icon .ic{width:17px;height:17px;stroke-width:1.5;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .order-more-menu .btn{width:100%;justify-content:flex-start;border:0;color:var(--ink);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .order-block{border:0;border-top:1px solid var(--line);border-radius:0;background:none;margin-bottom:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .order-block-head{padding:14px 0;border-bottom:0;background:none;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .order-block-meta{font-size:14.4px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .day-group{margin-top:28px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .day-group-head{font-family:var(--font-ui);font-size:11.52px;font-weight:500;letter-spacing:0.12em;margin-bottom:4px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .ord-book-figs{gap:24px;border-bottom:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .ord-book-fig{padding:12px 0 0;border-top:1px solid var(--line);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .ord-book-fig + .ord-book-fig{border-left:0;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .ord-book-label{font-size:11.52px;font-weight:500;letter-spacing:0.12em;text-transform:uppercase;color:var(--text-muted);}
html:is([data-theme="plasmodium"],[data-theme="oat"]) .ord-book-value{font-weight:300;font-size:26px;}
html:is([data-theme="plasmodium"],[data-theme="oat"]) :is(.ord-book-sub.up, .ord-top-change.up, .ord-book-sub.down, .ord-top-change.down){font-weight:400;}
