:root {
  --ink: #173b35;
  --ink-soft: #45625c;
  --muted: #78908a;
  --line: #dfe8e3;
  --line-dark: #cbdad3;
  --surface: #ffffff;
  --surface-soft: #f7faf8;
  --green: #15745e;
  --green-dark: #0f5948;
  --green-pale: #e7f4ee;
  --mint: #f0f8f4;
  --amber: #c47c25;
  --amber-pale: #fff4e4;
  --red: #c75a4b;
  --shadow: 0 12px 34px rgba(17, 65, 51, .07);
  --radius: 10px;
  font-family: "Noto Sans Thai", system-ui, sans-serif;
  color: var(--ink);
  background: #f3f7f5;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: #f3f7f5; color: var(--ink); font-size: 14px; }
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 252px; background: #fbfdfc; border-right: 1px solid var(--line); padding: 24px 16px 18px; display: flex; flex-direction: column; z-index: 20; }
.brand-block { display: flex; align-items: center; gap: 11px; padding: 0 10px 28px; }
.brand-block > div:nth-child(2) { min-width: 0; }
.sidebar-close { display: none; margin-left: auto; color: var(--muted); }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: white; background: var(--green); font-weight: 800; font-size: 21px; font-family: Georgia, serif; font-style: italic; }
.brand-name { font-family: "DM Mono", monospace; font-size: 20px; font-weight: 500; letter-spacing: -.8px; line-height: 1.1; }
.brand-caption { color: var(--muted); font-size: 10px; margin-top: 3px; }
.workspace-switcher { background: var(--mint); border: 1px solid #dceee5; border-radius: 10px; padding: 10px; display: flex; align-items: center; gap: 9px; margin: 0 2px 25px; }
.avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font-weight: 700; flex: 0 0 auto; }
.avatar-school { background: #d2ece1; color: var(--green-dark); }
.avatar-user { background: #d7e9e1; color: #3f6c60; }
.workspace-copy, .user-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.workspace-copy strong, .user-copy strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-copy span, .user-copy span { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-label { color: #97aaa4; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 0 12px 6px; font-weight: 700; }
.nav-label-spaced { margin-top: 25px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 12px; background: transparent; padding: 10px 12px; border-radius: 8px; color: var(--ink-soft); text-align: left; font-weight: 500; font-size: 13px; transition: background .15s, color .15s; }
.nav-item svg { width: 17px; height: 17px; color: #7a9790; stroke-width: 1.8; }
.nav-item:hover { background: #f0f6f2; color: var(--ink); }
.nav-item.active { background: var(--green-pale); color: var(--green-dark); font-weight: 700; }
.nav-item.active svg { color: var(--green); }
.nav-badge { margin-left: auto; background: #f5ead9; color: #a86e25; border-radius: 99px; padding: 2px 7px; font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.sync-card { border: 1px solid #e4eae6; border-radius: 9px; padding: 10px; display: flex; gap: 8px; align-items: center; margin-bottom: 15px; background: #fff; }
.sync-icon { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--amber); background: var(--amber-pale); }
.sync-icon svg { width: 14px; }
.sync-card strong, .sync-card span { display: block; }
.sync-card strong { font-size: 11px; }
.sync-card > div:nth-child(2) span { color: var(--muted); font-size: 9px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.status-dot.amber { background: #e0a052; margin-left: auto; }
.status-dot.green { background: #3eb281; }
.user-row { display: flex; width: 100%; align-items: center; gap: 8px; padding: 9px 6px 0; background: transparent; text-align: left; border-top: 1px solid var(--line); }
.user-row > svg { width: 17px; color: var(--muted); }
.user-row:hover, .user-row:focus-visible { color: var(--green-dark); }
.user-row:focus-visible, .admin-entry-button:focus-visible { outline: 2px solid #8fc7af; outline-offset: 2px; }
.admin-entry-button { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; margin-top: 12px; padding: 8px 10px; border: 1px solid #cce1d8; border-radius: 7px; color: var(--green-dark); background: var(--mint); font-size: 10px; font-weight: 700; text-decoration: none; }
.admin-entry-button:hover { background: var(--green-pale); border-color: #a9d1bf; }
.admin-entry-button svg { width: 14px; height: 14px; }
.main-content { margin-left: 252px; min-width: 0; flex: 1; }
.sidebar-overlay { display: none; }
.topbar { height: 66px; background: rgba(255,255,255,.83); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 40px; justify-content: space-between; position: sticky; top: 0; z-index: 10; backdrop-filter: blur(16px); }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.breadcrumb svg { width: 14px; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { width: 34px; height: 34px; border-radius: 8px; background: transparent; display: grid; place-items: center; color: var(--ink-soft); }
.icon-button:hover { background: #edf5f1; color: var(--green-dark); }
.icon-button svg { width: 17px; height: 17px; }
.icon-button.small { width: 25px; height: 25px; margin-left: auto; }
.notification { position: relative; }
.notification span { position: absolute; width: 5px; height: 5px; background: #db765a; border: 2px solid white; border-radius: 50%; top: 6px; right: 7px; }
.topbar-date { padding-left: 15px; margin-left: 5px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 0; text-align: right; }
.topbar-date span { color: var(--muted); font-size: 9px; }
.topbar-date strong { font-size: 10px; font-weight: 600; }
.mobile-menu { display: none; }
.page-wrap { max-width: 1500px; margin: 0 auto; padding: 32px 40px 28px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow, .section-kicker { color: var(--green); font-size: 10px; letter-spacing: .09em; font-weight: 700; text-transform: uppercase; }
.eyebrow { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.eyebrow-dot { width: 6px; height: 6px; background: #56b796; border-radius: 50%; }
h1, h2, p { margin: 0; }
h1 { font-size: 29px; line-height: 1.2; letter-spacing: -.8px; font-weight: 800; }
.page-heading p { color: var(--muted); font-size: 12px; margin-top: 7px; }
.heading-actions { display: flex; gap: 9px; }
.button { height: 36px; border-radius: 7px; padding: 0 13px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.button svg { width: 15px; height: 15px; }
.button-primary { color: #fff; background: var(--green); box-shadow: 0 3px 9px rgba(21,116,94,.17); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { color: var(--ink); background: #fff; border: 1px solid var(--line-dark); }
.button-danger { color: #fff; background: var(--red); box-shadow: 0 3px 9px rgba(199,90,75,.17); }
.button-danger:hover { background: #a9473c; }
.button-secondary:hover { border-color: var(--green); background: var(--mint); }
.button-ghost { color: var(--green-dark); background: transparent; border: 1px solid #cce1d8; }
.button-ghost:hover { background: var(--green-pale); }
.context-bar { min-height: 65px; display: flex; align-items: center; gap: 22px; padding: 11px 19px; border-radius: 10px; border: 1px solid #dce9e3; background: #fff; box-shadow: var(--shadow); margin-bottom: 18px; }
.context-field { display: flex; flex-direction: column; gap: 3px; min-width: 120px; }
.field-label { color: var(--muted); font-size: 10px; }
.context-field select { border: 0; color: var(--ink); font-weight: 700; padding: 0; background: transparent; outline: 0; font-size: 12px; }
.context-divider { height: 30px; width: 1px; background: var(--line); }
.catalog-chip { display: flex; align-items: center; gap: 9px; }
.catalog-chip > div { display: flex; flex-direction: column; gap: 1px; }
.catalog-chip strong { font-size: 12px; }
.text-button, .link-button { background: transparent; color: var(--green); font-weight: 700; font-size: 10px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.catalog-chip .text-button { margin-left: 10px; }
.form-status-chip { display: flex; align-items: center; gap: 9px; }
.form-status-chip > div { display: flex; flex-direction: column; gap: 1px; }
.form-status-chip strong { font-size: 12px; }
.form-status-chip .text-button { margin-left: 8px; }
.form-status-chip.closed strong { color: var(--red); }
.status-dot.red { background: #d36b59; }
.form-closed-banner { display: flex; align-items: center; gap: 10px; border: 1px solid #f0d5ce; background: #fff7f5; color: #8b5047; border-radius: 9px; padding: 11px 14px; margin: -5px 0 18px; }
.form-closed-banner > svg { width: 17px; color: var(--red); flex: 0 0 auto; }
.form-closed-banner > div { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.form-closed-banner strong { font-size: 11px; }
.form-closed-banner span { color: #a37067; font-size: 10px; }
.form-closed-banner .text-button { color: #a15349; }
.context-spacer { flex: 1; }
.autosave { display: flex; align-items: center; gap: 6px; color: #608177; font-size: 10px; }
.autosave svg { width: 14px; color: #4fa887; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 22px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 14px 16px 12px; min-height: 111px; }
.stat-card.stat-primary { background: var(--green); border-color: var(--green); color: #fff; }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 10px; }
.stat-primary .stat-top { color: #cae9dc; }
.stat-top svg { width: 16px; color: #75b69e; }
.stat-primary .stat-top svg { color: #9ed6bd; }
.stat-card > strong { display: block; font-size: 23px; line-height: 1.3; margin-top: 7px; letter-spacing: -.5px; }
.stat-card > strong small { font-size: 11px; letter-spacing: 0; font-weight: 500; }
.stat-card .status-text { font-size: 20px; }
.stat-foot { margin-top: 5px; font-size: 10px; color: var(--muted); }
.stat-primary .stat-foot { color: #d3ede2; }
.trend-up { color: #b9ead5; display: inline-flex; align-items: center; gap: 3px; }
.trend-up svg { width: 12px; }
.status-pill { padding: 3px 8px; font-size: 9px; border-radius: 99px; }
.status-pill.draft { background: var(--amber-pale); color: #af7024; }
.stepper { display: flex; align-items: center; margin: 0 4px 20px; }
.step { display: flex; align-items: center; gap: 9px; color: #9caca7; }
.step.active { color: var(--green-dark); }
.step-number { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #c8d7d1; display: grid; place-items: center; font: 500 11px "DM Mono", monospace; }
.step.active .step-number { background: var(--green); color: #fff; border-color: var(--green); }
.step strong, .step small { display: block; }
.step strong { font-size: 11px; }
.step small { font-size: 9px; color: var(--muted); margin-top: 1px; }
.step-line { width: 65px; height: 1px; background: #cfddd7; margin: 0 13px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(300px, .72fr); gap: 18px; align-items: start; }
.main-panel, .summary-panel, .catalog-admin { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 4px 17px rgba(16, 66, 51, .04); }
.main-panel { overflow: hidden; }
.panel-section { padding: 20px 22px; }
.order-details { border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
h2 { font-size: 17px; letter-spacing: -.2px; margin-top: 3px; }
.required-note { color: var(--muted); font-size: 10px; margin-top: 5px; }
.required-note span, label b { color: #d76f5b; }
.form-grid { display: grid; grid-template-columns: 1.15fr 1.15fr 1fr 1fr; gap: 14px 12px; }
.form-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form-field > span { color: #617973; font-size: 10px; }
.field-help { color: var(--muted); font-size: 9px; line-height: 1.3; }
.form-field input, .form-field select { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line-dark); border-radius: 6px; background: #fff; color: var(--ink); font-size: 12px; outline: none; transition: border .15s, box-shadow .15s; }
.form-field input:focus, .form-field select:focus { border-color: #78b89f; box-shadow: 0 0 0 3px #e8f5ee; }
.span-2 { grid-column: span 2; }
.teacher-scope-note { display: flex; align-items: flex-start; gap: 7px; padding: 9px 10px; margin: -4px 0 15px; border: 1px solid #deefe6; border-radius: 6px; background: #f3faf6; color: #5b7c70; font-size: 10px; line-height: 1.5; }
.teacher-scope-note svg { width: 14px; color: #6fb298; flex: 0 0 auto; margin-top: 1px; }
.teacher-form-grid { grid-template-columns: repeat(3, 1fr); max-width: 720px; }
.admin-settings-block { border: 1px solid #dcebe4; border-radius: 9px; background: #fbfefc; padding: 16px; margin-bottom: 15px; }
.admin-subheading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 13px; }
.admin-subheading h3 { font-size: 14px; margin: 3px 0 0; }
.admin-subheading p { color: var(--muted); font-size: 10px; margin-top: 4px; }
.admin-only-badge { color: #805f23; background: var(--amber-pale); border-radius: 99px; padding: 4px 8px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.admin-settings-grid, .admin-budget-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.admin-budget-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; max-width: 720px; }
.admin-settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; }
.admin-settings-actions .admin-note { margin: 0; }
.admin-settings-actions .button { flex: 0 0 auto; }
.number-input { position: relative; }
.number-input input { padding-right: 34px; }
.number-input span { position: absolute; right: 11px; top: 8px; font-size: 11px; color: var(--muted); }
.room-field { position: relative; }
.combined-rooms { margin-top: 7px; padding: 8px; border: 1px solid #b9d5c8; border-radius: 6px; background: #f3faf6; }
.combined-rooms > span { display: block; color: var(--green-dark); font-size: 9px; font-weight: 700; margin-bottom: 6px; }
.room-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 8px; }
.room-checks label { display: flex; align-items: center; gap: 4px; color: var(--ink-soft); font-size: 9px; white-space: nowrap; }
.room-checks input { width: 13px; height: 13px; margin: 0; accent-color: var(--green); }
.catalog-heading { margin-bottom: 14px; align-items: center; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.search-box { height: 34px; border: 1px solid var(--line-dark); border-radius: 6px; display: flex; align-items: center; gap: 7px; padding: 0 9px; width: 218px; }
.search-box svg { color: var(--muted); width: 15px; }
.search-box input { border: 0; outline: 0; min-width: 0; width: 100%; color: var(--ink); font-size: 11px; }
.filter-tabs { display: flex; gap: 4px; align-items: center; }
.filter-tab { color: var(--muted); background: transparent; font-size: 10px; padding: 6px 8px; border-radius: 5px; }
.filter-tab:hover { color: var(--green); background: var(--mint); }
.filter-tab.active { background: var(--green-pale); color: var(--green-dark); font-weight: 700; }
.filter-tab span { margin-left: 2px; color: #88a29a; }
.selection-hint { background: #f3faf6; border: 1px solid #deefe6; color: #5b7c70; border-radius: 6px; min-height: 31px; padding: 6px 9px; display: flex; align-items: center; gap: 7px; margin-bottom: 9px; font-size: 10px; }
.selection-hint > svg { width: 14px; color: #6fb298; flex: 0 0 auto; }
.hint-count { color: var(--green-dark); font-weight: 700; margin-left: auto; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.items-table, .admin-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.items-table th { text-align: left; padding: 7px 6px; color: #77918a; font-size: 9px; font-weight: 700; background: #f7faf8; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: nowrap; }
.items-table td { border-bottom: 1px solid #ebf0ed; padding: 7px 6px; vertical-align: middle; font-size: 10px; height: 45px; }
.items-table th:first-child, .items-table td:first-child { padding-left: 8px; }
.check-col { width: 28px; }
.index-col { width: 34px; text-align: center !important; }
.items-table td:nth-child(2) { text-align: center; color: #91a39e; font: 10px "DM Mono", monospace; }
.items-table th:nth-child(3) { width: 29%; }
.items-table th:nth-child(4) { width: 16%; }
.price-col { width: 82px; }
.qty-col { width: 77px; }
.sum-col { width: 76px; }
.action-col { width: 28px; }
.item-name { font-weight: 600; color: var(--ink); line-height: 1.3; }
.item-unit { color: var(--muted); margin-left: 3px; font-size: 9px; }
.variant-select { display: block; margin-top: 5px; max-width: 142px; height: 24px; padding: 0 22px 0 6px; border: 1px solid #b9d5c8; border-radius: 5px; color: var(--green-dark); background: #f3faf6; font-size: 9px; outline: none; }
.variant-select:focus { border-color: var(--green); box-shadow: 0 0 0 2px #e1f2e9; }
.category-label { color: #6f8c83; font-size: 9px; background: #f3f7f5; padding: 3px 6px; border-radius: 4px; white-space: nowrap; }
.price-text, .sum-text { font-family: "DM Mono", monospace; font-size: 10px; }
.sum-text { color: var(--green-dark); font-weight: 500; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--line-dark); border-radius: 5px; overflow: hidden; width: 72px; height: 27px; }
.qty-control button { width: 22px; height: 100%; color: var(--green); background: #f5faf7; font-size: 14px; line-height: 1; }
.qty-control button:hover { background: var(--green-pale); }
.qty-control input { width: 28px; height: 100%; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); outline: 0; font: 10px "DM Mono", monospace; color: var(--ink); }
.row-remove { color: #b6c6c0; background: transparent; padding: 2px; }
.row-remove:hover { color: var(--red); }
.row-remove svg { width: 14px; }
.check { appearance: none; width: 15px; height: 15px; margin: 0; border: 1px solid #b9cec5; border-radius: 4px; vertical-align: middle; cursor: pointer; position: relative; }
.check:checked { background: var(--green); border-color: var(--green); }
.check:checked:after { content: ""; position: absolute; width: 4px; height: 7px; border: solid white; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); left: 4px; top: 2px; }
.add-item-row { margin: 11px 0 0; width: 100%; border: 1px dashed #b9d4c8; border-radius: 6px; height: 38px; background: #fbfefc; color: var(--green); display: flex; align-items: center; justify-content: center; gap: 7px; font-weight: 700; font-size: 10px; }
.add-item-row:hover { background: var(--green-pale); }
.add-item-row svg { width: 14px; }
.add-item-row small { color: var(--muted); font-weight: 400; }
.empty-state { display: grid; place-items: center; text-align: center; padding: 33px 10px; color: var(--muted); gap: 4px; }
.empty-state svg { color: #a5bbb3; width: 25px; margin-bottom: 3px; }
.empty-state strong { color: var(--ink-soft); font-size: 12px; }
.empty-state span { font-size: 10px; }
.summary-panel { position: sticky; top: 85px; padding: 20px 18px 17px; }
.summary-top { display: flex; align-items: flex-start; justify-content: space-between; }
.summary-count { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: var(--green-dark); background: var(--green-pale); font: 12px "DM Mono", monospace; }
.summary-meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; margin-top: 6px; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: #99aaa4; }
.summary-list { min-height: 212px; max-height: 345px; overflow-y: auto; padding: 15px 0 8px; }
.summary-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 180px; color: var(--muted); text-align: center; gap: 4px; }
.summary-empty svg { width: 27px; color: #b5c9c1; margin-bottom: 5px; }
.summary-empty span { color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.summary-empty small { font-size: 10px; }
.summary-item { display: flex; align-items: flex-start; gap: 8px; padding: 9px 0; border-bottom: 1px solid #eef2f0; }
.summary-item:last-child { border-bottom: 0; }
.summary-item > div:first-child { flex: 1; min-width: 0; }
.summary-item-name { display: block; color: var(--ink); font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.summary-item-meta { color: var(--muted); font-size: 9px; margin-top: 2px; }
.summary-item-price { color: var(--green-dark); font: 10px "DM Mono", monospace; white-space: nowrap; }
.summary-total { padding: 13px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-end; }
.summary-total span { display: block; font-size: 11px; font-weight: 700; }
.summary-total small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }
.summary-total strong { color: var(--green-dark); font: 700 21px "DM Mono", monospace; letter-spacing: -.8px; }
.budget-meter { background: #f7faf8; border: 1px solid var(--line); border-radius: 7px; padding: 10px 10px 9px; margin: 4px 0 13px; }
.budget-heading, .budget-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; }
.budget-heading span, .budget-heading small { display: block; }
.budget-heading span { font-size: 10px; font-weight: 700; }
.budget-heading small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.budget-heading strong { color: var(--green-dark); font: 600 12px "DM Mono", monospace; white-space: nowrap; }
.budget-track { height: 6px; background: #e3eee8; border-radius: 99px; overflow: hidden; margin: 9px 0 5px; }
.budget-track span { display: block; width: 0; height: 100%; background: #55ae8c; border-radius: inherit; transition: width .2s, background .2s; }
.budget-track span.over { background: #d36b59; }
.budget-foot { color: var(--muted); font-size: 9px; }
.budget-foot span:last-child { color: var(--green-dark); font-weight: 700; }
.budget-alert { display: flex; align-items: flex-start; gap: 5px; margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); font-size: 9px; line-height: 1.4; }
.budget-alert svg { width: 13px; flex: 0 0 auto; }
.budget-alert.under { color: #9b6a2b; }
.budget-alert.under svg { color: #c48a3c; }
.budget-alert.over { color: var(--red); font-weight: 700; }
.budget-alert.over svg { color: var(--red); }
.summary-actions { display: flex; flex-direction: column; gap: 7px; }
.full-width { width: 100%; }
.summary-note { display: flex; gap: 7px; color: #6d8980; font-size: 9px; line-height: 1.45; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.summary-note svg { width: 14px; color: #71b69b; flex: 0 0 auto; }
.catalog-admin { margin-top: 18px; padding: 21px 22px; }
.catalog-admin[hidden] { display: none; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.admin-header p { color: var(--muted); font-size: 11px; margin-top: 5px; }
.version-row { display: flex; align-items: center; justify-content: space-between; background: var(--mint); border: 1px solid #d9eee4; border-radius: 8px; padding: 12px 13px; margin-bottom: 14px; }
.version-active { display: flex; gap: 9px; align-items: center; }
.version-active strong, .version-active span { display: block; }
.version-active strong { font-size: 12px; }
.version-active span { color: var(--muted); font-size: 10px; margin-top: 2px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table th { color: var(--muted); background: #f7faf8; text-align: left; font-size: 10px; padding: 8px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 9px 8px; border-bottom: 1px solid #edf2ef; font-size: 10px; }
.admin-table td:first-child { font-weight: 600; }
.admin-table .price-edit { width: 78px; height: 27px; padding: 0 6px; border: 1px solid var(--line-dark); border-radius: 4px; font: 10px "DM Mono", monospace; }
.admin-active-toggle { display: inline-flex; align-items: center; gap: 5px; color: #4f7568; font-size: 9px; white-space: nowrap; }
.admin-active-toggle input { width: 13px; height: 13px; margin: 0; accent-color: var(--green); }
.edit-item-form { display: grid; gap: 12px; max-width: 520px; }
.admin-variants { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.admin-variants label { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 400; }
.admin-variants .price-edit { width: 58px; }
.admin-edit { color: var(--green); background: transparent; padding: 3px; }
.admin-edit svg { width: 14px; }
.page-footer { display: flex; align-items: center; justify-content: space-between; color: #94a69f; font-size: 10px; margin-top: 26px; padding: 0 3px; }
.page-footer .link-button { color: #718f85; font-weight: 500; }
.modal-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(20, 50, 42, .42); display: grid; place-items: center; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(720px, 100%); max-height: min(88vh, 800px); overflow: auto; background: #fff; border-radius: 12px; box-shadow: 0 25px 70px rgba(9, 44, 33, .25); }
.modal-header { display: flex; justify-content: space-between; padding: 20px 23px 13px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 19px 23px; }
.modal-footer { padding: 12px 23px 19px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.order-preview { border: 1px solid #cbded5; padding: 20px; border-radius: 6px; font-size: 11px; }
.order-preview-header { display: flex; justify-content: space-between; border-bottom: 2px solid var(--green); padding-bottom: 10px; margin-bottom: 12px; }
.order-preview-header strong { font-size: 14px; }
.order-preview-title { text-align: center; font-size: 15px; font-weight: 800; margin: 9px 0 14px; }
.order-preview-info { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 17px; color: #4f6b62; margin-bottom: 14px; }
.order-preview-info b { color: var(--ink); }
.preview-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.preview-table th, .preview-table td { border: 1px solid #cddbd5; padding: 5px 6px; text-align: left; }
.preview-table th { background: #e9f2ee; }
.preview-table td:nth-child(1), .preview-table td:nth-child(3), .preview-table td:nth-child(4), .preview-table td:nth-child(5) { text-align: right; }
.preview-total { text-align: right; font-weight: 800; font-size: 13px; padding-top: 10px; }
.backend-copy { color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.backend-copy strong { color: var(--ink); }
.backend-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.backend-option { border: 1px solid var(--line-dark); border-radius: 8px; padding: 13px; }
.backend-option.recommended { border-color: #8fc7af; background: var(--mint); }
.backend-option strong { font-size: 12px; display: block; }
.backend-option span { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 4px; }
.form-control-panel { color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.form-control-status { display: flex; align-items: center; gap: 10px; padding: 13px; border-radius: 8px; border: 1px solid #d4e9de; background: var(--mint); }
.form-control-status.is-closed { border-color: #efd7d1; background: #fff7f5; }
.form-control-status > svg { width: 20px; color: var(--green); }
.form-control-status.is-closed > svg { color: var(--red); }
.form-control-status strong, .form-control-status span { display: block; }
.form-control-status strong { color: var(--ink); font-size: 12px; }
.form-control-status span { color: var(--muted); font-size: 10px; margin-top: 2px; }
.admin-note { color: var(--muted); font-size: 10px; margin: 13px 2px 0; }
.toast { position: fixed; bottom: 23px; right: 25px; z-index: 60; background: #173f35; color: #fff; border-radius: 8px; padding: 11px 14px; display: flex; align-items: center; gap: 8px; transform: translateY(18px); opacity: 0; pointer-events: none; transition: .25s; font-size: 11px; box-shadow: 0 7px 22px rgba(14, 56, 43, .18); }
.toast.visible { transform: translateY(0); opacity: 1; }
.toast svg { color: #91dbb8; width: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1200px) { .page-wrap { padding-left: 26px; padding-right: 26px; } .topbar { padding: 0 26px; } .content-grid { grid-template-columns: minmax(0, 1.45fr) minmax(285px, .75fr); } .filter-tab { padding-left: 5px; padding-right: 5px; } .catalog-toolbar { align-items: flex-start; flex-direction: column; } .filter-tabs { width: 100%; } .form-status-chip { width: 100%; padding-top: 8px; border-top: 1px solid var(--line); } }
@media (max-width: 900px) { .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 8px 0 25px rgba(0,0,0,.08); } .sidebar.open { transform: translateX(0); } .sidebar-close { display: grid; } .sidebar-overlay { position: fixed; inset: 0; display: block; background: rgba(15, 50, 40, .28); z-index: 15; opacity: 0; pointer-events: none; transition: opacity .2s; } .sidebar-overlay.visible { opacity: 1; pointer-events: auto; } .main-content { margin-left: 0; } .mobile-menu { display: grid; margin-right: 8px; } .topbar { justify-content: flex-start; } .topbar-actions { margin-left: auto; } .content-grid { grid-template-columns: 1fr; } .summary-panel { position: static; order: -1; } .summary-list { min-height: 0; max-height: 220px; } .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { body { font-size: 13px; } .topbar { height: 57px; padding: 0 14px; } .breadcrumb span { display: none; } .topbar-date { display: none; } .page-wrap { padding: 22px 14px 20px; } .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 19px; } h1 { font-size: 24px; } .heading-actions { width: 100%; } .heading-actions .button { flex: 1; } .context-bar { flex-wrap: wrap; gap: 10px 15px; padding: 12px; } .context-divider { display: none; } .context-spacer { display: none; } .autosave { width: 100%; padding-top: 7px; border-top: 1px solid var(--line); } .stats-grid { gap: 8px; margin-bottom: 16px; } .stat-card { padding: 11px 12px; min-height: 101px; } .stat-card > strong { font-size: 19px; } .stepper { overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; } .step { min-width: max-content; } .step-line { width: 24px; margin: 0 8px; } .panel-section { padding: 16px 13px; } .form-grid, .teacher-form-grid { grid-template-columns: 1fr 1fr; gap: 11px 8px; } .span-2 { grid-column: span 2; } .catalog-heading { align-items: flex-start; flex-direction: column; } .catalog-toolbar { gap: 9px; } .search-box { width: 100%; } .filter-tabs { overflow-x: auto; } .filter-tab { white-space: nowrap; } .selection-hint { align-items: flex-start; flex-wrap: wrap; } .hint-count { margin-left: 21px; } .items-table { min-width: 670px; } .summary-panel { padding: 15px 13px; } .page-footer { align-items: flex-start; flex-direction: column; gap: 6px; } .backend-options { grid-template-columns: 1fr; } .modal { max-height: 92vh; } .modal-header, .modal-body, .modal-footer { padding-left: 15px; padding-right: 15px; } .order-preview { padding: 12px; overflow-x: auto; } .preview-table { min-width: 550px; } .admin-settings-grid, .admin-budget-grid { grid-template-columns: 1fr 1fr; } .admin-settings-grid .span-2 { grid-column: span 2; } .admin-settings-actions { align-items: stretch; flex-direction: column; } .admin-settings-actions .button { width: 100%; } }
@media (max-width: 460px) { .page-wrap { padding-left: 10px; padding-right: 10px; } h1 { font-size: 22px; } .heading-actions { gap: 6px; } .heading-actions .button { padding-left: 8px; padding-right: 8px; font-size: 10px; } .context-field { min-width: 0; flex: 1; } .catalog-chip { width: 100%; } .catalog-chip .text-button { margin-left: auto; } .stats-grid { grid-template-columns: 1fr 1fr; } .stat-card > strong { font-size: 17px; } .stat-card .status-text { font-size: 16px; } .form-grid, .teacher-form-grid { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } .form-field input, .form-field select { height: 38px; } .summary-total strong { font-size: 18px; } .budget-heading strong { font-size: 11px; } .admin-settings-grid, .admin-budget-grid { grid-template-columns: 1fr; } .admin-settings-grid .span-2 { grid-column: auto; } }
@media print { .app-shell, .modal-header, .modal-footer, .toast { display: none !important; } body { background: #fff; margin: 0; padding: 0; } .modal-backdrop { display: block !important; position: static; background: #fff; padding: 0; } .modal { width: 100%; max-height: none; box-shadow: none; } .modal-body { padding: 0; } .order-preview { border: 0; } }
