/* Apple-inspired workspace: a single presentation layer over the existing ERP. */
:root {
  --paper: #f5f5f7;
  --paper-2: #eeeef0;
  --white: #fff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --blue: #0071e3;
  --cyan: #64a7ee;
  --green: #248a5b;
  --signal: #cf3b32;
  --amber: #b97806;
  --line: rgba(60,60,67,.10);
  --line-strong: #d2d2d7;
  --shadow-soft: 0 2px 8px rgba(0,0,0,.025), 0 12px 28px rgba(0,0,0,.025);
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  --sans: var(--body);
}
html, body { color: var(--ink); background: var(--paper); font-family: var(--body); }
body { line-height: 1.5; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; }
::selection { background: #cce4ff; }
.ui-icon { width: 20px; height: 20px; flex-shrink: 0; display: block; }
.eyebrow { color: #76767c; font-size: 10px; line-height: 1.4; font-weight: 600; letter-spacing: .12em; }
.button { min-height: 44px; padding: 11px 18px; border-radius: 12px; font-size: 13px; font-weight: 600; letter-spacing: 0; box-shadow: none; }
.button-primary, .button-blue { color: #fff; background: var(--blue); box-shadow: none; }
.button-ghost { color: #424247; background: #fff; border: 1px solid var(--line-strong); }
.button-green { background: #248a5b; }
.button-amber { background: #fff0d2; color: #88550a; }
.button-signal { background: #cf3b32; }
.button:hover { transform: none; box-shadow: none; filter: brightness(.98); }
.button-primary:hover, .button-blue:hover { background: #0077ed; box-shadow: 0 4px 12px #0071e31a; }
.button:active { transform: scale(.985); }
.button-small { min-height: 36px; padding: 8px 12px; font-size: 12px; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #0071e388; outline-offset: 3px; }
input, select, textarea { border-radius: 12px; border: 1px solid #d2d2d7; color: var(--ink); background: #fff; font-size: 14px; }
input:focus, select:focus, textarea:focus { border-color: #0071e3; box-shadow: 0 0 0 3px #0071e31a; }
label { color: #5c5c62; font-weight: 500; }
.brand-stamp { width: 48px; height: 48px; border-radius: 15px; background: linear-gradient(145deg,#343439,#18181a); box-shadow: inset 0 1px 0 #ffffff29, 0 4px 10px #00000012; color: #fff; transform: none; font: 650 27px/1 var(--display); }
.brand-stamp-small { width: 38px; height: 38px; border-radius: 12px; font-size: 22px; }
.sidebar { width: 224px; padding: 25px 14px 16px; color: var(--ink); background: rgba(250,250,252,.92); border-right: 1px solid var(--line); box-shadow: none; backdrop-filter: blur(24px); }
.sidebar-brand { gap: 12px; padding: 0 9px 19px; }
.sidebar-brand strong { font-size: 18px; font-weight: 650; letter-spacing: .02em; }
.sidebar-brand small { margin-top: 5px; color: #76767c; font-size: 10px; letter-spacing: .06em; }
.environment-chip { margin: 0 9px 20px; align-self: flex-start; padding: 5px 9px; color: #5e6268; font-weight: 500; font-size: 10px; letter-spacing: 0; background: #eceef1; border: 0; border-radius: 7px; }
.environment-chip span:first-child { width: 5px; height: 5px; box-shadow: none; background: #849198; }
.environment-chip .environment-label { width: auto; height: auto; color: inherit; background: none; border-radius: 0; box-shadow: none; }
.main-nav.text-nav { display: block; padding: 0 0 12px; scrollbar-width: thin; scrollbar-color: #d5d5da transparent; }
.desktop-nav-items { display: grid; gap: 16px; }
.nav-section { display: grid; gap: 3px; }
.nav-section h4 { margin: 0 12px 5px; color: #86868b; font-size: 10px; line-height: 1.4; font-weight: 500; letter-spacing: .08em; }
.text-nav .nav-button { gap: 11px; min-height: 38px; padding: 8px 12px; border-radius: 10px; color: #626269; font-size: 12px; font-weight: 500; line-height: 1.4; }
.text-nav .nav-button::before { display: none; }
.text-nav .nav-button .ui-icon { width: 17px; height: 17px; opacity: .85; }
.text-nav .nav-button:hover { color: var(--ink); background: #e9e9ed; }
.text-nav .nav-button.active { color: #0066cc; background: #e3effd; font-weight: 600; box-shadow: none; }
.text-nav .nav-button.active .ui-icon { opacity: 1; }
.text-nav .nav-badge { min-width: 18px; height: 18px; font-size: 10px; background: #0071e3; }
.sidebar-user { padding: 15px 7px 0; margin-top: auto; border-top: 1px solid var(--line); grid-template-columns: 32px minmax(0,1fr) 32px; gap: 8px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: #e7e7ec; color: #606068; font-size: 13px; font-weight: 600; }
.sidebar-user strong { font-size: 12px; font-weight: 600; }
.sidebar-user small { font-size: 9px; color: #77777e; line-height: 1.5; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: #64646b; }
.icon-button:hover { background: #ededf1; color: var(--ink); }
.sidebar-user .icon-button { width: 32px; height: 32px; background: none; border: 0; }
.sidebar-user .ui-icon { width: 17px; height: 17px; }
.main-area { margin-left: 224px; padding: 0 clamp(24px,3vw,48px) 48px; max-width: 1920px; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 15; min-height: 84px; border-bottom: 1px solid var(--line); background: #f5f5f7eb; backdrop-filter: blur(24px); gap: 16px; }
.topbar h2 { font-size: 24px; line-height: 1.3; font-weight: 650; letter-spacing: -.035em; }
.topbar .eyebrow { font-size: 9px; letter-spacing: .12em; color: #86868b; margin: 0 0 3px; }
.topbar-actions { gap: 14px; }
.network-state { color: #76767c; font-size: 11px; font-weight: 400; padding: 0; gap: 7px; }
.network-state i { width: 6px; height: 6px; box-shadow: none; }
.mobile-logout-button { display: none; }
.view-root { padding-top: 28px; }
.section-head, .manager-section-title { margin: 28px 0 14px; align-items: center; }
.section-head.first { margin: 0 0 22px; }
.section-head h3, .manager-section-title h3 { font-size: 20px; line-height: 1.35; font-weight: 650; letter-spacing: -.025em; }
.section-head p { color: #77777e; font-size: 12px; line-height: 1.65; }
.section-link { padding: 8px 0 8px 12px; border: 0; color: #0071e3; background: none; font-size: 12px; white-space: nowrap; }
.panel, .order-card, .task-card, .demand-card, .message-card, .inventory-card, .product-card, .flow-summary-card, .flow-order-sheet { border-color: var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-soft); }
.card-list { gap: 12px; }
.empty-state { min-height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 28px 20px; border: 1px solid var(--line); border-radius: 20px; background: #ffffffa6; color: #828289; font-size: 12px; }
.empty-state::before { content: '—'; display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 6px; color: #8c969e; background: #ebedf0; border-radius: 50%; font-size: 17px; }
.empty-state strong { color: #5e5e65; font-size: 15px; font-weight: 600; margin: 0; line-height: 1.4; }
.status-pill { border-radius: 7px; padding: 5px 9px; font-weight: 600; font-size: 11px; line-height: 1.5; }
.workspace-welcome { min-height: 206px; position: relative; display: grid; grid-template-columns: 1fr 290px; align-items: center; gap: 20px; padding: 28px 32px; margin-bottom: 24px; overflow: hidden; border: 1px solid #e0e6ed; border-radius: 24px; background: radial-gradient(ellipse at 80% 0,#e7edf8 0,transparent 64%),linear-gradient(115deg,#fff 15%,#f0f3f8 100%); }
.workspace-date { display: flex; align-items: center; gap: 7px; margin: 0 0 12px; color: #7a8291; font-size: 11px; }
.workspace-date .ui-icon { width: 16px; height: 16px; }
.workspace-welcome h3 { margin: 0; font-size: clamp(26px,2.5vw,35px); font-weight: 650; line-height: 1.25; letter-spacing: -.045em; }
.workspace-description { margin: 10px 0 20px; color: #7d818a; font-size: 13px; letter-spacing: .03em; }
.workspace-shortcuts { display: flex; flex-wrap: wrap; gap: 9px 18px; }
.workspace-shortcuts button { display: inline-flex; align-items: center; gap: 7px; padding: 5px 0; border: 0; color: #0066cc; background: none; font-size: 12px; font-weight: 500; }
.workspace-shortcuts button .ui-icon { width: 14px; height: 14px; }
.workspace-shortcuts button:hover { text-decoration: underline; text-underline-offset: 4px; }
.workspace-visual { position: relative; height: 164px; width: 260px; justify-self: center; }
.workspace-orbit { position: absolute; top: 23px; left: 40px; width: 175px; height: 106px; border: 1px solid #cbd5e5; border-radius: 50%; transform: rotate(-23deg); }
.workspace-step { display: flex; align-items: center; gap: 10px; position: absolute; padding: 14px 17px; border: 1px solid #ffffff; border-radius: 15px; background: #ffffffdf; box-shadow: 0 8px 22px #47679412; color: #69768c; font-size: 11px; white-space: nowrap; }
.workspace-step .ui-icon { color: #5686c6; }
.step-print { left: 0; top: 0; transform: rotate(-6deg); }
.step-check { right: 0; top: 56px; transform: rotate(5deg); }
.step-stock { left: 12px; top: 99px; transform: rotate(-3deg); }
.workspace-visual-caption { position: absolute; bottom: -4px; right: -6px; font-size: 7px; letter-spacing: .1em; color: #919caf; }
.metric-grid { grid-template-columns: repeat(6,minmax(0,1fr)); gap: 12px; }
.metric-card { min-height: 144px; padding: 16px; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-soft); background: #fff; transition: box-shadow .2s, border-color .2s; }
.metric-card:first-child { background: #fff; }
.metric-card::after { display: none; }
.metric-card:hover { background: #fff; border-color: #b6d4f6; box-shadow: 0 4px 18px #0071e30a; transform: none; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.metric-top .ui-icon { width: 16px; height: 16px; color: #a4aab3; }
.metric-label, .signal .metric-label { font-size: 11px; color: #6e6e73; font-weight: 500; }
.metric-value { color: #1d1d1f; font-size: 32px; line-height: 1.1; margin: 16px 0 10px; font-weight: 600; letter-spacing: -.04em; }
.metric-unit { color: #909097; font-weight: 400; font-size: 11px; margin-left: 5px; }
.metric-hint { display: block; margin: 0; color: #7d8796; font-size: 9px; line-height: 1.7; font-weight: 400; }
.metric-card.signal { background: #fff7f4; border-color: #f1d2c7; }
.metric-card.signal .metric-value { color: #b34426; }
.split-layout { grid-template-columns: minmax(0,1.25fr) minmax(320px,.85fr); gap: 24px; }
.split-layout > section, .manager-home-grid > section { min-width: 0; }
.message-index-card { border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow-soft); }
.message-index-card.unread { border-left: 1px solid var(--line); }
.message-index-card.high { border-color: #f0d1c7; }
.message-index-card.expanded { border-color: #b7d6f5; box-shadow: var(--shadow-soft); }
.message-index-main strong { color: #3a3a40; font-size: 13px; font-weight: 600; line-height: 1.5; }
.message-index-main small { color: #83838a; font-size: 11px; }
.message-index-toggle time { color: #8d8d95; font-size: 10px; }
.message-dot { width: 6px; height: 6px; }
.message-index-card.unread .message-dot { box-shadow: none; }
:is(#dash-msg,.manager-message-list) .message-index-row { grid-template-columns: 1fr; }
:is(#dash-msg,.manager-message-list) .message-index-toggle { grid-template-columns: 8px minmax(0,1fr) 16px; column-gap: 10px; row-gap: 7px; padding: 17px 17px 10px; }
:is(#dash-msg,.manager-message-list) .message-index-toggle time { grid-column: 2; grid-row: 2; }
:is(#dash-msg,.manager-message-list) .message-toggle-icon { grid-column: 3; grid-row: 1; }
:is(#dash-msg,.manager-message-list) .message-index-main strong { white-space: normal; }
:is(#dash-msg,.manager-message-list) .message-index-actions { padding: 0 17px 13px; justify-items: end; }
:is(#dash-msg,.manager-message-list) .message-index-actions .button { min-height: 30px; background: #f3f3f6; border: 0; color: #6e6e73; font-size: 10px; padding: 6px 12px; }
.message-index-detail { background: #fafafc; padding: 18px; }
.message-detail-head { flex-wrap: wrap; gap: 12px; }
.message-detail-head h4 { font-size: 15px; }
.message-detail-head p { overflow-wrap: anywhere; font-size: 12px; }
.message-product-list b { font-size: 11px; overflow-wrap: anywhere; }
.manager-welcome { border: 1px solid #dfe6ee; border-radius: 24px; background: linear-gradient(115deg,#fff,#eaf0f9); color: var(--ink); box-shadow: none; }
.manager-welcome::after { display: none; }
.manager-welcome .eyebrow { color: #7e8794; }
.manager-welcome h3 { font-size: 28px; color: var(--ink); }
.manager-welcome p:last-child { color: #7b818b; font-size: 13px; }
.manager-primary-action { min-height: 108px; box-shadow: 0 6px 20px #23456a0a; border-color: #fff; border-radius: 18px; }
.manager-primary-action > span { background: #0071e3; }
.manager-metrics button { box-shadow: var(--shadow-soft); border-radius: 18px; }
.manager-home-grid { margin-top: 10px; }
.modal { z-index: 100; padding: 24px; }
.modal-backdrop { background: rgba(20,24,32,.30); backdrop-filter: blur(8px); }
.modal-panel { width: min(820px,100%); max-height: calc(100dvh - 48px); padding: 30px; border: 1px solid #ffffff; border-radius: 24px; background: #fbfbfd; box-shadow: 0 30px 100px #00000026; }
.modal-panel h3 { font-size: 24px; font-weight: 650; letter-spacing: -.035em; }
.modal-panel:focus { outline: none; }
.modal-close { width: 36px; height: 36px; top: 18px; right: 18px; color: #76767d; background: #ebebf0; border: 0; border-radius: 50%; font-size: 22px; }
body:has(.modal:not(.is-hidden)) { overflow: hidden; }
.toast { border: 1px solid var(--line); border-radius: 16px; background: #ffffffed; backdrop-filter: blur(24px); box-shadow: 0 10px 40px #00000018; color: var(--ink); }
.toast-stack { z-index: 150; }
.toast strong { font-size: 13px; }
.toast span { color: #6e6e73; font-size: 12px; }
.login-screen.compact-login { width: min(1200px,100%); margin: 0 auto; min-height: 100dvh; padding: 48px; display: grid; grid-template-columns: minmax(0,1.3fr) minmax(330px,.85fr); gap: 0; align-content: center; align-items: stretch; }
.compact-login .login-brand { display: flex; flex-direction: column; position: relative; min-height: 628px; padding: 32px; border-radius: 28px 0 0 28px; overflow: hidden; background: #e7e9ed; }
.login-workshop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% center; }
.compact-login .login-brand::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,#131b2888 0%,#131b2810 35%,#131b28c9 100%); }
.compact-login .login-wordmark { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; color: #fff; }
.login-wordmark strong { font-size: 20px; font-weight: 600; letter-spacing: .05em; }
.compact-login .login-wordmark span { color: #ffffffb3; font-size: 11px; }
.compact-login .login-wordmark strong { color: #fff; }
.compact-login .login-wordmark .brand-stamp { background: #ffffff24; border: 1px solid #ffffff55; box-shadow: none; backdrop-filter: blur(14px); }
.login-story { position: relative; z-index: 1; margin-top: auto; padding-top: 150px; color: #fff; }
.login-story .eyebrow { color: #ffffffa1; font-size: 10px; margin-bottom: 14px; }
.login-story h1 { margin: 0; font-size: clamp(32px,3.5vw,44px); font-weight: 600; letter-spacing: -.04em; line-height: 1.3; }
.login-story > p:last-of-type { color: #ffffffbf; font-size: 12px; line-height: 1.8; margin: 18px 0 28px; }
.login-stages { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: #fff; font-size: 11px; }
.login-stages i { color: #ffffff70; font-style: normal; }
.compact-login .login-card { display: flex; flex-direction: column; justify-content: center; border: 1px solid #e4e4e9; border-left: 0; border-radius: 0 28px 28px 0; padding: 44px 36px; background: #fff; box-shadow: 0 12px 36px #26263305; }
.login-card::before { display: none; }
.login-card-head { display: block; }
.login-card-head .test-flag { padding: 0; border: 0; background: none; font-size: 10px; color: #76767c; font-weight: 500; letter-spacing: .07em; }
.login-card-head .test-flag span { width: 6px; height: 6px; background: #8090a1; box-shadow: none; }
.login-card-head > p { display: none; }
.compact-login .login-card h2 { margin: 16px 0 10px; font-size: 30px; font-weight: 650; letter-spacing: -.04em; }
.login-card-intro { color: #8a8a91; font-size: 12px; line-height: 1.7; margin-bottom: 30px; }
.login-card label { font-size: 12px; margin-bottom: 19px; gap: 8px; color: #5a5a62; }
.login-card input { min-height: 48px; background: #fafafc; border: 1px solid #e1e1e6; border-radius: 12px; font-size: 14px; }
.login-card input:focus { background: #fff; border-color: #0071e3; }
.login-card .button-primary { min-height: 48px; margin-top: 7px; border-radius: 12px; }
#forgot-password { margin-top: 10px; background: none; border: 0; color: #0071e3; font-size: 12px; }
.login-footnote { margin: 25px 0 0; text-align: center; color: #9b9ba1; font-size: 10px; line-height: 1.7; }
.form-error:empty, .form-success:empty { display: none; }
.password-change-screen { background: var(--paper); }
.password-change-card { border-radius: 24px; padding: 36px; background: #fff; }
.password-change-card h2 { font-size: 25px; }
@media (min-width: 821px) and (max-width: 1180px) {
  .sidebar { width: 204px; padding-left: 10px; padding-right: 10px; }
  .main-area { margin-left: 204px; padding-left: 24px; padding-right: 24px; }
  .metric-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .metric-card { min-height: 126px; }
  .split-layout, .manager-home-grid { grid-template-columns: 1fr; }
  #dash-msg { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workspace-welcome { grid-template-columns: 1fr 210px; padding: 25px; }
  .workspace-visual { transform: scale(.8); transform-origin: right center; justify-self: end; }
  .workspace-shortcuts { gap: 8px 12px; }
}
@media (max-width: 820px) {
  body { padding-bottom: calc(96px + env(safe-area-inset-bottom,0px)); }
  body:has(#login-screen:not(.is-hidden)), body:has(.password-change-screen:not(.is-hidden)) { padding-bottom: 0; }
  .main-area { margin-left: 0; width: 100%; padding: 0 20px 24px; }
  .topbar { min-height: calc(70px + env(safe-area-inset-top,0px)); padding: calc(10px + env(safe-area-inset-top,0px)) 0 10px; }
  .topbar h2 { font-size: 23px; }
  .topbar .eyebrow, .network-state { display: none; }
  .topbar-actions { gap: 8px; }
  .icon-button, .mobile-logout-button { width: 40px; height: 40px; display: inline-flex; }
  .topbar #install-button { width: 40px; min-width: 40px; min-height: 40px; }
  .view-root { padding-top: 20px; }
  .sidebar { position: fixed; inset: auto 12px calc(10px + env(safe-area-inset-bottom,0px)); width: auto; height: 70px; padding: 5px; border: 1px solid #ffffff; border-radius: 23px; background: transparent; backdrop-filter: none; box-shadow: 0 4px 25px #1d1d1f14,0 0 0 1px #00000005; z-index: 40; }
  .sidebar::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #ffffffed; backdrop-filter: blur(28px); pointer-events: none; }
  .sidebar-brand, .environment-chip, .sidebar-user, .desktop-nav-items { display: none; }
  .main-nav.text-nav { height: 100%; overflow: visible; padding: 0; }
  .mobile-nav-items { height: 100%; display: grid; gap: 2px; }
  .text-nav .mobile-nav-items > .nav-button, .text-nav .mobile-more-nav > summary { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 58px; padding: 5px 2px; border-radius: 17px; font-size: 10px; font-weight: 500; line-height: 1.4; }
  .text-nav .mobile-nav-items > .nav-button > .ui-icon, .text-nav .mobile-more-nav > summary > .ui-icon { width: 22px; height: 22px; }
  .mobile-nav-items .nav-button.active::after { display: none; }
  .text-nav .mobile-nav-items .nav-button.active { color: #0071e3; background: #eaf3ff; }
  .mobile-more-dot { position: absolute; top: 6px; right: 20%; }
  .mobile-nav-items > .nav-button .nav-badge { position: absolute; top: 4px; right: 8px; margin: 0; min-width: 16px; height: 16px; font-size: 9px; }
  .mobile-more-nav[open] .mobile-nav-shade { position: fixed; inset: 0; z-index: 41; background: #1d1d1f33; backdrop-filter: blur(3px); }
  .mobile-nav-sheet { left: 12px; right: 12px; bottom: calc(95px + env(safe-area-inset-bottom,0px)); z-index: 42; max-height: min(70dvh,580px); padding: 20px; border: 1px solid #fff; border-radius: 26px; background: #fafafc; box-shadow: 0 16px 60px #00000029; }
  .mobile-nav-sheet header { margin-bottom: 12px; }
  .mobile-nav-sheet header small { font-size: 11px; }
  .mobile-nav-sheet header strong { font-size: 18px; }
  .mobile-nav-sheet header button { min-width: 44px; min-height: 44px; }
  .mobile-nav-sheet section { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; padding: 14px 0; }
  .mobile-nav-sheet h4 { grid-column: 1/-1; font-size: 11px; margin: 0 0 3px; }
  .text-nav .mobile-nav-sheet .nav-button { display: flex; align-items: center; gap: 9px; min-height: 46px; background: #fff; font-size: 12px; padding: 11px; border: 1px solid var(--line); }
  body:has(#mobile-more-nav[open]) { overflow: hidden; }
  .workspace-welcome { min-height: 0; grid-template-columns: 1fr; padding: 23px; border-radius: 22px; margin-bottom: 18px; }
  .workspace-visual { display: none; }
  .workspace-date { font-size: 12px; margin-bottom: 10px; }
  .workspace-welcome h3 { font-size: 27px; }
  .workspace-description { margin: 10px 0 14px; font-size: 13px; }
  .workspace-shortcuts { gap: 5px 17px; }
  .workspace-shortcuts button { min-height: 44px; font-size: 12px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .metric-card { min-height: 130px; padding: 16px; border-radius: 18px; }
  .metric-top .ui-icon { width: 16px; height: 16px; }
  .metric-label { font-size: 12px; }
  .metric-value { font-size: 32px; margin: 12px 0 9px; }
  .metric-hint { font-size: 11px; }
  .split-layout, .manager-home-grid { grid-template-columns: 1fr; gap: 0; }
  .section-head { margin: 25px 0 13px; }
  .section-head.first { align-items: flex-start; margin-bottom: 18px; }
  .section-head h3, .manager-section-title h3 { font-size: 18px; }
  .section-head p { font-size: 12px; }
  .section-link { min-height: 44px; }
  .panel { padding: 18px; }
  .empty-state { min-height: 145px; }
  input, select, textarea, .login-card input { min-height: 46px; font-size: 16px; }
  .button, .button-small { min-height: 44px; }
  .message-index-row { grid-template-columns: 1fr; }
  .message-index-toggle { grid-template-columns: 8px minmax(0,1fr) 16px; padding: 17px 17px 10px; gap: 10px; }
  .message-index-toggle time { grid-column: 2; grid-row: 2; }
  .message-toggle-icon { grid-column: 3; grid-row: 1; }
  .message-index-main strong { white-space: normal; }
  .message-index-actions { padding: 0 17px 13px; justify-items: end; }
  .message-index-actions .button { width: auto; }
  :is(#dash-msg,.manager-message-list) .message-index-actions .button { min-height: 44px; padding: 10px 16px; font-size: 12px; }
  .modal { align-items: end; padding: env(safe-area-inset-top,0px) 0 0; }
  .modal-panel { width: 100%; max-height: calc(100dvh - 20px - env(safe-area-inset-top,0px)); border-radius: 25px 25px 0 0; padding: 27px 20px calc(24px + env(safe-area-inset-bottom,0px)); }
  .modal-close { width: 44px; height: 44px; top: 14px; right: 14px; }
  .modal-panel h3 { font-size: 22px; padding-right: 40px; }
  .toast-stack { left: 16px; right: 16px; top: calc(14px + env(safe-area-inset-top,0px)); bottom: auto; width: auto; }
  .manager-welcome { grid-template-columns: 1fr; gap: 20px; padding: 23px; }
  .manager-welcome h3 { font-size: 25px; }
  .manager-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .login-screen.compact-login { min-height: 100dvh; grid-template-columns: 1fr; padding: 0; gap: 0; align-content: start; background: #fff; }
  .compact-login .login-brand { min-height: 258px; border-radius: 0 0 28px 28px; padding: calc(23px + env(safe-area-inset-top,0px)) 26px 23px; }
  .login-workshop { object-position: 50% 46%; }
  .compact-login .login-brand::after { background: linear-gradient(180deg,#10192666,#10192622 35%,#101926c9); }
  .compact-login .login-wordmark .brand-stamp { width: 35px; height: 35px; border-radius: 11px; font-size: 20px; }
  .compact-login .login-wordmark strong { font-size: 18px; }
  .compact-login .login-wordmark span { font-size: 9px; }
  .login-story { padding-top: 40px; }
  .login-story h1 { font-size: 27px; letter-spacing: -.035em; line-height: 1.4; }
  .login-story .eyebrow, .login-story > p:last-of-type { display: none; }
  .login-stages { margin-top: 13px; font-size: 10px; gap: 9px; }
  .compact-login .login-card { border: 0; border-radius: 0; padding: 28px 27px calc(20px + env(safe-area-inset-bottom,0px)); box-shadow: none; }
  .login-card-head { display: none; }
  .compact-login .login-card h2 { font-size: 27px; margin: 0 0 9px; }
  .login-card-intro { margin: 0 0 24px; }
  .login-card label { margin-bottom: 17px; }
  .login-footnote { margin-top: 12px; }
  .password-change-card { padding: 27px 23px; }
}
@media (max-width: 370px) {
  .main-area { padding-left: 14px; padding-right: 14px; }
  .workspace-welcome { padding: 20px; }
  .workspace-shortcuts { gap: 0 10px; }
  .metric-card { padding: 14px; }
  .sidebar { left: 8px; right: 8px; }
  .topbar h2 { font-size: 21px; }
  .mobile-nav-sheet { padding: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
