:root {
    --navy: #132238;
    --slate: #203652;
    --sky: #6bc9db;
    --peach: #f4a261;
    --mint: #d8f3dc;
    --rose: #f7d6e0;
    --cream: #fcfaf6;
    --panel: rgba(255, 255, 255, 0.88);
    --line: rgba(27, 50, 79, 0.12);
    --text: #233045;
    --muted: #66758b;
    --success: #2d8f62;
    --warning: #c77e27;
    --danger: #b34f59;
    --shadow: 0 24px 60px rgba(21, 33, 56, 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(107, 201, 219, 0.18), transparent 24%),
        radial-gradient(circle at bottom right, rgba(244, 162, 97, 0.18), transparent 24%),
        linear-gradient(180deg, #f6f7fb 0%, #eef2f7 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(19, 34, 56, 0.98), rgba(28, 48, 74, 0.98)),
        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(45deg);
}

.sidebar-nav a {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.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);
    animation: reorder-alert-pulse 1.9s ease-in-out infinite;
}

.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-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);
    animation: reorder-alert-pulse 1.9s ease-in-out infinite;
}

@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);
}

@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);
}

#pos-live-feedback {
    min-height: 1.5rem;
    margin-top: 0.2rem;
    padding: 0;
    border-radius: 12px;
    font-weight: 600;
    transition: background-color 160ms ease, color 160ms ease, padding 160ms ease;
}

#pos-live-feedback[data-level="success"] {
    padding: 0.65rem 0.85rem;
    background: rgba(216, 243, 220, 0.92);
    color: var(--success);
}

#pos-live-feedback[data-level="info"] {
    padding: 0.65rem 0.85rem;
    background: rgba(232, 238, 247, 0.92);
    color: var(--slate);
}

#pos-live-feedback[data-level="warning"] {
    padding: 0.65rem 0.85rem;
    background: rgba(255, 242, 220, 0.96);
    color: var(--warning);
}

#pos-live-feedback[data-level="error"] {
    padding: 0.65rem 0.85rem;
    background: rgba(247, 214, 224, 0.96);
    color: var(--danger);
}

.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-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(380px, 0.95fr);
    gap: 0.7rem;
    align-items: stretch;
    min-height: calc(100vh - 4.75rem);
}

.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: 0.6rem;
}

.pos-side-switcher {
    display: grid;
    gap: 0.45rem;
}

.pos-section-tab {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid #0f1720;
    border-radius: 0;
    text-align: left;
    color: #fff;
    box-shadow: none;
}

.pos-section-tab[data-tone="checkout"] {
    background: #0f7b6c;
}

.pos-section-tab[data-tone="returns"] {
    background: #b4511f;
}

.pos-section-tab[data-tone="reconciliation"] {
    background: #265f9a;
}

.pos-section-tab[data-tone="receipts"] {
    background: #4f6173;
}

.pos-section-tab.active {
    transform: none;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.pos-section-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.pos-section-copy {
    display: grid;
    gap: 0.1rem;
}

.pos-section-copy strong {
    font-size: 0.88rem;
}

.pos-section-copy small {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.68rem;
}

.pos-workspace-panel {
    display: none;
}

.pos-workspace-panel.active {
    display: block;
}

.pos-panel {
    background: #f8fafc;
    border-radius: 0;
    border: 1px solid #b9c4d0;
    box-shadow: none;
    padding: 0.7rem;
    min-height: 0;
}

.pos-toolbar,
.barcode-form,
.pos-search-form {
    display: grid;
    gap: 0.8rem;
}

.pos-toolbar {
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 1fr);
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.pos-search-shell {
    position: relative;
    min-width: 0;
}

.pos-picker-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.7rem;
    border-radius: 0;
    border: 1px solid #cdd5de;
    background: #fff;
    min-height: 0;
}

.pos-picker-card .panel-head,
.pos-picker-card .helper-text {
    flex: 0 0 auto;
}

.pos-manual-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px auto;
    gap: 0.6rem;
    align-items: end;
}

.pos-side-switcher {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: auto;
    padding-top: 0.2rem;
}

.pos-side-switcher .pos-section-tab {
    flex: 1 1 155px;
    min-width: 155px;
}

.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: 0;
    border: 1px solid #8da0b3;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 34, 55, 0.14);
    z-index: 20;
    max-height: 320px;
    overflow: auto;
}

.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: 0;
    border: 1px solid #d9e1e9;
    background: #fff;
    text-align: left;
}

.pos-search-option:hover {
    background: #eef5fb;
}

.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.45rem;
    margin-bottom: 0.55rem;
    overflow: auto;
    min-height: 0;
}

.cart-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px auto 32px;
    gap: 0.4rem;
    align-items: center;
    padding: 0.38rem 0.5rem;
    border-radius: 0;
    background: #fff;
    border: 1px solid #d5dce3;
}

.cart-item-controls {
    display: grid;
    grid-template-columns: 74px auto;
    gap: 0.35rem;
    align-items: center;
}

.cart-line-total {
    font-weight: 800;
    color: var(--navy);
    font-size: 0.8rem;
    white-space: nowrap;
}

