:root {
  --primary: #2468d7;
  --primary-dark: #174fae;
  --primary-soft: #eaf2ff;
  --cyan: #11a8c8;
  --teal: #17a786;
  --orange: #f08a46;
  --red: #e25454;
  --ink: #1c2a3a;
  --muted: #6e7d91;
  --line: #e3eaf3;
  --panel: #ffffff;
  --canvas: #f3f6fa;
  --sidebar: #1f59b3;
  --radius: 6px;
  --shadow: 0 8px 24px rgba(32, 68, 117, .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; font-size: 14px; letter-spacing: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(36, 104, 215, .2); outline-offset: 1px; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; width: 248px; flex-direction: column; color: white; background: linear-gradient(180deg, #265fb8 0%, #174b9f 100%); transition: transform .25s ease; }
.brand { display: flex; align-items: center; height: 76px; padding: 0 24px; gap: 12px; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 18px; white-space: nowrap; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border: 2px solid rgba(255,255,255,.86); border-radius: 50%; font-weight: 700; }
.profile { display: flex; align-items: center; min-height: 105px; padding: 20px 24px; gap: 12px; background: rgba(0,0,0,.06); }
.avatar { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; color: #fff; background: #79a6ec; border: 2px solid rgba(255,255,255,.55); border-radius: 50%; font-weight: 700; }
.avatar.small { width: 30px; height: 30px; border-width: 0; font-size: 12px; }
.profile div:last-child { min-width: 0; }
.profile b, .profile span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile b { margin-bottom: 6px; font-size: 13px; }
.profile span { color: rgba(255,255,255,.7); font-size: 12px; }
.nav-list { flex: 1; overflow-y: auto; padding: 10px 0; }
.nav-item { position: relative; display: flex; width: 100%; min-height: 48px; align-items: center; padding: 0 18px; gap: 12px; color: rgba(255,255,255,.79); background: transparent; border: 0; border-left: 3px solid transparent; text-align: left; }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { color: #fff; background: rgba(55, 135, 255, .45); border-left-color: #67e2ca; font-weight: 700; }
.nav-icon { display: grid; width: 22px; place-items: center; font-size: 18px; }
.nav-count { min-width: 22px; margin-left: auto; padding: 2px 6px; color: #2260bd; background: #fff; border-radius: 10px; font-size: 11px; text-align: center; }
.nav-count.warning { color: #fff; background: #ee8e48; }
.nav-label { padding: 16px 22px 7px; color: rgba(255,255,255,.45); font-size: 11px; }
.sidebar-footer { display: flex; align-items: center; padding: 17px 22px; gap: 8px; color: rgba(255,255,255,.62); border-top: 1px solid rgba(255,255,255,.11); font-size: 12px; }
.sidebar-footer small { margin-left: auto; }
.status-dot { width: 7px; height: 7px; background: #5de4bc; border-radius: 50%; box-shadow: 0 0 0 4px rgba(93,228,188,.13); }

.main-area { width: calc(100% - 248px); min-width: 0; margin-left: 248px; }
.topbar { position: sticky; top: 0; z-index: 15; display: flex; height: 76px; align-items: center; justify-content: space-between; padding: 0 26px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.topbar-left, .topbar-right, .breadcrumb, .user-chip { display: flex; align-items: center; }
.topbar-left { gap: 18px; }
.topbar-right { gap: 14px; }
.icon-btn { display: grid; width: 36px; height: 36px; place-items: center; color: #53647a; background: transparent; border: 0; border-radius: 4px; font-size: 20px; }
.icon-btn:hover { background: #eef3f9; }
.breadcrumb { gap: 9px; color: #8a97a8; }
.breadcrumb i { font-style: normal; color: #c0c8d2; }
.breadcrumb strong { color: var(--ink); }
.notification-btn { position: relative; font-size: 24px; }
.notification-btn span { position: absolute; top: 3px; right: 1px; display: grid; min-width: 16px; height: 16px; place-items: center; color: white; background: var(--red); border: 2px solid white; border-radius: 50%; font-size: 9px; }
.date-badge { padding: 0 15px; border-right: 1px solid var(--line); text-align: right; }
.date-badge span, .date-badge small { display: block; }
.date-badge span { font-weight: 700; }
.date-badge small { margin-top: 3px; color: #8b98aa; }
.user-chip { padding: 6px 8px; gap: 8px; background: transparent; border: 0; border-radius: 4px; }
.user-chip:hover { background: #f2f5f9; }
.page-content { min-height: calc(100vh - 76px); padding: 22px 26px 40px; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; gap: 16px; }
.page-heading h1 { margin: 0 0 5px; font-size: 22px; }
.page-heading p { margin: 0; color: var(--muted); }
.heading-actions, .filters, .inline-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn { min-height: 38px; padding: 0 16px; border: 1px solid transparent; border-radius: 4px; font-weight: 600; }
.btn.primary { color: #fff; background: var(--primary); }
.btn.primary:hover { background: var(--primary-dark); }
.btn.secondary { color: #43536a; background: #fff; border-color: #dbe3ec; }
.btn.secondary:hover { color: var(--primary); border-color: #a6c1ee; }
.btn.success { color: #fff; background: var(--teal); }
.btn.danger-text { color: var(--red); background: #fff; border-color: #f0cccc; }
.btn.small { min-height: 31px; padding: 0 11px; font-size: 12px; }
.btn:disabled { cursor: not-allowed; opacity: .5; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; gap: 14px; }
.metric-card { position: relative; min-height: 126px; overflow: hidden; padding: 21px; color: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.metric-card::after { content: ""; position: absolute; right: -20px; bottom: -55px; width: 160px; height: 160px; border: 28px solid rgba(255,255,255,.08); border-radius: 50%; }
.metric-card.blue { background: linear-gradient(135deg, #3f83ef, #2262ca); }
.metric-card.cyan { background: linear-gradient(135deg, #22b5ce, #078eb7); }
.metric-card.green { background: linear-gradient(135deg, #25b89b, #11816f); }
.metric-card.orange { background: linear-gradient(135deg, #ff9a67, #ec7049); }
.metric-card .metric-label { color: rgba(255,255,255,.84); font-weight: 600; }
.metric-card strong { display: block; margin-top: 12px; font-size: 31px; line-height: 1; }
.metric-card strong small { margin-left: 4px; font-size: 13px; }
.metric-card .metric-note { position: absolute; right: 18px; top: 20px; display: grid; width: 38px; height: 38px; place-items: center; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.25); border-radius: 5px; font-size: 20px; }
.metric-card .metric-trend { position: absolute; left: 22px; bottom: 16px; color: rgba(255,255,255,.7); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr); gap: 18px; }
.panel { background: var(--panel); border: 1px solid #e7edf4; border-radius: var(--radius); box-shadow: 0 2px 8px rgba(38,65,99,.035); }
.panel + .panel { margin-top: 18px; }
.panel-header { display: flex; min-height: 57px; align-items: center; justify-content: space-between; padding: 0 18px; gap: 14px; border-bottom: 1px solid var(--line); }
.panel-title { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 16px; }
.panel-title::before { content: ""; width: 3px; height: 18px; background: var(--primary); border-radius: 2px; }
.panel-subtitle { color: #8996a8; font-size: 12px; font-weight: 400; }
.panel-body { padding: 18px; }
.link-btn { color: var(--primary); background: transparent; border: 0; font-weight: 600; }

.progress-overview { display: grid; grid-template-columns: 205px 1fr; gap: 22px; }
.progress-ring { position: relative; display: grid; width: 146px; height: 146px; margin: 5px auto; place-items: center; border-radius: 50%; background: conic-gradient(var(--primary) 0 80%, #e9eff7 80% 100%); }
.progress-ring::after { content: ""; width: 108px; height: 108px; background: white; border-radius: 50%; }
.progress-ring div { position: absolute; z-index: 1; text-align: center; }
.progress-ring strong, .progress-ring span { display: block; }
.progress-ring strong { font-size: 29px; }
.progress-ring span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.progress-legend { display: flex; justify-content: center; gap: 15px; color: var(--muted); font-size: 11px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; }
.legend-dot.done { background: var(--primary); }.legend-dot.todo { background: #dce5f0; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { height: 48px; padding: 9px 13px; border-bottom: 1px solid #e8edf3; text-align: left; white-space: nowrap; }
.data-table th { color: #5b6b80; background: #f7f9fc; font-size: 12px; font-weight: 700; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfdff; }
.table-wrap { width: 100%; overflow-x: auto; }
.tag { display: inline-flex; min-height: 24px; align-items: center; padding: 0 8px; border-radius: 3px; font-size: 11px; font-weight: 600; }
.tag.blue { color: #2665c8; background: #e9f1ff; }.tag.green { color: #14856f; background: #e5f6f1; }.tag.orange { color: #c46b2f; background: #fff0e5; }.tag.red { color: #bf4747; background: #ffeded; }.tag.gray { color: #6d7a8b; background: #edf1f5; }
.progress-line { display: flex; align-items: center; gap: 8px; }
.progress-line i { width: 70px; height: 7px; overflow: hidden; background: #e5ecf6; border-radius: 5px; }
.progress-line i::before { content: ""; display: block; width: var(--progress, 0%); height: 100%; background: var(--primary); border-radius: inherit; }

.todo-list { display: grid; gap: 8px; }
.todo-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; padding: 12px 0; gap: 10px; border-bottom: 1px solid #edf1f5; }
.todo-item:last-child { border-bottom: 0; }
.todo-icon { display: grid; width: 34px; height: 34px; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 5px; font-weight: 700; }
.todo-item b, .todo-item span { display: block; }
.todo-item b { margin-bottom: 4px; font-size: 13px; }.todo-item span { color: var(--muted); font-size: 11px; }
.todo-item time { color: #8a97a8; font-size: 11px; }

.chart-wrap { position: relative; height: 250px; }
.bar-chart { display: flex; height: 205px; align-items: flex-end; padding: 18px 12px 27px 38px; gap: clamp(10px, 3vw, 42px); border-left: 1px solid #e6edf4; border-bottom: 1px solid #e6edf4; background: repeating-linear-gradient(to top, transparent 0 39px, #edf2f7 40px); }
.bar-group { position: relative; display: flex; flex: 1; height: 100%; align-items: flex-end; justify-content: center; gap: 5px; }
.bar { width: 13px; min-width: 8px; height: var(--height); border-radius: 3px 3px 0 0; }
.bar.school { background: #3975d5; }.bar.supplier { background: #f28a54; }.bar.average { background: #17a786; }
.bar-group label { position: absolute; bottom: -23px; width: max-content; color: #67778c; font-size: 11px; }
.chart-legend { display: flex; justify-content: center; margin-top: 11px; gap: 18px; color: var(--muted); font-size: 11px; }
.chart-legend i { display: inline-block; width: 13px; height: 7px; margin-right: 5px; border-radius: 2px; }

.filter-panel { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding: 14px 16px; gap: 12px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.filter-control { display: flex; align-items: center; gap: 8px; }
.filter-control span { color: var(--muted); font-size: 12px; }
.filter-control input, .filter-control select { height: 36px; padding: 0 10px; color: #3b4b60; background: #fff; border: 1px solid #dce4ed; border-radius: 4px; }
.search-input { min-width: 220px; }

.plan-card-list { display: grid; gap: 13px; }
.plan-card { display: grid; grid-template-columns: minmax(220px, 1.3fr) minmax(270px, 1.4fr) minmax(250px, 1fr) auto; align-items: center; padding: 18px; gap: 24px; background: white; border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius); box-shadow: 0 3px 10px rgba(35,69,110,.04); }
.plan-card.complete { border-left-color: var(--teal); }.plan-card.draft { border-left-color: #9ba8b8; }
.plan-card h3 { margin: 0 0 7px; font-size: 16px; }.plan-card p { margin: 0; color: var(--muted); font-size: 12px; }
.ingredient-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ingredient-tag { padding: 5px 8px; color: #3c5f8b; background: #edf4ff; border: 1px solid #dbe9ff; border-radius: 3px; font-size: 11px; }
.plan-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-meta span { display: block; color: #8693a5; font-size: 11px; }.plan-meta b { display: block; margin-top: 3px; color: #34445a; font-size: 12px; }

.schedule-summary { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.schedule-summary div { padding: 16px 18px; border-right: 1px solid var(--line); }.schedule-summary div:last-child { border-right: 0; }
.schedule-summary span, .schedule-summary b { display: block; }.schedule-summary span { color: var(--muted); font-size: 11px; }.schedule-summary b { margin-top: 7px; font-size: 18px; }
.schedule-board { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.day-column { min-width: 210px; border-right: 1px solid var(--line); }.day-column:last-child { border-right: 0; }
.day-header { padding: 15px; background: #f7f9fc; border-bottom: 1px solid var(--line); }.day-header b, .day-header span { display: block; }.day-header b { margin-bottom: 4px; }.day-header span { color: var(--muted); font-size: 11px; }
.shift-card { margin: 12px; padding: 13px; background: #fbfdff; border: 1px solid #dfe7f1; border-radius: 5px; }
.shift-time { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-weight: 700; }.shift-time small { color: var(--teal); font-weight: 500; }
.staff-row { display: flex; align-items: center; margin: 8px 0; gap: 8px; font-size: 12px; }.staff-avatar { display: grid; width: 27px; height: 27px; flex: 0 0 auto; place-items: center; color: #245fbf; background: #e5efff; border-radius: 50%; font-size: 11px; font-weight: 700; }.staff-avatar.supplier { color: #b85f2c; background: #ffecdf; }
.staff-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.staff-row em { margin-left: auto; color: #8795a8; font-size: 10px; font-style: normal; }
.shift-footer { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px; color: var(--muted); border-top: 1px dashed #dde5ee; font-size: 10px; }

.price-value { font-weight: 700; }.average-price { color: var(--teal); font-size: 15px; font-weight: 700; }
.submitter-stack { display: flex; }.submitter-stack .staff-avatar { margin-right: -5px; border: 2px solid white; }
.photo-thumb { position: relative; display: grid; width: 54px; height: 40px; overflow: hidden; place-items: center; color: white; background: linear-gradient(145deg, #5fa753 0 38%, #efe5ca 39% 62%, #d94d39 63%); border-radius: 4px; font-size: 10px; }.photo-thumb::after { content: "水印"; position: absolute; right: 2px; bottom: 2px; padding: 1px 3px; background: rgba(0,0,0,.5); border-radius: 2px; font-size: 8px; }

.report-top { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; gap: 14px; }
.report-stat { padding: 18px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }.report-stat span { color: var(--muted); font-size: 12px; }.report-stat b { display: block; margin-top: 9px; font-size: 23px; }.report-stat small { color: var(--teal); }

.mobile-stage { display: grid; grid-template-columns: minmax(290px, 390px) minmax(0, 1fr); align-items: start; gap: 26px; }
.phone { position: sticky; top: 98px; width: 100%; max-width: 390px; height: 720px; min-height: 720px; overflow: hidden; background: #f4f6f9; border: 8px solid #263346; border-radius: 28px; box-shadow: 0 18px 44px rgba(25,42,67,.2); }
.phone::before { content: ""; position: absolute; z-index: 5; top: 7px; left: 50%; width: 74px; height: 17px; background: #263346; border-radius: 0 0 12px 12px; transform: translateX(-50%); }
.phone-status { display: flex; height: 33px; align-items: center; justify-content: space-between; padding: 7px 18px 0; color: white; background: var(--primary); font-size: 10px; }
.mobile-header { display: flex; height: 60px; align-items: center; justify-content: space-between; padding: 0 16px; color: white; background: var(--primary); }.mobile-header b { font-size: 16px; }.mobile-header button { color: white; background: transparent; border: 0; }
.mobile-content { height: calc(100% - 93px); overflow-y: auto; padding: 13px 13px 76px; scrollbar-width: thin; }
.mobile-shift { padding: 14px; color: white; background: linear-gradient(125deg, #3176df, #1c56b6); border-radius: 7px; }.mobile-shift > div:first-child { display: flex; align-items: center; justify-content: space-between; }.mobile-shift h3 { margin: 7px 0 4px; font-size: 17px; }.mobile-shift p { margin: 0; color: rgba(255,255,255,.78); font-size: 11px; }.mobile-shift .tag { color: #11634f; background: #ccf2e5; }
.mobile-progress { display: flex; align-items: center; margin-top: 13px; gap: 9px; font-size: 10px; }.mobile-progress i { flex: 1; height: 5px; background: rgba(255,255,255,.25); border-radius: 4px; }.mobile-progress i::before { content: ""; display: block; width: 33%; height: 100%; background: #66e0c1; border-radius: inherit; }
.mobile-section-title { display: flex; align-items: center; justify-content: space-between; margin: 17px 0 9px; }.mobile-section-title b { font-size: 14px; }.mobile-section-title span { color: var(--muted); font-size: 11px; }
.mobile-task { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; margin-bottom: 8px; padding: 10px; gap: 10px; background: white; border: 1px solid #e4eaf1; border-radius: 6px; }.food-icon { display: grid; width: 46px; height: 46px; place-items: center; background: #edf5e8; border-radius: 5px; font-size: 25px; }.mobile-task b, .mobile-task span { display: block; }.mobile-task b { margin-bottom: 4px; font-size: 13px; }.mobile-task span { color: var(--muted); font-size: 10px; }.capture-btn { display: grid; width: 35px; height: 35px; place-items: center; color: white; background: var(--primary); border: 0; border-radius: 50%; font-size: 16px; }.capture-btn.done { color: var(--teal); background: #e2f5ef; }
.mobile-tabbar { position: absolute; inset: auto 0 0; display: grid; grid-template-columns: repeat(3, 1fr); height: 58px; background: white; border-top: 1px solid #dfe6ee; }.mobile-tabbar button { color: #8996a8; background: transparent; border: 0; font-size: 10px; }.mobile-tabbar button span { display: block; margin-bottom: 3px; font-size: 17px; }.mobile-tabbar button.active { color: var(--primary); }
.capture-screen { display: none; padding: 13px; }.capture-screen.active { display: block; }.mobile-home.hidden { display: none; }
.camera-view { position: relative; height: 260px; overflow: hidden; background: radial-gradient(circle at 30% 35%, #d84b3e 0 12%, transparent 13%), radial-gradient(circle at 62% 28%, #57a044 0 18%, transparent 19%), linear-gradient(145deg, #77af56, #d9c8a3 48%, #c54d3b 49% 67%, #eee1c0 68%); border-radius: 7px; }.camera-view::before { content: "现场食材采集画面"; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.85); background: rgba(0,0,0,.08); font-size: 13px; }.watermark { position: absolute; right: 8px; bottom: 8px; left: 8px; padding: 8px 9px; color: white; background: rgba(7,27,41,.62); border-radius: 4px; font-size: 9px; line-height: 1.55; }.scan-line { position: absolute; top: 20px; right: 15px; left: 15px; height: 2px; background: #53ffd0; box-shadow: 0 0 12px #53ffd0; animation: scan 2s infinite ease-in-out; }
@keyframes scan { 0%,100% { transform: translateY(0); } 50% { transform: translateY(195px); } }
.ocr-result { margin-top: 10px; padding: 12px; background: white; border: 1px solid #dae5f1; border-radius: 6px; }.ocr-result header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }.ocr-result header b { font-size: 12px; }.ocr-result header span { color: var(--teal); font-size: 10px; }
.mobile-form-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 8px; }.mobile-field span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; }.mobile-field input, .mobile-field select { width: 100%; height: 34px; padding: 0 8px; border: 1px solid #dce4ed; border-radius: 4px; font-size: 11px; }.mobile-field.full { grid-column: 1 / -1; }
.mobile-submit { width: 100%; height: 42px; margin-top: 10px; color: white; background: var(--primary); border: 0; border-radius: 5px; font-weight: 700; }
.mobile-submit:disabled { background: #aebdce; }
.mobile-notice { display: flex; align-items: flex-start; padding: 11px; gap: 8px; color: #69798d; background: #eef3f8; border-radius: 5px; font-size: 10px; line-height: 1.5; }
.mobile-flow-info { display: grid; gap: 14px; }.flow-step { display: grid; grid-template-columns: 34px 1fr; padding: 16px; gap: 12px; background: white; border: 1px solid var(--line); border-radius: var(--radius); }.step-number { display: grid; width: 34px; height: 34px; place-items: center; color: var(--primary); background: var(--primary-soft); border-radius: 50%; font-weight: 700; }.flow-step h3 { margin: 0 0 6px; font-size: 15px; }.flow-step p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 12px; }
.permission-box { padding: 18px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--teal); border-radius: var(--radius); }.permission-box h3 { margin: 0 0 14px; }.permission-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }.permission-grid div { padding: 12px; background: #f7f9fc; border-radius: 4px; }.permission-grid span, .permission-grid b { display: block; }.permission-grid span { color: var(--muted); font-size: 10px; }.permission-grid b { margin-top: 5px; font-size: 12px; }

.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(17,31,51,.48); }
.modal-backdrop[hidden] { display: none; }.modal { width: min(680px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: white; border-radius: 7px; box-shadow: 0 24px 80px rgba(12,33,61,.28); }.modal > header { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }.modal h2 { margin: 4px 0 0; font-size: 19px; }.eyebrow { color: var(--primary); font-size: 11px; font-weight: 700; }.modal form { padding: 20px 22px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.field > span { display: block; margin-bottom: 7px; color: #58687c; font-size: 12px; }.field em { color: var(--red); font-style: normal; }.field input, .field select { width: 100%; height: 39px; padding: 0 10px; border: 1px solid #d9e2eb; border-radius: 4px; }.field.full { grid-column: 1 / -1; }.ingredient-picker { display: flex; flex-wrap: wrap; gap: 8px; }.ingredient-option { position: relative; }.ingredient-option input { position: absolute; opacity: 0; }.ingredient-option span { display: block; padding: 7px 11px; color: #52647a; background: #f6f8fb; border: 1px solid #dae3ed; border-radius: 4px; cursor: pointer; }.ingredient-option input:checked + span { color: var(--primary); background: var(--primary-soft); border-color: #83adef; }.rule-note { display: flex; margin-top: 17px; padding: 12px; gap: 10px; color: #5d6f85; background: #f1f6fd; border-left: 3px solid var(--primary); font-size: 11px; line-height: 1.6; }.rule-note b { color: #315d9b; white-space: nowrap; }.modal footer { display: flex; justify-content: flex-end; margin: 20px -22px -20px; padding: 15px 22px; gap: 9px; background: #f8fafc; border-top: 1px solid var(--line); }
.toast-region { position: fixed; z-index: 100; right: 22px; top: 92px; display: grid; gap: 9px; }.toast { min-width: 270px; padding: 12px 14px; color: white; background: #26384e; border-left: 4px solid #55ddb6; border-radius: 4px; box-shadow: var(--shadow); animation: toast-in .25s ease; }.toast.error { border-left-color: #ff7575; } @keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
.empty-state { padding: 38px 20px; color: var(--muted); text-align: center; }.empty-state strong { display: block; margin-bottom: 6px; color: var(--ink); }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .plan-card { grid-template-columns: 1fr 1fr; }
  .plan-card .inline-actions { justify-content: flex-end; }
}

@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); box-shadow: 16px 0 40px rgba(16,39,70,.2); }.sidebar.open { transform: translateX(0); }
  .main-area { width: 100%; margin-left: 0; }.topbar { height: 64px; padding: 0 14px; }.page-content { min-height: calc(100vh - 64px); padding: 16px 13px 30px; }
  .date-badge, .user-chip > span:not(.avatar), .user-chip b { display: none; }.topbar-right { gap: 4px; }
  .page-heading { align-items: flex-start; flex-direction: column; }.heading-actions { width: 100%; }.heading-actions .btn { flex: 1; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }.metric-card { min-height: 112px; padding: 16px; }.metric-card strong { font-size: 25px; }.metric-card .metric-note { display: none; }
  .progress-overview { grid-template-columns: 1fr; }.progress-ring { width: 130px; height: 130px; }.progress-ring::after { width: 96px; height: 96px; }
  .filter-panel { align-items: stretch; flex-direction: column; }.filters { display: grid; grid-template-columns: 1fr 1fr; }.filter-control { display: block; }.filter-control span { display: block; margin-bottom: 4px; }.filter-control input, .filter-control select, .search-input { width: 100%; min-width: 0; }
  .plan-card { grid-template-columns: 1fr; gap: 14px; }.plan-card .inline-actions { justify-content: flex-start; }
  .schedule-summary { grid-template-columns: 1fr 1fr; }.schedule-summary div:nth-child(2) { border-right: 0; }.schedule-summary div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .report-top { grid-template-columns: 1fr; }.mobile-stage { grid-template-columns: 1fr; }.phone { position: relative; top: 0; margin: 0 auto; }.mobile-flow-info { max-width: 500px; margin: 0 auto; }
  .form-grid { grid-template-columns: 1fr; }.field.full { grid-column: auto; }.modal-backdrop { padding: 8px; }
}

@media (max-width: 500px) {
  .breadcrumb span, .breadcrumb i { display: none; }.metric-grid { grid-template-columns: 1fr; }.metric-card { min-height: 106px; }.filters { grid-template-columns: 1fr; }.phone { height: 690px; min-height: 690px; border-width: 6px; border-radius: 22px; }.permission-grid { grid-template-columns: 1fr; }
}
