:root {
    color-scheme: light;
    font-family: "Nunito", sans-serif;
    --brand-black: #090909;
    --brand-red: #e4002b;
    --brand-blue: #003da5;
    --brand-red-dark: #b60024;
    color: #151923;
    background: #f4f6fb;
}

.row {
    width: 100%;
}

.wrapper {
    width: 100%;
    min-height: 100vh;
    margin: 0 auto;
}

.col-admin-a,
.col-admin-b {
    min-width: 0;
}

.col-admin-b {
    width: 100%;
}

.admin-page-loader,
#loader,
#loaderss {
    display: none !important;
}

#admin-page-content {
    position: relative;
    isolation: isolate;
    animation: page-content-enter .18s ease-out;
}

#admin-page-content::before {
    position: absolute;
    z-index: -1;
    top: -30px;
    right: -30px;
    left: -30px;
    height: 230px;
    background:
        radial-gradient(circle, rgba(0, 61, 165, 0.1) 1px, transparent 1.5px) right 34px top 28px / 18px 18px,
        linear-gradient(180deg, rgba(0, 61, 165, 0.035), rgba(0, 61, 165, 0));
    background-image:
        radial-gradient(circle, rgba(0, 61, 165, 0.1) 1px, transparent 1.5px),
        linear-gradient(180deg, rgba(0, 61, 165, 0.035), rgba(0, 61, 165, 0)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='680' height='230' viewBox='0 0 680 230' fill='none'%3E%3Cpath d='M194 230C278 160 343 203 416 126C477 61 529 48 680 29' stroke='%23003DA5' stroke-opacity='.12' stroke-width='1.5'/%3E%3Cpath d='M232 230C314 179 377 220 450 143C511 78 563 65 680 50' stroke='%23E4002B' stroke-opacity='.07' stroke-width='1.5'/%3E%3Cpath d='M284 230C352 198 411 230 484 159C545 100 588 83 680 72' stroke='%23003DA5' stroke-opacity='.08' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: repeat, no-repeat, no-repeat;
    background-position: right 34px top 28px, center, right top;
    background-size: 18px 18px, 100% 100%, min(680px, 75vw) 230px;
    content: "";
    pointer-events: none;
}

@keyframes page-content-enter {
    from { opacity: .7; transform: translateY(3px); }
    to { opacity: 1; transform: translateY(0); }
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    scrollbar-color: #dfe4ec #f8fafc;
    scrollbar-width: thin;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
aside::-webkit-scrollbar,
main::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
aside::-webkit-scrollbar-track,
main::-webkit-scrollbar-track {
    background: #f8fafc;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
aside::-webkit-scrollbar-thumb,
main::-webkit-scrollbar-thumb {
    border: 2px solid #f8fafc;
    border-radius: 999px;
    background: #dfe4ec;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
aside::-webkit-scrollbar-thumb:hover,
main::-webkit-scrollbar-thumb:hover {
    background: #cbd3df;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Nunito", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.app-shell {
    --app-bg: #f4f7fc;
    --surface: #ffffff;
    --sidebar-bg: #ffffff;
    --sidebar-text: #39445c;
    --text: #172033;
    --muted: #777f93;
    --border: #e3e8f1;
    background: var(--app-bg);
    color: var(--text);
    transition: background-color .2s ease, color .2s ease;
}

:root[data-theme="dark"] .app-shell {
    --app-bg: #111827;
    --surface: #1f2937;
    --sidebar-bg: #172033;
    --sidebar-text: #d9deea;
    --text: #f7f9fc;
    --muted: #aeb7c8;
    --border: #354155;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(circle at 0 100%, rgba(0, 61, 165, .12), transparent 32rem),
        linear-gradient(145deg, #f4f8fd 0%, #ffffff 70%);
}

.login-card {
    width: min(400px, 100%);
    padding: 32px;
    border: 1px solid rgba(0, 61, 165, .08);
    border-radius: 20px;
    background: white;
    box-shadow: 0 24px 70px rgba(20, 45, 90, .12);
}

.brand-logo {
    display: block;
    width: 240px;
    max-width: 100%;
    height: 72px;
}

.brand-logo-login {
    width: 150px;
    margin-right: auto;
    margin-left: auto;
    height: auto;
    margin-bottom: 14px;
    border-radius: 12px;
}

.eyebrow {
    margin: 20px 0 8px;
    color: var(--brand-blue);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 24px;
    font-size: 26px;
    text-align: center;
}

h2 {
    margin-bottom: 24px;
    font-size: 20px;
}

.subtext {
    color: #687189;
    line-height: 1.6;
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form label {
    display: grid;
    gap: 8px;
    color: #414a60;
    font-size: 14px;
    font-weight: 700;
}

label {
    display: inline-block;
    color: #414a60;
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #d8dce7;
    border-radius: 8px;
    outline: none;
    background: white;
    font: inherit;
}

input::placeholder {
    color: var(--brand-blue);
    opacity: .9;
}

input:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px rgba(0, 61, 165, .12);
}

.input-wrap {
    position: relative;
    display: block;
}

.input-wrap input {
    padding-left: 44px;
}

.input-wrap.password-wrap input {
    padding-left: 44px;
    padding-right: 48px;
}

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    fill: none;
    stroke: #8490a5;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 34px;
    height: 34px;
    padding: 7px;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    box-shadow: none;
}

.password-toggle:hover {
    background: transparent;
}

.eye-open,
.eye-off {
    color: var(--brand-blue);
    font-size: 16px;
}

.eye-off {
    display: none;
}

.password-toggle.is-visible .eye-open {
    display: none;
}

.password-toggle.is-visible .eye-off {
    display: block;
}

.submit-button {
    height: 48px;
    border: 0;
    border-radius: 8px;
    background: var(--brand-blue);
    color: white;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--brand-blue) 24%, transparent);
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.submit-button:hover,
.primary-action:hover,
.btn-primary-brand:hover {
    filter: brightness(.92);
}

.submit-button:active,
.primary-action:active,
.btn-primary-brand:active {
    transform: translateY(1px);
    box-shadow: none;
}

.submit-button:focus-visible,
.primary-action:focus-visible,
.btn-primary-brand:focus-visible,
.secondary-action:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand-blue) 24%, transparent);
    outline-offset: 2px;
}

