/* F01 · Pearl Frost — internal work screens.
   Load after frost-controls-v1.css. The existing render functions, field order,
   grids, tables and event handlers are unchanged. Home is deliberately excluded.
   Actual components: renderTasks / renderOrders / renderStock / renderGoals /
   renderPrices, plus the order and customer-note dialogs rendered inside #view. */

body.authed:not(.home-v2) {
  background-color: #f3f5f7;
  background-image:
    radial-gradient(ellipse at 88% 9%, #fff9 0, #fff0 48%),
    radial-gradient(ellipse at 12% 65%, #e5edf344 0, #e5edf300 50%);
}

body.authed:not(.home-v2) #view {
  --pearl-ink: #535e68;
  --pearl-heading: #35414b;
  --pearl-muted: #88939d;
  --pearl-line: #dce3e9;
  --pearl-divider: #dde5eb88;
  --pearl-glass: linear-gradient(130deg, #ffffffeb 0%, #ffffffbc 68%, #f8fafcd9 100%);
  --pearl-inset: linear-gradient(135deg, #ffffffb8, #f5f8faa8);
  --pearl-shadow: inset 1px 1px 1px #fff, inset -1px -1px #b9c9d421,
    0 0 0 1px #dbe3e966, 0 3px 0 #d8e2e955, 0 9px 23px #62758a0b;
  --pearl-control: linear-gradient(135deg, #ffffffed, #f3f6f9cf);
  --ink: var(--pearl-heading);
  --ink-2: var(--pearl-ink);
  --muted: var(--pearl-muted);
  --paper: #ffffffdc;
  --surface: #ffffffdc;
  --ice: #f3f6f8;
  --sunk: #f0f4f7;
  --frost: var(--pearl-line);
  --frost-2: var(--pearl-divider);
  --line: var(--pearl-line);
  --blue: #647583;
  --blue-2: #647583;
  --brand-blue: #8699a9;
  --blue-soft: #eaf0f5;
  --accent: #647583;
  --accent-soft: #eaf0f5;
  --frost-action-height: 32px;
  --frost-action-ink: #5c6873;
  --frost-action-line: #d5dfe7;
  --frost-action-surface: var(--pearl-control);
  --frost-action-shadow: inset 0 1px #fff, 0 2px 0 #cad5de45, 0 3px 7px #62788d0b;
  color: var(--pearl-ink);
}

/* One quiet type hierarchy; content and original heading sizes stay intact. */
body.authed:not(.home-v2) #view :is(.pagehead h1, .dialog-head h2) {
  color: var(--pearl-heading);
  font-weight: 650;
  text-shadow: 0 1px #fff8;
}
body.authed:not(.home-v2) #view :is(.panel-h h2, .lv-name, .order-top h3,
  .row h3, .goal h3, .scard h3, .manual-section-title h3, .empty strong) {
  color: #43505b;
  font-weight: 600;
}
body.authed:not(.home-v2) #view :is(.pagehead p, .detail, .cm, .fld > span,
  .notebook-caption label, .meta b, .staff-option-name) { color: #616d77; }
body.authed:not(.home-v2) #view :is(.crumb, .section-label, .lv-tag, .meta,
  .panel-h .sub, .items-head .sub, .recipient-help, .staff-option-role,
  .order .src, .auto-ship, .shipbar .lbl, .shipgroup .num, .spec, .upd,
  .dialog-head p, .dialog-actions > span, .item-number, .notebook-meta,
  .notebook-caption span, .empty, .manual-section-title > span) { color: var(--pearl-muted); }
body.authed:not(.home-v2) #view :is(.row.isdone h3, .goal.isdone h3) { color: #939da6; }

/* F01's white edge, soft diffuse light and shallow glass thickness. */
body.authed:not(.home-v2) #view :is(.panel, .stock-summary, .order-stage, .scard) {
  border: 1px solid #fffffff0;
  border-radius: 17px;
  background: var(--pearl-glass);
  color: var(--pearl-ink);
  box-shadow: var(--pearl-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
  backdrop-filter: blur(18px) saturate(112%);
}
body.authed:not(.home-v2) #view :is(.panel-b, .panel-h) { background: transparent; }
body.authed:not(.home-v2) #view .panel-h.bar {
  border-bottom-color: var(--pearl-divider);
  background: linear-gradient(110deg, #ffffff60, #ffffff0d);
}
body.authed:not(.home-v2) #view :is(.row, .goal, .order) { border-top-color: var(--pearl-divider); }
body.authed:not(.home-v2) #view .panel-h h2 .cnt { color: #8a97a3; }
body.authed:not(.home-v2) #view :is(.stock-summary strong, .order-stage strong, .scard .pr, td.pr, td.q) {
  color: #4b5965;
}
body.authed:not(.home-v2) #view :is(.stock-summary span, .stock-summary p,
  .stock-summary strong small, .scard .pr small, .scard .pr.none) { color: var(--pearl-muted); }