.checkout-form {
    display: grid;
    gap: 0.55rem;
    min-height: 0;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.payment-grid-prominent {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    align-items: end;
}

.payment-grid-prominent label {
    margin: 0;
}

.payment-grid-stacked {
    grid-template-columns: 1fr;
    align-content: start;
}

.payment-grid-prominent .payment-input {
    min-height: 54px;
    font-size: 1rem;
    font-weight: 700;
}

.checkout-customer-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.5rem;
}

.checkout-customer-grid-compact .form-select,
.checkout-customer-grid-compact .form-control {
    min-height: 38px;
    padding-top: 0.38rem;
    padding-bottom: 0.38rem;
    font-size: 0.82rem;
}

.checkout-customer-grid-compact #loyalty-child-select {
    font-size: 0.78rem;
}

.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.35rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.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.05rem;
}

.change-row {
    color: #0f5f3c;
    font-weight: 800;
}

body.pos-screen .topbar {
    justify-content: flex-end;
    padding: 0.45rem 0.7rem 0.25rem;
}

body.pos-screen .topbar > div:first-child,
body.pos-screen .topbar .user-pill {
    display: none;
}

body.pos-screen .pos-page-shell {
    padding: 0.35rem 0.7rem 0.7rem;
}

body.pos-screen .flash-stack {
    margin-bottom: 0.45rem;
}

.pos-catalog,
.pos-cart {
    display: grid;
    min-height: 0;
}

.pos-catalog {
    grid-template-rows: auto auto 1fr;
}

.pos-cart {
    grid-template-rows: auto 1fr auto;
}

.pos-command-strip,
.pos-box {
    border: 1px solid #c7d0da;
    background: #fff;
    border-radius: 0;
}

.pos-command-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
    margin-bottom: 0.65rem;
}

.pos-command-identity,
.pos-command-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.pos-command-identity strong {
    font-size: 1rem;
    color: var(--navy);
}

.pos-command-identity span,
.pos-command-note {
    font-size: 0.8rem;
    color: var(--muted);
}

.pos-logout-button {
    min-height: 42px;
    border-radius: 0;
}

.compact-box-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.45rem;
}

.compact-box-head h3 {
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--navy);
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(330px, 1fr) minmax(250px, 0.82fr);
    gap: 0.55rem;
    align-items: stretch;
}

.checkout-box {
    padding: 0.6rem;
}

.checkout-customer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    align-content: start;
}

.checkout-customer-grid > label,
.checkout-customer-grid > details,
.checkout-customer-grid > p,
.checkout-customer-grid > div {
    margin: 0;
}

.checkout-customer-grid label span,
.payment-grid label span,
.pos-discount-card label span {
    display: block;
    margin-bottom: 0.28rem;
    color: var(--navy);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.25;
}

.checkout-payment-box {
    display: grid;
    grid-template-rows: auto 1fr;
}

.pos-payment-top-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.pos-discount-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.55rem;
    align-items: end;
    padding: 0.45rem;
    border: 1px solid rgba(20, 42, 69, 0.12);
    background: #f7f9fc;
}

.pos-discount-card label {
    margin: 0;
}

.checkout-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 0.55rem;
}

.checkout-actions {
    display: grid;
    gap: 0.55rem;
}

.pos-cancel-button,
.pos-complete-button {
    min-height: 58px;
    border-radius: 0;
    font-weight: 800;
    font-size: 1rem;
    border: 1px solid transparent;
}

.pos-cancel-button {
    background: #b42318;
    color: #fff;
}

.pos-complete-button {
    background: #0b7a35;
    color: #fff;
}

.panel-head {
    margin-bottom: 0.45rem;
}

.panel-head h2 {
    margin: 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cart-remove-button {
    width: 32px;
    height: 32px;
    border: 1px solid #c74031;
    background: #fff4f2;
    color: #b42318;
    border-radius: 0;
    font-weight: 800;
    line-height: 1;
}

.cart-running-total-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.5rem;
    border: 1px solid #c7d0da;
    background: #f7f9fc;
}

.cart-running-total-box span {
    color: var(--muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cart-running-total-box strong {
    color: var(--navy);
    font-size: 1.18rem;
    font-weight: 800;
}

.cart-item > div:first-child {
    min-width: 0;
}

.cart-item > div:first-child strong {
    display: block;
    font-size: 0.84rem;
}

.cart-item > div:first-child span {
    display: block;
    color: var(--muted);
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-side-switcher .pos-section-tab {
    flex: 1 1 135px;
    min-width: 135px;
}

.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-request-button {
    min-height: 42px;
    padding: 0.42rem 0.72rem;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.pos-cancel-discount-request-button {
    min-height: 42px;
    padding: 0.42rem 0.72rem;
    font-size: 0.78rem;
    white-space: nowrap;
}

.loyalty-status-quiet {
    min-height: 0;
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.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,
    .checkout-grid,
    .checkout-footer-grid,
    .reconciliation-summary,
    .reconciliation-variance,
    .pos-manual-picker {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 1fr;
    }

    .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) {
    .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,
    .checkout-actions,
    .checkout-customer-grid {
        grid-template-columns: 1fr;
    }

    .compact-inline-form {
        grid-template-columns: 1fr;
    }

    .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;
    }
}
