:root {
  color-scheme: light;
  --ink: #292c31;
  --ink-muted: #858991;
  --green: #4a4e55;
  --green-strong: #fff;
  --lime: #e5e6e8;
  --paper: #f8f8f9;
  --white: #fff;
  --line: #ebeced;
  --muted-bg: #f5f5f6;
  --peach: #f4d5c6;
  --blue: #ddeaf0;
  --font-body: "DM Sans", sans-serif;
  --font-display: "Manrope", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font-body); font-size: 13px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-shell { min-height: 100vh; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; flex-direction: column; width: 238px; min-height: 0; padding: 29px 18px 17px; overflow-y: auto; overscroll-behavior: contain; background: #fff; border-right: 1px solid #e8e9eb; scrollbar-width: thin; scrollbar-color: #cfd1d5 transparent; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { border-radius: 6px; background: #cfd1d5; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 9px; color: var(--ink); text-decoration: none; }
.sidebar-user { display: flex; min-width: 0; align-items: center; gap: 10px; margin: 20px 4px 25px; padding: 10px; border: 1px solid #ececef; border-radius: 11px; background: #f8f8f9; }
.sidebar-user[hidden] { display: none; }
.sidebar-user-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: #e9e8f1; color: #62528b; font-size: 14px; font-weight: 800; }
.sidebar-user-copy { display: grid; min-width: 0; gap: 2px; }
.sidebar-user-copy small { color: #898d95; font-size: 9px; }
.sidebar-user-copy strong { overflow: hidden; color: #292c31; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
:root[data-theme="dark"] .sidebar-user { border-color: #303237; background: #191a1d; }
:root[data-theme="dark"] .sidebar-user-copy strong { color: #e6e7ea; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: #f0f1f2; color: #34383e; }
.brand-mark svg { width: 25px; height: 25px; }
.brand-name { font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -1.1px; }
.brand-name > span { color: #747982; }
.workspace-label { margin: 45px 0 13px 10px; color: #a0a3aa; font-size: 9px; font-weight: 700; letter-spacing: 1.25px; }
.primary-nav { display: grid; gap: 5px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 13px; width: 100%; height: 42px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: #70747b; text-align: left; font-size: 12px; font-weight: 500; cursor: pointer; transition: background .18s, color .18s; }
.nav-link:hover { background: #f1f1f2; color: var(--ink); }
.nav-link.active { border: 1px solid #e1e2e5; background: #fff; color: #292c31; font-weight: 700; }
.nav-icon { display: grid; place-items: center; width: 19px; height: 19px; }
.nav-icon svg { width: 18px; height: 18px; }
.nav-count { margin-left: auto; display: grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border-radius: 6px; background: #fff; color: #6f737a; font-size: 10px; }
.sidebar-bottom { margin-top: auto; }
.sidebar-settings-link { height: 54px; margin-top: 10px; padding-top: 12px; border-top: 1px solid #e4e5e8; border-radius: 0; }

.main-content { min-height: 100vh; margin-left: 238px; }
.topbar { position: sticky; top: 0; z-index: 4; display: flex; height: 64px; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid #ebeced; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); }
.topbar-actions { display: flex; align-items: center; gap: 15px; margin-left: auto; }
.today-label { margin-right: 3px; color: #898d95; font-size: 11px; }
.icon-button, .mobile-menu-button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid #e9eaed; border-radius: 8px; background: #fff; color: #747982; cursor: pointer; transition: background .15s, color .15s; }
.icon-button:hover { background: #f1f1f2; color: var(--green); }
.icon-button svg { width: 17px; height: 17px; }
.button { display: inline-flex; height: 36px; align-items: center; justify-content: center; gap: 8px; padding: 0 13px; border: 1px solid transparent; border-radius: 7px; font-size: 11px; font-weight: 600; cursor: pointer; transition: background .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button-dark { border-color: #dedfe2; background: #fff; color: #292c31; box-shadow: 0 2px 3px #10111412; }
.button-dark:hover { background: #f1f1f2; }
.button-light { border-color: #e8e9eb; background: #fff; color: #656970; }
.button-light:hover { background: #f5f5f6; }
.plus { color: #666b73; font-size: 18px; font-weight: 400; line-height: 0; }
.mobile-menu-button { display: none; }
.page-content { width: min(1120px, 100%); margin: 0 auto; padding: 34px 42px 25px; }
.dashboard-toolbar { display: flex; justify-content: flex-end; margin-bottom: 23px; }
.eyebrow { display: flex; align-items: center; gap: 7px; color: #777c84; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #858991; box-shadow: 0 0 0 3px #85899122; }
h1, h2, p { margin-top: 0; }
.reporting-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.period-select-wrap { position: relative; z-index: 1; display: flex; height: 35px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #e7e8eb; border-radius: 7px; background: white; color: #747982; }
.period-select-wrap.is-open { z-index: 10; }
.calendar-icon { display: flex; color: #777c84; }
.calendar-icon svg { width: 15px; height: 15px; }
.period-trigger { display: flex; width: 105px; height: 100%; align-items: center; justify-content: space-between; padding: 0; border: 0; outline: 0; background: transparent; color: #50545b; font-size: 10px; font-weight: 600; text-align: left; cursor: pointer; }
.period-trigger:focus-visible { outline: 2px solid #a5a8ae; outline-offset: 2px; border-radius: 4px; }
.select-chevron { color: #9a9da4; font-size: 13px; line-height: 10px; }
.period-trigger[aria-expanded="true"] .select-chevron { transform: rotate(180deg); }
.period-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 8; display: grid; width: 100%; min-width: 156px; gap: 2px; padding: 5px; border: 1px solid #e3e4e6; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px #15171b1c; }
.period-menu[hidden] { display: none; }
.period-option { display: flex; height: 32px; align-items: center; gap: 12px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: #50545b; font-size: 10px; text-align: left; cursor: pointer; }
.period-option:hover, .period-option:focus-visible { outline: 0; background: #f1f1f2; }
.period-option[aria-selected="true"] { background: #ececef; color: #292c31; font-weight: 600; }
.period-option[aria-selected="true"]::after { margin-left: auto; color: #656970; content: "✓"; }
.custom-date-range { display: flex; align-items: center; gap: 6px; color: #858991; font-size: 9px; }
.custom-date-range[hidden], .range-error[hidden] { display: none; }
.custom-date-range input { width: 119px; height: 30px; padding: 0 7px; border: 1px solid #e7e8eb; border-radius: 6px; background: #fff; color: #555a63; font-size: 9px; }
.custom-date-range input:focus { border-color: #a5a8ae; outline: 2px solid #a5a8ae22; }
.range-error { max-width: 270px; color: #ad604b; font-size: 9px; text-align: right; }

.metrics-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.metrics-grid.sales-view { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metrics-grid.expense-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-card { position: relative; overflow: hidden; min-height: 128px; padding: 17px 17px 14px; border: 1px solid #ececef; border-radius: 10px; background: #fff; box-shadow: 0 2px 5px #10111410; }
.metric-card[data-dashboard-page] { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.metric-card[data-dashboard-page]:hover { border-color: #d7d9dd; box-shadow: 0 5px 12px #10111418; }
.metric-card[data-dashboard-page]:focus-visible { outline: 2px solid #a5a8ae; outline-offset: 3px; }
.sales-card { background: #fff; border-color: #ececee; }
.profit-card { background: #fff; border-color: #ececee; color: var(--ink); }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-label { color: #798087; font-size: 10px; font-weight: 500; }
.profit-card .metric-label { color: #798087; }
.metric-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; }
.metric-icon svg { width: 15px; height: 15px; }
.metric-icon-green { background: #f0f1f2; color: #626770; }
.metric-icon-lime { background: #e8e9eb; color: #626770; }
.metric-icon-peach { background: #f9ece5; color: #b7876e; }
.metric-icon-blue { background: #edf3f4; color: #718998; }
.metric-card.item-count-card { z-index: 1; overflow: visible; }
.metric-card.item-count-card.menu-open { z-index: 10; }
.item-filter-dropdown { position: relative; z-index: 1; flex: 0 1 auto; }
.item-filter-dropdown.is-open { z-index: 10; }
.item-filter-trigger { width: 82px; height: 26px; gap: 4px; padding: 0 4px; border: 1px solid #e1e2e5; border-radius: 5px; background: #fff; font-size: 8px; }
.item-filter-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-filter-trigger .select-chevron { flex: 0 0 auto; font-size: 11px; }
.item-filter-dropdown .period-menu { right: 0; left: auto; width: 180px; max-width: calc(100vw - 32px); max-height: 220px; overflow-y: auto; }
.item-filter-dropdown .period-option { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.metric-value { position: relative; z-index: 1; margin: 13px 0 8px; font-family: var(--font-display); font-size: 24px; font-weight: 700; letter-spacing: -1.1px; }
.metric-foot { display: flex; align-items: center; gap: 6px; color: #858991; font-size: 9px; }
.profit-card .metric-foot { color: #858991; }
.metric-foot-dot { width: 5px; height: 5px; border-radius: 50%; }
.green-dot { background: #858991; }.light-dot { background: #a5a8ae; }.peach-dot { background: #d7a68b; }.blue-dot { background: #9ab6c2; }
.card-decoration { position: absolute; right: 12px; bottom: -19px; color: #777c840d; font-family: var(--font-display); font-size: 91px; font-weight: 500; line-height: 1; transform: rotate(-12deg); }
.profit-decoration { right: 7px; bottom: -8px; color: #ffffff0c; font-size: 67px; transform: none; }

.insights-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 15px; }
.insights-grid[hidden], .filter-button[hidden] { display: none; }
.panel { border: 1px solid #ececef; border-radius: 10px; background: #fff; box-shadow: 0 2px 5px #10111409; }
.chart-panel { min-height: 276px; padding: 18px 19px 13px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; }
.panel-header h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: -.2px; }
.panel-header p { margin: 0; color: #9a9da4; font-size: 9px; }
.chart-legend { display: flex; gap: 13px; padding-top: 2px; color: #7e828a; font-size: 9px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.income-legend { background: #4f9b71; }.expense-legend { background: #d65f5f; }
.chart-summary { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; }
.chart-summary strong { font-family: var(--font-display); font-size: 17px; letter-spacing: -.6px; }
.chart-summary span { color: #929b93; font-size: 9px; }
.chart-container { position: relative; height: 157px; margin-top: 3px; }
.chart-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-gridline { stroke: #edf0f2; stroke-width: 1; stroke-dasharray: 3 4; }
.chart-bar-income { fill: #4f9b71; }
.chart-bar-expense { fill: #d65f5f; }
.chart-label { fill: #989ba2; font-family: var(--font-body); font-size: 9px; }
.chart-empty { display: grid; height: 100%; place-items: center; color: #9ba0a7; font-size: 10px; }
.text-link { padding: 0; border: 0; background: none; color: #454950; font-size: 9px; font-weight: 600; cursor: pointer; }
.text-link span { display: inline-block; margin-left: 3px; transition: transform .15s; }
.text-link:hover span { transform: translateX(3px); }

.transactions-panel { margin-top: 15px; overflow: hidden; }
.transactions-header { align-items: center; padding: 17px 19px 13px; }
.table-actions { display: flex; gap: 8px; }
.search-box { display: flex; width: 163px; height: 30px; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid #e9eaed; border-radius: 6px; color: #9a9da4; }
.search-box svg { width: 14px; height: 14px; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 9px; }
.search-box input::placeholder { color: #a1a4ab; }
.filter-button { display: flex; height: 30px; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid #e9eaed; border-radius: 6px; background: #fff; color: #72767e; font-size: 9px; cursor: pointer; }
.filter-button svg { width: 13px; height: 13px; }
.filter-button.active-filter { border-color: #c6c8cc; background: #f3f3f4; color: #44484f; }
.table-wrap { min-height: 165px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #fafafa; }
th { height: 31px; border-top: 1px solid #f0f1f3; border-bottom: 1px solid #f0f1f3; color: #9a9da4; font-size: 8px; font-weight: 600; letter-spacing: .55px; }
th:first-child, td:first-child { padding-left: 19px; }
th:last-child, td:last-child { padding-right: 16px; }
td { height: 51px; border-bottom: 1px solid #f0f1f3; color: #7a7f87; font-size: 10px; white-space: nowrap; }
.entry-cell { display: flex; align-items: center; gap: 9px; color: #4a4e55; font-weight: 600; }
.entry-icon { display: grid; width: 29px; height: 29px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: #f0f1f2; color: #666b73; font-size: 14px; }
.entry-icon.type-expense { background: #fcf0ea; color: #bd896d; }
.entry-icon.type-income { background: #edf3f4; color: #77929b; }
.entry-details { display: grid; gap: 3px; }
.entry-details small { color: #a1a4ab; font-size: 8px; font-weight: 400; }
.date-cell { color: #898d95; }
.category-pill { display: inline-block; padding: 5px 8px; border-radius: 5px; background: #f5f5f6; color: #747982; font-size: 8px; }
.amount-cell { color: #4a4e55; font-family: var(--font-display); font-size: 10px; font-weight: 700; text-align: right; }
.amount-cell.negative { color: #b67d65; }
.row-delete { display: grid; width: 25px; height: 25px; place-items: center; border: 0; border-radius: 5px; background: transparent; color: #a6a8ae; font-size: 15px; opacity: 0; cursor: pointer; transition: opacity .15s, background .15s; }
tr:hover .row-delete, .row-delete:focus { opacity: 1; }
.row-delete:hover { background: #f8ece6; color: #a75f46; }
.row-actions { display: flex; justify-content: flex-end; gap: 4px; opacity: 0; transition: opacity .15s; }
tr:hover .row-actions, tr:focus-within .row-actions { opacity: 1; }
.row-action-button { display: grid; width: 26px; height: 26px; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #858991; cursor: pointer; transition: background .15s, color .15s; }
.row-action-button svg { width: 14px; height: 14px; }
.row-action-button:hover, .row-action-button:focus-visible { background: #f0f1f2; color: #454950; }
.row-action-delete:hover, .row-action-delete:focus-visible { background: #f8ece6; color: #a75f46; }
.context-menu { position: fixed; z-index: 20; width: 150px; padding: 5px; border: 1px solid #e8e9eb; border-radius: 8px; background: #fff; box-shadow: 0 8px 26px #10111426; }
.context-menu[hidden] { display: none; }
.context-menu button { display: flex; width: 100%; height: 34px; align-items: center; gap: 9px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; color: #555a63; font-size: 10px; text-align: left; cursor: pointer; }
.context-menu button:hover, .context-menu button:focus-visible { outline: 0; background: #f1f1f2; }
.context-menu button svg { width: 14px; height: 14px; color: #7d8189; }
.context-menu .context-delete { color: #a75f46; }
.context-menu .context-delete svg { color: #b27860; }
.amount-heading { text-align: right; }
.empty-state { display: grid; min-height: 192px; align-content: center; justify-items: center; padding: 22px; text-align: center; }
.empty-icon { display: grid; width: 34px; height: 34px; margin-bottom: 9px; place-items: center; border-radius: 10px; background: #f0f1f2; color: #777c84; font-size: 17px; }
.empty-state strong { color: #454950; font-family: var(--font-display); font-size: 12px; }
.empty-state p { margin: 5px 0 13px; color: #92969d; font-size: 10px; }
.empty-state .button { height: 32px; }
.table-footer { display: flex; min-height: 39px; align-items: center; justify-content: space-between; padding: 0 19px; color: #a0a3aa; font-size: 9px; }
.page-footer { display: flex; justify-content: space-between; margin-top: 17px; color: #a0a3aa; font-size: 9px; }
.page-footer > span:last-child { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.page-footer i { width: 6px; height: 6px; border-radius: 50%; background: #858991; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

.settings-page { padding-bottom: 20px; }
.settings-page-heading { margin-bottom: 22px; }
.settings-page-heading h1 { margin: 8px 0 5px; font-family: var(--font-display); font-size: 26px; letter-spacing: -1px; }
.settings-page-heading p { margin: 0; color: #858991; font-size: 11px; }
.settings-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); align-items: start; gap: 16px; }
.settings-tabs { display: grid; gap: 4px; padding: 8px; border: 1px solid #e7e7e9; border-radius: 10px; background: #fff; box-shadow: 0 2px 5px #10111409; }
.settings-tab { display: flex; min-height: 38px; align-items: center; gap: 9px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: #73777f; text-align: left; font-size: 10px; font-weight: 500; cursor: pointer; }
.settings-tab:hover { background: #f1f1f2; color: var(--ink); }
.settings-tab.active { border: 1px solid #e1e2e5; background: #fff; color: #292c31; font-weight: 700; }
.settings-tab-icon { display: grid; width: 19px; height: 19px; place-items: center; color: #777c84; font-size: 15px; }
.settings-panels { min-width: 0; }
.settings-panel[hidden] { display: none; }
.settings-panel-heading { margin: 2px 0 13px; }
.settings-panel-heading h2 { margin: 0 0 4px; font-family: var(--font-display); font-size: 15px; letter-spacing: -.3px; }
.settings-panel-heading p { margin: 0; color: #898d95; font-size: 10px; }
.settings-card { padding: 18px; border: 1px solid #e7e7e9; border-radius: 10px; background: #fff; box-shadow: 0 2px 5px #10111409; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.setting-copy strong { color: #454950; font-size: 11px; font-weight: 600; }
.setting-copy p { margin: 5px 0 0; color: #8a8e95; font-size: 9px; line-height: 1.6; }
.settings-field { display: grid; gap: 7px; color: #5f646c; font-size: 9px; font-weight: 600; }
.settings-field-full { grid-column: 1 / -1; }
.settings-field input, .settings-field select, .settings-field textarea { width: 100%; min-width: 170px; min-height: 36px; padding: 8px 10px; border: 1px solid #e7e7e9; border-radius: 6px; outline: 0; background: #fff; color: #3f434a; font-size: 10px; font-weight: 400; }
.settings-field input:focus, .settings-field select:focus, .settings-field textarea:focus { border-color: #a5a8ae; box-shadow: 0 0 0 3px #a5a8ae22; }
.settings-field input::placeholder, .settings-field textarea::placeholder { color: #999ea6; }
.settings-field select { min-width: 125px; }
.settings-field textarea { min-height: 98px; resize: vertical; line-height: 1.5; }
.settings-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 13px; }
.settings-form-actions { display: flex; grid-column: 1 / -1; align-items: center; justify-content: flex-end; gap: 12px; padding-top: 13px; border-top: 1px solid #e7e7e9; }
.settings-save-status { margin-right: auto; color: #666b73; font-size: 9px; }
.account-status { display: flex; grid-column: 1 / -1; align-items: center; gap: 8px; padding: 11px 12px; border-radius: 7px; background: #f2f2f3; color: #656970; font-size: 10px; }
.account-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #a5a8ae; }
.account-status.linked .account-status-dot { background: #777c84; box-shadow: 0 0 0 3px #777c8422; }
.account-note { grid-column: 1 / -1; margin: -5px 0 0; color: #92969d; font-size: 9px; line-height: 1.55; }
.signout-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 13px; border-color: #f0e5df; }
.signout-card .setting-copy { max-width: 380px; }
.signout-card .button { flex: 0 0 auto; }
.settings-topbar > * { display: none; }

.products-page { padding-bottom: 20px; }
.products-page-heading { margin-bottom: 22px; }
.products-page-heading h1 { margin: 8px 0 5px; font-family: var(--font-display); font-size: 26px; letter-spacing: -1px; }
.products-page-heading p { margin: 0; color: #858991; font-size: 11px; }
.products-layout { display: grid; grid-template-columns: minmax(250px, .75fr) minmax(0, 1.25fr); align-items: start; gap: 16px; }
.product-form-card, .product-catalog-card { padding: 18px; }
.product-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; margin-top: 16px; }
.product-form .settings-field { grid-column: 1 / -1; }
.product-form-status { grid-column: 1 / -1; min-height: 13px; color: #656970; font-size: 9px; }
.product-form .button { grid-column: 1 / -1; justify-self: end; }
.product-count { color: #777c84; font-size: 9px; white-space: nowrap; }
.product-list { display: grid; margin-top: 14px; }
.product-row { display: grid; min-height: 76px; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 13px 0; border-top: 1px solid #e7e7e9; color: #454950; }
.product-row-icon { display: grid; width: 64px; height: 64px; place-items: center; border-radius: 9px; background: #f0f1f2; color: #666b73; font-size: 15px; }
.product-row-icon svg { width: 28px; height: 28px; }
.product-row-thumbnail { width: 64px; height: 64px; object-fit: cover; border: 1px solid #e1e2e5; border-radius: 9px; background: #f0f1f2; }
.product-image-editor { display: flex; min-height: 76px; align-items: center; gap: 12px; padding: 9px; border: 1px solid #e7e8eb; border-radius: 8px; background: #fff; }
.product-image-preview, .product-image-placeholder { width: 58px; height: 58px; flex: 0 0 auto; overflow: hidden; border: 1px solid #e7e8eb; border-radius: 7px; background: #f5f5f6; }
.product-image-preview[hidden], .product-image-placeholder[hidden] { display: none; }
.product-image-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.product-image-placeholder { display: grid; place-items: center; color: #a0a3aa; }
.product-image-placeholder svg { width: 24px; height: 24px; }
.product-image-actions { display: flex; align-items: center; gap: 10px; }
.product-image-upload { height: 32px; cursor: pointer; }
.product-image-remove { height: 32px; align-items: center; justify-content: center; padding: 0 13px; border: 1px solid #a55740; border-radius: 7px; background: #a55740; color: #fff; box-shadow: 0 2px 3px #8f493522; font-size: 11px; font-weight: 600; text-decoration: none; }
.product-image-remove:hover, .product-image-remove:focus-visible { background: #914833; color: #fff; }
.product-row-details { min-width: 0; }
.product-row-heading { display: flex; align-items: center; gap: 8px; }
.product-row-name { min-width: 0; overflow-wrap: anywhere; color: #454950; font-size: 11px; font-weight: 700; }
.product-type-badge { flex: 0 0 auto; padding: 3px 6px; border-radius: 5px; background: #f1f1f2; color: #777c84; font-size: 8px; font-weight: 600; }
.product-row-values { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 7px; color: #858991; font-size: 9px; }
.product-row-values strong { margin-left: 3px; color: #53575e; font-weight: 600; }
.product-variations { display: grid; gap: 6px; margin-top: 9px; color: #858991; font-size: 8px; }
.product-variation-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-left: 8px; border-left: 2px solid #e1e2e5; }
.product-variation-row strong { min-width: 65px; color: #555a63; font-size: 9px; }
.product-row-actions { display: flex; align-items: center; gap: 3px; padding-top: 1px; opacity: 0; transition: opacity .15s; }
.product-row:hover .product-row-actions, .product-row:focus-within .product-row-actions { opacity: 1; }
.product-icon-button { display: grid; width: 27px; height: 27px; place-items: center; border: 0; border-radius: 6px; background: transparent; color: #858991; cursor: pointer; }
.product-icon-button svg { width: 14px; height: 14px; }
.product-icon-button:hover, .product-icon-button:focus-visible { outline: 0; background: #f0f1f2; color: #454950; }
.product-icon-delete:hover, .product-icon-delete:focus-visible { background: #f8ece6; color: #a75f46; }
.customer-row { display: flex; min-height: 48px; align-items: flex-start; gap: 10px; padding: 10px 0; border-top: 1px solid #e7e7e9; color: #454950; }
.customer-row-icon { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 6px; background: #f0f1f2; color: #666b73; }
.customer-row-icon svg { width: 15px; height: 15px; }
.customer-row-details { min-width: 0; }
.customer-row-details strong { display: block; font-size: 10px; }
.customer-row-details p { margin: 4px 0 0; color: #858991; font-size: 9px; line-height: 1.5; white-space: pre-wrap; }
.customer-row-details { flex: 1; }
.customer-row-actions { flex: 0 0 auto; align-self: flex-start; }
.referral-count { align-self: center; color: #777c84; }
.category-delete { margin-left: 6px; border: 0; background: transparent; color: #a75f46; cursor: pointer; }
.finance-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.finance-box { min-height: 170px; padding: 18px; }
.finance-actions { display:flex; flex-wrap:wrap; gap:7px; margin-top:18px; }
.finance-values { display:grid; gap:8px; margin:12px 0; color:#858991; font-size:10px; }
.finance-values strong { float:right; color:#454950; }
.toggle-wrap { display:flex; align-items:center; }
.toggle-wrap input { position:absolute; opacity:0; }
.toggle-wrap span { position:relative; width:38px; height:22px; border-radius:20px; background:#dfe1e4; }
.toggle-wrap span::after { content:""; position:absolute; top:3px; left:3px; width:16px; height:16px; border-radius:50%; background:#fff; box-shadow:0 1px 3px #0002; transition:.15s; }
.toggle-wrap input:checked + span { background:#3f9a64; box-shadow:0 0 0 2px #3f9a6422; }
.toggle-wrap input:checked + span::after { transform:translateX(16px); }
.toggle-wrap input:focus-visible + span { outline:2px solid #337d4f;outline-offset:3px; }
.finance-presets { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:14px; }
.finance-presets button { height:38px; border:1px solid #e7e8eb; border-radius:7px; background:#fff; font-weight:700; cursor:pointer; }
.stock-metrics { grid-template-columns:repeat(4,1fr); margin-bottom:14px; }
.stock-ranking { display:grid; gap:8px; padding:12px 0; }
.stock-ranking-row { display:flex; justify-content:space-between; padding:8px 10px; border-radius:7px; background:#f5f5f6; }
.finance-chart-summary { display:grid; gap:4px; margin-top:12px; }
.customer-row:hover .customer-row-actions,
.customer-row:focus-within .customer-row-actions,
.customer-row:hover .product-row-actions,
.customer-row:focus-within .product-row-actions { opacity: 1; }
.vendor-row-actions { display:flex;align-items:center;gap:7px;opacity:0;transition:opacity .15s; }
.vendor-profile-row:hover .vendor-row-actions,.vendor-profile-row:focus-within .vendor-row-actions { opacity:1; }
.social-avatar { display:grid;place-items:center;font-weight:800;font-size:20px; }
.social-avatar.social-instagram,.social-instagram { color:#b64b78; }
.social-avatar.social-snapchat,.social-snapchat { color:#766300; }
.social-avatar.social-telegram,.social-telegram { color:#2385b6; }
.social-avatar.social-tatotalk,.social-tatotalk { color:#7454a4; }
.social-avatar.social-signal,.social-signal { color:#3479d3; }
.social-avatar.social-phone,.social-phone { color:#43856c; }
.social-type-label { display:block;color:var(--ink-muted);font-size:11px;margin-top:2px; }
.customer-social-field { display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px; }
.customer-social-field select { width:54px;min-width:54px;padding-left:5px; }
.orders-row-actions { display:flex;gap:4px;opacity:0;transition:opacity .15s; }
.customer-row:hover .orders-row-actions,.customer-row:focus-within .orders-row-actions { opacity:1; }
.front-toggle-field[hidden],.front-deadline-field[hidden] { display:none!important; }
.front-switch { display:flex;align-items:center;gap:8px;cursor:pointer; }
.front-switch input { position:absolute;opacity:0; }
.front-switch-track { width:38px;height:22px;border-radius:14px;background:#c8cbd0;position:relative;transition:background .15s; }
.front-switch-track:after { content:"";position:absolute;width:16px;height:16px;left:3px;top:3px;border-radius:50%;background:#fff;transition:transform .15s; }
.front-switch input:checked + .front-switch-track { background:#397b59; }
.front-switch input:checked + .front-switch-track:after { transform:translateX(16px); }
.front-alerts { margin:0 0 14px;padding:12px 14px;border:1px solid #d65050;background:#fff0f0;color:#822d2d;border-radius:12px; }
.front-alert { display:flex;align-items:center;gap:12px;flex-wrap:wrap; }
.front-alert span { flex:1; }
.sale-item-row select,.sale-items-list select { background-color:#fff;border-color:#d9dbe0;color:#282b31; }
.sale-product-choice { flex:1;min-width:140px; }
.sale-product-choice button { width:100%;min-height:38px;text-align:left; }
.sale-product-picker-modal .customer-picker-option { width:100%;margin:0 0 5px;text-align:left; }
.sale-products-box { border:1px solid #e4e5e8;border-radius:10px;background:#fafafa;padding:12px; }
.sale-products-heading { display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:8px; }
.sale-products-heading strong { font-size:13px; }
.sale-products-empty { margin:0;padding:15px 8px;text-align:center;color:var(--ink-muted);font-size:11px; }
.sale-item-row { display:flex;align-items:center;gap:10px;padding:9px 2px;border-top:1px solid #e7e8eb; }
.sale-quantity-stepper { display:flex;align-items:center;gap:5px;flex-shrink:0; }
.sale-quantity-stepper button { order:0;width:29px;height:30px;border:1px solid #dfe1e4;border-radius:7px;background:#fff;color:#353941;font-size:16px;cursor:pointer; }
.sale-quantity-stepper input { width:42px;height:30px;order:1;padding:0 3px;text-align:center;border:1px solid #dfe1e4;border-radius:7px;background:#fff;color:#30343a;font-size:11px; }
.sale-quantity-stepper button[data-qty-delta="1"] { order:2; }
.sale-order-total { display:flex;justify-content:space-between;align-items:center;border-top:1px solid #e1e3e6;padding:10px 2px 2px;font-size:12px; }
.sale-order-total strong { font-size:14px; }
.sale-product-preview { display:flex;align-items:center;gap:9px;min-width:0;flex:1; }
.sale-product-preview img,.sale-product-placeholder { width:38px;height:38px;object-fit:cover;border-radius:8px;background:#eceef0; }
.sale-product-placeholder { display:grid;place-items:center;font-weight:700;color:#666b72; }
.sale-product-preview-details { display:grid;gap:3px;min-width:0; }
.sale-product-preview-details strong { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px; }
.sale-product-preview-details small,.sale-product-option small { color:var(--ink-muted);font-size:10px; }
.sale-product-options { display:grid;gap:6px;max-height:50vh;overflow:auto;margin:14px 0; }
.sale-product-option { display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #e7e8eb;border-radius:9px;background:#fff;cursor:pointer; }
.sale-product-option:has(input:checked) { border-color:#777c84;background:#f3f4f5; }
.sale-product-option > span:last-child { display:grid;gap:4px; }
.sale-product-option-image,.sale-product-option-image img { width:38px;height:38px;border-radius:8px;object-fit:cover; }
.sale-product-option-image { display:grid;place-items:center;background:#eceef0;font-weight:700; }
:root[data-theme="dark"] .sale-products-box { background:#1b1c20;border-color:#35373e; }
:root[data-theme="dark"] .sale-item-row { border-color:#35373e; }
:root[data-theme="dark"] .sale-quantity-stepper button,:root[data-theme="dark"] .sale-quantity-stepper input { background:#202226;border-color:#404249;color:#e4e6ea; }
:root[data-theme="dark"] .sale-order-total { border-color:#35373e; }
:root[data-theme="dark"] .sale-product-placeholder,:root[data-theme="dark"] .sale-product-option-image { background:#303238;color:#e2e4e8; }
:root[data-theme="dark"] .sale-product-option { background:#202226;border-color:#383a41;color:#e4e6ea; }
:root[data-theme="dark"] .sale-product-option:has(input:checked) { background:#2b2d33;border-color:#777c84; }
.vendor-profile-avatar img { width:100%;height:100%;object-fit:cover; }
.vendor-profile-avatar > span { width:100%;height:100%;display:grid;place-items:center;font-size:20px;font-weight:800; }
.settings-field select,.field-label select,.customer-social-field select { appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23777c84' stroke-width='1.5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center;padding-right:26px; }
select option { background:#fff;color:#30343a; }
:root[data-theme="dark"] select option { background:#202226;color:#e4e6ea; }
:root[data-theme="dark"] .settings-field select,:root[data-theme="dark"] .field-label select,:root[data-theme="dark"] .customer-social-field select { background-color:#191a1d;color:#e4e6ea;border-color:#34363c; }
#app-shell[hidden],.account-gate[hidden] { display:none!important; }
.account-gate { min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 20% 15%,#eceef0,transparent 40%),var(--paper); }
.account-gate-card { width:min(440px,100%);padding:34px;border:1px solid #e5e6e9;border-radius:18px;background:#fff;box-shadow:0 24px 70px #11111412; }
.account-gate-mark { display:block;width:112px;height:112px;margin-bottom:22px;border-radius:14px;object-fit:cover;background:#000; }
.account-gate-card h1 { margin:6px 0 8px;font:800 25px var(--font-display);letter-spacing:-.8px; }
.account-gate-copy { margin:0 0 22px;color:var(--ink-muted);font-size:12px;line-height:1.6; }
.account-gate-tabs { display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-bottom:18px;padding:4px;border-radius:9px;background:#f1f2f3; }
.account-gate-tabs button { min-height:34px;border:0;border-radius:7px;background:transparent;color:#747982;font-size:11px;cursor:pointer; }
.account-gate-tabs button.active { background:#fff;color:#2d3035;font-weight:700;box-shadow:0 1px 3px #11111412; }
.account-gate-form { display:grid;gap:12px; }
.account-gate-form[hidden],.account-created-panel[hidden],.account-gate-tabs[hidden] { display:none!important; }
.account-gate-form .settings-field { display:grid;gap:6px;font-size:11px;font-weight:600; }
.account-gate-form .settings-field input { width:100%;height:42px;padding:0 12px;border:1px solid #e3e5e8;border-radius:8px;background:#fff;color:#30343a;font-size:12px; }
.account-gate-form .button,.account-created-panel #continue-to-app { width:100%;min-height:42px;justify-content:center;margin-top:3px; }
.account-gate-message { margin:0;color:#b43c3c;font-size:11px; }
.account-local-note { display:block;margin-top:21px;color:#92969d;font-size:10px;text-align:center; }
.account-created-panel { display:grid;gap:11px;text-align:center; }
.account-created-panel h2 { margin:0;font:700 17px var(--font-display); }
.account-created-panel p { margin:0;color:var(--ink-muted);font-size:11px;line-height:1.5; }
.account-number-copy-row { display:flex;align-items:stretch;gap:8px;min-width:0; }
.account-number-copy-row > strong { flex:1;min-width:0;overflow-wrap:anywhere;display:grid;align-items:center;padding:12px 8px;border:1px dashed #cfd2d7;border-radius:8px;font:700 19px ui-monospace,monospace;letter-spacing:.5px; }
.account-number-copy-row .button { width:auto;min-width:62px;flex:0 0 auto;margin:0; }
.account-copy-status { min-height:12px;color:var(--ink-muted);font-size:10px; }
.entry-modal-actions #sale-order-total-wrap { margin:0 auto 0 0;padding:0;border:0; }
:root[data-theme="dark"] .account-gate { background:radial-gradient(circle at 20% 15%,#24262b,transparent 40%),#141518; }
:root[data-theme="dark"] .account-gate-card { border-color:#36383e;background:#1c1d21;color:#e5e7eb; }
:root[data-theme="dark"] .account-gate-tabs { background:#131417; }
:root[data-theme="dark"] .toggle-wrap input:checked + span { background:#43a86d;box-shadow:0 0 0 2px #43a86d25; }
:root[data-theme="dark"] .toggle-wrap input:focus-visible + span { outline-color:#55bd80; }
:root[data-theme="dark"] .account-gate-tabs button.active { background:#292b30;color:#f0f1f3; }
:root[data-theme="dark"] .account-gate-form .settings-field input { border-color:#383a41;background:#151619;color:#e5e7eb; }
:root[data-theme="dark"] .account-number-copy-row > strong { border-color:#4b4e56; }
.delete-account-card { border-color:#edd6d2; }
@media(max-width:520px){.account-gate-card{padding:25px 20px}.account-number-copy-row > strong{font-size:clamp(11px,3.5vw,15px);letter-spacing:0}.delete-account-card { align-items:flex-start; }}
@media (max-width:640px){.vendor-row-actions,.orders-row-actions{opacity:1}.front-alert{align-items:flex-start;flex-direction:column}}
.product-list-empty { padding: 18px 0 8px; color: #898d95; font-size: 10px; }
.variation-editor { margin-top: 2px; padding-top: 14px; border-top: 1px solid #edf0f2; }
.variation-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.variation-editor-heading strong { color: #555a63; font-size: 10px; }
.variation-editor-heading p { margin: 4px 0 0; color: #92969d; font-size: 8px; }
.variation-editor-heading .button { height: 30px; flex: 0 0 auto; padding: 0 8px; font-size: 9px; }
.product-variation-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(95px, .7fr) minmax(95px, .7fr) 28px; align-items: end; gap: 8px; margin-top: 9px; padding: 10px; border: 1px solid #e7e7e9; border-radius: 7px; }
.product-variation-remove { display: grid; width: 28px; height: 36px; place-items: center; border: 1px solid #e7e7e9; border-radius: 6px; background: #fff; color: #8a8e95; font-size: 18px; cursor: pointer; }
.product-variation-remove:hover, .product-variation-remove:focus-visible { outline: 0; background: #f8ece6; color: #a75f46; }
.product-modal { width: min(610px, 100%); }
.product-category-menu { width: min(320px, 100%); max-height: 240px; overflow-y: auto; }
.sale-categories-card { margin-top: 16px; padding: 18px; }
.sale-category-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin: 15px 0 12px; }
.sale-category-form .product-form-status { grid-column: 1 / -1; }
.sale-category-form .button { grid-column: 2; grid-row: 1; }
.sale-category-list { display: flex; flex-wrap: wrap; gap: 7px; }
.sale-category-chip { padding: 6px 9px; border-radius: 6px; background: #f0f1f2; color: #555a63; font-size: 9px; }
.sale-category-empty { color: #898d95; font-size: 10px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: #15171bcc; backdrop-filter: blur(3px); }
.modal-backdrop[hidden] { display: none; }
.entry-modal { width: min(480px, 100%); max-height: min(780px, 94vh); overflow-y: auto; padding: 24px; border: 1px solid #e9eaed; border-radius: 14px; background: #fff; box-shadow: 0 25px 80px #10111450; animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.confirm-backdrop { position: fixed; inset: 0; z-index: 12; display: grid; place-items: center; padding: 20px; background: #15171bcc; backdrop-filter: blur(3px); }
.confirm-backdrop[hidden] { display: none; }
.confirm-dialog { width: min(390px, 100%); padding: 25px; border: 1px solid #e9eaed; border-radius: 14px; background: #fff; box-shadow: 0 25px 80px #10111450; animation: modal-in .18s ease-out; }
.confirm-icon { display: grid; width: 38px; height: 38px; margin-bottom: 15px; place-items: center; border-radius: 11px; background: #fbede6; color: #b27860; }
.confirm-icon svg { width: 19px; height: 19px; }
.confirm-dialog .eyebrow { font-size: 8px; }
.confirm-dialog h2 { margin: 6px 0 7px; color: #3f434a; font-family: var(--font-display); font-size: 19px; letter-spacing: -.5px; }
.confirm-dialog p { margin: 0; color: #858991; font-size: 11px; line-height: 1.65; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 21px; padding-top: 15px; border-top: 1px solid #edf0f2; }
.button-danger { border-color: #a55740; background: #a55740; color: #fff; box-shadow: 0 2px 3px #8f493522; }
.button-danger:hover { background: #914833; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 21px; }
.modal-heading h2 { margin: 5px 0 0; font-family: var(--font-display); font-size: 21px; letter-spacing: -.7px; }
.modal-heading .eyebrow { font-size: 8px; }
.close-button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #edf0f2; border-radius: 7px; background: #fff; color: #8a8e95; font-size: 21px; cursor: pointer; }
.type-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 19px; padding: 0; border: 0; }
.type-picker legend { margin-bottom: 9px; color: #69756c; font-size: 10px; font-weight: 600; }
.type-option { position: relative; display: flex; height: 56px; align-items: center; gap: 8px; padding: 0 9px; border: 1px solid #eaebee; border-radius: 8px; color: #777c84; font-size: 9px; cursor: pointer; }
.type-option.selected { border-color: #c4c6ca; background: #f0f1f2; color: #3f434a; font-weight: 600; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-option:focus-within { outline: 2px solid #a5a8ae; outline-offset: 2px; }
.type-option-icon { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 7px; background: #f0f1f2; color: #666b73; font-size: 13px; }
.expense-option-icon { background: #fbede6; color: #bc8569; }.income-option-icon { background: #edf0f2; color: #777c84; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 12px; }
.field-label { display: grid; gap: 6px; color: #656970; font-size: 9px; font-weight: 600; }
.field-full { grid-column: 1 / -1; }
.required-indicator { color: #b27860; font-weight: 700; }
#entry-description-field[hidden] { display: none; }
.sale-product-fields { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 12px; }
.sale-product-fields[hidden] { display: none; }
#sale-variation-field[hidden] { display: none; }
#sale-variation-field { grid-column: 1 / -1; }
.customer-picker-field[hidden] { display: none; }
.customer-picker { position: relative; }
.customer-picker-trigger { display: flex; width: 100%; height: 36px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px; border: 1px solid #e7e8eb; border-radius: 6px; background: #fff; color: #444950; font-size: 10px; text-align: left; cursor: pointer; }
.customer-picker-trigger:focus-visible { outline: 0; border-color: #a5a8ae; box-shadow: 0 0 0 3px #a5a8ae22; }
.customer-picker-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-picker-menu { position: absolute; top: calc(100% + 5px); left: 0; z-index: 5; width: 100%; min-width: 240px; padding: 7px; border: 1px solid #e7e8eb; border-radius: 8px; background: #fff; box-shadow: 0 8px 26px #10111426; }
.customer-picker-menu[hidden] { display: none; }
.customer-search { display: flex; height: 32px; align-items: center; gap: 7px; padding: 0 8px; border: 1px solid #e7e8eb; border-radius: 6px; color: #999ea6; }
.customer-search svg { width: 13px; height: 13px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
.customer-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: #444950; font-size: 10px; }
.customer-search input::placeholder { color: #999ea6; }
.customer-picker-option, .customer-picker-add { display: block; width: 100%; padding: 8px; border: 0; border-radius: 5px; background: transparent; color: #555a63; font-size: 10px; text-align: left; cursor: pointer; }
.customer-picker-results { display: grid; max-height: 150px; overflow-y: auto; margin-top: 4px; }
.customer-picker-option { display: grid; gap: 3px; }
.customer-picker-option strong { font-size: 10px; font-weight: 600; }
.customer-picker-option small { overflow: hidden; color: #92969d; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.customer-picker-option:hover, .customer-picker-option:focus-visible, .customer-picker-add:hover, .customer-picker-add:focus-visible { outline: 0; background: #f1f1f2; }
.customer-picker-empty { margin: 6px 8px; color: #92969d; font-size: 9px; line-height: 1.45; }
.customer-picker-empty[hidden], .customer-picker-add[hidden] { display: none; }
.customer-picker-add { margin-top: 4px; border-top: 1px solid #edf0f2; color: #454950; font-weight: 600; }
.product-empty-hint { grid-column: 1 / -1; margin: 0; color: #777c84; font-size: 9px; }
.product-empty-hint[hidden] { display: none; }
.product-empty-hint button { padding: 0; border: 0; background: transparent; color: #454950; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.field-label input, .field-label select { width: 100%; height: 36px; padding: 0 10px; border: 1px solid #e7e8eb; border-radius: 6px; outline: 0; background: white; color: #444950; font-size: 10px; }
.field-label input:focus, .field-label select:focus { border-color: #a5a8ae; box-shadow: 0 0 0 3px #a5a8ae22; }
.field-label input::placeholder { color: #a5a8ae; }
.customer-picker-menu .customer-search input,
.customer-picker-menu .customer-search input:focus { width: 100%; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; outline: 0; background: transparent; box-shadow: none; color: #444950; font-size: 10px; }
.field-label select { appearance: auto; }
.optional { color: #a0a3aa; font-weight: 400; }
.amount-input { position: relative; display: flex; align-items: center; }
.amount-input > span { position: absolute; left: 10px; color: #93969e; font-size: 11px; }
.amount-input input { padding-left: 23px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 21px; padding-top: 15px; border-top: 1px solid #edf0f2; }
.form-error { margin-top: 11px; color: #ad604b; font-size: 10px; }
.toast { position: fixed; bottom: 23px; left: 50%; z-index: 15; display: flex; width: max-content; max-width: calc(100vw - 32px); min-height: 60px; align-items: center; gap: 12px; padding: 9px 12px 9px 17px; transform: translate(-50%, 12px); border: 1px solid #dedfe2; border-radius: 10px; background: #fff; box-shadow: 0 5px 20px #10111420; color: #292c31; font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
.toast-message { flex: 1; }
.undo-control { position: relative; display: grid; width: 64px; height: 64px; flex: 0 0 auto; place-items: center; }
.undo-control[hidden] { display: none; }
.undo-button { position: relative; z-index: 1; display: grid; width: 50px; height: 50px; place-items: center; padding: 0; border: 1px solid #d6d8dc; border-radius: 50%; background: #f5f5f6; color: #363940; font-size: 12px; font-weight: 700; cursor: pointer; pointer-events: auto; }
.undo-button:hover, .undo-button:focus-visible { outline: 0; background: #ececef; }
.undo-timer { position: absolute; inset: 0; width: 64px; height: 64px; overflow: visible; transform: rotate(-90deg); }
.undo-track, .undo-progress { fill: none; stroke-width: 2.4; }
.undo-track { stroke: #bfc2c8; }
.undo-progress { stroke: #555a63; stroke-dasharray: 182.21; stroke-dashoffset: 0; stroke-linecap: round; }

@media (min-width: 1450px) {
  .page-content { padding-top: 42px; }
  .metric-card { min-height: 139px; padding: 19px; }
  .chart-panel { min-height: 293px; }
  .chart-container { height: 173px; }
}
@media (max-width: 1100px) {
  .sidebar { width: 206px; }
  .main-content { margin-left: 206px; }
  .topbar { padding-right: 28px; padding-left: 28px; }
  .page-content { padding-right: 28px; padding-left: 28px; }
  .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .metrics-grid.sales-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .sidebar { width: 250px; transform: translateX(-101%); transition: transform .22s ease; box-shadow: 14px 0 34px #10111418; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar { height: 57px; padding: 0 16px; }
  .mobile-menu-button { display: grid; margin-right: 10px; }
  .topbar { justify-content: flex-start; }
  .topbar-actions { gap: 8px; }
  .today-label { display: none; }
  .top-add-button { height: 33px; padding: 0 9px; font-size: 10px; }
  .page-content { padding: 25px 16px 21px; }
  .dashboard-toolbar { margin-bottom: 18px; }
  .period-select-wrap { height: 32px; gap: 5px; padding: 0 7px; }
  .period-trigger { width: 101px; font-size: 9px; }
  .calendar-icon svg { width: 13px; height: 13px; }
  .custom-date-range { flex-wrap: wrap; justify-content: flex-end; }
  .custom-date-range input { width: 112px; }
  .metrics-grid { gap: 9px; }
  .products-layout { grid-template-columns: 1fr; gap: 12px; }
  .metric-card { min-height: 116px; padding: 13px; }
  .metric-value { font-size: 22px; }
  .insights-grid { gap: 10px; margin-top: 10px; }
  .chart-panel { min-height: 255px; }
  .chart-container { height: 143px; }
  .transactions-panel { margin-top: 10px; }
  .transactions-header { align-items: flex-start; gap: 12px; padding: 15px 12px 12px; }
  .table-actions { gap: 5px; }
  .search-box { width: min(135px, 35vw); }
  .filter-button { gap: 4px; padding: 0 6px; }
  th:first-child, td:first-child { padding-left: 12px; }
  th:last-child, td:last-child { padding-right: 10px; }
  .page-footer { gap: 12px; font-size: 8px; }
  .settings-layout { grid-template-columns: 1fr; gap: 12px; }
  .settings-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 5px; }
  .settings-tab { min-height: 42px; justify-content: center; gap: 5px; padding: 0 5px; font-size: 9px; }
  .settings-tab-icon { display: none; }
  .settings-card { padding: 15px; }
  .product-form-card, .product-catalog-card { padding: 15px; }
  .sale-categories-card { padding: 15px; }
  .product-row { grid-template-columns: 64px minmax(0, 1fr) auto; padding: 10px 0; }
  .product-variation-editor { grid-template-columns: minmax(0, 1fr) minmax(90px, .8fr) 28px; }
  .product-variation-editor .field-label:nth-child(3) { grid-column: 1 / 3; }
  .item-filter-trigger { width: 78px; }
  .item-count-card .metric-top { gap: 4px; }
  .signout-card { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 430px) {
  .icon-button { width: 31px; height: 31px; }
  .top-add-button { gap: 4px; }
  .dashboard-toolbar { margin-bottom: 15px; }
  .custom-date-range input { width: 105px; }
  .metric-card { min-height: 110px; padding: 11px; }
  .metric-label { font-size: 9px; }
  .metric-value { font-size: 20px; }
  .metric-foot { font-size: 8px; }
  .metric-icon { width: 24px; height: 24px; }
  .chart-panel { padding-right: 14px; padding-left: 14px; }
  .transactions-header { flex-direction: column; }
  .table-actions { width: 100%; }
  .search-box { flex: 1; width: auto; }
  table { min-width: 565px; }
  .page-footer { flex-wrap: wrap; }
  .entry-modal { padding: 19px 16px; }
  .confirm-dialog { padding: 21px 17px; }
  .type-option { gap: 5px; padding: 0 6px; font-size: 8px; }
  .type-option-icon { width: 23px; height: 23px; }
  .sale-product-fields { grid-template-columns: minmax(0, 1fr) 82px; gap: 8px; }
}
@media (hover: none) {
  .row-actions { opacity: 1; }
  .product-row-actions { opacity: 1; }
  .customer-row-actions { opacity: 1; }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e6e7ea;
  --ink-muted: #a5a8ae;
  --green: #b7bbc2;
  --green-strong: #242629;
  --lime: #d7dbe1;
  --paper: #0b0c0e;
  --white: #141518;
  --line: #292b2f;
  --muted-bg: #18191c;
  --peach: #342d2a;
  --blue: #252a30;
}
:root[data-theme="dark"] body { color: var(--ink); background: var(--paper); }
:root[data-theme="dark"] .sidebar,
:root[data-theme="dark"] .topbar,
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .metric-card:not(.profit-card),
:root[data-theme="dark"] .settings-tabs,
:root[data-theme="dark"] .settings-card,
:root[data-theme="dark"] .product-form-card,
:root[data-theme="dark"] .product-catalog-card,
:root[data-theme="dark"] .sale-categories-card { border-color: #292b2f; background: #141518; color: var(--ink); }
:root[data-theme="dark"] .topbar { background: rgba(17, 18, 20, .96); }
:root[data-theme="dark"] .brand,
:root[data-theme="dark"] .panel-header h2,
:root[data-theme="dark"] .settings-page-heading h1,
:root[data-theme="dark"] .products-page-heading h1,
:root[data-theme="dark"] .settings-panel-heading h2,
:root[data-theme="dark"] .confirm-dialog h2 { color: #e6e7ea; }
:root[data-theme="dark"] .workspace-label,
:root[data-theme="dark"] .settings-page-heading p,
:root[data-theme="dark"] .products-page-heading p,
:root[data-theme="dark"] .settings-panel-heading p,
:root[data-theme="dark"] .setting-copy p,
:root[data-theme="dark"] .panel-header p { color: #a5a8ae; }
:root[data-theme="dark"] .nav-link { color: #b7bbc2; }
:root[data-theme="dark"] .settings-tab { color: #b7bbc2; }
:root[data-theme="dark"] .settings-tab-icon { color: #a5a8ae; }
:root[data-theme="dark"] .nav-link:hover,
:root[data-theme="dark"] .settings-tab:hover { background: #202125; color: #f0f1f3; }
:root[data-theme="dark"] .nav-link.active,
:root[data-theme="dark"] .settings-tab.active { border-color: #3a3c42; background: #292b30; color: #f0f1f3; }
:root[data-theme="dark"] .sidebar-settings-link { border-top-color: #292b2f; }
:root[data-theme="dark"] .nav-count { background: #202125; color: #c0c3c9; }
:root[data-theme="dark"] .setting-copy strong { color: #dfe1e5; }
:root[data-theme="dark"] .metric-label,
:root[data-theme="dark"] .metric-foot,
:root[data-theme="dark"] .date-cell,
:root[data-theme="dark"] td { color: #b7bbc2; }
:root[data-theme="dark"] .sales-card { border-color: #292b2f; background: #191a1d; }
:root[data-theme="dark"] .expense-card,
:root[data-theme="dark"] .orders-card { background: #141518; }
:root[data-theme="dark"] .profit-card { border-color: #303237; background: #222428; }
:root[data-theme="dark"] .metric-value { color: #f0f1f3; }
:root[data-theme="dark"] .metric-icon-green,
:root[data-theme="dark"] .metric-icon-lime { background: #2a2c31; color: #d7dbe1; }
:root[data-theme="dark"] thead { background-color: #141518; }
:root[data-theme="dark"] th,
:root[data-theme="dark"] td,
:root[data-theme="dark"] .table-footer,
:root[data-theme="dark"] .settings-form-actions { border-color: #292b2f; }
:root[data-theme="dark"] th { color: #a5a8ae; }
:root[data-theme="dark"] .entry-cell { color: #d4d6db; }
:root[data-theme="dark"] .category-pill,
:root[data-theme="dark"] .account-status { background: #202125; color: #c3c6cc; }
:root[data-theme="dark"] .search-box,
:root[data-theme="dark"] .filter-button,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .period-select-wrap,
:root[data-theme="dark"] .custom-date-range input,
:root[data-theme="dark"] .field-label input,
:root[data-theme="dark"] .field-label select,
:root[data-theme="dark"] .customer-picker-trigger,
:root[data-theme="dark"] .settings-field input,
:root[data-theme="dark"] .settings-field select,
:root[data-theme="dark"] .settings-field textarea { border-color: #303237; background: #191a1d; color: #e1e3e7; }
:root[data-theme="dark"] .period-trigger { color: #e1e3e7; }
:root[data-theme="dark"] .period-menu { border-color: #303237; background: #18191c; }
:root[data-theme="dark"] .item-filter-trigger { border-color: #303237; background: #191a1d; }
:root[data-theme="dark"] .period-option { color: #d4d6db; }
:root[data-theme="dark"] .period-option:hover,
:root[data-theme="dark"] .period-option:focus-visible,
:root[data-theme="dark"] .period-option[aria-selected="true"] { background: #292b30; color: #f0f1f3; }
:root[data-theme="dark"] .period-option[aria-selected="true"]::after { color: #c1c4cb; }
:root[data-theme="dark"] .button-light { border-color: #303237; background: #222428; color: #d7d9de; }
:root[data-theme="dark"] .context-menu,
:root[data-theme="dark"] .entry-modal,
:root[data-theme="dark"] .confirm-dialog { border-color: #303237; background: #18191c; }
:root[data-theme="dark"] .customer-picker-menu { border-color: #303237; background: #18191c; }
:root[data-theme="dark"] .customer-search { border-color: #303237; }
:root[data-theme="dark"] .customer-search input { color: #e1e3e7; }
:root[data-theme="dark"] .customer-picker-option,
:root[data-theme="dark"] .customer-picker-add { color: #d4d6db; }
:root[data-theme="dark"] .customer-picker-option small,
:root[data-theme="dark"] .customer-picker-empty,
:root[data-theme="dark"] .sale-category-empty { color: #a5a8ae; }
:root[data-theme="dark"] .customer-picker-option:hover,
:root[data-theme="dark"] .customer-picker-option:focus-visible,
:root[data-theme="dark"] .customer-picker-add:hover,
:root[data-theme="dark"] .customer-picker-add:focus-visible { background: #292b30; }
:root[data-theme="dark"] .customer-picker-add { border-color: #303237; }
:root[data-theme="dark"] .context-menu button { color: #d4d6db; }
:root[data-theme="dark"] .context-menu button:hover,
:root[data-theme="dark"] .context-menu button:focus-visible { background: #292b30; }
:root[data-theme="dark"] .type-option { border-color: #303237; color: #c0c3c9; }
:root[data-theme="dark"] .type-option.selected { border-color: #62666e; background: #292b30; color: #e2e4e8; }
:root[data-theme="dark"] .type-picker legend,
:root[data-theme="dark"] .field-label,
:root[data-theme="dark"] .settings-field { color: #c5c8ce; }
:root[data-theme="dark"] .required-indicator { color: #dda186; }
:root[data-theme="dark"] .field-label input::placeholder { color: #8f949b; }
:root[data-theme="dark"] .close-button { border-color: #303237; background: #222428; color: #c1c4cb; }
:root[data-theme="dark"] .settings-save-status { color: #c3c6cc; }
:root[data-theme="dark"] .product-form-status,
:root[data-theme="dark"] .product-count { color: #a5a8ae; }
:root[data-theme="dark"] .product-row { border-color: #292b2f; color: #d4d6db; }
:root[data-theme="dark"] .product-row-icon { background: #292b30; color: #c3c6cc; }
:root[data-theme="dark"] .product-row-thumbnail,
:root[data-theme="dark"] .product-image-preview,
:root[data-theme="dark"] .product-image-placeholder,
:root[data-theme="dark"] .product-image-editor { border-color: #303237; background: #191a1d; }
:root[data-theme="dark"] .product-row-name,
:root[data-theme="dark"] .product-row-values strong,
:root[data-theme="dark"] .product-variation-row strong,
:root[data-theme="dark"] .variation-editor-heading strong { color: #d4d6db; }
:root[data-theme="dark"] .product-type-badge,
:root[data-theme="dark"] .product-icon-button:hover,
:root[data-theme="dark"] .product-icon-button:focus-visible { background: #292b30; color: #c3c6cc; }
:root[data-theme="dark"] .product-variation-row { border-color: #3a3c42; }
:root[data-theme="dark"] .variation-editor,
:root[data-theme="dark"] .product-variation-editor,
:root[data-theme="dark"] .product-variation-remove { border-color: #303237; }
:root[data-theme="dark"] .product-variation-remove { background: #191a1d; color: #c1c4cb; }
:root[data-theme="dark"] .product-icon-delete:hover,
:root[data-theme="dark"] .product-icon-delete:focus-visible { background: #342d2a; color: #dda186; }
:root[data-theme="dark"] .customer-row { border-color: #292b2f; color: #d4d6db; }
:root[data-theme="dark"] .customer-row-icon { background: #292b30; color: #c3c6cc; }
:root[data-theme="dark"] .customer-row-details p { color: #a5a8ae; }
:root[data-theme="dark"] .product-list-empty,
:root[data-theme="dark"] .product-empty-hint { color: #a5a8ae; }
:root[data-theme="dark"] .sale-category-chip { background: #292b30; color: #d4d6db; }
:root[data-theme="dark"] .product-empty-hint button { color: #e1e3e7; }
:root[data-theme="dark"] .signout-card { border-color: #4a3a35; }
:root[data-theme="dark"] .account-note,
:root[data-theme="dark"] .page-footer { color: #a5a8ae; }
:root[data-theme="dark"] .toast { border-color: #303237; background: #18191c; box-shadow: 0 8px 24px #00000055; color: #e6e7ea; }
:root[data-theme="dark"] .undo-button { border-color: #45484f; background: #292b30; color: #eef0f3; }
:root[data-theme="dark"] .undo-button:hover,
:root[data-theme="dark"] .undo-button:focus-visible { background: #34373d; }
:root[data-theme="dark"] .undo-track { stroke: #555963; }
:root[data-theme="dark"] .undo-progress { stroke: #d4d7dc; }
.finance-presets button { color: #33363d; }
:root[data-theme="dark"] .finance-presets button { border-color: #3a3c42; background: #292b30; color: #e6e7ea; }
.consumption-stepper { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.consumption-stepper button { width: 28px; height: 28px; border: 1px solid #dedfe2; border-radius: 7px; background: var(--white); color: var(--ink); font-size: 17px; cursor: pointer; }
.consumption-stepper span { min-width: 22px; text-align: center; font-size: 12px; font-weight: 700; }
.customer-row .product-icon-button svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .customer-row .product-icon-delete:hover,
:root[data-theme="dark"] .customer-row .product-icon-delete:focus-visible { background: #49312b; color: #f0ad91; }
:root[data-theme="dark"] #record-editor-modal .entry-modal { color: #e6e7ea; }
:root[data-theme="dark"] #record-editor-modal .modal-heading h2 { color: #f0f1f3; }

.stock-ranking-row { color: #393d44; }
:root[data-theme="dark"] .stock-ranking-row { background: #24262a; color: #e5e7eb; }
.customer-row:hover .product-row-actions,
.customer-row:focus-within .product-row-actions { opacity: 1; }
.business-row { align-items: center; }
.business-avatar { width: 64px; height: 64px; overflow: hidden; border-radius: 9px; }
.business-avatar img { width: 100%; height: 100%; object-fit: cover; }
.business-row-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.business-social-entry { display: flex; align-items: end; gap: 8px; }
.business-social-entry .settings-field { flex: 1; }
.business-social-entry .button { min-height: 36px; white-space: nowrap; }
.business-social-drafts { display: flex; flex-wrap: wrap; gap: 6px; }
.business-social-draft { padding: 5px 8px; border-radius: 6px; background: #f0f1f2; color: #4b5057; font-size: 10px; }
:root[data-theme="dark"] .business-social-draft { background: #292b30; color: #d6d8de; }
.stock-ranking-row { color: #393d44; }
:root[data-theme="dark"] .stock-ranking-row { background: #24262a; color: #e5e7eb; }
.business-row [data-edit-store] { opacity: 0; transition: opacity .15s; }
.business-row:hover [data-edit-store],
.business-row:focus-within [data-edit-store] { opacity: 1; }
@media (hover: none) {
  .customer-row .product-row-actions { opacity: 1; }
  .business-row [data-edit-store] { opacity: 1; }
}
.store-social-edit { display: grid; grid-template-columns: minmax(110px, .8fr) minmax(130px, 1fr) auto; align-items: center; gap: 7px; margin-top: 7px; }
.store-social-edit select, .store-social-edit input { min-width: 0; height: 34px; padding: 0 8px; border: 1px solid #e7e8eb; border-radius: 6px; background: #fff; color: #444950; font-size: 10px; }
.store-modal-actions { flex-wrap: wrap; }
.modal-action-spacer { flex: 1; }
:root[data-theme="dark"] .store-social-edit select,
:root[data-theme="dark"] .store-social-edit input { border-color: #303237; background: #191a1d; color: #e1e3e7; }