body.authed:not(.home-v2) #view .stock-summary > div + div { border-left-color: var(--pearl-divider); }
body.authed:not(.home-v2) #view .order-stage .stage-index { color: #94a1ad; background: transparent; }
body.authed:not(.home-v2) #view .order-stage:is(:hover, .active) {
  background: linear-gradient(125deg, #fff, #eaf0f5e0);
  border-color: #c7d4df;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #b9c9d421, 0 3px 0 #cbd8e26b, 0 8px 18px #62758a12;
}
body.authed:not(.home-v2) #view .order-stage.active :is(strong, .stage-index) { color: #536878; }
body.authed:not(.home-v2) #view .order-stage:focus-visible { outline: 2px solid #94a8b8; outline-offset: 4px; }

/* Toolbar, status and inset surfaces retain their existing structure. */
body.authed:not(.home-v2) #view :is(.comments, .kakao-status, .auto, .ship-none,
  .manual-item, .note-conflict, .staff-option-body) {
  border-color: #dbe4ebc7;
  background: var(--pearl-inset);
  color: var(--pearl-ink);
  border-radius: 11px;
  box-shadow: inset 0 1px #ffffffd9, 0 3px 8px #667a9005;
}
body.authed:not(.home-v2) #view .comments { border: 1px solid #e0e7edb5; }
body.authed:not(.home-v2) #view .kakao-status .sub { color: #8a97a2; }
body.authed:not(.home-v2) #view .auto .dot { background: #bbc5ce; box-shadow: inset 0 1px #fff8; }
body.authed:not(.home-v2) #view .auto .dot.on { background: #879ca7; }
body.authed:not(.home-v2) #view :is(.staff-option:hover .staff-option-body,
  .staff-option input:checked + .staff-option-body) {
  border-color: #aebfcd;
  background: linear-gradient(135deg, #fff, #eaf1f6dc);
  box-shadow: inset 0 1px #fff, 0 0 0 1px #b7c8d588, 0 4px 11px #647e9610;
}
body.authed:not(.home-v2) #view .staff-option input:focus-visible + .staff-option-body {
  outline: 2px solid #94a8b8;
  outline-offset: 3px;
}
body.authed:not(.home-v2) #view .staff-option-check { border-color: #d2dde6; background: #fff; }
body.authed:not(.home-v2) #view .staff-option input:checked + .staff-option-body .staff-option-check {
  background: #8ba0b0;
  border-color: #8ba0b0;
  color: #fff;
}
body.authed:not(.home-v2) #view .task-recipient legend { color: #5b6975; }

/* 32 px actions. Metric cards, bookmarks, paper swatches and content rows
   are not buttons in this sizing system and keep their content-driven height. */
body.authed:not(.home-v2) #view :is(.btn, .seg > button, .ship > button, .star) {
  box-sizing: border-box;
  min-height: 32px !important;
  height: 32px !important;
  max-height: 32px !important;
  padding: 0 11px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #d5dfe7 !important;
  border-radius: 8px !important;
  background: var(--pearl-control) !important;
  color: #687580 !important;
  box-shadow: var(--frost-action-shadow) !important;
  text-shadow: none !important;
  white-space: nowrap;
  line-height: 1.2;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
body.authed:not(.home-v2) #view :is(.btn, .seg > button, .ship > button, .star):not(:disabled):hover {
  border-color: #b9c8d5 !important;
  background: linear-gradient(135deg, #fff, #edf3f7) !important;
  color: #4f6577 !important;
  box-shadow: inset 0 1px #fff, 0 2px 0 #c8d4de55, 0 5px 10px #657f9610 !important;
}
body.authed:not(.home-v2) #view :is(.btn.primary, .seg > button[aria-pressed="true"],
  .ship > button[aria-pressed="true"], .star[aria-pressed="true"]) {
  border-color: #aebfcd !important;
  background: linear-gradient(135deg, #fff, #e8eff5ed) !important;
  color: #526878 !important;
  box-shadow: inset 0 1px #fff, 0 2px 0 #c7d4df66, 0 3px 7px #637d9610 !important;
  font-weight: 600;
}
body.authed:not(.home-v2) #view :is(.btn, .seg > button, .ship > button, .star):not(:disabled):active {
  background: linear-gradient(135deg, #e7eef4, #ffffffed) !important;
  box-shadow: inset 0 1px 3px #617a901f, 0 1px #fff !important;
}
body.authed:not(.home-v2) #view :is(.btn, .seg > button, .ship > button, .star):focus-visible {
  outline: 2px solid #8fa4b6;
  outline-offset: 3px;
}
body.authed:not(.home-v2) #view :is(.btn, .seg > button, .ship > button, .star):disabled {
  opacity: .42;
  cursor: not-allowed;
}
body.authed:not(.home-v2) #view .btn.danger { color: #8c7374 !important; }
body.authed:not(.home-v2) #view .btn.danger:not(:disabled):hover {
  background: linear-gradient(135deg, #fff, #f5eff0) !important;
  border-color: #d9c5c8 !important;
  color: #866367 !important;
}
body.authed:not(.home-v2) #view :is(.star, .dialog-head > .btn, .btn.item-remove) {
  width: 32px;
  min-width: 32px;
  flex-shrink: 0;
  padding: 0 !important;
}
body.authed:not(.home-v2) #view .star { font-size: 16px; }
body.authed:not(.home-v2) #view .star[aria-pressed="false"] { color: #a9b4be !important; }
body.authed:not(.home-v2) #view :is(.seg, .ship) {
  background: #eaf0f563;
  border-color: #dce5ec;
  border-radius: 10px;
  box-shadow: inset 0 1px #fff8;
}
body.authed:not(.home-v2) #view .seg { gap: 4px; }
body.authed:not(.home-v2) #view .ship { gap: 3px; padding: 3px; overflow: visible; }
body.authed:not(.home-v2) #view .ship > button + button { border-left-color: #d5dfe7 !important; }