.danger-action,
.btn-danger,
button.danger {
    border: 1px solid var(--brand-red);
    background: var(--brand-red);
    color: #fff;
}

.submit-button svg {
    width: 20px;
    height: 20px;
    margin-left: 8px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.alert {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 9px;
    background: #fff1f2;
    color: #be123c;
    font-size: 14px;
}

.demo-note {
    margin: 20px 0 0;
    color: #777f93;
    font-size: 12px;
    text-align: center;
}

.app-shell {
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: 78px minmax(0, 1fr);
}

.sidebar-collapse-button {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--brand-blue);
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.sidebar-heading {
    min-height: 52px;
    margin-bottom: 18px;
    padding: 0 4px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sidebar-heading .sidebar-collapse-button {
    margin-left: auto;
}

.logged-in-label {
    min-width: 0;
    height: 36px;
    max-width: 166px;
    padding: 0 11px;
    border: 1px solid color-mix(in srgb, var(--brand-blue) 18%, var(--border));
    border-radius: 10px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    background: color-mix(in srgb, var(--brand-blue) 4%, var(--surface));
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.sidebar-heading > div {
    min-width: 0;
    display: grid;
}

.sidebar-heading-label {
    margin-bottom: 1px;
    color: var(--sidebar-text);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logged-in-label .sidebar-heading-label::first-letter {
    text-transform: uppercase;
}

.sidebar-heading strong {
    font-size: 18px;
    line-height: 1.15;
}

.sidebar-collapse-button:hover {
    border-color: var(--brand-blue);
    background: color-mix(in srgb, var(--brand-blue) 8%, var(--surface));
}

aside {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: 244px;
    padding: 22px 14px 18px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    border-right: 1px solid var(--border);
    position: fixed;
    left: 0;
    top: 76px;
    bottom: 0;
    height: calc(100vh - 76px);
    overflow-y: auto;
    z-index: 14;
}

.app-shell.sidebar-collapsed aside {
    padding-left: 12px;
    padding-right: 12px;
    width: 78px;
}

.app-shell.sidebar-collapsed .sidebar-collapse-button {
    margin-left: auto;
    margin-right: auto;
}

.app-shell.sidebar-collapsed .sidebar-heading {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.app-shell.sidebar-collapsed .sidebar-heading > div {
    display: none;
}

.app-shell.sidebar-collapsed nav a {
    padding-left: 0;
    padding-right: 0;
    overflow: hidden;
    font-size: 0;
    text-align: center;
}

.app-shell.sidebar-collapsed nav a i {
    width: auto;
    margin: 0;
    font-size: 17px;
}

.app-shell.sidebar-collapsed .nav-divider,
.app-shell.sidebar-collapsed .submenu,
.app-shell.sidebar-collapsed .sidebar-user-info,
.app-shell.sidebar-collapsed .logout {
    display: none;
}

.app-shell.sidebar-collapsed .sidebar-user {
    justify-content: center;
    padding: 10px 0;
}

.brand {
    margin: 0 0 42px;
}

.brand img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}

nav {
    display: grid;
    gap: 7px;
}

nav a {
    min-height: 42px;
    padding: 11px 12px;
    border-radius: 8px;
    color: var(--sidebar-text);
    font-size: 14px;
    font-weight: 650;
    display: flex;
    align-items: center;
}

nav a.active,
nav a:hover {
    background: color-mix(in srgb, var(--brand-blue) 8%, var(--sidebar-bg));
    color: var(--brand-blue);
    box-shadow: none;
}

nav a i {
    width: 22px;
    margin-right: 6px;
    font-size: 15px;
}

.submenu {
    display: grid;
    gap: 2px;
    margin: -3px 0 6px 12px;
    padding-left: 8px;
    border-left: 2px solid var(--border);
}

.submenu a {
    padding: 7px 8px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
}

.submenu a i {
    width: 13px;
    margin-right: 2px;
}

.submenu a.active,
.submenu a:hover {
    background: rgba(0, 61, 165, .09);
    color: var(--brand-blue);
}

:root[data-theme="dark"] nav a.active,
:root[data-theme="dark"] nav a:hover,
:root[data-theme="dark"] .submenu a.active,
:root[data-theme="dark"] .submenu a:hover {
    background: rgba(107, 158, 255, .14);
    color: #a9c7ff;
}

.page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 16px;
}

.primary-action,
.secondary-action {
    width: auto;
    height: 40px;
    padding: 0 16px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.primary-action {
    border: 1px solid var(--brand-blue);
    background: var(--brand-blue);
    color: #fff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--brand-blue) 22%, transparent);
}

.secondary-action {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.data-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.data-table th {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.data-table td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.icon-action,
.text-action {
    width: auto;
    height: 32px;
    padding: 0 10px;
    background: transparent;
    color: var(--brand-blue);
}

.role-badge,
.status-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.role-badge { background: rgba(0, 61, 165, .1); color: var(--brand-blue); }
.status-badge.active { background: rgba(22, 163, 74, .1); color: #15803d; }
.status-badge.inactive { background: rgba(107, 114, 128, .12); color: var(--muted); }

.empty-panel {
    padding: 70px 20px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    background: var(--surface);
    text-align: center;
}

.empty-panel > i { color: var(--brand-blue); font-size: 38px; }
.empty-panel h2 { margin: 14px 0 6px; }
.empty-panel p { color: var(--muted); }

.record-grid,
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.record-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.summary-card {
    display: grid;
    gap: 8px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.summary-card strong { font-size: 24px; }

.logout {
    margin-top: auto;
    padding: 12px 14px;
    color: var(--sidebar-text);
    font-size: 14px;
}

.app-shell > main {
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    grid-column: 2;
    padding: 32px clamp(18px, 3vw, 42px) 48px;
    background: var(--app-bg);
    padding-top: 108px;
}

.app-shell > main > .site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 30;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 clamp(18px, 3vw, 42px);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 14px rgba(15, 23, 42, .035);
    backdrop-filter: blur(12px);
}

.site-header-brand {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
}

.site-header-brand img {
    width: 100%;
    height: 68px;
    object-fit: contain;
    object-position: left center;
}

:root[data-theme="dark"] .site-header {
    border-bottom-color: #354155;
    background: rgba(17, 24, 39, .98);
    box-shadow: 0 2px 14px rgba(0, 0, 0, .24);
}

:root[data-theme="dark"] .site-header-brand {
    flex: 0 1 190px;
    height: 64px;
    padding: 3px 10px;
    border-radius: 10px;
    background: #ffffff;
}

:root[data-theme="dark"] .site-header-brand img {
    height: 58px;
}

.site-header-title {
    min-width: 0;
    line-height: 1.15;
}

.site-header-title strong {
    display: block;
    color: var(--text);
    font-size: 15px;
}

.site-header-title small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icon-button {
    position: relative;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: #5b6474;
    font-size: 17px;
}

.header-notification-dot {
    position: absolute;
    top: -5px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 2px solid white;
    border-radius: 999px;
    background: var(--brand-red);
    color: white;
    font-size: 9px;
    font-weight: 800;
    line-height: 14px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.header-user-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--brand-blue);
    color: white;
    font-size: 13px;
    font-weight: 800;
}

.header-user-copy {
    line-height: 1.25;
}

.header-user-copy strong,
.header-user-copy small {
    display: block;
}

.header-user-copy strong {
    max-width: 150px;
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-user-copy small {
    color: var(--muted);
    font-size: 11px;
    text-transform: capitalize;
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    left: 16px;
    bottom: 16px;
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 61, 165, .22);
    z-index: 30;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
}

.topbar .eyebrow {
    margin: 0 0 4px;
}

.topbar h1 {
    margin: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    color: var(--brand-blue);
}

.mobile-menu-toggle.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.theme-toggle:hover {
    background: var(--surface);
}

.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: inline-block; }

:root[data-theme="dark"] .app-shell input {
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
}

.user-chip {
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 5px 20px rgba(23, 32, 51, .06);
    font-size: 14px;
    font-weight: 700;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stats article,
.panel {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 5px 24px rgba(23, 32, 51, .04);
}

.stats article {
    display: grid;
    gap: 8px;
    padding: 18px 20px;
}

.stats span {
    color: #777f93;
    font-size: 13px;
}

.stats strong {
    font-size: 18px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
}

.panel {
    padding: 24px;
}

.product-panel {
    min-height: 390px;
}

.empty-state {
    display: grid;
    place-items: center;
    padding: 70px 20px 30px;
    color: #7d8497;
    text-align: center;
}

.empty-state strong {
    margin: 12px 0 5px;
    color: var(--text);
}

.empty-state p {
    font-size: 13px;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(0, 61, 165, .1);
    color: var(--brand-blue);
    font-size: 26px;
}

.cart-panel {
    display: flex;
    flex-direction: column;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    color: #697187;
    font-size: 14px;
}

.grand-total {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding: 18px 0;
    border-top: 1px solid #e7eaf1;
    font-size: 18px;
}

.checkout-button {
    width: 100%;
}

.admin-section {
    grid-column: 1 / -1;
    margin-top: 16px;
}

.admin-section p {
    margin-bottom: 0;
    color: #687189;
}

@media (max-width: 800px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-shell > main {
        grid-column: 1;
        padding-top: 108px;
    }

    .app-shell.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    aside {
        position: fixed;
        left: 0;
        top: 76px;
        width: 244px;
        height: calc(100vh - 76px);
        transform: translateX(-100%);
        transition: transform .2s ease;
        box-shadow: 20px 0 50px rgba(15, 23, 42, .18);
    }

    aside.is-open { transform: translateX(0); }
    .mobile-menu-toggle {
        display: grid;
        place-items: center;
        top: 17px;
        bottom: auto;
        left: 16px;
        width: 42px;
        height: 42px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--surface);
        color: var(--brand-blue);
        z-index: 31;
    }

    .site-header .site-header-brand {
        margin-left: 52px;
    }

    nav {
        grid-template-columns: 1fr;
    }

    .logout {
        margin-top: 20px;
    }

    .stats,
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .app-shell > main {
        padding: 108px 18px 32px;
    }

    .app-shell .site-header {
        left: 0;
        height: 76px;
        padding: 0 16px;
    }

    .site-header-actions {
        gap: 6px;
        flex-shrink: 0;
    }

    .header-icon-button,
    .theme-toggle {
        width: 38px;
        height: 38px;
    }

    .site-header-brand {
        flex: 1 1 170px;
        overflow: hidden;
    }

    .site-header-brand img {
        height: 58px;
    }

    .site-header-title small,
    .header-user-copy {
        display: none;
    }

    .header-user {
        padding: 4px;
    }

    .header-user-avatar {
        width: 34px;
        height: 34px;
    }

    .site-header-actions .theme-toggle {
        position: static;
    }

    .topbar {
        align-items: flex-start;
        padding-left: 52px;
    }

    .topbar-actions { gap: 6px; }
    .user-chip { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .page-actions { justify-content: stretch; flex-wrap: wrap; }
    .page-actions button { flex: 1 1 150px; }
    .data-table th, .data-table td { padding: 13px 14px; }
}

@media (max-width: 350px) {
    .site-header {
        gap: 8px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .site-header .site-header-brand {
        margin-left: 48px;
        flex-basis: 0;
    }

    .site-header-actions {
        gap: 5px;
    }

    .site-header-actions .header-icon-button {
        display: none;
    }

    .header-icon-button,
    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .header-user-avatar {
        width: 32px;
        height: 32px;
    }
}

/* ========================================================================== */
/* MODERN DASHBOARD DESIGN SYSTEM & BRAND POLISH                              */
/* ========================================================================== */

:root {
    --brand-blue: #003da5;
    --brand-blue-hover: #002d7a;
    --brand-blue-tint: rgba(0, 61, 165, 0.08);
    --brand-blue-glow: rgba(0, 61, 165, 0.18);
    --brand-red: #e4002b;
    --brand-red-hover: #b60024;
    --brand-red-tint: rgba(228, 0, 43, 0.08);
    --brand-purple: #7c3aed;
    --brand-indigo: #4f46e5;
    --brand-emerald: #10b981;
    --brand-emerald-tint: rgba(16, 185, 129, 0.1);
    --brand-amber: #f59e0b;
    --brand-amber-tint: rgba(245, 158, 11, 0.1);
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --shadow-subtle: 0 1px 3px 0 rgba(15, 23, 42, 0.04), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    --shadow-elevated: 0 10px 25px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

/* Sidebar upgrades */
.brand a {
    display: block;
}

.nav-divider {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--muted);
    margin-top: 12px;
    padding: 18px 12px 8px;
    border-top: 1px solid var(--border);
}



.sidebar-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(0, 61, 165, 0.04);
    border: 1px solid var(--border);
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--brand-blue);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}

.sidebar-user-info {
    min-width: 0;
    flex: 1;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 750;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--muted);
    text-transform: capitalize;
}

/* Dashboard Topbar elements */
.dashboard-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.dashboard-title-group h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin: 4px 0 0;
}

.dashboard-actions-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    background: var(--brand-emerald-tint);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 999px;
    color: #065f46;
    font-size: 12px;
    font-weight: 750;
}

:root[data-theme="dark"] .live-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}

.live-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.clock-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.clock-pill i {
    color: var(--brand-blue);
}

.btn-primary-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    background: linear-gradient(135deg, var(--brand-blue) 0%, #1d4ed8 100%);
    color: white;
    border: 0;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 61, 165, 0.28);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary-brand:hover {
    background: var(--brand-blue);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--brand-blue) 32%, transparent);
    transform: translateY(-1px);
    color: white;
}

