:root {
  --topbar: 56px;
  --sidebar: 238px;
  --bg: #f1f1f1;
  --surface: #fff;
  --surface-subdued: #fafafa;
  --sidebar-bg: #ebebeb;
  --text: #202223;
  --muted: #616161;
  --faint: #616161;
  --line: #dedede;
  --line-strong: #c9cccf;
  --accent: #2c6ecb;
  --accent-hover: #1f5199;
  --accent-soft: #eaf2ff;
  --success: #008060;
  --success-soft: #e3f1df;
  --warning: #916a00;
  --warning-soft: #fff5cc;
  --danger: #d72c0d;
  --danger-soft: #fff0ed;
  --shadow: 0 1px 0 rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.08);
  --radius: 10px;
  --ease: cubic-bezier(.22,.75,.25,1);
  --transition: 160ms var(--ease);
}

html[data-theme="dark"] {
  --bg: #171717;
  --surface: #202020;
  --surface-subdued: #262626;
  --sidebar-bg: #1d1d1d;
  --text: #f1f1f1;
  --muted: #bec3ca;
  --faint: #aeb5be;
  --line: #454545;
  --line-strong: #4a4a4a;
  --accent: #6da8f2;
  --accent-hover: #8bb9f3;
  --accent-soft: #24364d;
  --success: #4bc49a;
  --success-soft: #183a30;
  --warning: #f0c85a;
  --warning-soft: #3b3219;
  --danger: #ff806d;
  --danger-soft: #47241f;
  --shadow: 0 1px 0 rgba(255,255,255,.035), 0 4px 14px rgba(0,0,0,.26);
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: only light;
  background: #fff;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.app-loading { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--bg); }
.loading-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: #202223; color: #fff; font-weight: 800; }
.app-loading strong { font-size: 13px; letter-spacing: .08em; }
.app-loading span { color: var(--muted); font-size: 12px; }

.topbar { position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--topbar); display: grid; grid-template-columns: minmax(225px, .6fr) minmax(320px, 660px) minmax(260px, .6fr); align-items: center; gap: 24px; padding: 0 16px; background: #1a1a1a; color: #f1f1f1; box-shadow: 0 1px 0 #000; }
.topbar-start, .topbar-actions { display: flex; align-items: center; min-width: 0; }
.topbar-actions { justify-content: flex-end; gap: 5px; }
.topbar-brand { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; white-space: nowrap; }
.topbar-brand strong { font-size: 14px; }
.topbar-brand > span:last-child { color: #aeb4b9; font-size: 12px; }
.brand-mark, .workspace-logo { display: grid; place-items: center; flex: none; width: 29px; height: 29px; border-radius: 8px; background: #202223; color: #fff; font-weight: 800; font-size: 13px; border: 1px solid #454545; }
.search-wrap { position: relative; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #444; border-radius: 8px; background: #303030; color: #b7b7b7; transition: .15s; }
.search-wrap.focused { border-color: #797979; background: #3b3b3b; box-shadow: 0 0 0 1px #797979; }
.search-wrap > svg { width: 18px; height: 18px; flex: none; }
.search-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: #fff; }
.search-wrap input::placeholder { color: #bababa; }
.search-wrap kbd { padding: 2px 6px; border: 1px solid #575757; border-radius: 5px; color: #bdbdbd; font: 11px "Segoe UI", sans-serif; white-space: nowrap; }
.search-results { position: absolute; top: 43px; left: 0; right: 0; max-height: min(470px, 70vh); overflow: auto; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); box-shadow: 0 14px 45px rgba(0,0,0,.23); animation: popoverIn 150ms var(--ease); }
.search-result { width: 100%; display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; padding: 9px; border: 0; border-radius: 7px; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.search-result:hover { background: #f1f1f1; }
.search-result-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.search-result strong, .search-result small { display: block; }
.search-result small { margin-top: 2px; color: var(--muted); font-size: 11px; text-transform: capitalize; }
.search-empty { padding: 18px; color: var(--muted); text-align: center; font-size: 12px; }
.topbar-icon, .icon-button { position: relative; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; transition: background var(--transition), transform var(--transition); }
.topbar-icon:hover, .icon-button:hover { background: rgba(255,255,255,.1); }
.topbar-icon svg, .icon-button svg { width: 20px; height: 20px; }
.notification-count { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; display: grid; place-items: center; border: 2px solid #1a1a1a; border-radius: 9px; background: #d72c0d; color: #fff; font-size: 9px; font-weight: 700; }
.account-wrap { position: relative; }
.account-button { height: 42px; max-width: 285px; display: grid; grid-template-columns: 30px minmax(0,1fr) 16px; align-items: center; gap: 8px; border: 0; border-radius: 8px; padding: 3px 5px; background: transparent; color: #fff; text-align: left; cursor: pointer; transition: background var(--transition); }
.account-button:hover, .account-button[aria-expanded="true"] { background: #303030; }
.account-button > svg { width: 16px; }
.account-avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 7px; background: #92e6b5; color: #143723; font-size: 11px; font-weight: 700; }
.account-avatar.large { width: 40px; height: 40px; font-size: 13px; }
.account-copy { min-width: 0; }
.account-copy strong, .account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: 11px; }
.account-copy small { color: #aaa; font-size: 10px; }
.account-menu { position: absolute; top: 47px; right: 0; width: 280px; padding: 8px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); box-shadow: 0 16px 48px rgba(0,0,0,.23); animation: popoverIn 150ms var(--ease); }
.account-menu-head { display: flex; align-items: center; gap: 10px; padding: 8px; }
.account-menu-head strong, .account-menu-head small { display: block; }
.account-menu-head strong { font-size: 12px; }
.account-menu-head small { max-width: 190px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; }
.access-chip { display: flex; align-items: center; gap: 7px; margin: 4px 8px 8px; padding: 7px 9px; border-radius: 7px; background: var(--success-soft); color: #14532d; font-size: 11px; }
.access-chip span { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.account-menu a, .account-menu > button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px; border: 0; border-radius: 7px; background: transparent; color: inherit; text-decoration: none; cursor: pointer; }
.account-menu a:hover, .account-menu > button:hover { background: #f1f1f1; }
.account-menu a svg, .account-menu > button svg { width: 18px; height: 18px; }

.side-nav { position: fixed; z-index: 50; top: var(--topbar); bottom: 0; left: 0; width: var(--sidebar); display: flex; flex-direction: column; overflow: auto; padding: 12px 8px; border-right: 1px solid #d3d3d3; background: var(--sidebar-bg); }
.workspace-switcher { display: flex; align-items: center; gap: 9px; margin: 0 4px 9px; padding: 8px; border-radius: 8px; }
.workspace-switcher strong, .workspace-switcher small { display: block; }
.workspace-switcher strong { font-size: 12px; }
.workspace-switcher small { color: var(--muted); font-size: 10px; }
.workspace-logo { background: #fff; color: #111; border-color: #c8c8c8; }
.nav-group { margin-bottom: 10px; }
.nav-group-label { padding: 9px 10px 5px; color: #707070; font-size: 10px; font-weight: 600; }
.nav-item { width: 100%; height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: #303030; text-align: left; cursor: pointer; transition: color var(--transition), background var(--transition), transform var(--transition), box-shadow var(--transition); }
.nav-item:hover { background: #dedede; }
.nav-item.active { background: #fff; border-radius: 999px; box-shadow: none; font-weight: 600; }
.nav-item svg { width: 17px; height: 17px; color: #505050; }
.side-footer { margin-top: auto; padding-top: 10px; border-top: 1px solid #d4d4d4; }
.language-switch { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px; padding: 0 10px; color: #414141; font-size: 12px; }
.language-switch select { min-width: 92px; max-width: 110px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; padding: 5px 7px; cursor: pointer; }
html[data-theme="dark"] .language-switch { color: var(--text); }
.side-footer a, .theme-toggle { width: 100%; height: 34px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: #414141; text-decoration: none; text-align: left; font-size: 12px; cursor: pointer; }
.side-footer a:hover, .theme-toggle:hover { background: #dedede; }
.side-footer svg { width: 17px; height: 17px; }
.theme-toggle > span:first-of-type { flex: 1; }
.theme-icon-moon { display: none; }
.theme-switch { width: 28px; height: 16px; display: flex; align-items: center; padding: 2px; border-radius: 9px; background: #b7b7b7; transition: background .18s ease; }
.theme-switch i { width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .18s ease; }
html[data-theme="dark"] .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: block; }
html[data-theme="dark"] .theme-switch { background: var(--accent); }
html[data-theme="dark"] .theme-switch i { transform: translateX(12px); }

.workspace { min-height: 100vh; margin-left: var(--sidebar); padding-top: var(--topbar); }
.control-bar { position: sticky; top: var(--topbar); z-index: 30; min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 8px clamp(18px, 3vw, 36px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(10px); }
.date-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.date-controls label { color: var(--muted); font-size: 11px; font-weight: 600; }
.date-controls select, .date-controls input, .filter-control { min-height: 34px; padding: 0 30px 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--text); }
.custom-dates { display: flex; align-items: center; gap: 6px; }
#customRangeButton { white-space: nowrap; }
.modal-backdrop.date-calendar-backdrop { align-items: center; justify-content: center; padding: 20px; }
.modal-panel.wide.date-calendar-panel { width: min(750px,100%); height: auto; max-height: calc(100dvh - 40px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); animation: popoverIn 150ms var(--ease); }
.calendar-help { margin: 0 0 18px; color: var(--muted); line-height: 1.6; }
.calendar-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.calendar-inputs label { display: grid; gap: 7px; font-size: 12px; font-weight: 600; }
.calendar-inputs input { width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--text); background: var(--surface); font: inherit; }
.calendar-inputs input:disabled { opacity: .5; }
.calendar-single { display: flex; align-items: center; gap: 8px; margin: 14px 0; font-size: 12px; }
.calendar-single input { width: 17px; height: 17px; accent-color: var(--accent); }
.calendar-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.calendar-nav button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); font-size: 22px; cursor: pointer; }
.calendar-months { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.calendar-month h3 { margin: 8px 0 16px; font-size: 14px; text-align: center; text-transform: capitalize; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 3px; text-align: center; }
.calendar-weekdays { margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.calendar-day { min-width: 0; min-height: 40px; padding: 0; border: 0; border-radius: 7px; color: var(--text); background: transparent; cursor: pointer; font: inherit; font-size: 12px; }
.calendar-day.in-range { background: var(--accent-soft); }
.calendar-day.selected { background: var(--accent); color: #fff; font-weight: 700; }
.calendar-day:hover:not(.selected) { background: var(--surface-subdued); box-shadow: inset 0 0 0 1px var(--accent); }
.calendar-day[aria-current="date"] { text-decoration: underline; text-underline-offset: 4px; }
.calendar-day:focus-visible, .calendar-nav button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.calendar-selection { margin: 16px 0 10px; color: var(--muted); font-size: 12px; text-align: center; }
.date-calendar-panel .modal-head { padding: 16px 20px; }
.date-calendar-panel .modal-body { padding: 18px 20px; }
.date-calendar-panel .form-actions { position: static; background: var(--surface); }
@media (min-width: 601px) and (max-height: 800px) {
  .date-calendar-panel .calendar-help { margin-bottom: 12px; font-size: 12px; }
  .date-calendar-panel .calendar-day { min-height: 34px; }
  .date-calendar-panel .calendar-single { margin: 10px 0; }
  .date-calendar-panel .calendar-selection { margin: 12px 0 8px; }
}
@media (max-width: 600px) {
  .modal-backdrop.date-calendar-backdrop { padding: 8px; }
  .modal-panel.wide.date-calendar-panel { max-height: calc(100dvh - 16px); border-radius: 12px; }
  .calendar-months { grid-template-columns: 1fr; gap: 8px; }
  .calendar-month:nth-child(2) { display: none; }
  .calendar-day { min-height: 44px; }
  .calendar-inputs { gap: 10px; }
  #customRangeButton { width: 100%; }
}
.active-session { display: flex; align-items: center; gap: 9px; margin-left: auto; padding-left: 12px; border-left: 1px solid var(--line); }
.active-session > div { display: grid; }
.active-session small { color: var(--success); font-size: 9px; font-weight: 600; text-transform: uppercase; }
.active-session strong { font-size: 11px; font-variant-numeric: tabular-nums; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: sessionPulse 1.8s infinite; }
@keyframes sessionPulse { 70% { box-shadow: 0 0 0 8px rgba(0,128,96,0); } 0% { box-shadow: 0 0 0 0 rgba(0,128,96,.35); } }
.content { width: min(1520px, 100%); margin: auto; padding: 28px clamp(18px, 3vw, 36px) 80px; }
.mobile-section-bar { display: none; }

.resource-header, .view-head { min-height: 56px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.resource-header h1, .view-head h2 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.025em; }
.resource-header p, .view-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.overview-heading h1 { font-size: 25px; }
.live-data-chip { min-height: 30px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 600; }
.live-data-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.view-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.primary-button, .secondary-button, .danger-button, .text-button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 13px; border-radius: 7px; font-weight: 600; font-size: 12px; cursor: pointer; transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition); }
.primary-button:active, .secondary-button:active, .danger-button:active, .quick-action:active, .row-action:active { transform: translateY(1px); }
.primary-button { border: 1px solid #202223; background: #303030; color: #fff; box-shadow: inset 0 1px rgba(255,255,255,.12); }
.primary-button:hover { background: #1a1a1a; }
.secondary-button { border: 1px solid var(--line-strong); background: #fff; color: var(--text); box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.secondary-button:hover { background: #f7f7f7; }
.danger-button { border: 1px solid #b42309; background: var(--danger); color: #fff; }
.text-button { border: 0; background: transparent; color: var(--accent); }
.text-button:hover { background: var(--accent-soft); }
.compact { min-height: 30px; padding: 0 10px; }
.export-wrap { position: relative; margin-left: auto; }
.export-menu { position: absolute; z-index: 35; top: calc(100% + 6px); right: 0; min-width: 215px; padding: 5px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); box-shadow: 0 12px 30px rgba(0,0,0,.16); animation: popoverIn 150ms var(--ease) both; }
.export-menu[hidden] { display: none; }
.export-menu button { width: 100%; min-height: 34px; display: block; padding: 7px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--text); font-size: 11px; font-weight: 600; text-align: left; cursor: pointer; }
.export-menu button:hover, .export-menu button:focus-visible { background: var(--accent-soft); outline: none; }
.export-menu button:disabled { color: var(--muted); cursor: wait; }
.primary-button svg, .secondary-button svg { width: 17px; height: 17px; }

.overview-card, .panel, .data-card, .resource-section { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); transition: border-color var(--transition), box-shadow var(--transition), background var(--transition); }
.overview-grid .overview-card:hover, .resource-section:hover { border-color: var(--line-strong); box-shadow: 0 5px 18px rgba(0,0,0,.09); }
.performance-card { overflow: hidden; }
.kpi-strip { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
.kpi-strip article { min-width: 0; padding: 18px 20px; border-right: 1px solid #ededed; }
.kpi-strip article:last-child { border: 0; }
.kpi-strip span:first-child { display: block; color: var(--muted); font-size: 11px; }
.kpi-strip strong { display: block; margin: 8px 0 5px; font-size: 21px; letter-spacing: -.025em; }
.kpi-strip small { color: var(--muted); font-size: 10px; }
.kpi-delta { display: inline-flex !important; align-items: center; width: fit-content; padding: 2px 5px; border-radius: 4px; font-size: 10px !important; font-weight: 600; }
.kpi-delta.up { background: var(--success-soft); color: #26752d; }
.kpi-delta.down { background: var(--danger-soft); color: var(--danger); }
.kpi-delta.muted { background: #f1f1f1; color: var(--muted); }
.performance-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.chart-block { padding: 20px; min-width: 0; }
.sales-breakdown { padding: 20px; border-left: 1px solid var(--line); }
.sales-breakdown h3 { margin: 0; font-size: 14px; }
.sales-breakdown > p { margin: 3px 0 15px; color: var(--muted); font-size: 10px; }
.panel-title, .card-header, .panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.panel-title h2, .card-header h2, .panel-head h3 { margin: 0; font-size: 14px; }
.panel-title p, .card-header p, .panel-head small { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.panel-title > strong { font-size: 18px; }
.chart-summary { display: grid; justify-items: end; gap: 5px; }
.chart-summary > strong { font-size: 18px; }
.chart-legend { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.chart-legend i { width: 16px; height: 2px; background: var(--accent); }
.chart-legend i:nth-of-type(2) { margin-left: 5px; background: var(--danger); }
.chart { height: 245px; margin-top: 10px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid-line { stroke: #e8e8e8; stroke-width: 1; }
.chart-area { fill: url(#overviewArea); }
.chart-line { fill: none; stroke: var(--accent); stroke-width: 2.6; }
.chart-line.expense-line { stroke: var(--danger); stroke-width: 2; stroke-dasharray: 6 5; }
.chart-dot { fill: #fff; stroke: var(--accent); stroke-width: 2; }
.chart-label, .chart-y-label { fill: #616161; font: 9px "Segoe UI", sans-serif; }
.chart-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 4px; color: var(--muted); text-align: center; }
.chart-empty strong { color: var(--text); }
.chart-empty span { font-size: 11px; }
.breakdown-list { display: grid; }
.breakdown-list > div { display: grid; grid-template-columns: 1fr auto 42px; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid #eee; font-size: 11px; }
.breakdown-list span { display: flex; align-items: center; gap: 8px; }
.breakdown-list i { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.breakdown-list > div:nth-child(2) i { background: #6ba5ea; }
.breakdown-list > div:nth-child(3) i { background: #b8d5f5; }
.breakdown-list small { color: var(--muted); text-align: right; }
.breakdown-list .breakdown-total { border: 0; font-weight: 700; }
.finance-list > div:nth-child(1) i { background: var(--accent); }
.finance-list > div:nth-child(2) i { background: var(--warning); }
.finance-list > div:nth-child(3) i { background: var(--danger); }
.finance-list > div:nth-child(4) { border-bottom: 0; font-weight: 700; }
.finance-list > div:nth-child(4) i { background: var(--success); }

html[data-theme="dark"] .app-loading { background: var(--bg); }
html[data-theme="dark"] .side-nav { border-color: var(--line); }
html[data-theme="dark"] .workspace-logo { border-color: var(--line-strong); background: #2b2b2b; color: var(--text); }
html[data-theme="dark"] .nav-group-label { color: var(--faint); }
html[data-theme="dark"] .nav-item, html[data-theme="dark"] .side-footer a, html[data-theme="dark"] .theme-toggle { color: var(--text); }
html[data-theme="dark"] .nav-item svg { color: var(--muted); }
html[data-theme="dark"] .nav-item:hover, html[data-theme="dark"] .side-footer a:hover, html[data-theme="dark"] .theme-toggle:hover { background: #2a2a2a; }
html[data-theme="dark"] .nav-item.active { background: #3c3c3c; box-shadow: none; }
html[data-theme="dark"] .side-footer { border-color: var(--line); }
html[data-theme="dark"] .control-bar { background: rgba(31,31,31,.94); }
html[data-theme="dark"] .date-controls select, html[data-theme="dark"] .date-controls input, html[data-theme="dark"] .filter-control, html[data-theme="dark"] .search-input,
html[data-theme="dark"] .form-field input, html[data-theme="dark"] .form-field select, html[data-theme="dark"] .form-field textarea { background: #292929; color: var(--text); }
html[data-theme="dark"] .secondary-button, html[data-theme="dark"] .quick-action, html[data-theme="dark"] .pagination button, html[data-theme="dark"] .modal-close, html[data-theme="dark"] .action-menu button { background: #292929; color: var(--text); }
html[data-theme="dark"] .secondary-button:hover, html[data-theme="dark"] .quick-action:hover { background: #333; }
html[data-theme="dark"] .kpi-strip article, html[data-theme="dark"] .breakdown-list > div, html[data-theme="dark"] .resource-row, html[data-theme="dark"] .task-row, html[data-theme="dark"] .data-table td, html[data-theme="dark"] .rank-row, html[data-theme="dark"] .planning-actions { border-color: var(--line); }
html[data-theme="dark"] .kpi-delta.muted, html[data-theme="dark"] .product-thumb, html[data-theme="dark"] .status, html[data-theme="dark"] .tag { background: #303030; color: var(--muted); }
html[data-theme="dark"] .kpi-delta.up, html[data-theme="dark"] .status.success, html[data-theme="dark"] .status.customer, html[data-theme="dark"] .status.completed, html[data-theme="dark"] .status.paid { color: #7be0b8; }
html[data-theme="dark"] .chart-grid-line { stroke: var(--line); }
html[data-theme="dark"] .chart-dot { fill: var(--surface); }
html[data-theme="dark"] .chart-label, html[data-theme="dark"] .chart-y-label { fill: var(--muted); }
html[data-theme="dark"] .data-table th, html[data-theme="dark"] .support-section { background: var(--surface-subdued); }
html[data-theme="dark"] .data-table tbody tr:hover { background: #272727; }
html[data-theme="dark"] .planning-card, html[data-theme="dark"] .instructions-index, html[data-theme="dark"] .instructions-document, html[data-theme="dark"] .modal-panel, html[data-theme="dark"] .form-actions, html[data-theme="dark"] .toast { background: var(--surface); }
html[data-theme="dark"] .form-field > span { color: var(--muted); }
html[data-theme="dark"] .account-menu a:hover, html[data-theme="dark"] .account-menu > button:hover { background: #303030; }
.overview-grid { display: grid; gap: 16px; margin-top: 16px; }
.overview-grid.two-up { grid-template-columns: repeat(2, minmax(0,1fr)); }
.overview-grid > .overview-card, .quick-start { padding: 18px; }
.card-header { margin-bottom: 13px; }
.card-header a { color: var(--accent); text-decoration: none; font-size: 11px; }
.resource-list, .task-list { display: grid; }
.resource-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 52px; padding: 7px 0; border-top: 1px solid #eee; transition: background var(--transition); }
.resource-row:hover { background: var(--surface-subdued); }
.resource-row:first-child { border-top: 0; }
.resource-row strong, .resource-row small { display: block; }
.resource-row strong { font-size: 12px; }
.resource-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.resource-row b { font-size: 11px; font-weight: 600; white-space: nowrap; }
.product-thumb, .alert-icon, .activity-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 7px; background: #f1f1f1; color: #4d4d4d; font-size: 11px; font-weight: 700; }
.alert-icon { background: var(--warning-soft); color: var(--warning); }
.activity-icon { background: var(--accent-soft); color: var(--accent); }
.task-row { width: 100%; display: grid; grid-template-columns: 17px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 0; border: 0; border-top: 1px solid #eee; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.task-row:first-child { border-top: 0; }
.task-check { width: 16px; height: 16px; border: 1px solid #aaa; border-radius: 4px; }
.task-row strong, .task-row small { display: block; }
.task-row strong { font-size: 12px; }
.task-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.card-action { width: 100%; margin-top: 8px; padding: 9px; border: 0; border-top: 1px solid var(--line); background: transparent; color: var(--accent); text-align: left; font-size: 11px; font-weight: 600; cursor: pointer; }
.compact-empty { min-height: 100px; display: grid; place-content: center; padding: 20px; color: var(--muted); text-align: center; font-size: 11px; }
.success-empty { color: var(--success); }
.quick-start { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 16px; }
.quick-start h2 { margin: 0; font-size: 14px; }
.quick-start p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.quick-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.quick-action { min-height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--text); font-size: 11px; cursor: pointer; }
.quick-action:hover { background: #f7f7f7; }
.quick-action span { color: var(--accent); font-weight: 700; }
.content > * { animation: salesEnter 260ms var(--ease) both; }
.content > *:nth-child(2) { animation-delay: 30ms; }
.content > *:nth-child(3) { animation-delay: 55ms; }
@keyframes salesEnter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes popoverIn { from { opacity: 0; transform: translateY(-4px) scale(.99); } to { opacity: 1; transform: none; } }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.summary-strip { display: grid; grid-template-columns: repeat(4,1fr); margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.summary-strip article { padding: 17px; border-right: 1px solid var(--line); }
.summary-strip article:last-child { border: 0; }
.summary-strip span { display: block; color: var(--muted); font-size: 10px; }
.summary-strip strong { display: block; margin-top: 7px; font-size: 20px; }
.resource-section { padding: 18px; margin-top: 16px; }
.resource-section > .card-header { margin-bottom: 14px; }
.resource-toolbar, .toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.search-input { min-width: 250px; flex: 1; min-height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; }
.toolbar .text-button { margin-left: auto; }
.data-card { overflow: hidden; box-shadow: var(--shadow); }
.resource-section .data-card { box-shadow: none; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table tbody tr { transition: background var(--transition); }
.data-table th { padding: 11px 13px; border-bottom: 1px solid var(--line); background: #f7f7f7; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .04em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 12px 13px; border-bottom: 1px solid #eee; font-size: 11px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafafa; }
.openable-record { cursor: pointer; }
.openable-record:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mobile-data-card.openable-record:hover { border-color: var(--accent); }
html[data-theme="dark"] .data-table tbody tr.openable-record:hover { background: var(--surface-subdued); }
.data-table .right { text-align: right; }
.cell-main { display: grid; gap: 2px; }
.cell-main strong { font-size: 12px; }
.cell-main small, .cell-note { color: var(--muted); font-size: 9px; }
.product-list-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.product-list-identity > .cell-main, .product-list-identity > div { min-width: 0; }
.product-list-thumb { position: relative; flex: 0 0 42px; width: 42px; height: 42px; padding: 0; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-subdued); color: var(--muted); cursor: pointer; }
.product-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-list-thumb span { position: absolute; right: 2px; bottom: 2px; padding: 1px 3px; border-radius: 3px; background: rgba(0,0,0,.7); color: #fff; font-size: 8px; }
.product-list-thumb.empty { cursor: default; font-size: 18px; }
.product-photo-hint { margin: 0 0 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.product-photo-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(105px,1fr)); gap: 10px; margin-bottom: 12px; }
.product-photo-item { position: relative; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subdued); }
.product-photo-item img { width: 100%; height: 100%; object-fit: cover; }
.product-photo-item > button { position: absolute; top: 5px; right: 5px; width: 27px; height: 27px; border: 0; border-radius: 5px; background: rgba(22,22,22,.84); color: white; font-size: 19px; line-height: 1; cursor: pointer; }
.product-photo-cover, .product-photo-pending { position: absolute; bottom: 5px; left: 5px; padding: 3px 6px; border-radius: 4px; background: rgba(22,22,22,.8); color: white; font-size: 9px; }
.product-photo-upload { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border: 1px dashed var(--line-strong); border-radius: 7px; background: var(--surface-subdued); color: var(--accent); font-size: 11px; font-weight: 600; cursor: pointer; }
.product-photo-upload:focus-within { outline: 2px solid var(--accent); }
.product-photo-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.product-gallery-main { display: block; width: 100%; height: min(48vh,420px); border-radius: 8px; background: var(--surface-subdued); object-fit: contain; }
.product-gallery-thumbs { display: flex; gap: 9px; overflow-x: auto; padding: 12px 0; }
.product-gallery-thumbs button { flex: 0 0 66px; width: 66px; height: 66px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 6px; background: var(--surface-subdued); cursor: pointer; }
.product-gallery-thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.product-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.cell-note { display: block; margin-top: 4px; }
.row-actions { white-space: nowrap; }
.row-action { padding: 5px 6px; border: 0; border-radius: 5px; background: transparent; color: var(--accent); font-size: 10px; cursor: pointer; }
.row-action:hover { background: var(--accent-soft); }
.money { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.positive { color: var(--success) !important; }
.negative, .danger-text { color: var(--danger) !important; }
.status { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 7px; border-radius: 12px; background: #eee; color: #545454; font-size: 9px; font-weight: 600; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.success, .status.customer, .status.completed, .status.paid { background: var(--success-soft); color: #26752d; }
.status.warning, .status.follow-up, .status.interested, .status.pending, .status.partially-paid, .status.normal, .status.high { background: var(--warning-soft); color: var(--warning); }
.status.danger, .status.rejected, .status.overdue, .status.critical, .status.refunded { background: var(--danger-soft); color: var(--danger); }
.status.low { background: #f1f1f1; color: #616161; }
.tag { display: inline-block; margin: 2px; padding: 3px 6px; border-radius: 10px; background: #eee; color: #555; font-size: 8px; }
.table-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.pagination { display: flex; align-items: center; gap: 7px; }
.pagination button { width: 29px; height: 27px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; cursor: pointer; }
.pagination button:disabled { opacity: .4; cursor: default; }
.mobile-card-list { display: none; }
.table-skeleton { min-height: 340px; }
.dashboard-skeleton { min-height: 330px; margin-top: 16px; }
.skeleton { position: relative; overflow: hidden; background: #ececec !important; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); animation: shimmer 1.25s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.empty-state { min-height: 280px; display: grid; place-content: center; justify-items: center; padding: 35px; text-align: center; }
.empty-state i { color: var(--accent); font-size: 28px; font-style: normal; }
.empty-state h3 { margin: 12px 0 5px; font-size: 16px; }
.empty-state p { max-width: 390px; margin: 0 0 16px; color: var(--muted); font-size: 11px; }
.error-state { padding: 20px; border: 1px solid #f3b4a7; border-radius: var(--radius); background: var(--danger-soft); }
.error-state strong { color: var(--danger); }
.error-state p { color: var(--text); font-size: 11px; }

.business-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(330px,.75fr); gap: 16px; }
.detail-panel { position: sticky; top: 128px; max-height: calc(100vh - 150px); overflow: auto; padding: 18px; }
.detail-hero { padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.detail-hero h3 { margin: 7px 0 4px; font-size: 22px; }
.detail-meta { color: var(--muted); font-size: 11px; }
.contact-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; margin: 14px 0; }
.contact-link { padding: 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); text-decoration: none; font-size: 10px; overflow: hidden; text-overflow: ellipsis; }
.contact-link:hover { border-color: var(--accent); color: var(--accent); }
.product-stats { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.product-stats div { display: grid; gap: 2px; }
.product-stats span { color: var(--muted); font-size: 9px; }
.product-stats strong { font-size: 12px; }
.timeline { position: relative; margin-top: 16px; }
.timeline::before { content: ""; position: absolute; top: 5px; bottom: 5px; left: 5px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 17px 22px; }
.timeline-item::before { content: ""; position: absolute; top: 4px; left: 1px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.timeline-item small { color: var(--muted); font-size: 9px; }
.timeline-item strong { display: block; margin: 3px 0; font-size: 11px; }
.timeline-item p { margin: 0; color: var(--muted); font-size: 10px; }
.session-card { display: grid; grid-template-columns: minmax(180px,1.2fr) repeat(5,minmax(80px,.7fr)) auto; align-items: center; gap: 12px; margin-bottom: 8px; padding: 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.session-time, .session-metric { display: grid; gap: 3px; }
.session-time strong { font-size: 12px; }
.session-time small, .session-metric span { color: var(--muted); font-size: 9px; }
.session-metric strong { font-size: 11px; }
.session-live { border-color: var(--line); box-shadow: none; }
.panel { padding: 18px; }
.panel-head { margin-bottom: 14px; }
.analytics-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; }
.stat-card { min-height: 120px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stat-card small { color: var(--muted); font-size: 10px; }
.stat-card strong { display: block; margin-top: 13px; font-size: 22px; }
.metric-meta { margin-top: 7px; color: var(--muted); font-size: 9px; }
.ranking { display: grid; }
.rank-row { display: grid; grid-template-columns: minmax(110px,1fr) 1.5fr repeat(3,minmax(55px,.45fr)); align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid #eee; font-size: 10px; }
.rank-row.head { border: 0; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.rank-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { height: 5px; border-radius: 3px; background: #e7e7e7; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--accent); }

.planning-grid { display: grid; grid-template-columns: repeat(4,minmax(220px,1fr)); gap: 12px; align-items: start; }
.planning-column { min-height: 250px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #ededed; }
.planning-column-head { display: flex; align-items: center; justify-content: space-between; padding: 3px 3px 10px; }
.planning-column-head h2 { margin: 0; font-size: 12px; }
.planning-column-head span { min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 11px; background: #dadada; font-size: 9px; }
.planning-card { margin-bottom: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.planning-card h3 { margin: 9px 0 3px; font-size: 12px; }
.planning-card p { margin: 0; color: var(--muted); font-size: 10px; }
.planning-card small { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }
.planning-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px solid #eee; }
.planning-skeleton { min-height: 270px; }

.instructions-layout { display: grid; grid-template-columns: 230px minmax(0,760px); gap: 24px; align-items: start; }
.instructions-index { position: sticky; top: 128px; display: grid; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.instructions-index > strong { margin-bottom: 8px; font-size: 11px; }
.instructions-index > a { padding: 7px 0; color: var(--muted); text-decoration: none; font-size: 10px; }
.instructions-index > a:hover { color: var(--accent); }
.access-note { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.access-note > span { width: 8px; height: 8px; flex: none; margin-top: 4px; border-radius: 50%; background: var(--success); }
.access-note strong { font-size: 10px; }
.access-note p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.instructions-document { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.document-hero { padding: 30px; background: #1f2123; color: #fff; }
.document-hero span { color: #aeb4b9; font-size: 9px; font-weight: 700; letter-spacing: .1em; }
.document-hero h2 { margin: 9px 0 5px; font-size: 28px; }
.document-hero p { max-width: 580px; margin: 0; color: #c6c8ca; font-size: 12px; }
.instructions-document > section { display: grid; grid-template-columns: 42px 1fr; gap: 13px; padding: 22px 28px; border-top: 1px solid var(--line); }
.step-number { color: var(--accent); font-size: 11px; font-weight: 700; }
.instructions-document h3 { margin: 0 0 5px; font-size: 14px; }
.instructions-document p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.support-section { background: #f8f8f8; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: flex-end; background: rgba(30,30,30,.48); animation: fadeIn 160ms var(--ease); }
.modal-panel { width: min(600px,100%); height: 100%; overflow: auto; border-left: 1px solid var(--line); background: #fff; box-shadow: -18px 0 48px rgba(0,0,0,.18); animation: slideIn 210ms var(--ease); }
.modal-panel.wide { width: min(820px,100%); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideIn { from { transform: translateX(35px); } }
.modal-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 20px 23px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.modal-head h2 { margin: 4px 0 0; font-size: 21px; }
.modal-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text); font-size: 20px; cursor: pointer; }
.modal-body { padding: 23px; }
.record-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 20px; margin: 0; }
.record-detail-grid > div { min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.record-detail-grid dt, .record-detail-totals dt { color: var(--muted); font-size: 10px; }
.record-detail-grid dd, .record-detail-totals dd { margin: 5px 0 0; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.record-detail-note { margin-top: 22px; }
.record-detail-note h3 { margin: 0 0 8px; font-size: 12px; }
.record-detail-note p { margin: 0; color: var(--text); font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.record-detail-meta { margin-top: 18px; color: var(--muted); font-size: 10px; }
.record-detail-items > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 4px 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.record-detail-items strong { font-size: 11px; overflow-wrap: anywhere; }
.record-detail-items span { grid-column: 1; color: var(--muted); }
.record-detail-items b { grid-column: 2; grid-row: 1 / 3; align-self: center; white-space: nowrap; }
.record-detail-totals { margin: 16px 0 0; }
.record-detail-totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; }
.record-detail-totals dd { margin: 0; }
.record-detail-totals .grand-total { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.record-detail-totals .grand-total dt, .record-detail-totals .grand-total dd { color: var(--text); font-size: 14px; font-weight: 700; }
.record-recap .form-actions { flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.form-field { display: grid; gap: 6px; }
.form-field.full { grid-column: 1/-1; }
.form-field > span { color: #4b4b4b; font-size: 10px; font-weight: 600; }
.form-field input, .form-field select, .form-field textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--text); }
.form-field input, .form-field select { height: 40px; padding: 0 10px; }
.form-field textarea { min-height: 90px; padding: 10px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus, .search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); outline: 0; }
.form-field small { color: var(--muted); font-size: 9px; }
.form-check { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.form-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-section { grid-column: 1/-1; margin-top: 3px; padding-top: 15px; border-top: 1px solid var(--line); }
.form-section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.form-section-title strong { font-size: 11px; }
.inline-fields { display: grid; grid-template-columns: 1.4fr .5fr .7fr .6fr auto; gap: 7px; align-items: end; margin-bottom: 7px; }
.remove-line { width: 38px; height: 40px; border: 1px solid #efb1a5; border-radius: 7px; background: var(--danger-soft); color: var(--danger); cursor: pointer; }
.form-actions { position: sticky; bottom: 0; grid-column: 1/-1; display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; padding: 16px 0 0; border-top: 1px solid var(--line); background: #fff; }
.form-error { grid-column: 1/-1; padding: 10px; border: 1px solid #f3b4a7; border-radius: 7px; background: var(--danger-soft); color: var(--danger); font-size: 10px; }
.confirm-copy { color: var(--muted); font-size: 12px; }
.action-menu { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.action-menu button { min-height: 78px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); text-align: left; cursor: pointer; }
.action-menu button:hover { border-color: var(--accent); background: var(--accent-soft); }
.action-menu strong, .action-menu small { display: block; }
.action-menu small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.toast-root { position: fixed; z-index: 150; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { min-width: 250px; max-width: 360px; padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--success); border-radius: 7px; background: #fff; box-shadow: 0 8px 30px rgba(0,0,0,.18); font-size: 11px; animation: toastIn 220ms var(--ease); }
.toast.error { border-left-color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.mobile-card-list, .mobile-fab, .mobile-only, .nav-scrim { display: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
