/* Shared visual layer: no business states or controls are hidden here. */
:root {
  --navy-950: #182c40; --navy-900: #25425d; --blue-600: #2467a5;
  --blue-100: #edf4fb; --ink-900: #203043; --ink-700: #45566a;
  --ink-500: #617286; --canvas: #f5f7fa; --line: #e0e6ec;
  --shadow: 0 2px 8px rgba(24,44,64,.035);
}
body { line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { line-height: 1.5; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #367cb8; outline-offset: 3px; }
.erp-shell { grid-template-columns: 224px minmax(0,1fr); }
.erp-sidebar { background: #f9fafc; padding: 20px 12px 16px; border-color: var(--line); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { flex: 1; gap: 10px; padding: 0 8px 22px; border: 0; }
.brand-copy { gap: 3px; }
.brand strong { font-size: 17px; line-height: 1.4; letter-spacing: .02em; }
.brand small { font-size: 11px; line-height: 1.4; color: var(--ink-500); }
.brand-mark { box-shadow: none; border-radius: 10px; }
.side-nav { padding-top: 4px; scrollbar-width: thin; }
.nav-label { margin: 20px 12px 7px; font-size: 11px; color: #68798b; letter-spacing: .04em; }
.nav-item { min-height: 42px; border-radius: 7px; padding: 9px 13px; }
.nav-item.is-active { color: #205e96; background: #e9f1f9; border-color: transparent; box-shadow: none; }
.nav-item:not(.is-disabled):hover { color: #205e96; background: #edf2f7; }
.sidebar-foot { color: var(--ink-500); line-height: 1.7; padding: 14px 8px 0; }
.status-dot { flex: 0 0 6px; width: 6px; height: 6px; background: #548973; box-shadow: none; }
.nav-toggle { display: none; border: 1px solid #cbd6e0; background: #fff; color: #25425d; border-radius: 7px; min-width: 64px; min-height: 44px; padding: 8px 12px; font-weight: 600; }
.topbar { height: 68px; padding: 0 28px; background: #fff; }
.topbar-context { font-weight: 600; }
.avatar { width: 32px; height: 32px; font-weight: 600; }
.page-area { max-width: 1560px; padding: 26px 28px 48px; }
.page-heading, .page-head { gap: 16px; margin-bottom: 22px; }
.page-heading h1, .page-head h1 { font-size: clamp(24px,2.2vw,30px); line-height: 1.35; letter-spacing: 0; font-weight: 650; margin: 4px 0 8px; }
.page-heading p, .page-head p { line-height: 1.75; }
.eyebrow { font-size: 11px; letter-spacing: .04em; font-weight: 600; }
.panel { border-radius: 10px; box-shadow: none; }
.panel-heading { min-height: 66px; padding: 16px 20px; gap: 12px; }
.panel-heading h2 { font-size: 17px; font-weight: 650; }
.panel-heading p { line-height: 1.6; }
.action-card, .category-module-card, .home-metric-card, .order-hero { box-shadow: none; border-radius: 10px; }
.action-card { min-height: 98px; padding: 18px; }
.action-card:hover { border-color: #bccbd9; }
.home-action-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.home-action-grid .action-number { font-size: 30px; font-weight: 650; }
.category-module-card { min-height: 104px; }
.category-module-card:hover { transform: none; }
.category-module-card.is-active { box-shadow: none; border-color: #9bb4cc; background: #f0f5fa; }
.metric-card { padding: 18px; border-radius: 9px; }
.metric-card > span { font-size: 13px; font-weight: 500; }
.metric-card > strong { font-size: 24px; line-height: 1.4; font-weight: 650; font-variant-numeric: tabular-nums; }
.metric-card > small { font-size: 12px; line-height: 1.6; }
.metric-card.is-unavailable { border-style: solid; background: #f8fafc; }
.count-badge { width: auto; min-width: 28px; min-height: 28px; height: auto; padding: 3px 9px; display: inline-flex; justify-content: center; align-items: center; font-size: 12px; font-weight: 600; line-height: 1.5; border-radius: 6px; }
.button { font-weight: 600; border-radius: 7px; transition: background-color .15s,border-color .15s; }
.button-primary { box-shadow: none; }
a.button:not([aria-disabled="true"]):not(.disabled):hover, button.button:not(:disabled):hover { transform: none; }
.button-primary:hover { background: #1d578c; }
.button-secondary:hover { background: #f4f7fa; border-color: #b3c3d2; }
.text-button { color: #586c80; }
.data-table { font-variant-numeric: tabular-nums; }
.data-table th { font-size: 12px; font-weight: 600; letter-spacing: 0; background: #f7f9fb; padding: 12px 16px; color: #53677c; }
.data-table td { padding: 14px 16px; line-height: 1.65; }
.data-table td small { font-size: 12px; line-height: 1.55; }
.data-table tbody tr:hover { background: #f5f9fc; }
.data-table td a:not(.button):not(.status-pill) { color: var(--blue-600); }
.table-wrap { scrollbar-width: thin; scrollbar-color: #b4c2cf #f4f7fa; overscroll-behavior-x: contain; }
.status-pill { min-height: 25px; padding: 3px 8px; font-size: 12px; font-weight: 500; border-radius: 5px; }
.record-form .form-grid small, .record-form .form-help, .record-form .form-error-text, .detail-grid dt, .execution-card dt { font-size: 12px; }
.record-form input, .record-form select, .record-form textarea, .stack-form input, .stack-form select, .stack-form textarea { border-radius: 7px; }
.record-form input[type="email"], .record-form input[type="tel"], .record-form input[type="password"] { width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; color: var(--ink-900); background: #fff; border: 1px solid #cfd9e4; }
.record-form .form-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 18px 20px; border-top: 1px solid var(--line); }
.required-mark { color: #a53737; margin-left: 3px; font-weight: 600; }
.empty-state.compact { padding: 25px 20px; }
.empty-state { padding: 38px 20px; }
.empty-state h3 { font-size: 15px; font-weight: 600; }
.empty-state > span { font-size: 22px; margin-bottom: 7px; }
.empty-state p { font-size: 13px; }
.inline-note { color: #586c80; background: #f8fafc; line-height: 1.7; }
.detail-tabs { top: 68px; box-shadow: none; }
.management-signal { gap: 12px; }
.secondary-disclosure summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; }
.secondary-disclosure summary::-webkit-details-marker { display: none; }
.secondary-disclosure summary strong, .secondary-disclosure summary small { display: block; }
.secondary-disclosure summary small { margin-top: 3px; color: var(--ink-500); font-size: 12px; }
.secondary-disclosure summary::after { content: '+'; font-size: 20px; color: #617286; }
.secondary-disclosure[open] summary { border-bottom: 1px solid var(--line); }
.secondary-disclosure[open] summary::after { content: '−'; }
.secondary-disclosure .action-grid { padding: 16px 20px; margin: 0; grid-template-columns: repeat(2,minmax(0,1fr)); }
.secondary-disclosure .action-card { display: block; min-height: auto; border-left-width: 1px; background: #fafbfd; }
.secondary-disclosure .action-card strong { font-size: 13px; }
.secondary-disclosure .action-card small { line-height: 1.6; }
.login-page { background: #edf2f7; min-height: 100vh; min-height: 100svh; }
.login-card { width: min(440px,100%); border: 1px solid #dbe4ed; border-radius: 14px; box-shadow: 0 14px 45px rgba(32,52,75,.07); padding: 36px; }
.login-brand { padding-bottom: 24px; }
.login-brand strong { font-size: 20px; }
.login-brand small { font-size: 12px; }
.login-copy { padding: 26px 0 22px; }
.login-copy h1 { font-size: 27px; font-weight: 650; }
.login-copy > p:last-child { font-size: 13px; }
.login-form { gap: 18px; }
.login-form input { min-height: 46px; }
.login-foot { font-size: 12px; line-height: 1.8; }
@media (max-width: 1120px) {
  .erp-shell { grid-template-columns: 204px minmax(0,1fr); }
  .page-area { padding: 24px 22px 42px; }
  .home-action-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .home-action-grid .action-card { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .home-action-grid .action-arrow { display: none; }
}
@media (max-width: 820px) {
  .erp-shell { display: block; }
  .erp-sidebar { padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; }
  .brand strong { font-size: 16px; }
  .brand small { font-size: 11px; }
  .brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  .brand-mark img { top: -16px; left: -18px; }
  .has-mobile-nav .nav-toggle:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; }
  .has-mobile-nav .side-nav { display: none; }
  .has-mobile-nav .nav-scroll-hint { display: none; }
  .has-mobile-nav .side-nav.is-open { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; max-height: 65vh; overflow: auto; padding: 16px 0 2px; }
  .has-mobile-nav .side-nav .nav-label { display: block; grid-column: 1/-1; margin: 12px 8px 2px; }
  .has-mobile-nav .side-nav .nav-item { min-width: 0; white-space: normal; }
  .topbar { height: 58px; padding: 0 16px; }
  .page-area { padding: 20px 16px 36px; }
  .page-heading { gap: 12px; }
  .detail-tabs { top: 58px; }
  .detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .management-signal { grid-template-columns: auto minmax(0,1fr); }
  .management-signal > :last-child { grid-column: 2; }
  .filter-bar { flex-wrap: wrap; }
}
@media (max-width: 540px) {
  body { font-size: 14px; }
  .page-heading h1, .page-head h1 { font-size: 25px; }
  .page-head { align-items: start; flex-direction: column; }
  .home-action-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .home-action-grid .action-card { grid-template-columns: auto minmax(0,1fr) auto; min-height: 84px; padding: 15px; }
  .home-action-grid .action-arrow { display: block; }
  .panel-heading { padding: 15px 16px; }
  .panel-heading .muted { display: block; }
  .detail-grid, .secondary-disclosure .action-grid { grid-template-columns: minmax(0,1fr); }
  .secondary-disclosure summary { padding: 15px 16px; }
  .secondary-disclosure summary .status-pill { display: none; }
  .secondary-disclosure .action-grid { padding: 15px 16px; }
  .button-row { gap: 8px; }
  .button-row > .button { flex: 1 1 auto; }
  .record-form input, .record-form select, .record-form textarea, .stack-form input, .stack-form select, .stack-form textarea, .login-form input { font-size: 16px; }
  .login-page { padding: 20px 16px; }
  .login-card { padding: 26px 22px; }
  .login-copy h1 { font-size: 25px; }
  .topbar-user { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; } }
@media print {
  .erp-shell { display: block; }
  .erp-sidebar, .topbar, .skip-link, .nav-toggle { display: none; }
  .page-area { padding: 0; max-width: none; }
  .table-wrap { overflow: visible; }
  .data-table { min-width: 0; }
  .panel { box-shadow: none; break-inside: avoid; }
  .detail-tabs { position: static; }
}