.btn-secondary-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-secondary-brand:hover {
    background: var(--slate-100);
    border-color: var(--slate-300);
    color: var(--brand-blue);
}

/* Welcome Banner */
.welcome-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 26px;
    background: linear-gradient(135deg, #ffffff 0%, #f7f9ff 100%);
    border: 1px solid var(--border);
    border-left: 5px solid var(--brand-blue);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
    margin-bottom: 24px;
    gap: 20px;
    flex-wrap: wrap;
}

:root[data-theme="dark"] .welcome-banner {
    background: linear-gradient(135deg, var(--surface) 0%, #1a2233 100%);
    border-left-color: #3b82f6;
}

.welcome-text h2 {
    font-size: 19px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 6px;
}

.welcome-text p {
    font-size: 13.5px;
    color: var(--muted);
    margin: 0;
    line-height: 1.5;
}

.welcome-text strong {
    color: var(--text);
}

.banner-quick-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pill-tag {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 750;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--brand-blue);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.pill-tag:hover {
    background: var(--brand-blue);
    color: white;
    border-color: var(--brand-blue);
}

/* KPI Stat Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 20px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-elevated);
    border-color: #cbd5e1;
}

.kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.kpi-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--muted);
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.kpi-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}

.kpi-icon-wrap.blue {
    background: var(--brand-blue-tint);
    color: var(--brand-blue);
}

.kpi-icon-wrap.indigo {
    background: rgba(99, 102, 241, 0.1);
    color: var(--brand-indigo);
}

.kpi-icon-wrap.emerald {
    background: var(--brand-emerald-tint);
    color: var(--brand-emerald);
}

.kpi-icon-wrap.red {
    background: var(--brand-red-tint);
    color: var(--brand-red);
}

.kpi-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

.kpi-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.kpi-badge.up {
    background: var(--brand-emerald-tint);
    color: #059669;
}

.kpi-badge.down {
    background: var(--brand-red-tint);
    color: var(--brand-red);
}

.kpi-badge.alert {
    background: var(--brand-red-tint);
    color: var(--brand-red);
    font-weight: 800;
}

.kpi-badge.neutral {
    background: rgba(0, 61, 165, 0.08);
    color: var(--brand-blue);
}

/* Analytics Row (Charts) */
.analytics-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.chart-title-group h3 {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-title-group p {
    font-size: 12.5px;
    color: var(--muted);
    margin: 3px 0 0;
}

.chart-filter-pills {
    display: inline-flex;
    background: var(--app-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.filter-pill {
    padding: 5px 12px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    font-size: 11.5px;
    font-weight: 750;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-pill.active,
.filter-pill:hover {
    background: var(--surface);
    color: var(--brand-blue);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.chart-summary-strip {
    display: flex;
    gap: 24px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.summary-strip-item span {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-strip-item strong {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
}

.chart-canvas-container {
    position: relative;
    width: 100%;
    min-height: 270px;
    flex: 1;
}

/* Fallback SVG chart */
.svg-chart-container {
    width: 100%;
    height: 260px;
    display: flex;
    align-items: flex-end;
    gap: 14px;
    padding-top: 20px;
    padding-bottom: 10px;
}

.svg-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}

.svg-bar {
    width: 100%;
    max-width: 42px;
    background: linear-gradient(180deg, var(--brand-blue) 0%, #3b82f6 100%);
    border-radius: 6px 6px 0 0;
    transition: height 0.3s ease, filter 0.2s ease;
    cursor: pointer;
}

.svg-bar:hover {
    filter: brightness(1.15);
}

.svg-bar-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
}

.svg-bar-val {
    font-size: 10.5px;
    font-weight: 800;
    color: var(--text);
}

/* Payment Breakdown Legend */
.payment-legend-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.payment-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--app-bg);
    border: 1px solid var(--border);
    font-size: 13px;
}

.legend-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 750;
    color: var(--text);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.mpesa { background: #10b981; }
.legend-dot.cash { background: var(--brand-blue); }
.legend-dot.card { background: var(--brand-red); }

.legend-right {
    text-align: right;
}

.legend-right strong {
    display: block;
    font-weight: 800;
    color: var(--text);
}

.legend-right small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

/* Operational Tables & Detail Grid */
.dashboard-content-grid {
    display: grid;
    grid-template-columns: 1.7fr 1.1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-subtle);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}

.content-card-header h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.content-card-header h3 i {
    color: var(--brand-blue);
}

.link-action {
    font-size: 12.5px;
    font-weight: 750;
    color: var(--brand-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.link-action:hover {
    text-decoration: underline;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.modern-table th {
    background: var(--app-bg);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.modern-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.modern-table tr:hover td {
    background: rgba(0, 61, 165, 0.02);
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.trx-id {
    font-family: monospace;
    font-weight: 700;
    color: var(--brand-blue);
    background: var(--brand-blue-tint);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11.5px;
}

.customer-cell strong {
    display: block;
    color: var(--text);
    font-weight: 750;
}

.customer-cell small {
    color: var(--muted);
    font-size: 11px;
}

.method-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 750;
}

.method-pill.mpesa {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.method-pill.cash {
    background: rgba(0, 61, 165, 0.08);
    color: var(--brand-blue);
}

.method-pill.card {
    background: rgba(228, 0, 43, 0.08);
    color: var(--brand-red);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 750;
}

.status-pill.completed {
    background: var(--brand-emerald-tint);
    color: #065f46;
}

.status-pill.pending {
    background: var(--brand-amber-tint);
    color: #92400e;
}

.btn-receipt {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 9px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--brand-blue);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-receipt:hover {
    background: var(--brand-blue);
    color: white;
    border-color: var(--brand-blue);
}

/* Product Ranking & Low Stock List */
.product-rank-list {
    padding: 12px 18px;
    display: grid;
    gap: 12px;
}

.product-rank-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--app-bg);
    border: 1px solid var(--border);
}

.rank-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--brand-blue-tint);
    color: var(--brand-blue);
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 11.5px;
    flex-shrink: 0;
}

.rank-badge.top-1 {
    background: #fef3c7;
    color: #b45309;
}

.rank-info {
    flex: 1;
    min-width: 0;
}

.rank-title {
    font-size: 13px;
    font-weight: 750;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-meta {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.stock-meter-wrap {
    width: 80px;
    height: 6px;
    background: var(--slate-200);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 5px;
}

.stock-meter-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--brand-emerald);
}

.stock-meter-fill.low {
    background: var(--brand-red);
}

.rank-price-col {
    text-align: right;
    flex-shrink: 0;
}

.rank-price-col strong {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
}

.rank-price-col small {
    font-size: 11px;
    color: var(--muted);
}

/* Low Stock Alert Box */
.low-stock-box {
    margin: 16px 18px 18px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

:root[data-theme="dark"] .low-stock-box {
    background: rgba(228, 0, 43, 0.12);
    border-color: rgba(228, 0, 43, 0.3);
}

.low-stock-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.low-stock-content i {
    font-size: 20px;
    color: var(--brand-red);
}

.low-stock-content strong {
    display: block;
    font-size: 13px;
    color: #9f1239;
}

:root[data-theme="dark"] .low-stock-content strong {
    color: #fecdd3;
}

.low-stock-content p {
    margin: 2px 0 0;
    font-size: 11.5px;
    color: #be123c;
}

:root[data-theme="dark"] .low-stock-content p {
    color: #fda4af;
}

.btn-restock {
    padding: 6px 12px;
    background: var(--brand-red);
    color: white;
    border: 0;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 750;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.btn-restock:hover {
    background: var(--brand-red-hover);
    color: white;
}

/* Quick Launch Operations Grid */
.quick-launch-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.quick-launch-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    text-align: center;
    box-shadow: var(--shadow-subtle);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.quick-launch-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

.quick-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 18px;
    transition: transform 0.2s ease;
}

.quick-launch-card:hover .quick-icon-circle {
    transform: scale(1.1);
}

.quick-icon-circle.blue { background: var(--brand-blue-tint); color: var(--brand-blue); }
.quick-icon-circle.indigo { background: rgba(99, 102, 241, 0.1); color: var(--brand-indigo); }
.quick-icon-circle.purple { background: rgba(124, 58, 237, 0.1); color: var(--brand-purple); }
.quick-icon-circle.emerald { background: var(--brand-emerald-tint); color: var(--brand-emerald); }
.quick-icon-circle.amber { background: var(--brand-amber-tint); color: var(--brand-amber); }
.quick-icon-circle.red { background: var(--brand-red-tint); color: var(--brand-red); }

.quick-launch-card span {
    font-size: 12px;
    font-weight: 750;
    line-height: 1.3;
}

/* Thermal POS Receipt Modal */
.receipt-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    place-items: center;
    z-index: 100;
    padding: 20px;
}

.receipt-modal-backdrop.is-open {
    display: grid;
}

.receipt-modal {
    background: white;
    width: min(380px, 100%);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.receipt-paper {
    padding: 28px 24px;
    font-family: "Courier New", Courier, monospace;
    color: #111827;
    background: #fff;
    line-height: 1.4;
}

.receipt-header-print {
    text-align: center;
    border-bottom: 1px dashed #9ca3af;
    padding-bottom: 14px;
    margin-bottom: 14px;
}

.receipt-store-name {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 1px;
}

.receipt-sub {
    font-size: 11px;
    color: #4b5563;
}

.receipt-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    font-size: 11px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #9ca3af;
}

.receipt-items-table {
    width: 100%;
    font-size: 11.5px;
    border-collapse: collapse;
    margin-bottom: 14px;
}

.receipt-items-table th {
    text-align: left;
    border-bottom: 1px solid #111;
    padding: 4px 0;
}

.receipt-items-table td {
    padding: 5px 0;
}

.receipt-totals-table {
    width: 100%;
    font-size: 12px;
    margin-bottom: 14px;
    border-top: 1px dashed #9ca3af;
    padding-top: 10px;
}

.receipt-totals-table td {
    padding: 3px 0;
}

.receipt-grand-total {
    font-size: 15px;
    font-weight: 900;
    border-top: 1px solid #111;
    border-bottom: 1px solid #111;
    padding: 6px 0;
}

.receipt-barcode-box {
    text-align: center;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed #9ca3af;
    font-size: 11px;
}

.receipt-barcode-img {
    height: 38px;
    width: 75%;
    margin: 6px auto;
    background: repeating-linear-gradient(90deg, #111, #111 2px, transparent 2px, transparent 5px);
}

.receipt-modal-actions {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.receipt-modal-actions button {
    flex: 1;
    height: 40px;
    border-radius: 8px;
    font-family: "Nunito", sans-serif;
    font-weight: 750;
    cursor: pointer;
}

.btn-print-receipt {
    background: var(--brand-blue);
    color: white;
    border: 0;
}

.btn-close-receipt {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

/* Responsive Overrides for Dashboard */
@media (max-width: 1200px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .quick-launch-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .analytics-grid,
    .dashboard-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .quick-launch-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .welcome-banner {
        flex-direction: column;
        align-items: flex-start;
    }
    .dashboard-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .dashboard-actions-group {
        width: 100%;
        justify-content: space-between;
    }
}

.user-management-alert,
.user-management-success {
    margin: 0 0 18px;
}

.admin-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
    color: var(--muted);
    font-size: 22px;
}

.admin-breadcrumb > a {
    color: var(--text);
    font-size: inherit;
    font-weight: 800;
}

.admin-breadcrumb > a:hover {
    color: var(--brand-blue);
}

.admin-breadcrumb > i {
    color: #a0a8b8;
    font-size: 17px;
}

.admin-breadcrumb h1 {
    margin: 0;
    color: var(--text);
    font-size: inherit;
    font-weight: 700;
}

.user-management-success {
    padding: 12px 15px;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    background: #f0fdf4;
    color: #166534;
    font-size: 13px;
    font-weight: 700;
}

.user-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.user-summary-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 5px 16px rgba(15, 23, 42, .035);
}

.user-summary-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand-blue) 10%, var(--surface));
    color: var(--brand-blue);
    font-size: 17px;
}

.user-summary-icon.is-active {
    background: #ecfdf3;
    color: #16834a;
}

.user-summary-icon.is-inactive {
    background: #fff1f2;
    color: #c24150;
}

.user-summary-icon.is-admin {
    background: #fff7ed;
    color: #c15b15;
}

.user-summary-card div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.user-summary-card div span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.user-summary-card div strong {
    color: var(--text);
    font-size: 23px;
    line-height: 1;
}

.user-management-panel {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
    box-shadow: 0 7px 22px rgba(15, 23, 42, .04);
}

.user-management-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.user-search {
    position: relative;
    display: flex;
    flex: 1 1 220px;
    align-items: center;
    min-width: 170px;
    color: var(--muted);
}

.user-search > i {
    position: absolute;
    left: 13px;
    z-index: 1;
    font-size: 13px;
}

.user-search input,
.user-management-filters select,
.user-form-fields input,
.user-form-fields select {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.user-search input {
    padding: 0 12px 0 36px;
}

.user-management-filters {
    display: flex;
    gap: 9px;
}

.user-management-filters select {
    width: auto;
    min-width: 125px;
    padding: 0 30px 0 11px;
}

.user-search input:focus,
.user-management-filters select:focus,
.user-form-fields input:focus,
.user-form-fields select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-blue) 12%, transparent);
}

.user-add-button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 15px;
    white-space: nowrap;
}

.user-table-scroll {
    position: relative;
    overflow-x: auto;
}

.user-table {
    width: 100%;
    min-width: 650px;
    border-collapse: collapse;
    text-align: left;
}

.user-table th {
    padding: 12px 18px;
    background: color-mix(in srgb, var(--app-bg) 55%, var(--surface));
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.user-table td {
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
}

.managed-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.managed-user-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand-blue) 10%, var(--surface));
    color: var(--brand-blue);
    font-size: 12px;
    font-weight: 800;
}