/* Inputs share the glass action edge. Paper textarea editors are intentionally
   outside this selector so their original paper, writing area and scroll remain. */
body.authed:not(.home-v2) #view :is(.f, .pform, .manual-form, .cmform, .cust-edit,
  .items-edit, .toolbar, .price-tools, .goal-nums) :is(input[type="text"], input[type="date"],
  input[type="number"], input[type="search"], input[type="email"], input[type="tel"], select, textarea) {
  border: 1px solid #d5dfe7;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffffff0, #f6f9fbdc);
  color: #596772;
  box-shadow: inset 0 1px 2px #647a8c06, 0 1px #fff;
  caret-color: #637f94;
}
body.authed:not(.home-v2) #view :is(.f, .pform, .manual-form, .cmform, .cust-edit,
  .items-edit, .toolbar, .price-tools, .goal-nums) :is(input[type="text"], input[type="date"],
  input[type="number"], input[type="search"], input[type="email"], input[type="tel"], select) {
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  padding: 4px 10px;
}
body.authed:not(.home-v2) #view :is(.f, .pform, .manual-form, .cmform, .cust-edit,
  .items-edit, .toolbar, .price-tools, .goal-nums) :is(input, select, textarea):focus {
  border-color: #9fb5c6;
  outline: none;
  box-shadow: 0 0 0 3px #dbe5edaa, inset 0 1px #fff;
}
body.authed:not(.home-v2) #view :is(.f, .pform, .manual-form, .cmform, .cust-edit,
  .items-edit, .toolbar, .price-tools, .goal-nums) :is(input, textarea)::placeholder { color: #a3aeb8; }
body.authed:not(.home-v2) #view :is(input[type="checkbox"], input[type="radio"]) { accent-color: #859baD; }
body.authed:not(.home-v2) #view :is(.fld em, .chk, .formfoot) { color: #7a8996; }
body.authed:not(.home-v2) #view select option { background: #fff; color: #55636f; }

/* Tables stay genuine tables with their existing horizontal scrolling. */
body.authed:not(.home-v2) #view .tablebox {
  max-width: 100%;
  border-color: #dbe4eb;
  border-radius: 10px;
  background: #ffffff83;
  box-shadow: inset 0 1px #fff, 0 3px 8px #687d9305;
  scrollbar-color: #c4d0da #f3f7fa;
}
body.authed:not(.home-v2) #view table { color: #626f7b; background: transparent; }
body.authed:not(.home-v2) #view th {
  background: linear-gradient(135deg, #f8fafce8, #ecf2f7d1);
  color: #778794;
  border-bottom-color: #dbe4ec;
}
body.authed:not(.home-v2) #view td { border-top-color: #e2e8eed1; }
body.authed:not(.home-v2) #view tbody tr:not(.edit-row):hover { background: #eff5f952; }
body.authed:not(.home-v2) #view .edit-row td { background: #f3f7fae0; }
body.authed:not(.home-v2) #view :is(.scard .acts, .dialog-actions) { border-top-color: var(--pearl-divider); }

