/* ---------- Color tokens ---------- */
:root {
    /* Brand */
    --brand: #0f766e;
    --brand-hover: #115e59;
    --brand-tint: #f0fdfa;
    --brand-border: #ccfbf1;

    /* Neutrals */
    --bg: #f1f5f9;
    --surface: #ffffff;
    --border: #cbd5e1;
    --text: #1e293b;
    --text-muted: #64748b;
    --heading: #134e4a;

    /* Stock status */
    --in-stock: #15803d;
    --in-stock-bg: #dcfce7;
    --low-stock: #b45309;
    --low-stock-bg: #fef3c7;
    --out-stock: #b91c1c;
    --out-stock-bg: #fee2e2;
    --incoming: #0369a1;
    --incoming-bg: #e0f2fe;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 30px 15px;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.container {
    width: 100%;
    max-width: 480px;
    margin: 50px auto;
    padding: 30px;
    background: var(--surface);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.07);
    text-align: center;
}

h1 {
    color: var(--heading);
}

label {
    display: block;
    margin-top: 16px;
    font-weight: bold;
}

input {
    width: 100%;
    padding: 12px;
    margin-top: 7px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px;
    color: var(--text);
    background: var(--surface);
}

input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

button, .button {
    display: block;
    width: 100%;
    padding: 13px;
    margin-top: 20px;
    border: none;
    border-radius: 6px;
    background: var(--brand);
    color: white;
    text-align: center;
    text-decoration: none;
    font-size: 15px;
    cursor: pointer;
}

button:hover, .button:hover {
    background: var(--brand-hover);
}

button:focus-visible, .button:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.4);
    outline-offset: 2px;
}

.secondary {
    background: #475569;
}

.secondary:hover {
    background: #334155;
}

/* Error message */
.message {
    padding: 10px 12px;
    background: var(--out-stock-bg);
    color: var(--out-stock);
    border-left: 4px solid var(--out-stock);
    border-radius: 6px;
}

/* Optional success message */
.message.success {
    background: var(--in-stock-bg);
    color: var(--in-stock);
    border-left-color: var(--in-stock);
}

.panel {
    margin-top: 25px;
    padding: 20px;
    background: var(--brand-tint);
    border: 1px solid var(--brand-border);
    border-radius: 8px;
}

.dashboard {
    max-width: 650px;
}

/* ---------- Stock status badges (optional) ----------
   Use with a text label or icon, e.g. <span class="badge in-stock">In stock</span> */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
}

.badge.in-stock  { background: var(--in-stock-bg);  color: var(--in-stock); }
.badge.low-stock { background: var(--low-stock-bg); color: var(--low-stock); }
.badge.out-stock { background: var(--out-stock-bg); color: var(--out-stock); }
.badge.incoming  { background: var(--incoming-bg);  color: var(--incoming); }