.managed-user-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.managed-user-copy strong {
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.managed-user-copy small {
    color: var(--muted);
    font-size: 11px;
}

.managed-role,
.managed-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.managed-role.admin {
    background: color-mix(in srgb, var(--brand-blue) 9%, var(--surface));
    color: var(--brand-blue);
}

.managed-role.cashier {
    background: color-mix(in srgb, #64748b 10%, var(--surface));
    color: var(--muted);
}

.managed-status.active {
    background: #ecfdf3;
    color: #16834a;
}

.managed-status.inactive {
    background: #fff1f2;
    color: #c24150;
}

.managed-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.managed-date {
    color: var(--muted) !important;
    font-size: 12px !important;
}

.managed-user-actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
}

.user-status-form {
    display: contents;
}

.user-row-action {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
}

.user-row-action:hover {
    border-color: color-mix(in srgb, var(--brand-blue) 35%, var(--border));
    background: color-mix(in srgb, var(--brand-blue) 7%, var(--surface));
    color: var(--brand-blue);
}

.user-row-action.deactivate:hover {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #be123c;
}

.user-row-action.activate:hover {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.user-table-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.user-table-footer strong {
    color: var(--text);
}

.user-list-empty {
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 42px 18px;
    color: var(--muted);
    text-align: center;
}

.user-list-empty[hidden] {
    display: none;
}

.user-list-empty > span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    margin-bottom: 3px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--brand-blue) 8%, var(--surface));
    color: var(--brand-blue);
}