/* State chips use quiet neutral glass, keeping every state label and number. */
body.authed:not(.home-v2) #view :is(.pill, .ship-tag, .kakao-tag, .merged-tag, .steps > span) {
  background: linear-gradient(135deg, #ffffffd6, #edf2f6ad);
  color: #7c8b97;
  border: 1px solid #dce5ecd9;
  box-shadow: inset 0 1px #fff9;
}
body.authed:not(.home-v2) #view :is(.steps > span.on, .pill.s-진행, .pill.s-확인, .pill.s-출고) {
  border-color: #bacbd8;
  background: linear-gradient(135deg, #fff, #e5edf4);
  color: #5c7488;
}
body.authed:not(.home-v2) #view :is(.steps > span.past, .pill.s-완료) { color: #7c8d95; background: #edf2f4cb; }
body.authed:not(.home-v2) #view .pill.urgent { color: #8e7477; border-color: #e2d4d7; background: #faf5f5e6; }
body.authed:not(.home-v2) #view .stripe { background: #d9e2e9; }
body.authed:not(.home-v2) #view .stripe.done { background: #b9c8cf; }
body.authed:not(.home-v2) #view .stripe.urgent { background: #c5a8ae; }
body.authed:not(.home-v2) #view .notice.warn {
  background: linear-gradient(135deg, #fff, #f7f3eee6);
  color: #8a7b69;
  border-color: #e4dbcf;
}
body.authed:not(.home-v2) #view .meter {
  background: #e6edf2;
  box-shadow: inset 0 1px 2px #6d849613, 0 1px #fff;
}
body.authed:not(.home-v2) #view .meter i {
  background: linear-gradient(100deg, #b7c5cf, #8da1b1);
  box-shadow: inset 0 1px #ffffff80;
}
body.authed:not(.home-v2) #view .meter i.full { background: linear-gradient(100deg, #b3c5cc, #829da9); }
body.authed:not(.home-v2) #view details.raw summary { color: #8999a6; }
body.authed:not(.home-v2) #view details.raw pre {
  background: #f0f5f8aa;
  border: 1px solid #e0e8ee;
  color: #70808e;
  box-shadow: inset 0 1px #fff;
}

/* The stock board's enclosing surface is glass; postits, bookmarks and memo
   editors keep their existing paper colours, texture, sizing and overflow. */
body.authed:not(.home-v2) #view .inventory-workspace .cork {
  background: var(--pearl-glass);
  border-color: #fffffff0;
  box-shadow: var(--pearl-shadow);
}

/* Existing dialogs retain their native top-layer behaviour and scroll area. */
body.authed:not(.home-v2) #view .order-dialog {
  border: 1px solid #fffffff0;
  border-radius: 19px;
  background: linear-gradient(135deg, #fffffff2, #f2f6faeb);
  color: var(--pearl-ink);
  box-shadow: inset 1px 1px #fff, inset -1px -1px #b8cad830,
    0 0 0 1px #d5e0eab5, 0 25px 90px #344e6930;
  -webkit-backdrop-filter: blur(24px) saturate(110%);
  backdrop-filter: blur(24px) saturate(110%);
}
body.authed:not(.home-v2) #view .order-dialog::backdrop {
  background: #526b813d;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
body.authed:not(.home-v2) #view .dialog-head {
  background: linear-gradient(120deg, #ffffffdc, #eff5f9a6);
  border-bottom-color: #dce6ed;
  box-shadow: inset 0 1px #fff;
}
body.authed:not(.home-v2) #view :is(.manual-form, .customer-note-form) { background: transparent; }
body.authed:not(.home-v2) #view .customer-note-form .dialog-actions {
  background: linear-gradient(135deg, #ffffffdb, #f4f8fbc9);
  border-top-color: #dce5ec;
}
body.authed:not(.home-v2) #view .customer-note-form textarea {
  border-color: #d8e2ea;
  color: #64727e;
  background: #fffffff2;
  box-shadow: inset 0 1px 3px #66809608, 0 1px #fff;
}
body.authed:not(.home-v2) #view .customer-note-form textarea:focus {
  border-color: #a9bccb;
  box-shadow: 0 0 0 3px #dce6ee99;
}

@media (max-width: 640px) {
  body.authed:not(.home-v2) #view :is(.panel-h.bar, .toolbar, .formfoot, .pernav) { flex-wrap: wrap; }
  body.authed:not(.home-v2) #view :is(.panel-h.bar .seg, .pagehead > div, .dialog-head > div) { min-width: 0; max-width: 100%; }
  body.authed:not(.home-v2) #view :is(.btn, .seg > button, .ship > button) { padding-inline: 9px !important; }
  body.authed:not(.home-v2) #view :is(.star, .dialog-head > .btn, .btn.item-remove) { padding: 0 !important; }
}

@supports not (backdrop-filter: blur(1px)) {
  body.authed:not(.home-v2) #view :is(.panel, .stock-summary, .order-stage, .scard) { background: #fbfcfe; }
  body.authed:not(.home-v2) #view .order-dialog { background: #f9fbfd; }
}
@media (prefers-reduced-transparency: reduce) {
  body.authed:not(.home-v2) #view :is(.panel, .stock-summary, .order-stage, .scard, .order-dialog, .btn, .seg > button, .ship > button) {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  body.authed:not(.home-v2) #view .order-dialog { background: #f9fbfd; }
}
