:root {
  --navy-950: #142a24;
  --navy-900: #203d34;
  --navy-800: #3f6658;
  --ink: #29332f;
  --muted: #77817b;
  --line: #e4e5dc;
  --paper: #f5f3ed;
  --white: #ffffff;
  --amber: #c58d49;
  --amber-pale: #fff4e3;
  --green: #4a8c72;
  --green-pale: #e8f3ed;
  --blue-pale: #eaf2ee;
  --red: #bd5f56;
  --red-pale: #fff0ee;
  --shadow: 0 9px 25px rgba(20, 48, 72, 0.055);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 88% -10%, rgba(94, 83, 210, .13), transparent 30%), var(--paper); }
button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  width: 250px;
  min-height: 100vh;
  background: linear-gradient(165deg, #091827 0%, #12283d 55%, #1b2440 100%);
  color: #d8e2ec;
  display: flex;
  flex-direction: column;
  padding: 30px 17px 19px;
  flex-shrink: 0;
}
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 10px 34px; }
.brand-mark {
  width: 41px; height: 41px; border-radius: 13px; display: grid; place-items: center;
  color: #10263d; background: #d9b56d; font-weight: 800; font-size: 19px;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.13);
}
.brand-name { margin: 0; color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.brand-caption { margin: 4px 0 0; color: #8092a5; font-size: 12px; }
.sidebar-section-label { color: #6e8499; font-size: 11px; letter-spacing: .14em; padding: 0 12px 9px; }
.sidebar-section-label.second { margin-top: 24px; }
.main-nav { display: grid; gap: 4px; }
.nav-item {
  width: 100%; border: 0; background: transparent; color: #a9b8c7; display: flex; align-items: center;
  gap: 11px; padding: 11px 12px; border-radius: 9px; text-align: left; font-size: 14px; transition: .2s ease;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(70, 205, 202, .2), rgba(115, 92, 220, .18)); box-shadow: inset 3px 0 0 #55d7d1; }
.nav-icon { width: 19px; text-align: center; color: #a9b8c7; font-size: 18px; line-height: 1; }
.nav-item.active .nav-icon { color: #e4c276; }
.nav-badge { margin-left: auto; color: #efd18d; background: rgba(224,182,102,.14); padding: 2px 7px; border-radius: 20px; font-size: 11px; }
.nav-badge.warning { color: #f0b36b; background: rgba(219,151,62,.17); }
.sidebar-foot { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid rgba(255,255,255,.08); }
.sync-status { display: flex; gap: 8px; align-items: center; color: #8ba0b2; font-size: 12px; padding: 0 2px 16px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #5bc093; box-shadow: 0 0 0 3px rgba(91,192,147,.12); }
.signed-user { display: flex; align-items: center; gap: 9px; }
.signed-user strong, .signed-user span { display: block; }
.signed-user strong { color: #dce6ef; font-size: 13px; font-weight: 600; }
.signed-user span { color: #71869a; font-size: 11px; margin-top: 3px; }
.signed-user .icon-button { margin-left: auto; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #d9b56d; color: #17314a; display: grid; place-items: center; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.avatar.small { width: 28px; height: 28px; font-size: 12px; }

.main-content { flex: 1; min-width: 0; background: linear-gradient(180deg, rgba(255,255,255,.32), transparent 280px); }
.topbar { height: 90px; display: flex; align-items: center; justify-content: space-between; padding: 0 42px; background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-title { display: flex; align-items: center; gap: 12px; }
.eyebrow { margin: 0 0 5px; color: var(--muted); font-size: 12px; }
h1 { margin: 0; color: var(--navy-900); font-size: 22px; letter-spacing: -.02em; }
.mobile-menu { display: none; border: 0; background: transparent; color: var(--navy-800); font-size: 22px; padding: 4px; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.global-search { width: min(350px, 31vw); height: 38px; display: flex; align-items: center; gap: 8px; color: #8b9aab; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; padding: 0 10px; }
.global-search span { font-size: 20px; line-height: 1; }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.global-search input::placeholder { color: #9ca9b5; }
kbd { color: #9ba7b2; font-size: 10px; border: 1px solid #dce3ea; border-bottom-width: 2px; padding: 2px 5px; border-radius: 4px; white-space: nowrap; }
.icon-button { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; color: #637789; font-size: 21px; border-radius: 8px; }
.icon-button:hover { background: #f1f5f8; }
.icon-button.quiet { color: #72889b; font-size: 20px; }
.notice-dot { width: 6px; height: 6px; position: absolute; top: 6px; right: 6px; background: #d16d57; border-radius: 50%; border: 1px solid white; }

.view-root { max-width: 1540px; margin: 0 auto; padding: 38px 42px 58px; }
.view-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 23px; }
.view-heading h2 { margin: 0; color: var(--navy-900); font-size: 25px; letter-spacing: -.03em; }
.view-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.primary-button, .secondary-button, .ghost-button { border-radius: 7px; padding: 10px 15px; font-size: 13px; transition: .2s ease; }
.primary-button { border: 1px solid var(--navy-900); color: white; background: var(--navy-900); box-shadow: 0 4px 10px rgba(19,43,68,.13); }
.primary-button:hover { background: #23496b; transform: translateY(-1px); }
.secondary-button { border: 1px solid #d7e0e8; color: var(--navy-800); background: white; }
.secondary-button:hover, .ghost-button:hover { border-color: #b7c9d6; background: #f7fafc; }
.ghost-button { border: 0; color: var(--navy-800); background: transparent; padding-left: 8px; padding-right: 8px; }
.button-icon { margin-right: 6px; font-size: 16px; vertical-align: -1px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 27px; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px; box-shadow: var(--shadow); min-height: 126px; }
.stat-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.stat-label { color: #687b8c; font-size: 13px; }
.stat-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 17px; }
.stat-icon.navy { background: var(--blue-pale); color: #416f9e; }
.stat-icon.amber { background: var(--amber-pale); color: #b97d29; }
.stat-icon.red { background: var(--red-pale); color: #bd655b; }
.stat-icon.green { background: var(--green-pale); color: var(--green); }
.stat-value { color: var(--navy-900); font-size: 27px; font-weight: 700; letter-spacing: -.04em; margin: 12px 0 7px; }
.stat-value .unit { font-size: 14px; font-weight: 600; margin-left: 2px; }
.stat-foot { display: flex; align-items: center; gap: 7px; color: #8a98a5; font-size: 11px; }
.trend-up { color: var(--green); }
.trend-warn { color: var(--amber); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(290px, .9fr); gap: 18px; align-items: start; }
.panel { background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 19px 20px 15px; }
.panel-title { margin: 0; color: var(--navy-900); font-size: 16px; }
.panel-caption { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.panel-actions { display: flex; align-items: center; gap: 10px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 630px; }
th { padding: 0 20px 11px; color: #8a99a7; font-size: 11px; font-weight: 600; text-align: left; white-space: nowrap; }
td { padding: 14px 20px; border-top: 1px solid #edf1f4; color: #405365; font-size: 12px; white-space: nowrap; }
tbody tr { transition: .2s ease; }
tbody tr:hover { background: #fbfcfe; }
.case-id { color: var(--navy-800); font-weight: 700; }
.case-contact { color: var(--navy-900); font-weight: 600; }
.case-contact small { display: block; margin-top: 4px; color: #96a3ae; font-size: 11px; font-weight: 400; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 20px; font-size: 11px; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.blue { color: #4e7da7; background: var(--blue-pale); }
.status-pill.amber { color: #b87b29; background: var(--amber-pale); }
.status-pill.green { color: var(--green); background: var(--green-pale); }
.status-pill.gray { color: #7e8d99; background: #f0f3f5; }
.table-link { border: 0; background: transparent; color: #4c7699; font-size: 12px; padding: 4px; }
.table-link:hover { color: var(--navy-900); text-decoration: underline; }

.quick-panel { padding-bottom: 9px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; padding: 0 20px 16px; }
.quick-action { min-height: 83px; border: 1px solid var(--line); border-radius: 8px; background: #fcfdff; color: var(--navy-900); text-align: left; padding: 12px; transition: .2s ease; }
.quick-action:hover { border-color: #a9bfce; background: #f6fafc; transform: translateY(-1px); }
.quick-action .quick-icon { display: block; color: #5a809e; font-size: 19px; margin-bottom: 8px; }
.quick-action strong { display: block; font-size: 12px; font-weight: 700; }
.quick-action span { display: block; color: #8796a3; font-size: 11px; margin-top: 4px; }
.reminder-list { border-top: 1px solid #edf1f4; padding: 3px 20px 0; }
.reminder { display: flex; gap: 10px; padding: 13px 0; border-bottom: 1px solid #edf1f4; }
.reminder:last-child { border-bottom: 0; }
.reminder-marker { margin-top: 4px; width: 7px; height: 7px; border-radius: 50%; background: #d99d42; flex-shrink: 0; }
.reminder-marker.blue { background: #6a97bc; }
.reminder strong { display: block; color: #3e5365; font-size: 12px; font-weight: 600; }
.reminder span { display: block; color: #97a3ae; font-size: 11px; margin-top: 4px; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.search-field { height: 38px; min-width: 260px; display: flex; align-items: center; gap: 8px; border: 1px solid #dbe4eb; border-radius: 7px; padding: 0 11px; background: #fff; }
.search-field span { color: #8b9baa; font-size: 18px; }
.search-field input { border: 0; outline: 0; min-width: 0; flex: 1; font-size: 12px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-tab { border: 1px solid #dce4ea; color: #6d7e8d; background: #fff; border-radius: 20px; font-size: 12px; padding: 8px 12px; }
.filter-tab.active, .filter-tab:hover { border-color: #c6a665; color: #8d6529; background: var(--amber-pale); }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.product-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; transition: .2s ease; }
.product-card:hover { border-color: #b9cbd7; transform: translateY(-2px); }
.product-visual { height: 126px; display: grid; place-items: center; position: relative; background: #eff3f5; color: #668093; }
.product-visual.deep { background: #e7edf1; color: #3d5a71; }
.product-visual.sand { background: #f3eee6; color: #8d7150; }
.product-visual .fabric-symbol { width: 64px; height: 74px; border: 1px solid currentColor; border-radius: 22px 22px 16px 16px; display: grid; place-items: center; font-size: 22px; opacity: .68; }
.stock-tag { position: absolute; top: 11px; right: 11px; border-radius: 20px; padding: 4px 7px; background: rgba(255,255,255,.75); color: #6d7e8c; font-size: 10px; }
.product-info { padding: 14px 15px 15px; }
.product-info h3 { margin: 0; color: var(--navy-900); font-size: 14px; }
.product-meta { color: #8b99a5; font-size: 11px; margin-top: 5px; }
.product-bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 15px; gap: 10px; }
.product-price { color: #a06a26; font-size: 19px; font-weight: 700; letter-spacing: -.02em; }
.product-price small { color: #a8adb0; font-size: 10px; font-weight: 400; margin-left: 2px; }
.product-location { color: #8898a5; font-size: 10px; text-align: right; }
.product-actions { display: flex; gap: 7px; margin-top: 12px; }
.product-actions button { flex: 1; padding: 7px 6px; border-radius: 6px; font-size: 11px; }

.inventory-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 18px; }
.mini-stat { padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.mini-stat span { display: block; color: var(--muted); font-size: 12px; }
.mini-stat strong { display: block; color: var(--navy-900); margin-top: 8px; font-size: 22px; }
.mini-stat strong.warn { color: #b8792b; }
.inventory-row { display: flex; align-items: center; gap: 12px; }
.inventory-thumb { width: 36px; height: 36px; border-radius: 7px; display: grid; place-items: center; color: #607e92; background: #edf2f4; border: 1px solid #e0e7eb; }
.inventory-thumb.sand { background: #f5eee5; color: #967752; }
.inventory-row strong { display: block; font-size: 12px; color: var(--navy-900); }
.inventory-row span { display: block; margin-top: 4px; color: #95a1aa; font-size: 10px; }
.low-stock { color: #ba7331; font-weight: 700; }
.progress-track { width: 82px; height: 5px; border-radius: 10px; background: #edf0f2; overflow: hidden; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: #d8a455; }

.printing-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 18px; align-items: start; }
.print-sheet-wrap { background: #eef2f5; padding: 25px; border-radius: 10px; min-height: 570px; display: grid; place-items: start center; }
.print-sheet { width: min(100%, 390px); background: white; border: 1px solid #dfe6eb; padding: 24px 24px 20px; box-shadow: 0 5px 17px rgba(24,52,74,.08); color: #293c4b; }
.receipt-head { text-align: center; border-bottom: 1px dashed #bfc8ce; padding-bottom: 14px; }
.receipt-head h3 { margin: 0; font-size: 18px; color: var(--navy-900); letter-spacing: .08em; }
.receipt-head p { margin: 6px 0 0; font-size: 10px; color: #8795a0; }
.receipt-title { margin: 17px 0 11px; display: flex; align-items: center; justify-content: space-between; }
.receipt-title strong { font-size: 13px; }
.receipt-title span { color: #84919b; font-size: 10px; }
.receipt-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; padding-bottom: 13px; color: #71808d; font-size: 10px; }
.receipt-meta b { color: #3d5364; font-weight: 600; }
.receipt-table { width: 100%; min-width: 0; font-size: 10px; }
.receipt-table th { padding: 8px 0; border-top: 1px solid #dfe5e8; border-bottom: 1px solid #dfe5e8; font-size: 10px; color: #7e8d98; }
.receipt-table td { padding: 9px 0; border-top: 0; font-size: 10px; white-space: normal; color: #435665; }
.receipt-table td:last-child, .receipt-table th:last-child { text-align: right; }
.receipt-total { border-top: 1px dashed #bfc8ce; margin-top: 5px; padding-top: 12px; display: grid; gap: 7px; font-size: 11px; }
.receipt-total div { display: flex; justify-content: space-between; }
.receipt-total .grand { color: var(--navy-900); font-size: 15px; font-weight: 700; }
.receipt-foot { margin-top: 18px; padding-top: 12px; border-top: 1px dashed #bfc8ce; text-align: center; color: #9aa5ac; font-size: 10px; line-height: 1.7; }
.print-options { padding: 4px 20px 20px; }
.option-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid #edf1f3; font-size: 12px; color: #5d7080; }
.option-row:last-child { border-bottom: 0; }
.option-row select { border: 1px solid #dbe3e9; border-radius: 6px; padding: 7px 8px; color: #425667; font-size: 11px; background: #fff; }
.full-button { width: 100%; margin-top: 16px; }

.empty-placeholder { padding: 48px 25px; text-align: center; color: #8192a0; }
.empty-placeholder strong { display: block; color: var(--navy-900); font-size: 16px; margin-bottom: 7px; }
.empty-placeholder p { margin: 0; font-size: 12px; }
.report-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.bars { height: 250px; display: flex; align-items: end; gap: 14px; padding: 25px 25px 15px; border-top: 1px solid #edf1f4; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: end; }
.bar { width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: #c8d7e3; min-height: 8px; }
.bar.active { background: #d7aa58; }
.bar-col small { color: #98a4ad; font-size: 10px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 22, 36, .45); display: grid; place-items: center; padding: 20px; z-index: 10; }
.modal { width: min(560px, 100%); max-height: min(730px, 92vh); overflow: auto; border-radius: 12px; background: white; box-shadow: 0 24px 80px rgba(7,24,39,.25); }
.modal-header { display: flex; align-items: start; justify-content: space-between; padding: 22px 23px 15px; border-bottom: 1px solid #edf1f4; }
.modal-header h2 { margin: 0; color: var(--navy-900); font-size: 18px; }
.modal-header p { margin: 6px 0 0; color: #8897a2; font-size: 12px; }
.modal-body { padding: 20px 23px 23px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-field { display: grid; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: #5c7180; font-size: 12px; }
.form-field input, .form-field textarea, .form-field select { width: 100%; border: 1px solid #dbe4ea; border-radius: 7px; padding: 10px 11px; outline: 0; color: #334b5d; font-size: 12px; background: #fff; }
.form-field textarea { min-height: 82px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: #9eb5c6; box-shadow: 0 0 0 3px rgba(81,125,157,.1); }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding-top: 20px; }
.toast { position: fixed; left: 50%; bottom: 25px; transform: translate(-50%, 20px); padding: 11px 16px; border-radius: 7px; background: var(--navy-900); color: white; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 20; box-shadow: 0 8px 24px rgba(12,38,61,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1120px) {
  .sidebar { width: 220px; }
  .topbar { padding-left: 26px; padding-right: 26px; }
  .view-root { padding-left: 26px; padding-right: 26px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid, .printing-layout, .report-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; left: -250px; top: 0; bottom: 0; z-index: 12; transition: left .25s ease; box-shadow: 12px 0 32px rgba(10,27,43,.2); }
  .sidebar.open { left: 0; }
  .mobile-menu { display: block; }
  .topbar { height: 72px; padding: 0 17px; }
  .topbar-actions { gap: 8px; }
  .global-search { width: 38px; padding: 0; justify-content: center; border: 0; background: transparent; }
  .global-search input, .global-search kbd { display: none; }
  .global-search span { font-size: 22px; }
  .view-root { padding: 24px 17px 40px; }
  .view-heading { align-items: start; flex-direction: column; margin-bottom: 18px; }
  .view-heading .primary-button { width: 100%; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 14px; min-height: 112px; }
  .stat-value { font-size: 23px; }
  .content-grid { gap: 13px; }
  .panel-header { padding-left: 15px; padding-right: 15px; }
  .quick-grid, .reminder-list { padding-left: 15px; padding-right: 15px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .search-field { width: 100%; min-width: 0; }
  .catalog-grid { grid-template-columns: 1fr; }
  .inventory-summary { grid-template-columns: 1fr 1fr; }
  .inventory-summary .mini-stat:last-child { grid-column: 1 / -1; }
  .print-sheet-wrap { padding: 13px; }
  .print-sheet { padding: 19px 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
}
@media print {
  body { background: white; }
  .app-shell, .toast, .modal-backdrop { display: none !important; }
  .print-sheet { width: 80mm; border: 0; box-shadow: none; margin: 0; }
  .print-sheet-wrap { display: block; min-height: auto; padding: 0; background: white; }
  .view-root { padding: 0; }
}

/* Refined working-surface direction */
.focus-band {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin: -2px 0 22px; padding: 22px 25px; border-radius: 15px;
  color: #f8fbfc; background: linear-gradient(110deg, #183449 0%, #224a63 100%);
  box-shadow: 0 12px 25px rgba(18, 48, 69, .13); position: relative; overflow: hidden;
}
.focus-band::after { content: ""; position: absolute; width: 230px; height: 230px; right: 16%; top: -150px; border: 1px solid rgba(224,194,119,.18); border-radius: 50%; pointer-events: none; }
.focus-lead { position: relative; z-index: 1; }
.focus-kicker { color: #e2bf72; text-transform: uppercase; letter-spacing: .16em; font-size: 10px; font-weight: 700; }
.focus-band h3 { margin: 9px 0 6px; font-size: 19px; letter-spacing: -.02em; }
.focus-band p { margin: 0; color: #b5c6d2; font-size: 12px; }
.focus-actions { position: relative; z-index: 1; display: flex; gap: 9px; flex-shrink: 0; }
.focus-button { border: 1px solid rgba(226,193,113,.58); border-radius: 7px; padding: 10px 12px; color: #f5e3b9; background: rgba(5,24,38,.16); font-size: 12px; }
.focus-button:hover { background: rgba(5,24,38,.34); }
.focus-button span { margin-left: 9px; font-size: 15px; }
.focus-button.muted { border-color: rgba(212,226,234,.2); color: #d7e3ea; }
.photo-panel { margin-bottom: 18px; }
.photo-panel .panel-header { align-items: center; }
.upload-note { color: #8697a4; font-size: 11px; }
.photo-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; padding: 0 20px 20px; }
.photo-tile { min-width: 0; border: 1px solid #e4ebef; border-radius: 9px; overflow: hidden; background: #fcfdfe; }
.photo-tile-media { height: 102px; position: relative; display: grid; place-items: center; background: #e8eef0; color: #6d8291; overflow: hidden; }
.photo-tile-media.deep { background: #e3ebee; color: #516d7d; }
.photo-tile-media.sand { background: #f2ede6; color: #977a59; }
.photo-tile-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-placeholder { width: 41px; height: 53px; border: 1px solid currentColor; border-radius: 16px 16px 12px 12px; display: grid; place-items: center; font-size: 16px; opacity: .7; }
.photo-tile-info { padding: 10px; }
.photo-tile-info strong, .photo-tile-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.photo-tile-info strong { color: var(--navy-900); font-size: 11px; }
.photo-tile-info span { margin-top: 4px; color: #93a0a9; font-size: 10px; }
.photo-tile-info button { width: 100%; margin-top: 10px; padding: 7px 5px; font-size: 10px; }
.upload-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.product-visual { overflow: hidden; }
.product-visual.has-photo { background: #e7ebed; }
.product-photo { width: 100%; height: 100%; display: block; object-fit: cover; }
.photo-hint { position: absolute; left: 12px; bottom: 11px; border-radius: 5px; padding: 5px 7px; color: #6e7e88; background: rgba(255,255,255,.78); font-size: 10px; }
.photo-edit { position: absolute; left: 10px; top: 10px; border: 0; border-radius: 5px; padding: 6px 8px; color: #fff; background: rgba(14,35,51,.72); font-size: 10px; opacity: 0; transform: translateY(-3px); transition: .2s ease; }
.product-visual:hover .photo-edit { opacity: 1; transform: translateY(0); }
.product-card { border-radius: 13px; }
.product-visual { height: 145px; }
.product-info { padding: 16px 16px 17px; }
.product-info h3 { font-size: 15px; }
.product-actions button { padding: 8px 6px; }
.stat-card:nth-child(1) { border-top: 3px solid #517d9d; }
.stat-card:nth-child(2) { border-top: 3px solid #d4a150; }
.stat-card:nth-child(3) { border-top: 3px solid #b7655d; }
.stat-card:nth-child(4) { border-top: 3px solid #5a9b7d; }

@media (max-width: 1120px) {
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .focus-band { align-items: stretch; flex-direction: column; padding: 19px; gap: 17px; }
  .focus-actions { flex-direction: column; }
  .focus-button { text-align: left; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 15px; padding-right: 15px; }
  .photo-tile-media { height: 115px; }
  .upload-note { display: none; }
  .product-visual { height: 165px; }
  .photo-edit { opacity: 1; transform: none; }
}

.business-tray { position: fixed; right: 28px; bottom: 24px; z-index: 8; width: min(460px, calc(100vw - 34px)); display: flex; align-items: center; gap: 13px; padding: 13px 14px 13px 17px; border: 1px solid #c6d5dd; border-radius: 11px; color: #eaf2f5; background: rgba(18, 48, 67, .96); box-shadow: 0 15px 34px rgba(10, 29, 43, .21); backdrop-filter: blur(8px); }
.business-tray > div { min-width: 0; flex: 1; }
.tray-kicker, .business-tray strong, .business-tray > div > span:last-child { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-kicker { color: #d8b66b; font-size: 10px; letter-spacing: .1em; }
.business-tray strong { margin-top: 3px; font-size: 12px; }
.business-tray > div > span:last-child { margin-top: 4px; color: #adc0cc; font-size: 10px; }
.business-tray .primary-button { white-space: nowrap; padding: 9px 11px; border-color: #d6ae60; background: #d6ae60; color: #173449; box-shadow: none; }
.business-tray .primary-button:hover { background: #e1bd76; }
.tray-close { width: 24px; height: 24px; border: 0; border-radius: 50%; background: rgba(255,255,255,.09); color: #c9d7df; font-size: 18px; line-height: 1; }
.tray-close:hover { background: rgba(255,255,255,.18); }
.selected-chips { display: flex; flex-wrap: wrap; gap: 7px; min-height: 38px; padding: 7px; border: 1px solid #dbe4ea; border-radius: 7px; background: #fbfcfd; }
.selected-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 7px 6px 9px; border-radius: 5px; color: #46647a; background: #eaf2f5; font-size: 11px; }
.selected-chip button { width: 16px; height: 16px; border: 0; border-radius: 50%; color: #6a8391; background: transparent; line-height: 1; }
.selected-chip button:hover { background: #d4e1e7; }
.selected-empty { align-self: center; color: #9aa8b2; font-size: 11px; padding: 3px 4px; }
.detail-topline { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid #edf1f3; }
.detail-topline > strong { color: #a36d2c; font-size: 20px; }
.detail-timeline { padding: 18px 0 4px; }
.timeline-step { display: flex; gap: 11px; min-height: 47px; position: relative; }
.timeline-step:not(:last-child)::before { content: ""; position: absolute; left: 4px; top: 11px; bottom: 0; width: 1px; background: #dce5e9; }
.timeline-step > span { width: 9px; height: 9px; margin-top: 4px; border-radius: 50%; border: 2px solid #bdcbd3; background: #fff; flex-shrink: 0; z-index: 1; }
.timeline-step.done > span { border-color: #5a9a7b; background: #5a9a7b; }
.timeline-step.current > span { border-color: #d6a04c; box-shadow: 0 0 0 4px #fff1d8; }
.timeline-step strong { display: block; color: #476072; font-size: 12px; }
.timeline-step small { display: block; margin-top: 3px; color: #98a5ae; font-size: 10px; }
.detail-block { margin-top: 14px; padding: 12px 13px; border-radius: 7px; background: #f5f8f9; }
.detail-block label { color: #8a99a3; font-size: 10px; }
.detail-block p { margin: 6px 0 0; color: #486172; font-size: 12px; line-height: 1.6; }
@media (max-width: 760px) {
  .business-tray { right: 17px; bottom: 16px; }
}
@media print {
  .business-tray { display: none !important; }
}

/* v5 functional workflow additions */
.heading-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.table-actions .table-link { padding-left: 0; padding-right: 0; }
.tab-count { margin-left: 5px; color: #9aa7b0; font-size: 10px; }
.filter-tab.active .tab-count { color: #a67934; }
.product-title-line { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.product-title-line h3 { min-width: 0; }
.mini-code { flex-shrink: 0; color: #9aa7b0; font-size: 9px; font-family: Consolas, monospace; }
.product-stock-line { display: flex; justify-content: space-between; gap: 8px; margin-top: 11px; color: #8796a1; font-size: 10px; }
.product-stock-line .low-stock { color: #bb7330; }
.compact-visual { height: 94px; width: 120px; border-radius: 9px; flex-shrink: 0; }
.detail-product-hero { display: flex; align-items: center; gap: 16px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid #edf1f4; }
.detail-product-hero > div:last-child { display: grid; gap: 5px; }
.detail-product-hero > div:last-child strong { color: #a06a26; font-size: 25px; }
.detail-product-hero > div:last-child span { color: #8b99a5; font-size: 11px; }
.detail-product-hero > div:last-child small { color: #5d7180; font-size: 11px; }
.detail-money { display: grid; justify-items: end; gap: 4px; }
.detail-money strong { color: #a36d2c; font-size: 20px; }
.detail-money small { color: #b8792b; font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px 0 4px; }
.detail-grid div { display: grid; gap: 5px; }
.detail-grid label, .detail-grid strong { display: block; }
.detail-grid label { color: #8a99a3; font-size: 10px; }
.detail-grid strong { color: #476072; font-size: 12px; font-weight: 600; }
.detail-items { display: grid; gap: 8px; }
.detail-items div, .payment-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-items div { color: #536a79; font-size: 12px; }
.detail-items strong { color: #a36d2c; font-size: 12px; }
.payment-line { color: #536a79; font-size: 12px; }
.payment-line .table-link { margin-left: auto; }
.form-field label em { color: #b8792b; font-style: normal; font-size: 10px; margin-left: 5px; }
.form-readonly { min-height: 38px; display: flex; align-items: center; padding: 9px 11px; border: 1px solid #e0e7eb; border-radius: 7px; color: #456174; background: #f8fafb; font-size: 12px; }
.form-add-row { display: flex; gap: 8px; }
.form-add-row select { min-width: 0; flex: 1; border: 1px solid #dbe4ea; border-radius: 7px; padding: 10px 11px; color: #334b5d; font-size: 12px; background: #fff; }
.selection-table { margin-top: 10px; border: 1px solid #e2e9ed; border-radius: 8px; overflow: hidden; }
.selection-table table { min-width: 0; }
.selection-table th { padding: 9px 11px; background: #f8fafb; }
.selection-table td { padding: 9px 11px; }
.selection-table td small { display: block; margin-top: 3px; color: #97a3ac; font-size: 10px; }
.mini-input { width: 64px; border: 1px solid #dbe4ea; border-radius: 5px; padding: 6px; color: #385367; font-size: 11px; }
.price-input { width: 82px; }
.inventory-toolbar { align-items: center; margin-top: 20px; margin-bottom: 12px; }
.toolbar-result { color: #425a6b; font-size: 14px; }
.toolbar-muted { margin-left: 8px; color: #96a2ab; font-size: 11px; }
.inventory-image { width: 36px; height: 36px; object-fit: cover; border-radius: 7px; border: 1px solid #e0e7eb; }
.progress-cell { display: grid; gap: 5px; }
.progress-cell small { color: #8d9aa3; font-size: 10px; }
.progress-track span.warning { background: #bd7332; }
.modal-wide { width: min(720px, 100%); }
.file-input-visible { width: 100%; border: 1px dashed #bdcdd7; border-radius: 7px; padding: 9px; color: #6b7f8d; background: #fbfcfd; font-size: 11px; }
.data-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.data-card { min-height: 230px; padding: 22px; }
.data-card-icon { width: 36px; height: 36px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 10px; color: #8c682d; background: #fff4dd; font-size: 20px; }
.data-card h3 { margin: 0; color: var(--navy-900); font-size: 16px; }
.data-card p { min-height: 45px; margin: 8px 0 18px; color: #84929e; font-size: 12px; line-height: 1.6; }
.data-counts { display: flex; gap: 24px; align-items: baseline; }
.data-counts strong { color: var(--navy-900); font-size: 25px; }
.data-counts small { display: block; color: #8d9aa4; font-size: 10px; font-weight: 400; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 18px 20px; }
.danger-button { color: #aa6259; }
.category-bars { display: grid; gap: 19px; padding: 25px 25px 29px; }
.category-bar-row { display: grid; grid-template-columns: 48px 1fr 35px; align-items: center; gap: 12px; color: #647987; font-size: 12px; }
.category-bar-row strong { color: #425c6f; text-align: right; }
.category-bar-track { height: 9px; overflow: hidden; border-radius: 10px; background: #edf2f4; }
.category-bar-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9fb7c6, #d6ad5d); }
.notice-row { display: flex; gap: 10px; padding: 13px 0; border-bottom: 1px solid #edf1f4; }
.notice-row strong, .notice-row small { display: block; }
.notice-row strong { color: #425c6e; font-size: 12px; }
.notice-row small { margin-top: 4px; color: #93a0a9; font-size: 10px; }
.warn-text { color: #b8792b; }
.category-list { display: grid; gap: 8px; margin-top: 18px; }
.category-row { display: flex; align-items: center; gap: 10px; padding: 12px 13px; border: 1px solid #e4ebef; border-radius: 8px; color: #476072; background: #fbfcfd; font-size: 12px; }
.category-row small { margin-left: auto; color: #97a3ac; font-size: 10px; }
.category-row .table-link { margin-left: 8px; }
@media (max-width: 900px) {
  .data-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .heading-actions { width: 100%; }
  .heading-actions button { flex: 1; }
  .form-add-row { align-items: stretch; flex-direction: column; }
  .form-add-row button { width: 100%; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .danger-zone { align-items: stretch; flex-direction: column; }
}

/* Seasonal stall and mixed-role workflow */
.stall-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stall-card { padding: 22px; }
.stall-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 17px; border-bottom: 1px solid #edf1f3; }
.stall-card h3 { margin: 7px 0 5px; color: var(--navy-900); font-size: 17px; }
.stall-card p { margin: 0; color: #7d8f9d; font-size: 12px; }
.stall-card-lines { display: grid; gap: 11px; margin-top: 17px; }
.stall-card-lines div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; color: #82919b; font-size: 11px; }
.stall-card-lines strong { overflow: hidden; color: #476072; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.stall-card-lines .stall-line-wide { align-items: start; }
.stall-card-lines .stall-line-wide strong { white-space: normal; line-height: 1.6; }
.stall-note { margin-top: 15px !important; padding: 11px 12px; border-radius: 7px; color: #6b7e8a !important; background: #f4f7f8; line-height: 1.6; }
.role-tags { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.role-tags i { border-radius: 999px; padding: 4px 7px; color: #466b68; background: #e7f0ee; font-size: 10px; font-style: normal; white-space: nowrap; }
.role-checks { display: flex; flex-wrap: wrap; gap: 8px 15px; min-height: 39px; align-items: center; padding: 9px 11px; border: 1px solid #dbe4ea; border-radius: 7px; background: #fbfcfd; }
.role-checks label { display: inline-flex; align-items: center; gap: 5px; color: #456174; font-size: 12px; }
.role-checks small { color: #97a4ad; font-size: 10px; }
.suggestion-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; color: #97a4ad; font-size: 12px; }
.suggestion-chip { border: 1px solid #dbe4ea; border-radius: 999px; background: #fff; color: #334b5d; padding: 6px 10px; cursor: pointer; }
.suggestion-chip:hover { border-color: #2d617e; color: #2d617e; }
.custom-member-row { margin-top: 10px; }
.custom-member-row input:first-child { min-width: 0; flex: 1; }
.custom-stall-items { display: grid; gap: 8px; margin-top: 8px; }
.custom-stall-item { display: grid; grid-template-columns: auto minmax(0, 1fr) 66px; align-items: center; gap: 8px; padding: 8px; border: 1px dashed #dbe4ea; border-radius: 7px; color: #456174; background: #fff; font-size: 12px; }
.custom-stall-item input[type=number] { width: 66px; border: 1px solid #dbe4ea; border-radius: 5px; padding: 6px; }
.stall-product-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; border: 1px solid #dbe4ea; border-radius: 7px; background: #fbfcfd; }
.stall-product-row { display: grid; grid-template-columns: auto minmax(0, 1fr) 54px; align-items: center; gap: 8px; min-width: 0; padding: 8px; border: 1px solid #e5ecef; border-radius: 6px; background: #fff; }
.stall-product-row span { min-width: 0; }
.stall-product-row strong, .stall-product-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stall-product-row strong { color: #516879; font-size: 11px; }
.stall-product-row small { margin-top: 3px; color: #96a4ad; font-size: 10px; }
.stall-product-row input[type="number"] { width: 54px; padding: 6px 5px; border: 1px solid #dbe4ea; border-radius: 5px; color: #425b6c; font-size: 11px; }
@media (max-width: 900px) { .stall-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .stall-product-list { grid-template-columns: 1fr; } .stall-card { padding: 17px; } .stall-card-top { align-items: stretch; flex-direction: column; } .stall-card-top button { width: 100%; } }

/* v6 operations workspace */
.login-shell { min-height: calc(100vh - 90px); display: grid; place-items: center; padding: 36px 18px; }
.login-card { width: min(390px, 100%); padding: 32px; border: 1px solid #d9e4ea; border-radius: 20px; background: rgba(255,255,255,.94); box-shadow: 0 24px 65px rgba(18, 48, 67, .14); }
.login-mark { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 15px; color: #f7edd8; background: linear-gradient(145deg, #17364e, #2d6676); font-size: 22px; font-weight: 800; }
.login-card h2 { margin: 0; color: #17364e; font-size: 22px; }
.login-card > p { margin: 8px 0 22px; color: #718492; font-size: 13px; line-height: 1.7; }
.login-card form { display: grid; gap: 14px; }
.login-card label { display: grid; gap: 7px; color: #476072; font-size: 12px; font-weight: 700; }
.login-card input { width: 100%; border: 1px solid #dbe5ea; border-radius: 8px; padding: 11px 12px; color: #263f51; font: inherit; box-sizing: border-box; }
.login-error { padding: 10px 11px; border-radius: 8px; color: #a8524a; background: #fff0ed; font-size: 12px; line-height: 1.5; }
.timeline-board { display: grid; gap: 11px; }
.schedule-card { display: grid; grid-template-columns: 135px 1fr auto; align-items: center; gap: 18px; padding: 18px 20px; border: 1px solid #e1eaee; border-radius: 12px; background: #fff; }
.schedule-date { color: #2c637a; font-size: 13px; font-weight: 700; }
.schedule-card h3 { margin: 5px 0; color: #27475b; font-size: 15px; }
.schedule-card p { margin: 0; color: #8495a0; font-size: 12px; }
.purchase-alerts, .supplier-list, .audit-list { display: grid; padding: 3px 20px 18px; }
.purchase-alerts > div, .supplier-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid #edf1f3; }
.purchase-alerts > div:last-child, .supplier-row:last-child { border-bottom: 0; }
.purchase-alerts strong, .supplier-row strong { color: #425d6f; font-size: 13px; }
.purchase-alerts span, .supplier-row small { color: #8797a2; font-size: 11px; }
.purchase-alerts .table-link, .supplier-row .table-link { margin-left: auto; }
.purchase-product-list { display: grid; gap: 7px; padding: 10px; border: 1px solid #dce6eb; border-radius: 8px; background: #f9fbfc; }
.purchase-head, .purchase-product-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 72px 100px; align-items: center; gap: 8px; }
.purchase-head { padding: 0 7px; color: #8b99a3; font-size: 10px; }
.purchase-product-row { padding: 8px; border: 1px solid #e1e9ed; border-radius: 7px; background: #fff; }
.purchase-product-row strong, .purchase-product-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.purchase-product-row strong { color: #486172; font-size: 12px; }
.purchase-product-row small { margin-top: 3px; color: #98a5ad; font-size: 10px; }
.purchase-product-row input[type=number] { width: 100%; min-width: 0; border: 1px solid #d7e2e8; border-radius: 5px; padding: 7px; color: #3d586a; font-size: 12px; box-sizing: border-box; }
.audit-list { padding-bottom: 5px; }
.audit-list .notice-row { padding-left: 0; padding-right: 0; }
@media (max-width: 760px) {
  .login-card { padding: 25px 21px; }
  .schedule-card { grid-template-columns: 1fr; gap: 8px; }
  .schedule-card .secondary-button { width: 100%; }
  .purchase-head { display: none; }
  .purchase-product-row { grid-template-columns: 22px minmax(0, 1fr) 60px 82px; }
}

/* v7: calm, contemporary work surface */
:root { --shadow: 0 12px 30px rgba(42, 57, 50, .07); }
body { background: #f5f3ed; }
.app-shell:not(.auth-shell) { gap: 14px; min-height: 100vh; padding: 14px; background: #eeeee7; }
.app-shell:not(.auth-shell) .sidebar {
  width: 258px; min-height: calc(100vh - 28px); padding: 27px 16px 18px; border-radius: 20px;
  background: linear-gradient(165deg, #19352e 0%, #21463b 56%, #315e4f 100%);
  box-shadow: 0 16px 34px rgba(27, 45, 37, .14);
}
.app-shell:not(.auth-shell) .brand-lockup { padding-bottom: 31px; }
.app-shell:not(.auth-shell) .brand-mark { color: #264438; background: #eed28e; box-shadow: none; }
.app-shell:not(.auth-shell) .brand-caption { color: rgba(236, 244, 237, .58); }
.app-shell:not(.auth-shell) .sidebar-section-label { color: rgba(230, 242, 234, .47); letter-spacing: .1em; }
.app-shell:not(.auth-shell) .nav-item { color: rgba(239, 246, 241, .72); border: 1px solid transparent; border-radius: 11px; }
.app-shell:not(.auth-shell) .nav-item:hover { color: #fff; background: rgba(255,255,255,.08); }
.app-shell:not(.auth-shell) .nav-item.active {
  color: #fff7e6; background: rgba(255,255,255,.12); border-color: rgba(248, 224, 160, .18); box-shadow: none;
}
.app-shell:not(.auth-shell) .nav-icon { color: rgba(237, 246, 239, .65); }
.app-shell:not(.auth-shell) .nav-item.active .nav-icon { color: #f3d58e; }
.app-shell:not(.auth-shell) .nav-badge { color: #f7da96; background: rgba(20, 39, 31, .26); }
.app-shell:not(.auth-shell) .nav-badge.warning { color: #ffe2a4; background: rgba(196, 132, 61, .22); }
.app-shell:not(.auth-shell) .sidebar-foot { border-color: rgba(255,255,255,.12); }
.app-shell:not(.auth-shell) .sync-status { color: rgba(235, 245, 239, .63); }
.app-shell:not(.auth-shell) .signed-user strong { color: #f5f8f5; }
.app-shell:not(.auth-shell) .signed-user span { color: rgba(235, 245, 239, .52); }
.app-shell:not(.auth-shell) .avatar { color: #264438; background: #eed28e; }
.app-shell:not(.auth-shell) .main-content { overflow: hidden; border-radius: 20px; background: #faf9f5; box-shadow: 0 12px 30px rgba(42, 57, 50, .045); }
.topbar { height: 82px; padding: 0 34px; background: rgba(255,255,252,.9); border-color: #ebe9e0; }
.eyebrow { color: #8c948b; }
h1, .view-heading h2, .panel-title { color: #264438; }
.global-search { height: 40px; border-radius: 10px; background: #f6f6f1; border-color: #e7e6dd; }
.global-search:focus-within { border-color: #9ab8a7; box-shadow: 0 0 0 3px rgba(73, 135, 110, .1); }
.icon-button:hover { background: #eef3ed; color: #315e4f; }
.view-root { max-width: 1600px; padding: 30px 34px 52px; }
.view-heading { margin-bottom: 20px; }
.view-heading h2 { font-size: 27px; }
.primary-button { border-color: #315e4f; background: #315e4f; border-radius: 10px; box-shadow: 0 6px 14px rgba(41, 85, 69, .16); }
.primary-button:hover { background: #254a3d; }
.secondary-button { border-color: #dfe3da; color: #3f6658; border-radius: 10px; background: #fffefa; }
.secondary-button:hover, .ghost-button:hover { border-color: #b9cdbf; background: #f1f6f1; }
.ghost-button { color: #3f6658; }
.focus-band { padding: 24px 26px; border-radius: 18px; background: linear-gradient(125deg, #22453a, #3b6e5a); box-shadow: 0 14px 30px rgba(29, 61, 49, .16); }
.focus-band::after { border-color: rgba(249, 223, 156, .22); }
.focus-band h3 { color: #fffdf7; font-size: 20px; }
.focus-band p { color: rgba(244, 250, 245, .72); }
.focus-kicker { color: #f2d38a; }
.focus-button { border-color: rgba(245, 218, 149, .52); color: #fff3cf; background: rgba(15, 45, 35, .19); border-radius: 10px; }
.focus-button:hover { background: rgba(15, 45, 35, .34); }
.focus-button.muted { color: #f1f7f2; border-color: rgba(239, 247, 241, .24); }
.stats-grid { gap: 14px; margin-bottom: 22px; }
.stat-card { min-height: 118px; padding: 18px; border: 1px solid #ebeae2; border-radius: 16px; box-shadow: 0 7px 18px rgba(46, 58, 51, .045); }
.stat-card:nth-child(n) { border-top: 1px solid #ebeae2; }
.stat-card:nth-child(1) { border-left: 4px solid #5e907a; }
.stat-card:nth-child(2) { border-left: 4px solid #d19a54; }
.stat-card:nth-child(3) { border-left: 4px solid #719f94; }
.stat-card:nth-child(4) { border-left: 4px solid #bf725f; }
.stat-label { color: #758179; }
.stat-value { color: #294a3d; }
.panel { border-color: #ebeae2; border-radius: 16px; box-shadow: 0 7px 18px rgba(46, 58, 51, .045); }
.panel-header { padding: 20px 21px 15px; }
.panel-caption { color: #89928b; }
th { color: #8a938b; }
td { color: #4b5b53; border-color: #f0efe9; }
tbody tr:hover { background: #fbfcf9; }
.quick-grid { gap: 10px; }
.quick-action { border-color: #e6e8e1; border-radius: 11px; background: #fcfcf9; }
.quick-action:hover { border-color: #b7d0c0; background: #f2f7f1; }
.quick-action .quick-icon { color: #4a8c72; }
.product-card, .mini-stat, .schedule-card { border-color: #e9e9e1; border-radius: 14px; }
.product-price { color: #9c6a31; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus, .login-card input:focus { border-color: #83ae99; box-shadow: 0 0 0 3px rgba(74, 140, 114, .12); outline: 0; }
.modal { border-radius: 18px; }

/* A signed-out page is a welcome screen, not a disabled dashboard. */
.auth-shell { min-height: 100vh; background: #f3f0e8; }
.auth-shell .sidebar, .auth-shell .topbar { display: none; }
.auth-shell .main-content { width: 100%; min-height: 100vh; background: radial-gradient(circle at 10% 4%, rgba(238, 207, 137, .35), transparent 23%), radial-gradient(circle at 93% 91%, rgba(95, 144, 120, .16), transparent 26%), #f6f3ec; }
.auth-shell .view-root { max-width: none; min-height: 100vh; padding: 0; }
.login-shell { min-height: 100vh; padding: 42px 28px; }
.login-stage { width: min(1040px, 100%); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr); gap: 90px; align-items: center; }
.login-intro { padding: 24px 0; }
.login-brand { display: inline-flex; align-items: center; gap: 11px; color: #294a3d; font-size: 15px; }
.login-brand-mark, .login-mark { display: grid; place-items: center; border-radius: 13px; color: #244237; background: #edcf83; font-weight: 800; }
.login-brand-mark { width: 38px; height: 38px; font-size: 18px; }
.login-eyebrow { display: block; margin: 55px 0 13px; color: #a27438; font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.login-intro h2 { margin: 0; color: #254438; font-size: clamp(34px, 4.3vw, 54px); line-height: 1.2; letter-spacing: -.06em; }
.login-intro > p { max-width: 440px; margin: 20px 0 25px; color: #6e7d73; font-size: 15px; line-height: 1.9; }
.login-points { display: flex; flex-wrap: wrap; gap: 9px; }
.login-points span { padding: 8px 12px; border: 1px solid #dce5db; border-radius: 999px; color: #4c6f60; background: rgba(255,255,252,.56); font-size: 12px; }
.login-card { width: 100%; padding: 34px; border: 1px solid rgba(222, 224, 212, .9); border-radius: 22px; background: rgba(255,255,252,.88); box-shadow: 0 25px 65px rgba(45, 58, 49, .13); }
.login-mark { width: 46px; height: 46px; margin-bottom: 22px; font-size: 21px; box-shadow: none; }
.login-card-kicker { display: block; margin-bottom: 8px; color: #a27438; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.login-card h2 { color: #254438; font-size: 26px; }
.login-card > p { color: #7b857d; margin-bottom: 25px; }
.login-card label { color: #52695e; }
.login-card input { border-color: #e1e6dc; border-radius: 10px; background: #fcfcf9; padding: 12px 13px; color: #2f443a; }
.login-card .full-button { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; }
.login-card .full-button span { font-size: 17px; }
.login-error { color: #a35449; background: #fff0eb; border: 1px solid #f2d8d0; }

@media (max-width: 900px) {
  .app-shell:not(.auth-shell) { padding: 10px; gap: 10px; }
  .app-shell:not(.auth-shell) .sidebar { width: 226px; }
  .view-root { padding-left: 24px; padding-right: 24px; }
  .login-stage { gap: 42px; }
}
@media (max-width: 760px) {
  .app-shell:not(.auth-shell) { padding: 0; }
  .app-shell:not(.auth-shell) .sidebar { min-height: 100vh; border-radius: 0 18px 18px 0; }
  .app-shell:not(.auth-shell) .main-content { border-radius: 0; }
  .topbar { height: 70px; padding: 0 17px; }
  .view-root { padding: 23px 17px 38px; }
  .login-shell { padding: 30px 20px; }
  .login-stage { grid-template-columns: 1fr; gap: 30px; }
  .login-intro { padding: 0; }
  .login-eyebrow { margin-top: 32px; }
  .login-intro h2 { font-size: 35px; }
  .login-intro > p { margin: 14px 0 19px; font-size: 14px; }
  .login-card { padding: 27px 23px; }
}
@media print { .app-shell { padding: 0 !important; } }