.user-list-empty strong {
    color: var(--text);
    font-size: 14px;
}

.user-list-empty small {
    font-size: 12px;
}

.user-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    align-items: start;
    justify-items: center;
    overflow-y: auto;
    padding: 20px;
    background: rgba(15, 23, 42, .52);
    backdrop-filter: blur(4px);
}

.user-modal-backdrop[hidden] {
    display: none;
}

.user-modal {
    width: min(520px, 100%);
    margin: auto;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
}

.user-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}

.user-modal-kicker {
    color: var(--brand-blue);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
}

.user-modal-header h2 {
    margin: 5px 0 0;
    color: var(--text);
    font-size: 21px;
}

.user-modal-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
}

.user-form-fields {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    align-items: center;
    gap: 13px 15px;
}

.user-form-fields label {
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.user-form-fields input,
.user-form-fields select {
    padding: 0 12px;
}

.user-form-fields input::placeholder {
    color: var(--muted);
}

.user-password-hint {
    grid-column: 2;
    margin-top: -7px;
    color: var(--muted);
    font-size: 11px;
}

.user-password-controls {
    position: relative;
    grid-column: 2;
    display: flex;
    align-items: center;
}

.user-password-controls input {
    padding-right: 88px;
}

.user-password-action {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.user-password-action:hover {
    background: color-mix(in srgb, var(--brand-blue) 8%, var(--surface));
    color: var(--brand-blue);
}

#user-password-preview {
    right: 42px;
}

.password-change-intro {
    margin: -10px 0 22px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.user-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.user-modal-actions button {
    min-height: 40px;
    padding: 0 14px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

:root[data-theme="dark"] .user-summary-icon.is-active,
:root[data-theme="dark"] .managed-status.active {
    background: rgba(34, 197, 94, .14);
    color: #86efac;
}

:root[data-theme="dark"] .user-summary-icon.is-inactive,
:root[data-theme="dark"] .managed-status.inactive {
    background: rgba(244, 63, 94, .14);
    color: #fda4af;
}

:root[data-theme="dark"] .user-summary-icon.is-admin {
    background: rgba(249, 115, 22, .14);
    color: #fdba74;
}

@media (max-width: 1000px) {
    .user-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .user-management-toolbar {
        flex-wrap: wrap;
    }

    .user-search {
        flex-basis: 100%;
    }

    .user-management-filters {
        flex: 1 1 auto;
    }

    .user-management-filters select {
        flex: 1 1 0;
    }
}

@media (max-width: 1080px) {
    .user-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .user-summary-grid {
        gap: 10px;
    }

    .user-summary-card {
        gap: 9px;
        padding: 13px 11px;
    }

    .user-summary-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 14px;
    }

    .user-summary-card div span {
        font-size: 10px;
    }

    .user-summary-card div strong {
        font-size: 20px;
    }

    .user-management-toolbar {
        padding: 13px;
    }

    .user-management-filters {
        min-width: 100%;
    }

    .user-add-button {
        flex: 1 1 100%;
        justify-content: center;
    }

    .user-form-fields {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .user-form-fields label:not(:first-child) {
        margin-top: 5px;
    }

    .user-password-hint {
        grid-column: 1;
        margin-top: -2px;
    }

    .user-password-controls {
        grid-column: 1;
    }

    .user-modal {
        padding: 19px;
    }
}
