:root {
    --navy: #234a43;
    --slate: #35685d;
    --sky: #a9cfc2;
    --peach: #e97f68;
    --mint: #dceee5;
    --rose: #f8dfe3;
    --cream: #fffaf4;
    --panel: rgba(255, 255, 255, 0.88);
    --line: rgba(35, 74, 67, 0.14);
    --text: #2c403b;
    --muted: #647871;
    --success: #2d8f62;
    --warning: #c77e27;
    --danger: #b34f59;
    --shadow: 0 24px 60px rgba(35, 74, 67, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", Arial, sans-serif;
    font-size: 15px;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(248, 223, 227, 0.78), transparent 28%),
        radial-gradient(circle at bottom right, rgba(220, 238, 229, 0.86), transparent 30%),
        linear-gradient(180deg, #fffdf9 0%, #f6f5ef 100%);
    min-height: 100vh;
}

body.app-body {
    overflow-x: hidden;
}

body.auth-body {
    background:
        radial-gradient(circle at 14% 18%, rgba(74, 184, 255, 0.22), transparent 22%),
        radial-gradient(circle at 84% 16%, rgba(255, 123, 158, 0.18), transparent 18%),
        radial-gradient(circle at 82% 88%, rgba(255, 189, 115, 0.18), transparent 22%),
        linear-gradient(135deg, #fff7fb 0%, #f7fbff 42%, #fdf7f0 100%);
}

body .btn {
    border-radius: 14px;
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 252px 1fr;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background:
        linear-gradient(180deg, rgba(35, 74, 67, 0.99), rgba(47, 102, 91, 0.99)),
        var(--navy);
    color: #fff;
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.brand-block {
    display: flex;
    gap: 0.9rem;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
}

.brand-block strong {
    display: block;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.brand-block small {
    color: rgba(255, 255, 255, 0.72);
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--peach), var(--sky));
    overflow: hidden;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sidebar-nav {
    display: grid;
    gap: 0.35rem;
}

.sidebar-nav-group {
    display: grid;
    gap: 0.3rem;
}

.sidebar-accordion {
    display: grid;
    gap: 0.3rem;
}

.sidebar-accordion summary {
    list-style: none;
}

.sidebar-accordion summary::-webkit-details-marker {
    display: none;
}

.sidebar-accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    user-select: none;
}

.sidebar-accordion-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-accordion-toggle.active {
    background: linear-gradient(135deg, rgba(244, 162, 97, 0.24), rgba(107, 201, 219, 0.2));
    color: #fff;
}

.sidebar-accordion-caret {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.18s ease, opacity 0.18s ease;
    opacity: 0.9;
}

.sidebar-accordion[open] .sidebar-accordion-caret {
    transform: rotate(90deg);
}

.sidebar-nav a {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.sidebar-nav a.reorder-alert {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: #fff;
}

.sidebar-nav a.reorder-ok {
    background: linear-gradient(135deg, #167a56, #2ca878);
    color: #fff;
}

.sidebar-nav-status {
    min-width: 1.85rem;
    padding: 0.14rem 0.42rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(244, 162, 97, 0.24), rgba(107, 201, 219, 0.2));
    color: #fff;
}

.sidebar-subnav {
    display: grid;
    gap: 0.25rem;
    margin-left: 0.75rem;
    padding-left: 0.8rem;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-subnav .subnav-link {
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.76);
}

.sidebar-subnav .subnav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-card {
    margin-top: auto;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.86);
}

.sidebar-card h3 {
    margin: 0.35rem 0 0.6rem;
    font-family: Georgia, serif;
}

.compact-inline-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: 0.55rem;
    align-items: center;
    margin-top: 0.55rem;
}

.main-pane {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.4rem 0.85rem;
}

.topbar h1,
.hero-panel h2,
.info-card h3,
.panel h2,
.auth-card h1 {
    margin: 0.35rem 0 0;
    font-family: Georgia, serif;
    color: var(--navy);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.user-pill {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    min-width: 220px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--line);
}

.user-pill span {
    color: var(--muted);
    font-size: 0.9rem;
}

.page-shell {
    padding: 0 1.4rem 1.6rem;
}

.auth-page-shell {
    padding: 0;
}

.pos-page-shell {
    padding: 1.5rem;
}

.admin-top-strip {
    position: sticky;
    top: 0;
    z-index: 60;
    padding: 0.8rem 1.8rem 0.9rem;
    background: linear-gradient(180deg, rgba(244, 247, 251, 0.98), rgba(244, 247, 251, 0.9));
    border-bottom: 1px solid rgba(19, 34, 56, 0.08);
    backdrop-filter: blur(10px);
}

.admin-top-links {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.admin-top-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.72rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(19, 34, 56, 0.12);
    color: #fff;
    font-weight: 800;
    font-size: 0.92rem;
    line-height: 1;
    box-shadow: 0 10px 22px rgba(15, 34, 55, 0.14);
}

.admin-top-link.tone-sales {
    background: linear-gradient(135deg, #ef7f62, #f4a261);
}

.admin-top-link.tone-suppliers {
    background: linear-gradient(135deg, #157f5f, #3ca370);
}

.admin-top-link.tone-employees {
    background: linear-gradient(135deg, #126782, #28a3b9);
}

.admin-top-link.tone-stock {
    background: linear-gradient(135deg, #304c89, #5575b8);
}

.admin-top-link.tone-orders {
    background: linear-gradient(135deg, #8f3f71, #b95fa0);
}

.admin-top-link.tone-reorder {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
}

.admin-top-link.tone-expenses {
    background: linear-gradient(135deg, #5a3d91, #7b5db4);
}

.admin-top-link.tone-pnl {
    background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.admin-top-link.tone-receipts {
    background: linear-gradient(135deg, #8b1e54, #d96c9a);
}

.admin-top-link.tone-variance {
    background: linear-gradient(135deg, #9a3412, #f97316);
}

.admin-top-link.tone-approvals {
    background: linear-gradient(135deg, #157f5f, #f4a261);
}

.admin-top-link.active,
.admin-top-link:hover {
    filter: saturate(1.08) brightness(1.02);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 34, 55, 0.2);
}

.reorder-alert-panel {
    background:
        radial-gradient(circle at top right, rgba(248, 113, 113, 0.14), transparent 24%),
        linear-gradient(180deg, rgba(255, 244, 244, 0.96), rgba(255, 250, 250, 0.96));
    border: 1px solid rgba(185, 28, 28, 0.14);
}

.reorder-healthy-panel {
    background: linear-gradient(180deg, rgba(239, 250, 245, 0.98), rgba(250, 255, 252, 0.98));
    border: 1px solid rgba(22, 122, 86, 0.18);
}

.reorder-healthy-panel .reorder-alert-callout h2,
.reorder-healthy-panel .reorder-alert-callout p:last-child {
    color: #126143;
}

.reorder-healthy-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #167a56, #2ca878);
    color: #fff;
    font-weight: 800;
}

.reorder-alert-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.reorder-alert-callout h2 {
    margin: 0 0 0.35rem;
    color: #7f1d1d;
}

.reorder-alert-callout p:last-child {
    margin: 0;
    color: #7a4d4d;
}

.reorder-alert-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    padding: 0.9rem 1.15rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: 0 14px 30px rgba(185, 28, 28, 0.22);
}

@keyframes reorder-alert-pulse {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 12px 26px rgba(185, 28, 28, 0.2);
    }
    50% {
        transform: translateY(-1px) scale(1.04);
        box-shadow: 0 18px 36px rgba(239, 68, 68, 0.3);
    }
}

.hero-grid,
.card-grid {
    display: grid;
    gap: 1rem;
}

.hero-grid {
    grid-template-columns: 1.6fr 1fr;
    margin-bottom: 1rem;
}

.card-grid.two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.four-up {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-panel,
.info-card,
.panel,
.metric-card,
.auth-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.hero-panel,
.info-card,
.panel {
    padding: 1.35rem;
}

.hero-primary {
    background:
        linear-gradient(135deg, rgba(19, 34, 56, 0.96), rgba(33, 54, 82, 0.9)),
        var(--navy);
    color: #fff;
}

.hero-primary h2,
.hero-primary .eyebrow,
.hero-primary p,
.hero-primary a {
    color: #fff;
}

.hero-accent {
    background:
        linear-gradient(135deg, rgba(244, 162, 97, 0.2), rgba(107, 201, 219, 0.2)),
        rgba(255, 255, 255, 0.92);
}

.hero-secondary {
    background:
        linear-gradient(135deg, rgba(107, 201, 219, 0.18), rgba(216, 243, 220, 0.35)),
        rgba(255, 255, 255, 0.92);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.2rem;
}

.button,
.ghost-button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.85rem 1.25rem;
    border: 0;
    font-weight: 700;
    cursor: pointer;
}

.button,
button {
    background: linear-gradient(135deg, var(--peach), #ef7f62);
    color: #fff;
}

.ghost-button {
    background: rgba(19, 34, 56, 0.06);
    color: var(--navy);
    border: 1px solid var(--line);
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--peach);
    font-size: 0.72rem;
    font-weight: 800;
}

.feature-list {
    margin: 0.9rem 0 0;
    padding-left: 1.05rem;
    line-height: 1.65;
}

.feature-list.compact {
    line-height: 1.5;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-shell {
    display: grid;
    gap: 1rem;
}

.dashboard-overview-toggle {
    align-self: flex-start;
    justify-self: start;
    width: fit-content;
    min-height: 44px;
    padding: 0.8rem 1.2rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(240, 140, 104, 0.16), rgba(93, 191, 231, 0.18));
    border: 1px solid rgba(19, 34, 56, 0.08);
    color: var(--navy);
    box-shadow: 0 14px 28px rgba(15, 34, 55, 0.08);
}

.admin-overview-toggle {
    margin: 0.8rem 1.8rem 0;
}

.dashboard-overview-toggle:hover,
.dashboard-overview-toggle:focus {
    background: linear-gradient(135deg, rgba(240, 140, 104, 0.24), rgba(93, 191, 231, 0.24));
}

.dashboard-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.35rem;
}

.dashboard-toolbar h2 {
    margin: 0.25rem 0 0;
}

.dashboard-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.dashboard-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.dashboard-toolbar-actions-inline {
    margin-bottom: 1rem;
}

.dashboard-history-form {
    display: grid;
    gap: 0.3rem;
}

.dashboard-history-form label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.dashboard-history-form select {
    min-width: 220px;
    min-height: 42px;
    padding: 0.72rem 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(19, 34, 56, 0.12);
    background: #fff;
    color: var(--text);
    font: inherit;
}

.dashboard-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(19, 34, 56, 0.06);
    border: 1px solid rgba(19, 34, 56, 0.08);
    color: var(--navy);
    font-weight: 800;
    font-size: 0.92rem;
}

.dashboard-filter-pill.active {
    background: linear-gradient(135deg, #16315a, #4d86d9);
    color: #fff;
    box-shadow: 0 14px 28px rgba(22, 49, 90, 0.18);
}

.dashboard-metrics {
    margin-bottom: 0;
}

.dashboard-kpi-cluster {
    padding: 1rem 1rem 1.1rem;
    background:
        linear-gradient(180deg, rgba(249, 252, 255, 0.96), rgba(255, 255, 255, 0.92));
    border: 1px solid rgba(19, 34, 56, 0.08);
    box-shadow: 0 18px 40px rgba(15, 34, 55, 0.08);
}

.dashboard-toolbar-embedded {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard-metrics-linked {
    margin-top: 0.9rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(19, 34, 56, 0.08);
}

.dashboard-main-grid,
.dashboard-support-grid {
    align-items: stretch;
}

.dashboard-main-grid > .dashboard-panel,
.dashboard-support-grid > .dashboard-panel {
    min-height: 520px;
}

.dashboard-panel {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.dashboard-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0.9rem;
}

.dashboard-trend-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.dashboard-trend-card {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(19, 34, 56, 0.08);
}

.dashboard-trend-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-legend-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--navy);
    background: rgba(19, 34, 56, 0.06);
}

.dashboard-chart-shell {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
    gap: 0.9rem;
    align-items: end;
    min-height: 280px;
}

.dashboard-chart-shell-vertical {
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    gap: 0.55rem;
    align-items: stretch;
    min-height: 360px;
    padding-top: 0.4rem;
    padding-bottom: 0.35rem;
    background:
        repeating-linear-gradient(
            to top,
            transparent 0,
            transparent 58px,
            rgba(19, 34, 56, 0.06) 58px,
            rgba(19, 34, 56, 0.06) 59px
        );
    border-radius: 18px;
}

.dashboard-chart-shell-fixed {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
}

.dashboard-chart-shell.single-branch {
    min-height: 240px;
}

.dashboard-chart-card {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 0.35rem;
    align-items: stretch;
    min-width: 0;
}

.dashboard-chart-top-value {
    text-align: center;
    font-size: clamp(0.9rem, 1vw, 1.02rem);
    font-weight: 1000;
    color: #0f2748;
    letter-spacing: 0.01em;
    line-height: 1.1;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}

.dashboard-bar-chart-list {
    display: grid;
    gap: 0.85rem;
}

.dashboard-bar-row {
    display: grid;
    gap: 0.38rem;
}

.dashboard-bar-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.dashboard-bar-row-label {
    font-weight: 800;
    color: var(--navy);
}

.dashboard-bar-row-value {
    font-size: 0.88rem;
    font-weight: 800;
    color: #16315a;
}

.dashboard-bar-row-track {
    width: 100%;
    min-height: 26px;
    padding: 2px;
    border-radius: 999px;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(19, 34, 56, 0.06) 0,
            rgba(19, 34, 56, 0.06) calc(20% - 1px),
            rgba(19, 34, 56, 0.12) calc(20% - 1px),
            rgba(19, 34, 56, 0.12) 20%
        );
    overflow: hidden;
}

.dashboard-bar-row-fill {
    height: 100%;
    min-height: 22px;
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(15, 34, 55, 0.15);
}

.dashboard-chart-group {
    display: grid;
    gap: 0.55rem;
    align-items: end;
}

.dashboard-chart-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
    align-items: end;
    min-height: 220px;
    padding: 0 0.3rem;
}

.dashboard-chart-columns.single-branch {
    grid-template-columns: 1fr;
}

.dashboard-chart-column {
    display: grid;
    gap: 0.28rem;
    align-items: end;
    justify-items: center;
    min-height: 100%;
    width: 100%;
    min-width: 0;
}

.dashboard-chart-bar-track {
    width: 100%;
    max-width: 38px;
    height: 180px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0.2rem 0;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(19, 34, 56, 0.04), rgba(19, 34, 56, 0.1));
}

.dashboard-chart-bar-track-wide {
    max-width: 54px;
    width: 54px;
    height: 240px;
    padding: 0.25rem 0.28rem;
    border-radius: 10px 10px 0 0;
    background:
        linear-gradient(180deg, rgba(19, 34, 56, 0.03), rgba(19, 34, 56, 0.11)),
        repeating-linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.18) 0,
            rgba(255, 255, 255, 0.18) calc(20% - 1px),
            rgba(19, 34, 56, 0.04) calc(20% - 1px),
            rgba(19, 34, 56, 0.04) 20%
        );
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.dashboard-chart-bar {
    width: 100%;
    max-width: 24px;
    min-height: 8px;
    border-radius: 14px 14px 8px 8px;
    box-shadow: 0 10px 22px rgba(15, 34, 55, 0.16);
}

.dashboard-chart-bar-wide {
    max-width: 100%;
    min-height: 16px;
    border-radius: 0;
    box-shadow: 0 14px 26px rgba(15, 34, 55, 0.2);
}

.dashboard-chart-bar.branch-1,
.dashboard-legend-pill.branch-1,
.dashboard-branch-bar.branch-1,
.dashboard-bar-row-fill.branch-1 {
    background: linear-gradient(180deg, #2f6fe0, #6bc9db);
}

.dashboard-chart-bar.branch-2,
.dashboard-legend-pill.branch-2,
.dashboard-branch-bar.branch-2,
.dashboard-bar-row-fill.branch-2 {
    background: linear-gradient(180deg, #d75b90, #f4a261);
}

.dashboard-legend-pill.branch-1 {
    color: #16315a;
}

.dashboard-legend-pill.branch-2 {
    color: #7f3755;
}

.dashboard-chart-bar.tone-1 {
    background: linear-gradient(180deg, #2f6fe0, #7dd3fc);
}

.dashboard-chart-bar.tone-2 {
    background: linear-gradient(180deg, #f28d35, #ffd166);
}

.dashboard-chart-bar.tone-3 {
    background: linear-gradient(180deg, #0f8b6d, #67d5b5);
}

.dashboard-chart-bar.tone-4 {
    background: linear-gradient(180deg, #c8553d, #f7a072);
}

.dashboard-chart-bar.tone-5 {
    background: linear-gradient(180deg, #6a4c93, #b8a1ff);
}

.dashboard-chart-bar.tone-6 {
    background: linear-gradient(180deg, #a23b72, #f28482);
}

.dashboard-chart-value {
    font-size: 0.74rem;
    color: var(--muted);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    min-height: 42px;
}

.dashboard-chart-label {
    text-align: center;
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-chart-label-strong {
    font-size: 0.88rem;
    font-weight: 900;
    color: var(--navy);
    line-height: 1.2;
    width: 100%;
    padding-top: 0.55rem;
    border-top: 2px solid rgba(19, 34, 56, 0.12);
}

.hr-chart-label {
    font-size: 1.02rem;
    letter-spacing: 0.01em;
    color: #10284c;
}

.subtle-rule-note {
    display: grid;
    gap: 0.12rem;
    margin-top: 0.35rem;
    padding: 0.42rem 0.55rem;
    border-left: 3px solid rgba(77, 134, 217, 0.45);
    background: rgba(235, 243, 255, 0.7);
    border-radius: 10px;
}

.subtle-rule-note strong {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #24416a;
}

.subtle-rule-note span {
    font-size: 0.8rem;
    color: #48617f;
    line-height: 1.35;
}

.dashboard-branch-stack,
.dashboard-expense-mix {
    display: grid;
    gap: 0.85rem;
}

.dashboard-branch-card {
    display: grid;
    gap: 0.45rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(19, 34, 56, 0.08);
}

.dashboard-branch-head,
.dashboard-branch-meta,
.dashboard-mix-head {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: center;
}

.dashboard-branch-head span,
.dashboard-branch-meta span,
.dashboard-mix-head span {
    color: var(--muted);
    font-size: 0.88rem;
}

.dashboard-branch-bar-track,
.dashboard-mix-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(19, 34, 56, 0.08);
    overflow: hidden;
}

.dashboard-branch-bar,
.dashboard-mix-fill {
    height: 100%;
    border-radius: 999px;
}

.dashboard-expense-mix {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(19, 34, 56, 0.08);
}

.dashboard-expense-mix-compact {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.dashboard-expense-mix h3 {
    margin: 0;
    font-family: Georgia, serif;
    color: var(--navy);
}

.dashboard-profit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.dashboard-profit-card {
    display: grid;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(19, 34, 56, 0.08);
    box-shadow: 0 14px 28px rgba(15, 34, 55, 0.08);
}

.dashboard-profit-card.tone-cogs {
    background: linear-gradient(180deg, rgba(232, 242, 255, 0.96), rgba(255, 255, 255, 0.9));
}

.dashboard-profit-card.tone-expenses {
    background: linear-gradient(180deg, rgba(255, 243, 229, 0.96), rgba(255, 255, 255, 0.9));
}

.dashboard-profit-card.tone-profit,
.dashboard-profit-card.tone-loss {
    background: linear-gradient(180deg, rgba(232, 249, 238, 0.96), rgba(255, 255, 255, 0.9));
}

.dashboard-profit-label {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-profit-value {
    margin: 0;
    font-size: 1.28rem;
    font-weight: 900;
    color: var(--navy);
}

.dashboard-profit-percent {
    margin: 0;
    font-size: 0.9rem;
    color: #355076;
    font-weight: 700;
}

.dashboard-profit-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(19, 34, 56, 0.08);
    overflow: hidden;
}

.dashboard-profit-fill {
    height: 100%;
    border-radius: 999px;
}

.dashboard-profit-fill.tone-cogs {
    background: linear-gradient(90deg, #2f6fe0, #7dd3fc);
}

.dashboard-profit-fill.tone-expenses {
    background: linear-gradient(90deg, #f28d35, #ffd166);
}

.dashboard-profit-fill.tone-profit {
    background: linear-gradient(90deg, #0f8b6d, #67d5b5);
}

.dashboard-profit-fill.tone-loss {
    background: linear-gradient(90deg, #c8553d, #f7a072);
}

.dashboard-mix-row {
    display: grid;
    gap: 0.42rem;
}

.dashboard-mix-row-legend {
    padding: 0.7rem 0.85rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(19, 34, 56, 0.08);
}

.dashboard-pie-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.55rem;
    vertical-align: middle;
}

.dashboard-horizontal-bars {
    display: grid;
    gap: 0.85rem;
    margin-top: 1rem;
    align-content: start;
}

.dashboard-horizontal-bar-row {
    display: grid;
    gap: 0.42rem;
}

.dashboard-horizontal-bar-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
}

.dashboard-horizontal-bar-head strong {
    color: var(--navy);
}

.dashboard-horizontal-bar-head span {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.dashboard-horizontal-bar-track {
    width: 100%;
    height: 18px;
    border-radius: 999px;
    background: rgba(19, 34, 56, 0.08);
    overflow: hidden;
}

.dashboard-horizontal-bar-fill {
    height: 100%;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(15, 34, 55, 0.15);
}

.dashboard-horizontal-bar-fill.tone-1 {
    background: linear-gradient(90deg, #2f6fe0, #7dd3fc);
}

.dashboard-horizontal-bar-fill.tone-2 {
    background: linear-gradient(90deg, #f28d35, #ffd166);
}

.dashboard-horizontal-bar-fill.tone-3 {
    background: linear-gradient(90deg, #0f8b6d, #67d5b5);
}

.dashboard-horizontal-bar-fill.tone-4 {
    background: linear-gradient(90deg, #a23b72, #f28482);
}

.dashboard-horizontal-bar-fill.tone-5 {
    background: linear-gradient(90deg, #6a4c93, #b8a1ff);
}

.dashboard-scroll-table-wrap {
    margin-top: 0.8rem;
    flex: 1;
    min-height: 0;
    height: 340px;
    max-height: 340px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 18px;
    border: 1px solid rgba(19, 34, 56, 0.08);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.dashboard-scroll-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-scroll-table thead th {
    position: sticky;
    top: 0;
    background: #f8fbff;
    color: var(--navy);
    text-align: left;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid rgba(19, 34, 56, 0.08);
}

.dashboard-scroll-table tbody td {
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid rgba(19, 34, 56, 0.06);
    color: #0f172a;
    font-weight: 800;
    font-size: 0.94rem;
}

.dashboard-scroll-table tbody tr:nth-child(even) td {
    background: rgba(248, 251, 255, 0.7);
}

.dashboard-scroll-table tbody td:nth-child(2),
.dashboard-scroll-table tbody td:nth-child(3) {
    color: #111827;
    font-weight: 900;
}

.hr-scroll-table-wrap {
    height: 360px;
    max-height: 360px;
}

.hr-scroll-table-wrap .dashboard-scroll-table tbody td {
    vertical-align: top;
}

.dashboard-mix-fill.tone-cogs {
    background: linear-gradient(135deg, #ef9a5d, #f4c07a);
}

.dashboard-mix-fill.tone-expenses {
    background: linear-gradient(135deg, #7b5db4, #b084e8);
}

.dashboard-mix-fill.tone-profit {
    background: linear-gradient(135deg, #157f5f, #58c28c);
}

.dashboard-mix-fill.tone-loss {
    background: linear-gradient(135deg, #b34f59, #e37b88);
}

.metric-card {
    padding: 1.1rem 1.2rem;
}

.metric-success {
    background: linear-gradient(180deg, rgba(216, 243, 220, 0.92), rgba(255, 255, 255, 0.88));
}

.metric-warn {
    background: linear-gradient(180deg, rgba(255, 235, 210, 0.92), rgba(255, 255, 255, 0.88));
}

.metric-danger {
    background: linear-gradient(180deg, rgba(247, 214, 224, 0.92), rgba(255, 255, 255, 0.88));
}

.metric-label {
    margin: 0;
    color: var(--muted);
    text-transform: uppercase;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.metric-value {
    margin: 0.55rem 0 0;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--navy);
}

.elly-dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 1.65rem 1.8rem;
    border-radius: 26px;
    background:
        radial-gradient(circle at 86% 14%, rgba(255, 236, 199, 0.8), transparent 24%),
        radial-gradient(circle at 72% 92%, rgba(188, 225, 211, 0.72), transparent 31%),
        linear-gradient(120deg, #234a43, #35685d 56%, #4b8c7a);
    color: #fff;
    box-shadow: 0 20px 42px rgba(35, 74, 67, 0.19);
}

.elly-dashboard-hero .eyebrow { color: #f7d7a8; }
.elly-dashboard-hero h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.45rem); }
.elly-dashboard-hero p:last-child { max-width: 580px; margin: 0.45rem 0 0; color: rgba(255, 255, 255, 0.82); }
.elly-hero-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.elly-hero-actions .btn-primary { background: #ef8068; border-color: #ef8068; }
.elly-hero-actions .btn-light { background: rgba(255, 255, 255, 0.9); color: #234a43; }
.elly-dashboard-period { display: flex; align-items: end; justify-content: space-between; gap: 1.2rem; margin: 1rem 0; padding: 1rem 1.15rem; border-top: 3px solid rgba(233, 127, 104, 0.6); }
.elly-dashboard-period h2 { margin: 0.25rem 0 0; font-size: 1.15rem; }
.elly-dashboard-period-form { display: flex; align-items: end; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap; }
.elly-period-buttons { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.elly-period-buttons .dashboard-filter-pill { cursor: pointer; }
.elly-dashboard-period-form label { display: grid; gap: 0.28rem; min-width: 145px; color: #5e766f; font-size: 0.73rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.elly-dashboard-period-form .form-control { min-height: 40px; padding: 0.45rem 0.6rem; }
.elly-dashboard-period-form .btn-primary { min-height: 40px; background: #ef8068; border-color: #ef8068; }

.elly-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9rem; margin: 1rem 0; }
.elly-summary-card { min-height: 142px; padding: 1.1rem 1.15rem; border: 1px solid rgba(35, 74, 67, 0.08); border-radius: 22px; box-shadow: 0 12px 28px rgba(35, 74, 67, 0.07); }
.elly-summary-card p { margin: 0; color: #5e766f; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }
.elly-summary-card h2 { margin: 0.7rem 0 0.35rem; color: #234a43; font-size: clamp(1.35rem, 2.1vw, 1.9rem); }
.elly-summary-card span { color: #647871; font-size: 0.86rem; }
.elly-summary-card.tone-sales { background: linear-gradient(145deg, #fff9e9, #fff 74%); }
.elly-summary-card.tone-orders { background: linear-gradient(145deg, #fff0ef, #fff 74%); }
.elly-summary-card.tone-stock { background: linear-gradient(145deg, #eaf8f0, #fff 74%); }
.elly-summary-card.tone-alert { background: linear-gradient(145deg, #ffe8e5, #fff 74%); }
.elly-summary-card.tone-expenses { background: linear-gradient(145deg, #e9f4f1, #fff 74%); }

.elly-quick-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.7rem; margin-bottom: 1rem; }
.elly-quick-actions a { display: grid; gap: 0.22rem; padding: 0.85rem 0.9rem; border: 1px solid rgba(53, 104, 93, 0.12); border-radius: 17px; background: #fffdf9; color: #234a43; text-decoration: none; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.elly-quick-actions a:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(35, 74, 67, 0.12); }
.elly-quick-actions strong { font-size: 0.9rem; }.elly-quick-actions span { color: #647871; font-size: 0.78rem; }
.elly-dashboard-grid { margin-bottom: 1rem; }.elly-dashboard-panel { border-top: 3px solid rgba(233, 127, 104, 0.6); }
.elly-order-list, .elly-stock-list { display: grid; gap: 0.55rem; }.elly-order-row, .elly-stock-list > div, .elly-stock-list > a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.7rem; padding: 0.72rem; border-radius: 15px; background: #f7fbf8; color: #234a43; text-decoration: none; }.elly-stock-list > div, .elly-stock-list > a { grid-template-columns: 1fr auto; }.elly-order-row:hover, .elly-stock-list > a:hover { background: #eef7f2; }.elly-order-date { min-width: 48px; padding: 0.46rem; border-radius: 12px; background: #f9d8d3; color: #8a4335; font-weight: 800; text-align: center; }.elly-order-row small, .elly-stock-list small { display: block; margin-top: 0.15rem; color: #647871; font-size: 0.76rem; }.elly-order-row > span:last-child, .elly-stock-list > * > span:last-child { text-align: right; }
.elly-payment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.65rem; }.elly-payment-grid div { padding: 0.85rem 0.65rem; border-radius: 15px; background: #f7fbf8; }.elly-payment-grid span { display: block; color: #647871; font-size: 0.75rem; }.elly-payment-grid strong { display: block; margin-top: 0.28rem; color: #234a43; font-size: 0.95rem; }.elly-payment-note { display: flex; gap: 0.4rem; align-items: baseline; margin-top: 1rem; color: #647871; }.elly-payment-note strong { color: #e26e57; font-size: 1.5rem; }

@media (max-width: 900px) {
    .dashboard-profit-grid {
        grid-template-columns: 1fr;
    }
}

.admin-quick-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.admin-quick-card {
    display: grid;
    gap: 0.45rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(19, 34, 56, 0.08);
    box-shadow: 0 14px 28px rgba(15, 34, 55, 0.08);
    color: var(--navy);
    background: #fff;
    min-height: 88px;
}

.admin-quick-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(15, 34, 55, 0.12);
}

.admin-quick-card:not(.admin-quick-card-wide) {
    grid-column: span 2;
}

.admin-quick-card-wide {
    grid-column: span 3;
}

.admin-quick-head {
    display: grid;
    gap: 0.35rem;
}

.admin-quick-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(19, 34, 56, 0.68);
}

.admin-quick-value {
    font-size: 1rem;
    line-height: 1.3;
}

.tone-peach {
    background: linear-gradient(135deg, rgba(244, 162, 97, 0.22), rgba(255, 255, 255, 0.98));
}

.tone-mint {
    background: linear-gradient(135deg, rgba(216, 243, 220, 0.85), rgba(255, 255, 255, 0.98));
}

.tone-sky {
    background: linear-gradient(135deg, rgba(107, 201, 219, 0.24), rgba(255, 255, 255, 0.98));
}

.tone-orders {
    background: linear-gradient(135deg, rgba(255, 235, 210, 0.9), rgba(255, 255, 255, 0.98));
}

.tone-stock {
    background: linear-gradient(135deg, rgba(19, 34, 56, 0.06), rgba(107, 201, 219, 0.1), rgba(255, 255, 255, 0.98));
}

.admin-stock-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.admin-stock-pill {
    display: grid;
    gap: 0.2rem;
    padding: 0.7rem 0.8rem;
    border-radius: 16px;
    color: var(--navy);
    border: 1px solid rgba(19, 34, 56, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.admin-stock-pill strong {
    font-size: 0.88rem;
}

.admin-order-preview {
    display: grid;
    gap: 0.45rem;
}

.admin-order-row {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(19, 34, 56, 0.08);
    font-size: 0.9rem;
}

.admin-order-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.tone-amber {
    background: linear-gradient(135deg, rgba(255, 213, 128, 0.4), rgba(255, 255, 255, 0.96));
}

.tone-teal {
    background: linear-gradient(135deg, rgba(107, 201, 219, 0.25), rgba(255, 255, 255, 0.96));
}

.tone-blue {
    background: linear-gradient(135deg, rgba(196, 221, 255, 0.7), rgba(255, 255, 255, 0.96));
}

.panel {
    margin-bottom: 1rem;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.9rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    text-align: left;
    padding: 0.82rem 0.72rem;
    border-bottom: 1px solid var(--line);
}

th {
    color: var(--navy);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.list-stack {
    display: grid;
    gap: 0.7rem;
}

.list-item {
    display: grid;
    gap: 0.18rem;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.list-item span,
.info-card p,
.panel p,
.hero-panel p,
.auth-card p {
    color: var(--muted);
}

.discount-approval-state.approved,
.approval-item.approved {
    border: 1px solid rgba(45, 143, 98, 0.22);
    background: linear-gradient(180deg, rgba(216, 243, 220, 0.72), rgba(255, 255, 255, 0.96));
}

.discount-approval-state.pending,
.approval-item.pending {
    border: 1px solid rgba(199, 126, 39, 0.2);
    background: linear-gradient(180deg, rgba(255, 242, 220, 0.78), rgba(255, 255, 255, 0.96));
}

.discount-approval-state.rejected,
.approval-item.rejected {
    border: 1px solid rgba(179, 79, 89, 0.2);
    background: linear-gradient(180deg, rgba(247, 214, 224, 0.78), rgba(255, 255, 255, 0.96));
}

.approval-products {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.35rem;
}

.approval-product-row {
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(19, 34, 56, 0.08);
}

.approval-product-row strong {
    color: var(--navy);
}

.approval-status-note.approved {
    color: var(--success);
    font-weight: 700;
}

.approval-status-note.rejected {
    color: var(--danger);
    font-weight: 700;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.35rem;
}

.helper-text {
    margin: -0.25rem 0 0;
    font-size: 0.92rem;
    color: var(--muted);
}

.message-detail-card,
.empty-state-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(19, 34, 56, 0.08);
}

.message-detail-card h3,
.empty-state-card h3 {
    margin: 0;
}

.message-meta {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.message-body {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: rgba(107, 201, 219, 0.1);
    color: var(--text);
    line-height: 1.6;
    white-space: normal;
    word-break: break-word;
}

.message-row-unread td {
    font-weight: 700;
}

.mailbox-panel {
    display: grid;
    gap: 1rem;
}

.mailbox-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-bottom: 0.2rem;
}

.mailbox-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 1rem;
    border-radius: 999px;
    background: rgba(19, 34, 56, 0.06);
    border: 1px solid rgba(19, 34, 56, 0.08);
    font-weight: 700;
    color: var(--text);
}

.mailbox-tab.active {
    background: linear-gradient(135deg, rgba(19, 34, 56, 0.96), rgba(32, 54, 82, 0.96));
    color: #fff;
    box-shadow: 0 14px 28px rgba(19, 34, 56, 0.16);
}

.mailbox-badge {
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: rgba(107, 201, 219, 0.18);
    color: inherit;
    font-size: 0.82rem;
}

.mailbox-layout {
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(0, 1.2fr);
    gap: 1rem;
    align-items: start;
}

.mailbox-list-shell,
.mailbox-detail-shell,
.mailbox-compose-shell {
    display: grid;
    gap: 0.9rem;
}

.mailbox-list {
    display: grid;
    gap: 0.5rem;
}

.mailbox-row {
    display: grid;
    gap: 0.35rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(19, 34, 56, 0.08);
    background: rgba(255, 255, 255, 0.84);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.mailbox-row:hover,
.mailbox-row.active {
    transform: translateY(-1px);
    border-color: rgba(107, 201, 219, 0.55);
    box-shadow: 0 16px 26px rgba(19, 34, 56, 0.08);
}

.mailbox-row.unread {
    background: rgba(107, 201, 219, 0.12);
    border-color: rgba(107, 201, 219, 0.42);
}

.mailbox-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.mailbox-row-top strong {
    font-size: 0.98rem;
}

.mailbox-row-top span,
.mailbox-row-preview {
    color: var(--muted);
}

.mailbox-row.unread .mailbox-row-top strong,
.mailbox-row.unread .mailbox-row-subject {
    font-weight: 800;
}

.mailbox-row-subject {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mailbox-row-preview {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.94rem;
}

.mailbox-compose-strip,
.mailbox-opened-message,
.mailbox-list-shell {
    display: grid;
    gap: 0.85rem;
}

.mailbox-opened-message {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(19, 34, 56, 0.08);
    background: rgba(255, 255, 255, 0.86);
}

.mailbox-opened-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.mailbox-opened-head h2 {
    margin: 0;
}

.mailbox-opened-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem 1.2rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.mailbox-opened-body {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(107, 201, 219, 0.08);
    line-height: 1.7;
    border: 1px solid rgba(19, 34, 56, 0.06);
    white-space: pre-wrap;
}

.mailbox-list-header,
.mailbox-list-row {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) 88px;
    gap: 1rem;
    align-items: center;
}

.mailbox-list-header {
    padding: 0 0.9rem 0.45rem;
    color: var(--muted);
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mailbox-list-rows {
    border: 1px solid rgba(19, 34, 56, 0.08);
    border-radius: 18px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.82);
}

.mailbox-list-row {
    padding: 0.95rem 0.9rem;
    border-top: 1px solid rgba(19, 34, 56, 0.08);
    transition: background 0.18s ease;
}

.mailbox-list-row:first-child {
    border-top: 0;
}

.mailbox-list-row:hover,
.mailbox-list-row.active {
    background: rgba(19, 34, 56, 0.06);
}

.mailbox-list-row.unread {
    background: rgba(107, 201, 219, 0.12);
}

.mailbox-row-mailer {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mailbox-row-summary {
    display: flex;
    gap: 0.45rem;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mailbox-row-summary strong,
.mailbox-row-summary span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mailbox-row-summary span,
.mailbox-row-time {
    color: var(--muted);
}

.mailbox-list-row.unread .mailbox-row-mailer,
.mailbox-list-row.unread .mailbox-row-summary strong {
    font-weight: 800;
}

.mailbox-row-time {
    text-align: right;
    font-size: 0.92rem;
}

.mailbox-empty-row {
    padding: 1rem;
    color: var(--muted);
}

.children-optin-row {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: rgba(107, 201, 219, 0.12);
    border: 1px solid rgba(19, 34, 56, 0.08);
}

.children-table-controls {
    margin: 0 0 0.9rem;
}

.children-live-search {
    max-width: 420px;
}

.filtered-select-picker {
    position: relative;
}

.filtered-select-search {
    margin-bottom: 0.55rem;
}

.filtered-select-input {
    min-height: 44px;
}

.filtered-select-picker.open .filtered-select-input {
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
}

.filtered-select-menu {
    position: absolute;
    top: calc(100% - 0.35rem);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 260px;
    overflow-y: auto;
    padding: 0.45rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(19, 34, 56, 0.12);
    box-shadow: 0 18px 40px rgba(19, 34, 56, 0.14);
}

.filtered-select-option,
.filtered-select-empty {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border-radius: 14px;
    font-size: 0.95rem;
    line-height: 1.35;
}

.filtered-select-option {
    border: 0;
    background: transparent;
    color: var(--navy);
    text-align: left;
}

.filtered-select-option:hover,
.filtered-select-option:focus,
.filtered-select-option.active {
    background: rgba(77, 134, 217, 0.12);
    outline: none;
}

.filtered-select-empty {
    color: var(--muted);
}

.filtered-select-native {
    display: none;
}

.children-table-actions {
    display: flex;
    gap: 0.7rem;
    justify-content: flex-end;
    margin-top: 0.9rem;
}

.children-optin-row input[type="checkbox"] {
    margin-top: 0.25rem;
}

.children-campaign-form {
    display: grid;
    gap: 0.9rem;
}

.children-campaign-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(244, 162, 97, 0.16), rgba(107, 201, 219, 0.16));
}

.children-select-all {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    font-weight: 700;
    color: var(--navy);
}

.children-recipient-list {
    display: grid;
    gap: 0.75rem;
    max-height: 420px;
    overflow: auto;
    padding-right: 0.2rem;
}

.children-recipient-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
}

.children-recipient-card input[type="checkbox"] {
    margin-top: 0.35rem;
}

.children-recipient-card span {
    display: grid;
    gap: 0.2rem;
}

.children-recipient-card small {
    color: var(--muted);
}

.children-campaign-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.children-channel-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(154, 52, 18, 0.12);
    color: #9a3412;
    font-weight: 700;
    font-size: 0.9rem;
}

.children-channel-pill.is-live {
    background: rgba(45, 143, 98, 0.14);
    color: var(--success);
}

.children-email-preview {
    margin: 0;
    white-space: pre-wrap;
    font: inherit;
    color: var(--text);
}

.auth-card {
    max-width: 470px;
    margin: 3rem auto;
    padding: 1.5rem;
}

.auth-layout {
    display: block;
    min-height: 100vh;
}

.auth-shell {
    max-width: 540px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.auth-shell-wide {
    max-width: 1040px;
    min-height: 100vh;
    padding: 1.25rem 1.5rem;
    grid-template-columns: minmax(420px, 470px) minmax(420px, 470px);
    align-items: center;
    gap: 1rem;
    justify-content: center;
}

.auth-card-compact {
    margin: 1rem auto 0;
    width: 100%;
}

.auth-login-card {
    margin: 0;
    max-width: none;
    min-height: 430px;
    padding: 1.45rem 1.55rem;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: center;
}

.auth-login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 8px;
    background: linear-gradient(90deg, #f08c68, #5dbfe7, #9d74d8);
}

.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-inline-links {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.85rem;
    flex-wrap: wrap;
}

.auth-inline-links a {
    color: var(--link);
    font-weight: 600;
    text-decoration: none;
}

.auth-inline-links a:hover {
    text-decoration: underline;
}

.auth-brand-panel {
    position: relative;
    overflow: hidden;
    min-height: 430px;
    padding: 1.45rem 1.55rem;
    border-radius: 32px;
    border: 1px solid rgba(19, 34, 56, 0.06);
    background:
        radial-gradient(circle at top right, rgba(93, 191, 231, 0.3), transparent 28%),
        radial-gradient(circle at bottom left, rgba(255, 176, 120, 0.22), transparent 24%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(252, 245, 255, 0.92));
    box-shadow: 0 28px 64px rgba(35, 31, 66, 0.14);
    display: grid;
    align-content: center;
    justify-items: start;
    gap: 0.8rem;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    inset: auto -90px -90px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 140, 104, 0.18), transparent 68%);
}

.auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 28px auto auto 58%;
    width: 132px;
    height: 132px;
    border-radius: 32px;
    border: 1px solid rgba(93, 191, 231, 0.14);
    background: rgba(255, 255, 255, 0.26);
    transform: rotate(12deg);
}

.auth-brand-mark {
    width: min(150px, 34vw);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 0.55rem;
    border-radius: 30px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 255, 0.7));
    border: 1px solid rgba(19, 34, 56, 0.08);
    box-shadow: 0 20px 48px rgba(15, 34, 55, 0.1);
}

.auth-logo {
    width: 100%;
    height: auto;
    display: block;
}

.auth-brand-panel h1,
.auth-login-card h2 {
    margin: 0;
    font-family: Georgia, serif;
    color: var(--navy);
}

.auth-brand-name {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.55rem;
    font-size: clamp(2.45rem, 4vw, 3.55rem);
    line-height: 0.95;
    letter-spacing: 0.02em;
    margin-top: 0.75rem;
}

.auth-brand-cute {
    background: linear-gradient(90deg, #0d7be7 0%, #2f6fe0 45%, #e96f90 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-style: italic;
    text-shadow: 0 8px 18px rgba(27, 92, 184, 0.1);
}

.auth-brand-baby {
    background: linear-gradient(90deg, #8a6670 0%, #b84f86 45%, #a6832c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 8px 18px rgba(125, 85, 98, 0.1);
}

.auth-slogan {
    margin: 0.2rem 0 0;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #c04f7f;
    font-style: italic;
}

.auth-login-head {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 0.55rem;
}

.auth-login-note {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(19, 34, 56, 0.08);
}

.auth-login-note p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--muted);
}

.auth-note-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f08c68, #5dbfe7);
    box-shadow: 0 0 0 6px rgba(93, 191, 231, 0.14);
    flex: 0 0 auto;
}

.auth-submit {
    min-height: 52px;
    margin-top: 0.2rem;
    font-size: 0.98rem;
    background: linear-gradient(90deg, #f08c68, #5dbfe7, #9d74d8);
    box-shadow: 0 16px 28px rgba(93, 116, 216, 0.22);
}

.auth-submit:hover,
.auth-submit:focus {
    background: linear-gradient(90deg, #e57d56, #48b1db, #8d63cf);
}

.auth-form label,
.data-form label {
    display: grid;
    gap: 0.42rem;
}

.auth-form input,
.data-form input,
.data-form select,
.data-form textarea {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    font: inherit;
    color: var(--text);
}

.auth-form input {
    min-height: 54px;
    border: 1px solid rgba(23, 49, 87, 0.12);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.auth-form input:focus {
    outline: none;
    border-color: rgba(93, 191, 231, 0.72);
    box-shadow: 0 0 0 4px rgba(93, 191, 231, 0.12);
}

.data-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.compact-form {
    margin-top: 0.7rem;
}

.data-form .field-span-full {
    grid-column: 1 / -1;
}

.data-form textarea {
    resize: vertical;
    min-height: 108px;
}

.flash-stack {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.flash {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.45s ease, transform 0.45s ease, max-height 0.45s ease, margin 0.45s ease, padding 0.45s ease;
    max-height: 120px;
}

.flash-dismiss {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.flash-success,
.flash-info {
    background: rgba(216, 243, 220, 0.92);
}

.flash-error {
    background: rgba(247, 214, 224, 0.96);
    color: var(--danger);
}

.pos-shell {
    display: block;
}

.pos-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 22px;
    margin-bottom: 0.85rem;
    background:
        linear-gradient(125deg, #0f2237, #17395d 48%, #f29d56 130%);
    color: #fff;
    box-shadow: var(--shadow);
}

.pos-hero h1 {
    margin: 0;
    font-family: Georgia, serif;
    font-size: 2rem;
}

.pos-user-card {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.pos-layout {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 1rem;
}

.pos-section-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.pos-section-tabs-inline,
.pos-side-switcher {
    margin-top: 1rem;
}

.pos-side-switcher {
    display: grid;
    gap: 0.7rem;
}

.pos-section-tab {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0.95rem;
    border: 0;
    border-radius: 18px;
    text-align: left;
    color: #fff;
    box-shadow: var(--shadow);
}

.pos-section-tab[data-tone="checkout"] {
    background: linear-gradient(135deg, #0f7b6c, #45bfae);
}

.pos-section-tab[data-tone="returns"] {
    background: linear-gradient(135deg, #d96f32, #f3a15f);
}

.pos-section-tab[data-tone="reconciliation"] {
    background: linear-gradient(135deg, #2e5f9b, #66a6d9);
}

.pos-section-tab[data-tone="receipts"] {
    background: linear-gradient(135deg, #7f3f98, #c66dd8);
}

.pos-section-tab.active {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(15, 34, 55, 0.2);
}

.pos-section-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.pos-section-copy {
    display: grid;
    gap: 0.1rem;
}

.pos-section-copy strong {
    font-size: 0.94rem;
}

.pos-section-copy small {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.74rem;
}

.pos-workspace-panel {
    display: none;
}

.pos-workspace-panel.active {
    display: block;
}

.pos-panel {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 28px;
    border: 1px solid rgba(20, 42, 69, 0.08);
    box-shadow: var(--shadow);
    padding: 1.2rem;
}

.pos-catalog { display: flex; flex-direction: column; min-height: 520px; }
.pos-action-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.65rem; margin-top: auto; padding-top: 1rem; }
.pos-action-button { display: grid; grid-template-columns: auto 1fr; gap: 0.08rem 0.45rem; align-items: center; min-height: 72px; padding: 0.7rem; border-radius: 14px; color: #fff; text-decoration: none; box-shadow: 0 8px 18px rgba(15, 34, 55, 0.14); }
.pos-action-button > span { grid-row: span 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 255, 255, 0.18); font-size: 0.68rem; font-weight: 900; }.pos-action-button strong { font-size: 0.82rem; }.pos-action-button small { color: rgba(255,255,255,.82); font-size: 0.66rem; }
.action-checkout { background: linear-gradient(135deg, #236d61, #3f9a86); }.action-returns { background: linear-gradient(135deg, #c86434, #ed876a); }.action-reconciliation { background: linear-gradient(135deg, #17395d, #2f668e); }.action-receipts { background: linear-gradient(135deg, #536b7b, #7f96a3); }.pos-action-button.is-locked { opacity: .64; cursor: not-allowed; }

.pos-cart-sticky { align-self: start; position: sticky; top: 0.8rem; max-height: calc(100vh - 1.6rem); overflow-y: auto; }
.pos-running-total { display: grid; grid-template-columns: 1fr auto; gap: 0.15rem 1rem; margin: -0.2rem -0.2rem 1rem; padding: 0.85rem 0.95rem; border-radius: 18px; background: linear-gradient(135deg, #234a43, #397967); color: #fff; }
.pos-running-total span { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #f7d7a8; }.pos-running-total strong { font-size: 1.35rem; }.pos-running-total small { grid-column: 1 / -1; color: rgba(255, 255, 255, 0.8); }
.pos-payment-and-actions { display: grid; grid-template-columns: minmax(0, 1fr) 172px; gap: 0.8rem; align-items: stretch; }
.pos-sale-actions { display: grid; grid-template-rows: repeat(2, minmax(82px, 1fr)); gap: 0.65rem; }
.pos-sale-actions .btn { width: 100%; border: 0; border-radius: 14px; color: #fff; font-size: 0.98rem; font-weight: 800; box-shadow: none; }
.pos-sale-actions .btn:hover, .pos-sale-actions .btn:focus { color: #fff; filter: brightness(1.06); }
.pos-cancel-button { background: #bf261e; }
.pos-complete-button { background: #087b35; }
.pos-cancel-form { display: none; }
.pos-payment-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.7rem; padding: 0.6rem; border: 1px solid #dce6e1; border-radius: 12px; background: #f7fbf8; }
.pos-payment-summary span { display: grid; gap: 0.16rem; color: #647871; font-size: 0.72rem; font-weight: 700; }
.pos-payment-summary strong { color: #234a43; font-size: 0.9rem; }
.pos-payment-summary .pos-change-line strong { color: #087b35; }
.pos-payment-summary .pos-balance-line strong { color: #bf261e; }
@media (max-width: 760px) {
    .pos-payment-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.return-guidance { display: flex; gap: 0.6rem; margin-bottom: 1rem; padding: 0.9rem 1rem; border-radius: 18px; background: #fff4e6; border: 1px solid rgba(226, 110, 87, 0.18); color: #6b4338; }.return-panel { max-width: 980px; }

.pos-toolbar,
.barcode-form,
.pos-search-form {
    display: grid;
    gap: 0.8rem;
}

.pos-toolbar {
    grid-template-columns: 1.2fr 1fr;
    margin-bottom: 1rem;
}

.pos-search-shell {
    position: relative;
}

.pos-picker-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(19, 34, 56, 0.1);
    background: linear-gradient(180deg, rgba(107, 201, 219, 0.08), rgba(255, 255, 255, 0.96));
}

.pos-manual-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px auto;
    gap: 0.8rem;
    align-items: end;
}

.pos-secondary-panel > .pos-section-tabs-inline:first-child {
    margin-top: 0;
    margin-bottom: 1rem;
}

.barcode-form {
    grid-template-columns: 1.6fr 0.6fr auto;
    align-items: center;
}

.pos-search-dropdown {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    display: none;
    gap: 0.35rem;
    padding: 0.45rem;
    border-radius: 18px;
    border: 1px solid rgba(20, 42, 69, 0.12);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(15, 34, 55, 0.18);
    z-index: 20;
}

.pos-search-dropdown.open {
    display: grid;
}

.pos-search-option,
.pos-search-empty {
    display: grid;
    gap: 0.15rem;
    width: 100%;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    border: 1px solid rgba(20, 42, 69, 0.08);
    background: #fff;
    text-align: left;
}

.pos-search-option:hover {
    background: rgba(107, 201, 219, 0.08);
}

.pos-search-option span,
.pos-search-empty {
    color: var(--muted);
    font-size: 0.88rem;
}

.pos-search-option strong {
    color: var(--navy);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
}

.product-tile {
    display: grid;
    gap: 0.45rem;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid rgba(19, 34, 56, 0.1);
    background:
        linear-gradient(180deg, rgba(107, 201, 219, 0.1), rgba(255, 255, 255, 0.95));
}

.product-tile h3 {
    margin: 0;
    font-size: 1.05rem;
}

.tile-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

.cart-stack {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.cart-item {
    display: grid;
    gap: 0.7rem;
    padding: 0.95rem;
    border-radius: 18px;
    background: #f7fafc;
    border: 1px solid rgba(22, 35, 48, 0.08);
}

.cart-item-controls {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 0.8rem;
    align-items: center;
}

.cart-line-total {
    font-weight: 800;
    color: var(--navy);
}

.checkout-form {
    display: grid;
    gap: 1rem;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.payment-heading {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: rgba(244, 162, 97, 0.12);
    color: var(--navy);
}

.payment-heading span {
    color: var(--muted);
    font-size: 0.9rem;
}

.totals-card {
    display: grid;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(19, 34, 56, 0.05), rgba(255, 255, 255, 0.9));
}

.totals-card div {
    display: flex;
    justify-content: space-between;
}

.grand-total {
    padding-top: 0.4rem;
    border-top: 1px solid rgba(20, 42, 69, 0.12);
    font-size: 1.1rem;
}

.change-row {
    color: #0f5f3c;
    font-weight: 800;
}

.reconciliation-summary,
.reconciliation-variance {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    padding: 0.95rem;
    border-radius: 18px;
    background: rgba(19, 34, 56, 0.05);
}

.reconciliation-summary div,
.reconciliation-variance div {
    display: grid;
    gap: 0.2rem;
}

.reconciliation-summary span,
.reconciliation-variance span {
    color: var(--muted);
    font-size: 0.84rem;
}

.reconciliation-summary strong,
.reconciliation-variance strong {
    color: var(--navy);
}

.pos-secondary {
    margin-top: 1rem;
}

.pos-secondary-panel {
    margin-bottom: 0;
}

.recent-sales {
    margin-top: 1rem;
}

.recent-sale-row {
    display: flex;
    justify-content: space-between;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(20, 42, 69, 0.08);
}

.recent-sale-row-rich {
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.recent-sale-copy,
.recent-sale-actions,
.receipt-list-copy {
    display: grid;
    gap: 0.18rem;
}

.recent-sale-copy span,
.receipt-list-copy span {
    color: var(--muted);
    font-size: 0.9rem;
}

.recent-sale-actions {
    justify-items: end;
    margin-left: auto;
}

.recent-receipt-link,
.table-receipt-link,
.receipt-list-link {
    min-height: 38px;
    padding: 0.62rem 0.95rem;
    font-size: 0.88rem;
}

.table-receipt-link {
    white-space: nowrap;
}

.receipt-list-item {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.8rem;
}

.receipt-preview-modal[hidden] {
    display: none;
}

.receipt-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.receipt-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 19, 34, 0.58);
    backdrop-filter: blur(4px);
}

.receipt-preview-dialog {
    position: relative;
    width: min(960px, 100%);
    max-height: calc(100vh - 3rem);
    padding: 1.2rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 32px 70px rgba(8, 18, 36, 0.28);
    display: grid;
    gap: 1rem;
}

.receipt-preview-head,
.receipt-preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.receipt-preview-head h2 {
    margin: 0.2rem 0 0;
    font-family: Georgia, serif;
    color: var(--navy);
}

.receipt-preview-toolbar {
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: rgba(19, 34, 56, 0.05);
}

.receipt-preview-frame-shell {
    min-height: 60vh;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(19, 34, 56, 0.08);
    background: #f6f8fb;
}

.receipt-preview-frame-shell iframe {
    width: 100%;
    min-height: 60vh;
    border: 0;
    background: #f6f8fb;
}

.receipt-preview-close {
    min-height: 42px;
}

.sales-filter-bar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.sales-branch-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sales-branch-tab {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(19, 34, 56, 0.08);
    color: var(--navy);
    font-weight: 700;
}

.sales-branch-tab.active {
    background: linear-gradient(135deg, rgba(107, 201, 219, 0.32), rgba(244, 162, 97, 0.28));
    box-shadow: 0 10px 22px rgba(15, 34, 55, 0.1);
}

.sales-date-filter {
    min-width: min(280px, 100%);
}

.sales-date-groups {
    display: grid;
    gap: 1.4rem;
}

.sales-day-block {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(19, 34, 56, 0.04), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(19, 34, 56, 0.08);
}

.sales-day-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(20, 42, 69, 0.08);
}

.sales-day-head h3 {
    margin: 0;
}

.loyalty-redemption-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(107, 201, 219, 0.08), rgba(244, 162, 97, 0.08));
    border: 1px solid rgba(19, 34, 56, 0.08);
}

.loyalty-redemption-grid .field-span-full,
.loyalty-redemption-grid > .field-span-full {
    grid-column: 1 / -1;
}

.loyalty-redemption-grid label {
    margin: 0;
}

.loyalty-discount-field,
.loyalty-product-field {
    transition: opacity 0.18s ease;
}

.pos-discount-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: end;
}

.pos-request-button {
    min-height: 50px;
    white-space: nowrap;
}

.pos-foldout {
    border: 1px solid rgba(19, 34, 56, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.76);
    overflow: hidden;
}

.pos-foldout summary {
    cursor: pointer;
    list-style: none;
    padding: 0.95rem 1rem;
    font-weight: 800;
    color: var(--navy);
    background: linear-gradient(180deg, rgba(19, 34, 56, 0.04), rgba(255, 255, 255, 0.92));
}

.pos-foldout summary::-webkit-details-marker {
    display: none;
}

.pos-foldout[open] summary {
    border-bottom: 1px solid rgba(19, 34, 56, 0.08);
}

.pos-foldout .loyalty-redemption-grid {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.employee-accrual-row td {
    background: rgba(19, 34, 56, 0.02);
}

.employee-accrual-stack {
    display: grid;
    gap: 0.65rem;
    padding: 0.35rem 0;
}

.employee-accrual-item {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(19, 34, 56, 0.08);
}

.employee-accrual-item strong {
    min-width: 220px;
    color: var(--navy);
}

.employee-accrual-item span {
    color: var(--muted);
}

.muted-empty {
    color: var(--muted);
}

@media (max-width: 1080px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        gap: 1rem;
    }

    .sidebar-card {
        margin-top: 0;
    }

    .pos-layout,
    .pos-toolbar,
    .pos-section-tabs,
    .reconciliation-summary,
    .reconciliation-variance,
    .pos-manual-picker {
        grid-template-columns: 1fr;
    }

    .pos-action-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .pos-cart-sticky { position: static; max-height: none; }

    .admin-top-strip {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .admin-top-menu,
    .admin-top-menu-wide {
        min-width: 280px;
        max-width: min(90vw, 380px);
    }
}

@media (min-width: 1180px) {
    body.app-body {
        font-size: 12.45px;
    }

    .app-shell {
        grid-template-columns: 230px 1fr;
    }

    .sidebar {
        padding: 1.15rem;
    }

    .page-shell {
        padding: 0 1.1rem 1.3rem;
    }

    .topbar {
        padding: 0.95rem 1.1rem 0.7rem;
    }

    .admin-top-strip {
        padding: 0.65rem 1.1rem 0.75rem;
    }

    .admin-overview-toggle {
        margin: 0.65rem 1.1rem 0;
    }

    .hero-panel,
    .info-card,
    .panel {
        padding: 1.1rem;
    }

    .metric-grid,
    .dashboard-shell,
    .card-grid,
    .hero-grid {
        gap: 0.85rem;
    }
}

@media (max-width: 820px) {
    .elly-dashboard-hero { align-items: flex-start; flex-direction: column; padding: 1.3rem; }
    .elly-dashboard-period { align-items: stretch; flex-direction: column; }
    .elly-dashboard-period-form { justify-content: stretch; }
    .elly-dashboard-period-form label { flex: 1 1 140px; }
    .elly-summary-grid, .elly-quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .elly-payment-grid { grid-template-columns: 1fr; }

    .hero-grid,
    .card-grid.two-up,
    .card-grid.three-up,
    .card-grid.four-up,
    .auth-shell-wide {
        grid-template-columns: 1fr;
    }

    .data-form {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .user-pill {
        min-width: 0;
        width: 100%;
    }

    .payment-grid,
    .barcode-form,
    .loyalty-redemption-grid,
    .pos-discount-row {
        grid-template-columns: 1fr;
    }

    .compact-inline-form {
        grid-template-columns: 1fr;
    }

    .pos-hero {
        flex-direction: column;
    }

    .sales-filter-bar,
    .sales-day-head {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-top-links {
        gap: 0.45rem;
    }

    .admin-top-link {
        min-height: 40px;
        padding: 0.68rem 0.9rem;
    }

    .employee-accrual-item {
        flex-direction: column;
        gap: 0.35rem;
    }

    .auth-shell-wide {
        min-height: auto;
        padding: 1rem;
        align-items: stretch;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 1.6rem;
    }

    .auth-brand-mark {
        width: min(160px, 64vw);
    }

    .auth-login-card {
        padding: 1.4rem;
    }

    .auth-brand-name {
        gap: 0.45rem;
    }

    .receipt-preview-dialog {
        padding: 1rem;
        max-height: calc(100vh - 1.5rem);
    }

    .receipt-preview-frame-shell,
    .receipt-preview-frame-shell iframe {
        min-height: 52vh;
    }
}

.elly-cakes-monogram {
    display: inline-grid;
    width: 100%;
    height: 100%;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #e76f62, #f4a2a5 55%, #f7d8b5);
    color: #fffdf9;
    font-family: Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.auth-cakes-monogram {
    width: 132px;
    height: 132px;
    font-size: 2.6rem;
}

body.auth-body {
    background: #2d1712;
}

.auth-shell-wide {
    max-width: 1180px;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    gap: 0;
    padding: 2rem;
}

.auth-brand-panel {
    min-height: 620px;
    padding: 3rem;
    justify-content: end;
    border-radius: 30px 0 0 30px;
    background:
        linear-gradient(90deg, rgba(34, 15, 10, 0.86) 0%, rgba(51, 22, 14, 0.55) 42%, rgba(51, 22, 14, 0.04) 78%),
        url("../images/elly-cakes-shop.png") center / cover no-repeat;
    box-shadow: 0 30px 80px rgba(20, 8, 5, 0.35);
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    display: none;
}

.auth-brand-panel h1,
.auth-brand-name,
.auth-slogan {
    position: relative;
    z-index: 1;
    color: #fff8ec;
}

.auth-brand-name {
    font-size: clamp(2.8rem, 6vw, 5.2rem);
    line-height: 0.9;
    text-shadow: 0 4px 24px rgba(20, 7, 4, 0.34);
}

.auth-brand-cute,
.auth-brand-baby {
    color: #fff8ec;
    background: none;
    -webkit-text-fill-color: currentColor;
    text-shadow: inherit;
}

.auth-slogan {
    max-width: 310px;
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.45;
    color: rgba(255, 248, 236, 0.9);
}

.auth-login-card {
    align-self: stretch;
    display: grid;
    align-content: center;
    margin: 0;
    padding: clamp(2rem, 5vw, 4.2rem);
    border: 0;
    border-radius: 0 30px 30px 0;
    background:
        radial-gradient(circle at 88% 8%, rgba(230, 156, 98, 0.22), transparent 28%),
        linear-gradient(145deg, #5c3024, #351914 72%);
    color: #fff5e8;
    box-shadow: 0 30px 80px rgba(20, 8, 5, 0.35);
}

.auth-login-card .auth-form {
    margin-top: 1.6rem;
}

.auth-login-head {
    grid-template-columns: 74px minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}

.auth-official-logo {
    width: 74px;
    height: 74px;
    display: block;
    object-fit: contain;
    border-radius: 50%;
    background: #fff9f0;
    box-shadow: 0 8px 22px rgba(15, 5, 3, 0.3);
}

.auth-login-card h2 { color: #fff7eb; }
.auth-login-card .helper-text,
.auth-login-card .eyebrow,
.auth-login-card .auth-login-note p { color: rgba(255, 245, 232, 0.78); }
.auth-login-card .eyebrow { color: #f4bd82; }
.auth-login-card .auth-inline-links a { color: #ffe0b6; }
.auth-login-card .auth-inline-links a:hover { color: #fff8ef; }
.pin-field { position: relative; display: grid; gap: 0.45rem; }
.pin-field > span:first-child { color: #fff8ef; font-weight: 700; }

.pin-input {
    position: absolute;
    inset: 1.95rem 0 0;
    z-index: 2;
    height: 66px;
    opacity: 0;
    cursor: text;
}

.pin-display { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.45rem; height: 66px; padding: 0.45rem; border: 1px solid rgba(249, 216, 177, 0.42); border-radius: 18px; background: rgba(20, 8, 5, 0.34); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04); }
.pin-display span { display: grid; place-items: center; border-radius: 11px; background: rgba(255, 248, 236, 0.12); color: #ffe4bd; font-family: Georgia, serif; font-size: 2rem; font-weight: 900; line-height: 1; }
.pin-field:focus-within .pin-display { border-color: #f0ae75; box-shadow: 0 0 0 0.24rem rgba(240, 174, 117, 0.18); }
.pin-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.48rem; }
.pin-key { min-height: 46px; border: 1px solid rgba(255, 236, 210, 0.22); border-radius: 13px; background: rgba(255, 248, 236, 0.12); color: #fff8ef; font-size: 1.05rem; font-weight: 800; }
.pin-key:hover, .pin-key:focus { background: rgba(255, 248, 236, 0.22); }
.pin-key-clear { color: #ffc0a5; font-size: 0.8rem; }.pin-key-enter { background: #e7795e; border-color: #e7795e; color: #fff; font-size: 0.82rem; }

.pin-input:focus {
    outline: 0;
}

.auth-submit {
    margin-top: 0.4rem;
    border: 0;
    background: linear-gradient(135deg, #276255, #4d8a7d);
    box-shadow: 0 12px 24px rgba(39, 98, 85, 0.24);
}

.auth-login-card .auth-submit { display: none; }

@media (max-width: 820px) {
    .auth-shell-wide {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .auth-brand-panel {
        min-height: 300px;
        border-radius: 24px 24px 0 0;
        padding: 2rem;
    }

    .auth-login-card {
        border-radius: 0 0 24px 24px;
    }

    .auth-login-head {
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 0.8rem;
    }

    .auth-official-logo {
        width: 64px;
        height: 64px;
    }

    .pos-payment-and-actions {
        grid-template-columns: 1fr;
    }

    .pos-sale-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
    }
}

.admin-mobile-nav { display: none; }
@media (max-width: 820px) {
  body.admin-mobile-view .sidebar { display: none; }
  body.admin-mobile-view .app-shell { display: block; padding-bottom: 5.5rem; }
  .admin-mobile-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; gap: 0.2rem; padding: 0.55rem 0.45rem calc(0.55rem + env(safe-area-inset-bottom)); background: #234a43; box-shadow: 0 -8px 24px rgba(20, 47, 42, 0.2); }
  .admin-mobile-nav a { padding: 0.6rem 0.25rem; border-radius: 10px; color: #fff; font-size: 0.68rem; font-weight: 800; text-align: center; text-decoration: none; }
  .admin-mobile-nav a:active, .admin-mobile-nav a:hover { background: rgba(255,255,255,0.16); color: #fff; }
  body.admin-mobile-view .page-shell { padding: 0.75rem; }
  body.admin-mobile-view .topbar { padding: 0.85rem 0.75rem; }
  body.admin-mobile-view .elly-summary-grid, body.admin-mobile-view .elly-quick-actions { gap: 0.6rem; }
  body.admin-mobile-view .elly-summary-card { min-height: 112px; padding: 0.8rem; }
  body.admin-mobile-view .elly-summary-card h2 { font-size: 1.1rem; word-break: break-word; }
}
/* Compact desktop checkout: cart and payment details remain visible without page scrolling. */
@media (min-width: 761px) {
    .pos-compact-layout { min-height: calc(100vh - 185px); }
    .pos-compact-layout .pos-catalog { min-height: 0; }
    .pos-compact-layout .pos-cart-sticky { max-height: calc(100vh - 185px); }
}
.pos-product-picker { gap: 0.7rem; }
.pos-product-picker label { margin: 0; }
.pos-cart .panel-head { margin-bottom: 0.65rem; }
.cart-stack { gap: 0.5rem; margin-bottom: 0.65rem; }
.cart-item { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.55rem; padding: 0.7rem 0.75rem; border-radius: 14px; }
.cart-item-description { display: grid; gap: 0.12rem; min-width: 0; }
.cart-item-description strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-description span { color: #647871; font-size: 0.75rem; }
.cart-item-controls { grid-column: 2; grid-row: 1; grid-template-columns: auto 62px 32px; gap: 0.45rem; align-items: end; }
.cart-quantity-label { display: grid; gap: 0.15rem; margin: 0; }
.cart-quantity-label > span { color: #647871; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; }
.cart-quantity-input { min-width: 0; height: 34px; padding: 0.3rem 0.4rem; text-align: center; }
.cart-line-total { white-space: nowrap; font-size: 0.83rem; }
.cart-remove-button { width: 32px; height: 34px; padding: 0; border: 1px solid #d9534f; border-radius: 8px; background: #fff5f4; color: #b62621; font-weight: 900; line-height: 1; }
.cart-remove-button:hover { background: #b62621; color: #fff; }
.checkout-form { gap: 0.65rem; }
.pos-payment-and-actions { grid-template-columns: minmax(0, 1fr) 148px; gap: 0.65rem; }
.pos-payment-column { display: grid; gap: 0.65rem; }
.pos-payment-grid { grid-template-columns: 1fr; gap: 0.45rem; padding: 0.65rem; border: 1px solid #d7e0e7; background: #fbfcfd; }
.pos-payment-grid label { display: grid; gap: 0.2rem; margin: 0; color: #17395d; font-size: 0.78rem; font-weight: 800; }
.pos-payment-grid .form-control { height: 40px; font-size: 1rem; font-weight: 800; }
.pos-payment-summary { grid-template-columns: 1fr; gap: 0; margin-top: 0; padding: 0.7rem; border-radius: 0; background: #fbfcfd; }
.pos-payment-summary span { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.22rem 0; color: #415463; font-size: 0.76rem; }
.pos-payment-summary strong { font-size: 0.83rem; color: #23364a; white-space: nowrap; }
.pos-payment-summary .pos-total-line { margin-top: 0.25rem; padding-top: 0.55rem; border-top: 1px solid #d7e0e7; font-size: 0.95rem; }
.pos-payment-summary .pos-total-line strong { font-size: 1rem; }
.pos-payment-summary .pos-change-line { color: #087b35; }
.pos-payment-summary .pos-change-line strong { color: #087b35; }
.pos-sale-actions { grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.pos-sale-actions .btn { min-height: 88px; border-radius: 10px; }
@media (max-width: 760px) {
    .cart-item { grid-template-columns: 1fr; }
    .cart-item-controls { grid-column: 1; grid-row: auto; }
    .pos-payment-and-actions { grid-template-columns: 1fr; }
    .pos-sale-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
    .pos-sale-actions .btn { min-height: 56px; }
}
/* Business dashboard: concise, decision-focused, and designed for a single desktop view. */
.business-dashboard { display: grid; gap: 0.75rem; max-width: 1500px; }
.business-dashboard-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 1rem; border: 1px solid rgba(35, 74, 67, 0.1); border-radius: 16px; background: rgba(255, 255, 255, 0.86); }
.business-dashboard-head h1 { margin: 0; color: #173f38; font-family: Georgia, serif; font-size: 1.55rem; }
.business-dashboard-head p { margin: 0.18rem 0 0; color: #647871; font-size: 0.78rem; font-weight: 700; }
.business-dashboard-filter { display: flex; align-items: center; justify-content: flex-end; gap: 0.38rem; flex-wrap: wrap; }
.business-dashboard-filter .form-control { width: 134px; min-height: 34px; padding: 0.25rem 0.45rem; font-size: 0.76rem; }
.business-period-buttons { display: flex; gap: 0.25rem; }
.business-period-buttons .dashboard-filter-pill { min-height: 34px; padding: 0.3rem 0.6rem; border-radius: 9px; font-size: 0.73rem; }
.business-filter-apply { min-height: 34px; padding: 0.3rem 0.7rem; border: 0; border-radius: 9px; background: #e97f68; color: #fff; font-size: 0.75rem; font-weight: 800; }
.business-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.65rem; }
.business-kpi { display: grid; align-content: center; gap: 0.28rem; min-height: 82px; padding: 0.72rem 0.85rem; border: 1px solid rgba(35, 74, 67, 0.08); border-radius: 14px; background: #fff; box-shadow: 0 7px 20px rgba(35, 74, 67, 0.06); }
.business-kpi span { color: #61766f; font-size: 0.67rem; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; }
.business-kpi strong { color: #173f38; font-size: clamp(1rem, 1.55vw, 1.35rem); line-height: 1.08; }
.business-kpi small { color: #8a5a4d; font-size: 0.7rem; }
.business-kpi-expense { background: #fff8f3; }
.business-kpi-expense strong { color: #a5533d; }
.business-kpi-balance { background: #f5faf7; }
.business-kpi-balance strong { color: #176553; }
.business-chart-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); gap: 0.75rem; }
.business-chart-card { min-height: 250px; padding: 0.85rem 1rem; border: 1px solid rgba(35, 74, 67, 0.09); border-radius: 16px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 9px 24px rgba(35, 74, 67, 0.07); }
.business-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.business-chart-head h2 { margin: 0; color: #173f38; font-family: Georgia, serif; font-size: 1.05rem; }
.business-legend { display: flex; gap: 0.6rem; color: #62766f; font-size: 0.68rem; font-weight: 700; }
.business-legend span { display: inline-flex; align-items: center; gap: 0.24rem; }
.business-legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend-product, .business-bar-product { background: #3d9d88; }
.legend-cake, .business-bar-cake { background: #ed8a69; }
.business-bar-chart { display: flex; align-items: stretch; gap: clamp(2px, 0.5vw, 8px); height: 202px; margin-top: 0.55rem; padding: 0.25rem 0 0; border-bottom: 1px solid #dce7e2; background: repeating-linear-gradient(to top, transparent 0, transparent 49px, rgba(35, 74, 67, 0.06) 50px); }
.business-bar-day { display: grid; grid-template-rows: 15px 1fr 16px; flex: 1 1 0; min-width: 0; text-align: center; }
.business-bar-day > strong { overflow: hidden; color: #51655f; font-size: clamp(0.48rem, 0.65vw, 0.68rem); line-height: 1; white-space: nowrap; text-overflow: ellipsis; }
.business-bar-track { display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; padding: 0 14%; }
.business-bar-track i { display: block; min-height: 0; border-radius: 3px 3px 0 0; transition: height 0.25s ease; }
.business-bar-cake { opacity: 0.92; }
.business-bar-product { opacity: 0.98; }
.business-bar-day > span { padding-top: 0.25rem; color: #647871; font-size: 0.62rem; font-weight: 800; }
.business-payment-card { display: grid; grid-template-rows: auto 1fr; }
.business-payment-list { display: grid; align-content: center; gap: 1rem; padding: 0.75rem 0.2rem; }
.business-payment-row { display: grid; gap: 0.38rem; }
.business-payment-row > div:first-child { display: flex; justify-content: space-between; gap: 1rem; color: #274942; font-size: 0.78rem; }
.business-payment-row span { color: #657a73; font-weight: 700; }
.business-payment-track { height: 12px; overflow: hidden; border-radius: 99px; background: #e8eeeb; }
.business-payment-track i { display: block; height: 100%; min-width: 0; border-radius: inherit; }
.payment-cash { background: #3d9d88; }
.payment-mpesa { background: #4d85ce; }
.payment-card { background: #b76d96; }
@media (max-width: 1050px) { .business-dashboard-head { align-items: flex-start; flex-direction: column; }.business-dashboard-filter { justify-content: flex-start; }.business-chart-grid { grid-template-columns: 1fr; }.business-chart-card { min-height: 220px; } }
@media (max-width: 760px) { .business-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.business-dashboard-filter .form-control { width: calc(50% - 0.2rem); }.business-dashboard-head { padding: 0.8rem; }.business-chart-card { padding: 0.75rem; }.business-bar-chart { gap: 2px; }.business-bar-track { padding: 0 8%; }.business-legend { gap: 0.35rem; font-size: 0.6rem; } }
/* Keep dashboard lists contained while the overview itself remains a single compact page. */
@media (min-width: 1201px) {
    .business-chart-grid { grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.78fr) minmax(250px, 0.78fr); }
}
.business-chart-card { min-height: 246px; }
.business-table-card { display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.business-table-scroll { min-height: 0; max-height: 194px; margin-top: 0.55rem; overflow: auto; border: 1px solid #e2ebe6; border-radius: 10px; }
.business-mini-table { width: 100%; margin: 0; border-collapse: collapse; font-size: 0.72rem; }
.business-mini-table th { position: sticky; top: 0; z-index: 1; padding: 0.46rem 0.5rem; border-bottom: 1px solid #dce7e2; background: #f7faf8; color: #62766f; font-size: 0.61rem; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; }
.business-mini-table td { padding: 0.48rem 0.5rem; border-bottom: 1px solid #edf2ef; color: #36534c; vertical-align: top; }
.business-mini-table tr:last-child td { border-bottom: 0; }
.business-mini-table td:not(:first-child), .business-mini-table th:not(:first-child) { text-align: right; white-space: nowrap; }
.business-mini-table a, .business-mini-table strong { color: #174b41; font-weight: 800; text-decoration: none; }
.business-mini-table a:hover { color: #e16f57; text-decoration: underline; }
.business-mini-table small { display: block; margin-top: 0.13rem; color: #7b8d87; font-size: 0.64rem; }
@media (max-width: 1200px) { .business-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.business-activity-card { grid-column: 1 / -1; } }
@media (max-width: 760px) { .business-chart-grid { grid-template-columns: 1fr; }.business-activity-card { grid-column: auto; }.business-table-scroll { max-height: 185px; } }
/* Five compact KPIs fit across the desktop dashboard without increasing its height. */
@media (min-width: 1051px) { .business-kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.business-kpi-orders { background: #f4f8ff; }
.business-kpi-orders strong { color: #285f9d; }
/* POS touch search: show a visible shortlist before the cashier types. */
.pos-search-picker { position: relative; z-index: 3; }
.pos-search-shell { position: relative; }
.pos-product-results { position: absolute; top: calc(100% + 0.3rem); right: 0; left: 0; z-index: 30; max-height: 276px; overflow-y: auto; border: 1px solid #cfded7; border-radius: 12px; background: #fff; box-shadow: 0 16px 34px rgba(22, 54, 47, 0.2); }
.pos-product-result { display: grid; width: 100%; gap: 0.12rem; padding: 0.62rem 0.72rem; border: 0; border-bottom: 1px solid #edf2ef; background: #fff; color: #244941; text-align: left; }
.pos-product-result:last-of-type { border-bottom: 0; }
.pos-product-result:hover, .pos-product-result:focus { background: #edf7f2; outline: 0; }
.pos-product-result strong { font-size: 0.82rem; }
.pos-product-result small { color: #6b8079; font-size: 0.7rem; }
.pos-product-no-results { margin: 0; padding: 0.8rem; color: #647871; font-size: 0.8rem; }
/* Final compact dashboard layout: Revenue left, live lists stacked right. */
@media (min-width: 1051px) {
    .business-kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .business-chart-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.84fr); align-items: stretch; }
    .business-side-panels { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 0.75rem; min-height: 246px; }
    .business-side-panels .business-chart-card { min-height: 0; }
    .business-side-panels .business-table-scroll { max-height: 86px; }
}
.business-kpi-orders { background: #f4f8ff; }
.business-kpi-orders strong { color: #285f9d; }
.business-table-card { display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.business-table-scroll { min-height: 0; overflow: auto; }
@media (max-width: 1050px) { .business-side-panels { display: grid; gap: 0.75rem; }.business-chart-grid { grid-template-columns: 1fr; } }
/* Balanced desktop dashboard: Revenue and operations each take half the screen. */
@media (min-width: 1051px) {
    .business-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: calc(100vh - 258px); }
    .business-activity-card { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
    .business-activity-card .business-bar-chart { height: auto; min-height: 202px; }
    .business-side-panels { min-height: 0; height: 100%; grid-template-rows: repeat(2, minmax(0, 1fr)); }
    .business-side-panels .business-table-scroll { max-height: 192px; }
}
/* Four-panel dashboard: separate product and cake revenue, with contained operational tables. */
@media (min-width: 1051px) {
    .business-four-panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); min-height: calc(100vh - 258px); }
    .business-four-panel-grid .business-chart-card { min-height: 0; }
    .business-four-panel-grid .business-table-scroll { max-height: 184px; }
}
@media (max-width: 1050px) { .business-four-panel-grid { grid-template-columns: 1fr; } }
/* POS catalogue keeps unavailable products visible but prevents them from being sold. */
.pos-product-result:disabled { cursor: not-allowed; opacity: 0.58; background: #f4f6f5; }
.pos-product-result:disabled:hover { background: #f4f6f5; color: #244941; }

/* Compact order register keeps operational details readable without oversized rows. */
.cake-order-register-table { font-size: 0.78rem; margin-bottom: 0; }
.cake-order-register-table th { padding: 0.48rem 0.5rem; font-size: 0.62rem; }
.cake-order-register-table td { padding: 0.48rem 0.5rem; line-height: 1.25; vertical-align: top; }
.cake-order-register-table small { font-size: 0.69rem; line-height: 1.25; }
.cake-order-register-table .btn { min-height: 27px; padding: 0.26rem 0.48rem; font-size: 0.68rem; line-height: 1.2; }
.cake-order-register-table .form-control,
.cake-order-register-table .form-select { min-height: 29px; padding: 0.2rem 0.38rem; font-size: 0.69rem; }
.cake-order-register-table .mb-1 { margin-bottom: 0.22rem !important; }
.cake-order-register-table .gap-1 { gap: 0.22rem !important; }
@media (max-width: 900px) { .cake-order-register-table { font-size: 0.75rem; } }

/* Supplier invoice product results open upward so the shortlist stays visible. */
.stock-receipt-table-wrap { overflow: visible; }
.stock-receipt-product-picker { z-index: 60; }
.stock-receipt-product-picker .filtered-select-menu {
    top: auto;
    bottom: calc(100% - 0.35rem);
    z-index: 70;
    max-height: 260px;
}
.stock-receipt-product-picker .filtered-select-option { padding: 0.62rem 0.78rem; }

/* Revenue totals remain legible when a dashboard period contains many days. */
.business-bar-day { grid-template-rows: 25px 1fr 20px; }
.business-bar-day > strong { overflow: visible; color: #183f38; font-size: clamp(0.7rem, 0.82vw, 0.88rem); font-weight: 900; line-height: 1.15; white-space: nowrap; }
.business-bar-day > span { padding-top: 0.34rem; color: #365b52; font-size: 0.7rem; font-weight: 900; white-space: nowrap; }
.business-bar-chart.is-grouped { gap: clamp(12px, 2.5vw, 34px); }
.business-bar-chart.is-grouped .business-bar-track { padding: 0 20%; }
@media (max-width: 760px) {
    .business-bar-day > strong { font-size: 0.66rem; }
    .business-bar-day > span { font-size: 0.61rem; }
    .business-bar-chart.is-grouped { gap: 8px; }
}