/* Eagle Business UI tokens and focused interaction helpers */
:root {
  --eagle-primary: #174b6b;
  --eagle-success: #176b45;
  --eagle-warning: #a16207;
  --eagle-danger: #b91c1c;
  --eagle-border: #e2e8f0;
  --eagle-muted: #64748b;
  --eagle-radius: 8px;
}
.table-filter, input[type="search"][data-table-filter] {
  width: min(100%, 420px); padding: 10px 12px; margin: 8px 0 16px;
  border: 1px solid var(--eagle-border); border-radius: var(--eagle-radius);
}
.inline-action { color: var(--eagle-primary); font-weight: 700; text-decoration: underline; }
.stock-alert { padding: 10px 12px; border-radius: var(--eagle-radius); background: #fff7ed; color: var(--eagle-warning); }
.sale-preview { margin: 18px 0; padding: 14px 16px; border: 1px solid var(--eagle-border); border-radius: var(--eagle-radius); background: #f8fafc; }
.sale-preview p { margin: 6px 0; }
.sale-preview small { color: var(--eagle-muted); }
tr[hidden] { display: none !important; }

/* Responsive owner dashboard */
.dashboard-page {
    min-height: 100vh;
    padding: 0 24px;
    background: #f4f7f6;
    color: #172d25;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dashboard-shell {
    width: min(100%, 1240px);
    margin: 0 auto;
    padding-bottom: max(28px, env(safe-area-inset-bottom));
}

.dashboard-page h1,
.dashboard-page h2,
.dashboard-page p {
    margin-top: 0;
}

.dashboard-topbar {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid #e3ebe6;
}

.brand-lockup,
.topbar-actions,
.quick-actions,
.section-heading,
.report-filter,
.overview-card,
.activity-item,
.stock-alert-item,
.stock-quantity {
    display: flex;
    align-items: center;
}

.brand-lockup {
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: #145b43;
    color: #fff;
    font-weight: 800;
}

.brand-lockup strong,
.brand-lockup small {
    display: block;
}

.brand-lockup strong {
    font-size: 15px;
    letter-spacing: -.02em;
}

.brand-lockup small,
.dashboard-footer {
    color: #718078;
    font-size: 12px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    min-width: 0;
}

.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #31614a;
    font-size: 12px;
    font-weight: 650;
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #24a36b;
}

.connection-status.is-offline {
    color: #9c3c32;
}

.connection-status.is-offline .connection-dot {
    background: #c94b3f;
}

.topbar-link,
.install-button {
    padding: 9px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #355347;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

.topbar-link:hover,
.install-button:hover {
    background: #e8f0eb;
}

.logout-form {
    margin: 0;
}

.welcome-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin: 28px 0 26px;
    padding: clamp(24px, 4vw, 40px);
    border: 1px solid #dfeae3;
    border-radius: 20px;
    background: linear-gradient(115deg, #fff 5%, #f1f8f3 100%);
    box-shadow: 0 12px 34px rgba(27, 68, 47, .045);
}

.welcome-copy {
    max-width: 610px;
}

.eyebrow {
    margin-bottom: 9px;
    color: #6b8176;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.welcome-copy h1 {
    margin-bottom: 9px;
    color: #183c2c;
    font-size: clamp(26px, 3.5vw, 36px);
    line-height: 1.15;
    letter-spacing: -.045em;
}

.welcome-copy > p:last-child {
    margin-bottom: 0;
    color: #6b7c73;
    font-size: 14px;
    line-height: 1.6;
}

.quick-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.action-primary,
.action-secondary {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 15px;
    border: 1px solid #dce8df;
    border-radius: 10px;
    color: #315343;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.action-primary {
    border-color: #145b43;
    background: #145b43;
    color: #fff;
}

.action-primary:hover { background: #104b38; }
.action-secondary { background: #fff; }
.action-secondary:hover { background: #f6faf7; }

.dashboard-section {
    min-width: 0;
    margin-top: 28px;
    padding: clamp(18px, 2.5vw, 26px);
    border: 1px solid #e3ebe6;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(27, 68, 47, .035);
}

.section-heading {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading .eyebrow { margin-bottom: 4px; }

.section-heading h2 {
    margin: 0;
    color: #1d382b;
    font-size: 20px;
    letter-spacing: -.03em;
}

.text-link {
    color: #17684a;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.text-link:hover { text-decoration: underline; }

.report-filter {
    flex-wrap: wrap;
    gap: 8px;
}

.report-filter select,
.report-filter input,
.report-filter button {
    min-height: 40px;
    margin: 0;
    border: 1px solid #dce6e0;
    border-radius: 9px;
    background: #fff;
    color: #354c40;
    font: inherit;
    font-size: 13px;
}

.report-filter select { padding: 0 30px 0 11px; }
.report-filter input { width: auto; min-width: 132px; padding: 0 9px; }
.report-filter button {
    padding: 0 13px;
    border-color: #d3e6da;
    background: #eaf5ee;
    color: #15583f;
    font-weight: 750;
    cursor: pointer;
}

.date-separator {
    color: #86948c;
    font-size: 12px;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.metric-card {
    min-width: 0;
    min-height: 126px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 17px;
    border: 1px solid #e8eeea;
    border-radius: 13px;
    background: #fff;
}

.metric-sales { background: #f5faf6; }
.metric-profit { background: #f3faf6; }
.metric-net { border-color: #cfe7d7; background: #edf7f0; }
.metric-label { color: #6b7b72; font-size: 12px; font-weight: 650; }
.metric-value { color: #213b2d; font-size: clamp(17px, 1.65vw, 23px); letter-spacing: -.035em; overflow-wrap: anywhere; }
.metric-net .metric-value { color: #145b43; }
.metric-footnote { color: #89968f; font-size: 11px; }

.report-details { margin-top: 15px; }
.report-details summary {
    width: fit-content;
    color: #426553;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.metric-grid-secondary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 14px;
}

.detail-metric {
    display: grid;
    gap: 6px;
    padding: 13px 15px;
    border-radius: 10px;
    background: #f7f9f8;
}

.detail-metric span { color: #77877e; font-size: 11px; }
.detail-metric strong { color: #344c3e; font-size: 14px; }
.report-note { margin: 13px 0 0; color: #7d8b83; font-size: 11px; line-height: 1.55; }

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
}

.overview-card {
    min-width: 0;
    gap: 13px;
    padding: 15px;
    border: 1px solid #e9efeb;
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
}

a.overview-card:hover { border-color: #c7dfd0; background: #fbfdfb; }
.overview-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 11px; font-weight: 800; }
.icon-green { background: #e8f4ec; color: #26734d; }
.icon-amber { background: #fff4dc; color: #a76b13; }
.icon-red { background: #fff0ed; color: #b94a3f; }
.icon-blue { background: #eaf3fb; color: #3576a4; }
.icon-purple { background: #f1edfa; color: #7152a1; }
.icon-slate { background: #eef1f3; color: #586976; }
.overview-copy { min-width: 0; display: grid; gap: 4px; }
.overview-copy span { color: #738178; font-size: 11px; }
.overview-copy strong { color: #233d2f; font-size: 17px; overflow-wrap: anywhere; }

.dashboard-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.dashboard-columns .dashboard-section { height: 100%; }
.activity-list,
.stock-alert-list { margin: 0; padding: 0; list-style: none; }

.activity-item {
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #eef2ef;
}

.activity-item:first-child { padding-top: 0; }
.activity-item:last-child { padding-bottom: 0; border-bottom: 0; }
.activity-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 11px; background: #edf6ef; color: #28714e; font-weight: 800; }
.activity-expense { background: #fff3e8; color: #aa6423; }
.activity-stock { background: #edf3fa; color: #4a729a; }
.activity-product { background: #f0eef9; color: #69559c; }
.activity-content { min-width: 0; flex: 1; display: grid; gap: 3px; }
.activity-content strong { color: #2b4135; font-size: 12px; }
.activity-details { overflow: hidden; color: #66776d; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.activity-meta { color: #98a39c; font-size: 10px; }
.activity-amount { color: #315b43; font-size: 11px; font-weight: 750; white-space: nowrap; }
.amount-expense { color: #a05c37; }

.stock-alert-item {
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #eef2ef;
}

.stock-alert-item:first-child { padding-top: 0; }
.stock-alert-item:last-child { padding-bottom: 0; border-bottom: 0; }
.stock-product { min-width: 0; display: grid; gap: 6px; }
.stock-product > strong { overflow: hidden; color: #2c4236; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.stock-quantity { flex-wrap: wrap; gap: 7px; color: #829087; font-size: 10px; }
.stock-pill { padding: 4px 7px; border-radius: 20px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.pill-red { background: #fff0ed; color: #ad4136; }
.pill-amber { background: #fff5df; color: #96620d; }
.restock-link { padding: 8px 10px; border: 1px solid #d6e8dc; border-radius: 8px; color: #176044; font-size: 11px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.restock-link:hover { background: #f1f8f3; }

.empty-state {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 28px 12px;
    border-radius: 12px;
    background: #f8faf8;
    color: #63776b;
    text-align: center;
}

.empty-state > span { color: #77a88b; font-size: 22px; }
.empty-state strong { color: #3a5545; font-size: 13px; }
.empty-state p { margin: 0; font-size: 11px; }
.empty-success { background: #f4faf5; }
.dashboard-footer { padding: 24px 4px 8px; text-align: center; }
.dashboard-footer span { margin: 0 5px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

.dashboard-page :focus-visible {
    outline: 3px solid rgba(32, 132, 83, .4);
    outline-offset: 3px;
}

@media (max-width: 980px) {
    .welcome-panel { align-items: flex-start; flex-direction: column; gap: 22px; }
    .quick-actions { justify-content: flex-start; }
    .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .metric-grid-secondary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .dashboard-page { padding: 0 14px; }
    .dashboard-topbar { min-height: 68px; gap: 8px; }
    .brand-mark { width: 37px; height: 37px; }
    .brand-lockup { gap: 9px; }
    .brand-lockup strong { font-size: 13px; }
    .brand-lockup small { font-size: 10px; }
    .topbar-actions { gap: 4px; }
    .connection-status { font-size: 0; }
    .connection-dot { width: 9px; height: 9px; }
    .topbar-link,
    .install-button { padding: 8px; font-size: 11px; }
    .welcome-panel { margin: 17px 0 18px; padding: 22px 18px; border-radius: 16px; }
    .welcome-copy h1 { font-size: 27px; }
    .welcome-copy > p:last-child { font-size: 13px; }
    .quick-actions { width: 100%; gap: 7px; }
    .action-primary { flex: 1 1 100%; }
    .action-secondary { flex: 1 1 30%; padding: 0 9px; font-size: 12px; }
    .dashboard-section { margin-top: 16px; padding: 17px 15px; border-radius: 14px; }
    .section-heading { align-items: flex-start; flex-direction: column; margin-bottom: 14px; }
    .section-heading h2 { font-size: 18px; }
    .report-filter { width: 100%; gap: 7px; }
    .report-filter select { flex: 1 1 100%; }
    .report-filter input { flex: 1; min-width: 0; width: 0; font-size: 12px; }
    .report-filter button { flex: 0 0 auto; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .metric-card { min-height: 112px; padding: 12px; gap: 6px; }
    .metric-label { font-size: 10px; }
    .metric-value { font-size: clamp(15px, 4vw, 19px); }
    .metric-footnote { font-size: 9px; }
    .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .overview-card { gap: 9px; padding: 11px 9px; }
    .overview-icon { width: 32px; height: 32px; flex-basis: 32px; border-radius: 9px; }
    .overview-copy span { font-size: 10px; }
    .overview-copy strong { font-size: 14px; }
    .dashboard-columns { grid-template-columns: 1fr; gap: 0; }
    .dashboard-columns .dashboard-section { height: auto; }
    .dashboard-footer { padding-bottom: 18px; }
}

@media (max-width: 380px) {
    .dashboard-page { padding: 0 10px; }
    .logout-form { display: none; }
    .metric-grid-secondary { grid-template-columns: 1fr 1fr; }
    .overview-card { padding: 10px 7px; }
    .overview-copy strong { font-size: 12px; }
    .activity-item { gap: 8px; }
    .activity-amount { font-size: 10px; }
}

@media (prefers-reduced-motion: no-preference) {
    .dashboard-page a,
    .dashboard-page button { transition: background-color .15s ease, border-color .15s ease; }
}

/* Platform admin dashboard */
.admin-dashboard-page {
    min-height: 100vh;
    padding: 0 24px;
    background: #f4f7f6;
    color: #172d25;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.admin-shell { width: min(100%, 1240px); margin: 0 auto; padding-bottom: 30px; }
.admin-topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e3ebe6; }
.admin-topbar form { margin: 0; }
.admin-signout,
.mark-read-button,
.review-button {
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid #dce8df;
    border-radius: 9px;
    background: #fff;
    color: #315343;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.admin-signout:hover,
.mark-read-button:hover { background: #f3f8f4; }

.admin-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 27px 0 20px;
    padding: 27px 30px;
    border: 1px solid #dfeae3;
    border-radius: 18px;
    background: linear-gradient(115deg, #fff 5%, #f1f8f3 100%);
}

.admin-welcome .eyebrow { margin-bottom: 7px; }
.admin-welcome h1 { margin: 0 0 7px; color: #183c2c; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.045em; }
.admin-welcome p:last-child { margin: 0; color: #6b7c73; font-size: 13px; }
.admin-status { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid #d9e9de; border-radius: 99px; background: #f7fbf8; color: #426b52; font-size: 11px; font-weight: 700; white-space: nowrap; }
.admin-status > span { width: 7px; height: 7px; border-radius: 50%; background: #24a36b; }

.admin-flashes { display: grid; gap: 8px; margin: 0 0 18px; }
.admin-flash { margin: 0; padding: 11px 14px; border: 1px solid #dce8df; border-radius: 9px; background: #fff; color: #395c48; font-size: 13px; }
.admin-flash-error { border-color: #f0d2cf; background: #fff7f6; color: #a13e36; }
.admin-flash-warning { border-color: #f0e2c4; background: #fffbf1; color: #8d631c; }

.admin-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.admin-shortcut { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid #e3ebe6; border-radius: 13px; background: #fff; color: inherit; text-decoration: none; box-shadow: 0 6px 18px rgba(27, 68, 47, .025); }
.admin-shortcut:hover { border-color: #c7dfd0; background: #fbfdfb; }
.shortcut-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 11px; font-weight: 800; }
.shortcut-businesses { background: #e8f4ec; color: #26734d; }
.shortcut-plans { background: #f1edfa; color: #7152a1; }
.shortcut-payments { background: #fff4dc; color: #a76b13; }
.admin-shortcut > span:nth-child(2) { min-width: 0; flex: 1; display: grid; gap: 4px; }
.admin-shortcut strong { color: #294435; font-size: 12px; }
.admin-shortcut small { overflow: hidden; color: #829087; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.shortcut-arrow { color: #84958b; font-size: 17px; }
.shortcut-count { display: grid; min-width: 25px; height: 25px; place-items: center; padding: 0 6px; border-radius: 99px; background: #fff0ed; color: #a64439; font-size: 11px; font-weight: 800; }

.admin-section { margin-top: 21px; padding: 22px; border: 1px solid #e3ebe6; border-radius: 15px; background: #fff; box-shadow: 0 8px 26px rgba(27, 68, 47, .035); }
.admin-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.admin-section-heading .eyebrow { margin-bottom: 4px; }
.admin-section-heading h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 0; color: #1d382b; font-size: 19px; letter-spacing: -.03em; }
.unread-count { padding: 4px 8px; border-radius: 99px; background: #fff2df; color: #94620f; font-size: 10px; letter-spacing: 0; }
.admin-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.admin-metric { min-width: 0; display: grid; grid-template-columns: 35px 1fr; grid-template-rows: auto auto auto; column-gap: 10px; align-items: center; padding: 14px; border: 1px solid #e8eeea; border-radius: 12px; background: #fff; }
.admin-metric-attention { border-color: #f0dfc0; background: #fffcf6; }
.admin-metric-icon { grid-column: 1; grid-row: 1 / span 3; display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; font-size: 13px; font-weight: 800; }
.admin-metric-label { overflow: hidden; color: #6f7e75; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-metric > strong { color: #223b2e; font-size: 22px; line-height: 1.15; }
.admin-metric > small { color: #95a098; font-size: 9px; }

.notification-section { margin-bottom: 20px; }
.notification-heading { margin-bottom: 10px; }
.notification-heading form { margin: 0; }
.notification-list { display: grid; }
.notification-item { display: flex; align-items: flex-start; gap: 12px; padding: 16px 3px; border-bottom: 1px solid #edf1ee; }
.notification-item:last-child { border-bottom: 0; }
.notification-unread .notification-indicator { background: #27945e; box-shadow: 0 0 0 4px #e8f5ed; }
.notification-indicator { width: 8px; height: 8px; flex: 0 0 8px; margin: 6px 3px 0; border-radius: 50%; background: #d7dfda; }
.notification-copy { min-width: 0; flex: 1; }
.notification-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.notification-copy h3 { margin: 0; color: #2b4135; font-size: 13px; }
.new-label { padding: 3px 6px; border-radius: 99px; background: #eaf5ee; color: #246746; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.notification-copy p { margin: 5px 0; color: #65756b; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.notification-copy time { color: #95a098; font-size: 10px; }
.review-button { min-height: 36px; border-color: #d3e6da; background: #f1f8f3; color: #176044; white-space: nowrap; }
.review-button:hover { background: #e5f2e9; }

.admin-empty-state { display: grid; justify-items: center; gap: 5px; padding: 28px 14px; border-radius: 11px; background: #f7faf8; color: #65786c; text-align: center; }
.admin-empty-state > span { color: #6ba27e; font-size: 22px; }
.admin-empty-state strong { color: #365341; font-size: 13px; }
.admin-empty-state p { margin: 0; font-size: 11px; }
.admin-footer { padding: 7px 0 4px; color: #849188; font-size: 11px; text-align: center; }
.admin-footer span { margin: 0 5px; }

.admin-dashboard-page :focus-visible { outline: 3px solid rgba(32, 132, 83, .4); outline-offset: 3px; }

@media (max-width: 760px) {
    .admin-dashboard-page { padding: 0 14px; }
    .admin-topbar { min-height: 68px; }
    .admin-welcome { align-items: flex-start; flex-direction: column; margin: 18px 0 15px; padding: 22px 18px; }
    .admin-shortcuts { grid-template-columns: 1fr; gap: 8px; }
    .admin-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .admin-section { margin-top: 15px; padding: 17px 15px; }
}

@media (max-width: 440px) {
    .admin-dashboard-page { padding: 0 10px; }
    .admin-welcome h1 { font-size: 27px; }
    .admin-metric { grid-template-columns: 30px 1fr; column-gap: 8px; padding: 11px 9px; }
    .admin-metric-icon { width: 30px; height: 30px; }
    .admin-metric-label { font-size: 10px; }
    .admin-metric > strong { font-size: 19px; }
    .notification-item { flex-wrap: wrap; gap: 9px; }
    .notification-copy { flex-basis: calc(100% - 35px); }
    .notification-item form { margin-left: 29px; }
    .notification-heading { align-items: flex-start; flex-direction: column; }
}

/* Shared styling for the remaining application pages */
body:not(.dashboard-page):not(.admin-dashboard-page) {
    min-height: 100vh;
    padding: clamp(14px, 3vw, 34px);
    background: #f3f7f4;
    color: #23392d;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .container {
    width: min(100%, 760px);
    max-width: 760px;
    margin: 16px auto;
    padding: clamp(20px, 4vw, 36px);
    border: 1px solid #e1eae4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(27, 68, 47, .055);
    text-align: left;
}

body:not(.dashboard-page):not(.admin-dashboard-page) main.container:has(table),
body:not(.dashboard-page):not(.admin-dashboard-page) main.container:has(.grid),
body:not(.dashboard-page):not(.admin-dashboard-page) main.container:has(.table-wrap),
body:not(.dashboard-page):not(.admin-dashboard-page) main.container:has(.table-wrapper),
body:not(.dashboard-page):not(.admin-dashboard-page) main.container:has(.scroll) {
    width: min(100%, 1200px);
    max-width: 1200px;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .container:has(> form):not(.sale-container) {
    width: min(100%, 620px);
    max-width: 620px;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .container:has(> .button) {
    width: min(100%, 560px);
    max-width: 560px;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .container:has(table) {
    width: min(100%, 1200px);
    max-width: 1200px;
    overflow-x: auto;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .container:has(> .panel),
body:not(.dashboard-page):not(.admin-dashboard-page) .container:has(> .expense-form) {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .product-form,
body:not(.dashboard-page):not(.admin-dashboard-page) .edit-container,
body:not(.dashboard-page):not(.admin-dashboard-page) .expense-form {
    width: min(100%, 640px);
    max-width: 640px;
    margin: 16px auto;
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid #e1eae4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(27, 68, 47, .055);
    text-align: left;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .products-container,
body:not(.dashboard-page):not(.admin-dashboard-page) .history-container {
    width: min(100%, 1200px);
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid #e1eae4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(27, 68, 47, .055);
}

body:not(.dashboard-page):not(.admin-dashboard-page) h1,
body:not(.dashboard-page):not(.admin-dashboard-page) h2,
body:not(.dashboard-page):not(.admin-dashboard-page) h3 {
    color: #183c2c;
    letter-spacing: -.025em;
}

body:not(.dashboard-page):not(.admin-dashboard-page) h1 {
    margin: 0 0 10px;
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.2;
}

body:not(.dashboard-page):not(.admin-dashboard-page) h2 { font-size: 21px; }
body:not(.dashboard-page):not(.admin-dashboard-page) p { line-height: 1.6; }
body:not(.dashboard-page):not(.admin-dashboard-page) a { color: #17684a; }
body:not(.dashboard-page):not(.admin-dashboard-page) a:hover { color: #104b38; }

body:not(.dashboard-page):not(.admin-dashboard-page) label {
    margin: 15px 0 6px;
    color: #344c3e;
    font-size: 13px;
    font-weight: 650;
    text-align: left;
}

body:not(.dashboard-page):not(.admin-dashboard-page) input:not([type="checkbox"]):not([type="radio"]),
body:not(.dashboard-page):not(.admin-dashboard-page) select,
body:not(.dashboard-page):not(.admin-dashboard-page) textarea {
    width: 100%;
    min-height: 45px;
    margin-top: 5px;
    padding: 10px 12px;
    border: 1px solid #d5e0d9;
    border-radius: 9px;
    background: #fff;
    color: #243a2e;
    font: inherit;
    font-size: 14px;
}

body:not(.dashboard-page):not(.admin-dashboard-page) textarea {
    min-height: 96px;
    resize: vertical;
}

body:not(.dashboard-page):not(.admin-dashboard-page) input:focus,
body:not(.dashboard-page):not(.admin-dashboard-page) select:focus,
body:not(.dashboard-page):not(.admin-dashboard-page) textarea:focus {
    border-color: #3a9465;
    outline: 3px solid rgba(32, 132, 83, .12);
    box-shadow: none;
}

body:not(.dashboard-page):not(.admin-dashboard-page) input[type="checkbox"],
body:not(.dashboard-page):not(.admin-dashboard-page) input[type="radio"] {
    width: 17px;
    height: 17px;
    accent-color: #176b45;
}

body:not(.dashboard-page):not(.admin-dashboard-page) button,
body:not(.dashboard-page):not(.admin-dashboard-page) .button,
body:not(.dashboard-page):not(.admin-dashboard-page) .btn,
body:not(.dashboard-page):not(.admin-dashboard-page) .add-button,
body:not(.dashboard-page):not(.admin-dashboard-page) .back-link,
body:not(.dashboard-page):not(.admin-dashboard-page) .submit-button,
body:not(.dashboard-page):not(.admin-dashboard-page) .top-actions a {
    display: inline-flex;
    width: auto;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 10px 6px 0 0;
    padding: 10px 15px;
    border: 1px solid #145b43;
    border-radius: 9px;
    background: #145b43;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

body:not(.dashboard-page):not(.admin-dashboard-page) button:hover,
body:not(.dashboard-page):not(.admin-dashboard-page) .button:hover,
body:not(.dashboard-page):not(.admin-dashboard-page) .btn:hover,
body:not(.dashboard-page):not(.admin-dashboard-page) .add-button:hover {
    border-color: #104b38;
    background: #104b38;
    color: #fff;
}

body:not(.dashboard-page):not(.admin-dashboard-page) form > button[type="submit"],
body:not(.dashboard-page):not(.admin-dashboard-page) .container > .button {
    min-height: 46px;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .secondary,
body:not(.dashboard-page):not(.admin-dashboard-page) .alt,
body:not(.dashboard-page):not(.admin-dashboard-page) .secondary-link,
body:not(.dashboard-page):not(.admin-dashboard-page) .back-link,
body:not(.dashboard-page):not(.admin-dashboard-page) .cancel-link {
    border-color: #dce6e0;
    background: #f1f5f2;
    color: #40594a;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .secondary:hover,
body:not(.dashboard-page):not(.admin-dashboard-page) .alt:hover,
body:not(.dashboard-page):not(.admin-dashboard-page) .secondary-link:hover,
body:not(.dashboard-page):not(.admin-dashboard-page) .back-link:hover,
body:not(.dashboard-page):not(.admin-dashboard-page) .cancel-link:hover {
    border-color: #ccd9d0;
    background: #e7eee9;
    color: #2f4939;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .danger,
body:not(.dashboard-page):not(.admin-dashboard-page) .reject,
body:not(.dashboard-page):not(.admin-dashboard-page) .delete-button,
body:not(.dashboard-page):not(.admin-dashboard-page) .remove-button {
    border-color: #b94a3f;
    background: #b94a3f;
    color: #fff;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .panel,
body:not(.dashboard-page):not(.admin-dashboard-page) .card,
body:not(.dashboard-page):not(.admin-dashboard-page) .plan,
body:not(.dashboard-page):not(.admin-dashboard-page) .sale-preview,
body:not(.dashboard-page):not(.admin-dashboard-page) .stock-info {
    border: 1px solid #e3ebe6;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(27, 68, 47, .035);
}

body:not(.dashboard-page):not(.admin-dashboard-page) .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 14px;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .products-header,
body:not(.dashboard-page):not(.admin-dashboard-page) .top-actions,
body:not(.dashboard-page):not(.admin-dashboard-page) .form-actions,
body:not(.dashboard-page):not(.admin-dashboard-page) .actions,
body:not(.dashboard-page):not(.admin-dashboard-page) .filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .products-header > div {
    flex: 1 0 100%;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .products-header > a:not(.add-button) {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid #dce6e0;
    border-radius: 9px;
    background: #f1f5f2;
    color: #40594a;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .products-header > a:not(.add-button):hover {
    background: #e7eee9;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .table-wrapper,
body:not(.dashboard-page):not(.admin-dashboard-page) .table-wrap,
body:not(.dashboard-page):not(.admin-dashboard-page) .scroll {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #e3ebe6;
    border-radius: 12px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .container:has(table) table,
body:not(.dashboard-page):not(.admin-dashboard-page) .products-container table,
body:not(.dashboard-page):not(.admin-dashboard-page) .history-container table {
    width: 100%;
    min-width: 680px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

body:not(.dashboard-page):not(.admin-dashboard-page) th {
    padding: 12px 14px;
    border-bottom: 1px solid #dfe8e2;
    background: #f5f8f6;
    color: #607167;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .06em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

body:not(.dashboard-page):not(.admin-dashboard-page) td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf1ee;
    color: #415448;
    font-size: 13px;
    text-align: left;
    vertical-align: middle;
}

body:not(.dashboard-page):not(.admin-dashboard-page) tbody tr:last-child td { border-bottom: 0; }
body:not(.dashboard-page):not(.admin-dashboard-page) tbody tr:hover { background: #f8fbf9; }

body:not(.dashboard-page):not(.admin-dashboard-page) .message,
body:not(.dashboard-page):not(.admin-dashboard-page) .success,
body:not(.dashboard-page):not(.admin-dashboard-page) .error,
body:not(.dashboard-page):not(.admin-dashboard-page) .warning,
body:not(.dashboard-page):not(.admin-dashboard-page) .info {
    padding: 11px 14px;
    border: 1px solid #dce9df;
    border-radius: 9px;
    background: #f4faf5;
    color: #286344;
    line-height: 1.5;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .error,
body:not(.dashboard-page):not(.admin-dashboard-page) .message:not(.success):not(.warning):not(.info) {
    border-color: #f0d2cf;
    background: #fff6f5;
    color: #a13e36;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .warning {
    border-color: #f0e2c4;
    background: #fffbf1;
    color: #8d631c;
}

body:not(.dashboard-page):not(.admin-dashboard-page) .empty-state {
    padding: 20px;
    border: 1px dashed #d5e3d9;
    border-radius: 12px;
    background: #f8fbf9;
    color: #62766a;
}

body:not(.dashboard-page):not(.admin-dashboard-page) :focus-visible {
    outline: 3px solid rgba(32, 132, 83, .35);
    outline-offset: 3px;
}

@media (max-width: 680px) {
    body:not(.dashboard-page):not(.admin-dashboard-page) { padding: 12px; }
    body:not(.dashboard-page):not(.admin-dashboard-page) .container,
    body:not(.dashboard-page):not(.admin-dashboard-page) .product-form,
    body:not(.dashboard-page):not(.admin-dashboard-page) .edit-container,
    body:not(.dashboard-page):not(.admin-dashboard-page) .expense-form,
    body:not(.dashboard-page):not(.admin-dashboard-page) .products-container,
    body:not(.dashboard-page):not(.admin-dashboard-page) .history-container {
        width: 100%;
        margin: 8px auto;
        padding: 19px 16px;
        border-radius: 14px;
    }

    body:not(.dashboard-page):not(.admin-dashboard-page) .container:has(> .panel),
    body:not(.dashboard-page):not(.admin-dashboard-page) .container:has(> .expense-form) {
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    body:not(.dashboard-page):not(.admin-dashboard-page) .sale-row {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
        padding: 12px;
        border: 1px solid #e3ebe6;
        border-radius: 12px;
        background: #f9fbfa;
    }

    body:not(.dashboard-page):not(.admin-dashboard-page) .sale-row .product-field { grid-column: 1 / -1; }
    body:not(.dashboard-page):not(.admin-dashboard-page) .notification-item { flex-wrap: wrap; }
    body:not(.dashboard-page):not(.admin-dashboard-page) .expense-actions { gap: 6px; }
    body:not(.dashboard-page):not(.admin-dashboard-page) .table-wrap,
    body:not(.dashboard-page):not(.admin-dashboard-page) .table-wrapper,
    body:not(.dashboard-page):not(.admin-dashboard-page) .scroll { margin-right: -2px; }
}

/* Shared application sidebar for business and platform administration */
.app-sidebar {
    position: fixed;
    z-index: 90;
    inset: 0 auto 0 0;
    display: flex;
    width: 252px;
    flex-direction: column;
    padding: 22px 14px 14px;
    border-right: 1px solid rgba(255, 255, 255, .08);
    background: #123d2e;
    color: #d8e7dd;
}

.sidebar-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 22px;
}

.sidebar-brand {
    display: flex;
    min-width: 0;
    flex: 1;
    align-items: center;
    gap: 11px;
    padding: 0 0 0 8px;
    color: #fff;
    text-decoration: none;
}

.sidebar-collapse-toggle {
    display: grid;
    width: 32px;
    min-height: 32px;
    flex: 0 0 32px;
    place-items: center;
    margin: 4px 0 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 8px;
    background: rgba(255, 255, 255, .05);
    color: #c7d9cd;
    cursor: pointer;
}

.sidebar-collapse-toggle:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.sidebar-collapse-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.sidebar-brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 12px;
    background: #e8f4ec;
    color: #145b43;
    font-weight: 850;
}

.sidebar-brand strong,
.sidebar-brand small,
.sidebar-account-copy strong,
.sidebar-account-copy small {
    display: block;
}

.sidebar-brand strong { color: #fff; font-size: 13px; letter-spacing: -.01em; }
.sidebar-brand small { margin-top: 3px; color: #a9c5b4; font-size: 10px; }
.sidebar-nav { display: flex; flex: 1; flex-direction: column; gap: 4px; overflow-y: auto; padding: 4px 0; }
.sidebar-section-label { margin: 15px 10px 5px; color: #86a995; font-size: 9px; font-weight: 800; letter-spacing: .13em; }

body.business-app-page .app-sidebar a.sidebar-link,
body.admin-app-page .app-sidebar a.sidebar-link {
    display: flex;
    min-height: 43px;
    align-items: center;
    gap: 12px;
    padding: 0 11px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #c7d9cd;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

body.business-app-page .app-sidebar a.sidebar-link:hover,
body.admin-app-page .app-sidebar a.sidebar-link:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
}

body.business-app-page .app-sidebar a.sidebar-link.is-active,
body.admin-app-page .app-sidebar a.sidebar-link.is-active {
    border-color: rgba(190, 233, 204, .15);
    background: #24533e;
    color: #fff;
    box-shadow: inset 3px 0 #9ad4ac;
}

.sidebar-link svg,
.sidebar-signout svg,
.sidebar-toggle svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.sidebar-link svg { color: #a6c4b1; }
.sidebar-link.is-active svg { color: #b7e2c4; }
.sidebar-badge { display: grid; min-width: 22px; height: 22px; place-items: center; margin-left: auto; padding: 0 5px; border-radius: 99px; background: #f0c46d; color: #513916; font-size: 10px; font-weight: 850; }
.sidebar-link-label { min-width: 0; }

.sidebar-account {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 12px;
    padding: 13px 5px 2px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.sidebar-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 50%; background: #d8ecdf; color: #20583c; font-size: 12px; font-weight: 800; }
.sidebar-avatar-admin { background: #e7def4; color: #594179; }
.sidebar-account-copy { min-width: 0; flex: 1; }
.sidebar-account-copy strong { overflow: hidden; color: #fff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account-copy small { margin-top: 3px; color: #a9c5b4; font-size: 10px; }
.sidebar-account form { margin: 0; }

body.business-app-page .app-sidebar .sidebar-signout,
body.admin-app-page .app-sidebar .sidebar-signout {
    display: grid;
    width: 35px;
    min-height: 35px;
    place-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #b8d0c0;
    cursor: pointer;
}

body.business-app-page .app-sidebar .sidebar-signout:hover,
body.admin-app-page .app-sidebar .sidebar-signout:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.mobile-app-bar { display: none; }
.sidebar-scrim { display: none; }
body.business-app-page .payment-instructions {
    padding: 12px 14px;
    border: 1px solid #d5e8dc;
    border-radius: 8px;
    background: #f0f8f3;
    color: #145b43;
    font-size: 16px;
    font-weight: 700;
}

body.business-app-page .sidebar-scrim[hidden],
body.admin-app-page .sidebar-scrim[hidden] { display: none; }

body:not(.dashboard-page):not(.admin-dashboard-page).business-app-page,
body:not(.dashboard-page):not(.admin-dashboard-page).admin-app-page { padding-left: 280px; }
body.dashboard-page.business-app-page { padding-left: 280px; }
body.admin-dashboard-page.admin-app-page { padding-left: 280px; }
body.dashboard-page.business-app-page .dashboard-topbar { justify-content: flex-end; }
body.dashboard-page.business-app-page .topbar-actions { margin-left: auto; }

@media (min-width: 761px) {
    body:not(.dashboard-page):not(.admin-dashboard-page).business-app-page.sidebar-collapsed,
    body:not(.dashboard-page):not(.admin-dashboard-page).admin-app-page.sidebar-collapsed { padding-left: 104px; }

    body.dashboard-page.business-app-page.sidebar-collapsed,
    body.admin-dashboard-page.admin-app-page.sidebar-collapsed { padding-left: 104px; }

    body.sidebar-collapsed .app-sidebar { width: 76px; padding-right: 10px; padding-left: 10px; }
    body.sidebar-collapsed .sidebar-heading { flex-direction: column; align-items: center; gap: 10px; }
    body.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0; }
    body.sidebar-collapsed .sidebar-brand > span:last-child,
    body.sidebar-collapsed .sidebar-section-label,
    body.sidebar-collapsed .sidebar-account-copy { display: none; }
    body.sidebar-collapsed .sidebar-collapse-toggle { margin: 0; }
    body.sidebar-collapsed .sidebar-collapse-toggle svg { transform: rotate(180deg); }
    body.sidebar-collapsed .sidebar-nav { align-items: center; }
    body.business-app-page.sidebar-collapsed .app-sidebar a.sidebar-link,
    body.admin-app-page.sidebar-collapsed .app-sidebar a.sidebar-link { position: relative; width: 44px; justify-content: center; gap: 0; padding: 0; }
    body.sidebar-collapsed .sidebar-link-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    body.sidebar-collapsed .sidebar-badge { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; margin: 0; padding: 0 3px; font-size: 8px; }
    body.sidebar-collapsed .sidebar-account { justify-content: center; gap: 3px; padding-right: 0; padding-left: 0; }
    body.sidebar-collapsed .sidebar-account form { flex: 0 0 35px; }
}

@media (max-width: 760px) {
    .mobile-app-bar {
        position: fixed;
        z-index: 110;
        inset: 0 0 auto;
        display: flex;
        height: 64px;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
        border-bottom: 1px solid #e3ebe6;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 4px 14px rgba(27, 68, 47, .06);
        backdrop-filter: blur(12px);
    }

    .mobile-app-bar .sidebar-brand { padding: 0; color: #183c2c; }
    .mobile-app-bar .sidebar-brand strong { color: #183c2c; }
    .mobile-app-bar .sidebar-brand small { color: #718078; }
    body.business-app-page .mobile-app-bar .sidebar-toggle,
    body.admin-app-page .mobile-app-bar .sidebar-toggle {
        display: grid;
        width: 42px;
        min-height: 42px;
        height: 42px;
        place-items: center;
        margin: 0;
        padding: 0;
        border: 1px solid #dfe9e2;
        border-radius: 10px;
        background: #f8fbf9;
        color: #20583c;
        cursor: pointer;
    }
    .sidebar-toggle svg { width: 21px; height: 21px; }

    .app-sidebar {
        z-index: 100;
        top: 64px;
        bottom: 0;
        width: min(292px, 86vw);
        padding-top: 15px;
        transform: translateX(-105%);
        transition: transform .2s ease;
        box-shadow: 12px 0 28px rgba(11, 39, 26, .18);
    }

    .app-sidebar > .sidebar-heading,
    .sidebar-collapse-toggle { display: none; }
    body.sidebar-open .app-sidebar { transform: translateX(0); }
    .sidebar-scrim:not([hidden]) { position: fixed; z-index: 95; inset: 64px 0 0; display: block; width: 100%; height: calc(100vh - 64px); margin: 0; padding: 0; border: 0; border-radius: 0; background: rgba(10, 28, 19, .45); }
    body.sidebar-open { overflow: hidden; }
    body:not(.dashboard-page):not(.admin-dashboard-page).business-app-page,
    body:not(.dashboard-page):not(.admin-dashboard-page).admin-app-page,
    body.dashboard-page.business-app-page,
    body.admin-dashboard-page.admin-app-page { padding: 78px 12px 12px; }
    body.dashboard-page.business-app-page { padding-top: 78px; }
    body.admin-dashboard-page.admin-app-page { padding-top: 78px; }
    body.dashboard-page.business-app-page .dashboard-topbar { min-height: 42px; margin-bottom: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .app-sidebar { transition: none; }
}

.help-page,
.team-page { width: min(100%, 1040px); margin: 0 auto 30px; }
.help-hero { padding: clamp(24px, 5vw, 48px); border: 1px solid #e1ebe4; border-radius: 20px; background: linear-gradient(135deg, #f3faf5, #fff 70%); }
.help-hero h1 { margin: 6px 0 10px; color: #173c2c; font-size: clamp(30px, 5vw, 44px); letter-spacing: -.04em; }
.help-hero > p:not(.eyebrow) { max-width: 650px; color: #607066; font-size: 16px; }
.help-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.help-section { margin-top: 34px; }
.help-section-heading { margin-bottom: 16px; }
.help-section-heading h2 { margin: 4px 0; color: #173c2c; font-size: clamp(22px, 3vw, 28px); letter-spacing: -.025em; }
.help-benefit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 13px; }
.help-card { min-height: 165px; padding: 18px; border: 1px solid #e3ebe5; border-radius: 14px; background: #fff; box-shadow: 0 5px 16px rgba(28, 62, 42, .035); }
.help-card-icon { display: grid; width: 36px; height: 36px; place-items: center; margin-bottom: 12px; border-radius: 11px; background: #eaf5ee; color: #17684a; font-size: 17px; font-weight: 800; }
.help-card h3,
.help-steps h3 { margin: 0 0 6px; color: #233d2f; font-size: 15px; }
.help-card p,
.help-steps p { margin: 0; color: #67766c; font-size: 13px; line-height: 1.65; }
.help-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.help-steps li { display: flex; align-items: flex-start; gap: 14px; padding: 17px; border: 1px solid #e3ebe5; border-radius: 13px; background: #fff; }
.help-steps li > span { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; border-radius: 50%; background: #eaf5ee; color: #17684a; font-size: 13px; font-weight: 800; }
.help-steps h3 { margin-top: 2px; }
.faq-section { margin-bottom: 30px; }
.help-faq { margin: 9px 0; padding: 0 17px; border: 1px solid #e3ebe5; border-radius: 12px; background: #fff; }
.help-faq summary { padding: 16px 0; color: #253f31; font-size: 14px; font-weight: 700; cursor: pointer; }
.help-faq p { margin: -3px 0 16px; color: #607066; font-size: 13px; line-height: 1.7; }

.team-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 0 22px; }
.team-header h1 { margin: 4px 0; color: #173c2c; }
.team-header p { margin: 5px 0; }
.team-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.team-stat { display: grid; gap: 7px; padding: 16px; border: 1px solid #e3ebe5; border-radius: 13px; background: #fff; }
.team-stat span { color: #68786e; font-size: 12px; }
.team-stat strong { color: #1d4732; font-size: 23px; }
.team-panel { margin: 16px 0; padding: 20px; border: 1px solid #e3ebe5; border-radius: 14px; background: #fff; box-shadow: 0 5px 16px rgba(28, 62, 42, .035); }
.team-panel h2 { margin: 3px 0; color: #203d2d; font-size: 20px; }
.team-panel > p { color: #68786e; font-size: 13px; line-height: 1.65; }
.team-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.team-invite-created { border-color: #b6d9c2; background: #f7fcf8; }
.invite-link-row { display: flex; align-items: stretch; gap: 9px; margin-top: 14px; }
.invite-link-row input { min-width: 0; flex: 1; }
.invite-link-row .button { flex: 0 0 auto; margin: 0; }
.team-member-list { display: grid; }
.team-member { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-top: 1px solid #edf1ee; }
.team-member > div { display: grid; min-width: 0; flex: 1; gap: 3px; }
.team-member > div strong { overflow: hidden; color: #283f32; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.team-member > div span { color: #758178; font-size: 11px; }
.team-member-status { padding: 5px 9px; border-radius: 99px; background: #eaf5ee; color: #216342; font-size: 10px; font-weight: 750; }
.team-member-status.is-inactive { background: #f1f3f2; color: #657069; }
.team-panel table { width: 100%; border-collapse: collapse; }
.team-panel th,
.team-panel td { padding: 11px 9px; border-bottom: 1px solid #edf1ee; text-align: left; }
.team-panel th { color: #67756c; font-size: 11px; }
.team-panel td { color: #35493b; font-size: 12px; }
.team-panel td form { margin: 0; }
.team-panel td .button { margin: 0; padding: 7px 10px; font-size: 11px; }

@media (max-width: 680px) {
    .help-hero { border-radius: 15px; }
    .help-benefit-grid { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
    .help-card { min-height: 0; padding: 15px; }
    .team-header { align-items: flex-start; flex-direction: column; }
    .team-overview { grid-template-columns: 1fr 1fr; }
    .team-stat:last-child { grid-column: 1 / -1; }
    .team-panel { padding: 15px; }
    .invite-link-row { align-items: stretch; flex-direction: column; }
    .invite-link-row .button { width: 100%; }
}

body.seller-invite-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    background: linear-gradient(145deg, #f1f8f3, #f8faf9 55%, #edf5f0);
}

.seller-invite-shell { width: min(100%, 520px); margin: 24px auto; }
.seller-invite-card { padding: clamp(22px, 5vw, 36px); border: 1px solid #e0e9e3; border-radius: 18px; background: #fff; box-shadow: 0 18px 50px rgba(27, 65, 43, .09); }
.seller-invite-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 28px; color: #173c2c; text-decoration: none; }
.seller-invite-brand strong,
.seller-invite-brand small { display: block; }
.seller-invite-brand strong { font-size: 13px; }
.seller-invite-brand small { margin-top: 3px; color: #718078; font-size: 11px; }
.seller-invite-card h1 { margin: 5px 0 9px; color: #173c2c; font-size: 28px; letter-spacing: -.03em; }
.seller-invite-intro { color: #66756c; font-size: 13px; line-height: 1.65; }
.seller-invite-form { display: grid; gap: 7px; margin-top: 22px; }
.seller-invite-form label { margin-top: 8px; color: #304337; font-size: 12px; font-weight: 700; }
.seller-invite-form input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d6e0d9; border-radius: 9px; background: #fff; color: #243b2e; font: inherit; }
.seller-invite-form input:focus { border-color: #3a8b61; outline: 3px solid rgba(58, 139, 97, .15); }
.seller-invite-form .button { width: 100%; margin-top: 14px; }

.auth-recovery-page { width: min(100%, 500px); margin: clamp(24px, 8vh, 80px) auto; }
.auth-recovery-card { padding: clamp(22px, 5vw, 34px); border: 1px solid #e1e9e3; border-radius: 16px; background: #fff; box-shadow: 0 14px 40px rgba(27, 65, 43, .07); }
.auth-recovery-card h1 { margin: 5px 0 10px; color: #173c2c; font-size: clamp(25px, 5vw, 32px); letter-spacing: -.03em; }
.auth-recovery-card > p:not(.eyebrow) { color: #637168; font-size: 13px; line-height: 1.65; }
.auth-recovery-card form { display: grid; gap: 8px; margin: 22px 0 18px; }
.auth-recovery-card label { margin-top: 5px; color: #304337; font-size: 12px; font-weight: 700; }
.auth-recovery-card input:not([type="hidden"]) { min-height: 44px; padding: 10px 12px; border: 1px solid #d6e0d9; border-radius: 9px; }
.auth-recovery-card button.button { width: 100%; margin-top: 10px; }
.auth-recovery-card .message { padding: 11px 13px; border-radius: 9px; }


/* Global language, theme, install and WhatsApp controls */
.global-preferences {
    position: fixed;
    z-index: 1200;
    top: 12px;
    right: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    max-width: calc(100% - 28px);
}
.global-preferences select, .global-preferences button { min-height: 38px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; color: #1f2937; padding: 7px 10px; font: inherit; box-shadow: 0 2px 9px rgba(15,23,42,.10); cursor: pointer; }
.global-preferences button[hidden] { display: none; }
.whatsapp-support { position: fixed; z-index: 1190; right: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 999px; background: #16a34a; color: #fff !important; text-decoration: none; font-weight: 700; box-shadow: 0 5px 18px rgba(0,0,0,.22); }
.whatsapp-support:hover { background: #15803d; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:600px) { .global-preferences { top: 8px; right: 8px; } .global-preferences select, .global-preferences button { min-height: 34px; padding: 5px 7px; font-size: 12px; } .whatsapp-support { right: 12px; bottom: 12px; padding: 10px 13px; } }
