﻿:root {
    --axen-orange: #ff6a00;
    --axen-orange-2: #ff3d00;
    --axen-navy: #071426;
    --axen-dark: #0b1220;
    --axen-card: #111827;
    --axen-light: #f5f7fb;
    --axen-muted: #95a0b6;
    --axen-border: rgba(148, 163, 184, 0.18);
    --shadow-soft: 0 24px 70px rgba(7, 20, 38, 0.22);
    --shadow-card: 0 18px 42px rgba(15, 23, 42, 0.13);
    --radius: 8px;
}

/* Payments / Cash / Bank */
.erp-dashboard {
    padding: 28px;
    background: #f8fafc;
    min-height: calc(100vh - 74px);
}

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

.dashboard-hero h1 {
    margin: 8px 0 6px;
    color: #0f172a;
    font-size: 32px;
    letter-spacing: 0;
}

.dashboard-hero p {
    margin: 0;
    color: #64748b;
}

.dashboard-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.dashboard-context span {
    padding: 7px 11px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 900;
}

.dashboard-period {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.dashboard-period select,
.dashboard-period input {
    min-height: 40px;
    border: 1px solid #d8e3f1;
    border-radius: 10px;
    padding: 0 11px;
    background: #fff;
    color: #0f172a;
    font-weight: 700;
}

.dashboard-warning {
    margin-bottom: 16px;
    padding: 13px 16px;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    color: #c2410c;
    background: #fff7ed;
    font-weight: 800;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.dashboard-kpi {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border: 1px solid #e5edf8;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.dashboard-kpi::after {
    content: "";
    position: absolute;
    right: -22px;
    top: -22px;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: var(--dash-soft, #dbeafe);
}

.dashboard-kpi span {
    position: relative;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: var(--dash-color, #2563eb);
    background: var(--dash-soft, #dbeafe);
    font-weight: 900;
}

.dashboard-kpi p {
    margin: 14px 0 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.dashboard-kpi strong {
    display: block;
    color: #0f172a;
    font-size: 20px;
    font-weight: 950;
}

.dashboard-kpi small {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-kpi.blue { --dash-color: #2563eb; --dash-soft: #dbeafe; }
.dashboard-kpi.orange { --dash-color: #f97316; --dash-soft: #ffedd5; }
.dashboard-kpi.green { --dash-color: #16a34a; --dash-soft: #dcfce7; }
.dashboard-kpi.cyan { --dash-color: #0891b2; --dash-soft: #cffafe; }
.dashboard-kpi.red { --dash-color: #dc2626; --dash-soft: #fee2e2; }
.dashboard-kpi.purple { --dash-color: #7c3aed; --dash-soft: #ede9fe; }
.dashboard-kpi.slate { --dash-color: #334155; --dash-soft: #e2e8f0; }

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.dashboard-wide-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr 1fr;
    gap: 18px;
}

.dashboard-panel {
    border: 1px solid #e5edf8;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .06);
    padding: 18px;
    min-width: 0;
}

.dashboard-panel header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.dashboard-panel h2 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 18px;
}

.dashboard-panel header p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-panel header a {
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.dashboard-mini-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.dashboard-mini-stats span {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 14px;
    color: #64748b;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 800;
}

.dashboard-mini-stats b {
    color: #0f172a;
    font-size: 14px;
}

.hour-chart {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 4px;
    align-items: end;
    height: 126px;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(180deg, #f8fbff, #eef6ff);
    margin-bottom: 16px;
}

.hour-chart span {
    min-height: 4px;
    border-radius: 999px 999px 3px 3px;
    background: linear-gradient(180deg, #2563eb, #60a5fa);
}

.dashboard-list {
    display: grid;
    gap: 10px;
}

.dashboard-list div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e5edf8;
    border-radius: 14px;
    background: #fff;
}

.dashboard-list.compact div {
    padding: 10px 12px;
}

.dashboard-list strong,
.dashboard-list span {
    min-width: 0;
}

.dashboard-list span {
    color: #64748b;
    font-size: 12px;
}

.dash-status {
    grid-row: span 2;
    padding: 5px 9px;
    border-radius: 999px;
    font-style: normal;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.dash-status.paid {
    color: #047857;
    background: #dcfce7;
}

.dash-status.partial {
    color: #c2410c;
    background: #ffedd5;
}

.dash-status.unpaid {
    color: #b91c1c;
    background: #fee2e2;
}

.dash-status.cancelled {
    color: #475569;
    background: #e2e8f0;
}

.dashboard-empty {
    margin: 0;
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    color: #64748b;
    background: #f8fafc;
    font-weight: 700;
}

.treasury-panel {
    display: grid;
}

.treasury-donut {
    width: 210px;
    height: 210px;
    margin: 0 auto 18px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    text-align: center;
    background:
        radial-gradient(circle at center, #fff 0 54%, transparent 55%),
        conic-gradient(#16a34a 0 calc(var(--cash) * 1%), #2563eb 0 100%);
}

.treasury-donut strong,
.treasury-donut span {
    grid-area: 1 / 1;
}

.treasury-donut strong {
    margin-top: -14px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
}

.treasury-donut span {
    margin-top: 34px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.product-ranking {
    display: grid;
    gap: 14px;
}

.product-ranking div {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding-bottom: 16px;
}

.product-ranking small {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.product-ranking b {
    color: #0f172a;
}

.product-ranking i {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #f97316);
}

.dashboard-table-scroll {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
}

.dashboard-table th {
    padding: 11px 12px;
    color: #fff;
    background: #0f172a;
    text-align: left;
    font-size: 12px;
}

.dashboard-table th:first-child {
    border-radius: 12px 0 0 12px;
}

.dashboard-table th:last-child {
    border-radius: 0 12px 12px 0;
}

.dashboard-table td {
    padding: 12px;
    border-bottom: 1px solid #e5edf8;
    color: #0f172a;
}

.dashboard-table small {
    display: block;
    color: #64748b;
    font-size: 11px;
}

@media (max-width: 1320px) {
    .dashboard-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-wide-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .dashboard-hero,
    .dashboard-main-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .dashboard-kpi-grid,
    .dashboard-mini-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Premium AXEN sidebar refresh */
.app-shell {
    grid-template-columns: 312px minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    width: 312px;
    min-height: 100vh;
    max-height: 100vh;
    padding: 22px 14px 18px;
    overflow: hidden;
    border-right: 1px solid rgba(148, 163, 184, .18);
    background:
        radial-gradient(circle at 14% 8%, rgba(37, 99, 235, .24), transparent 30%),
        radial-gradient(circle at 94% 42%, rgba(14, 165, 233, .12), transparent 28%),
        linear-gradient(180deg, #071827 0%, #051322 48%, #06101d 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .04), 18px 0 42px rgba(2, 6, 23, .18);
}

.app-sidebar::before {
    content: "";
    position: absolute;
    inset: 10px;
    pointer-events: none;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 22px;
}

.app-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 74px;
    margin: 0 8px 18px;
    padding: 8px 4px 14px;
    color: #f8fafc;
    text-decoration: none;
}

.app-brand .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #fff;
    background: linear-gradient(135deg, #ff7a18, #f04405);
    box-shadow: 0 18px 34px rgba(249, 115, 22, .28);
    font-weight: 950;
}

.app-brand strong {
    display: block;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    letter-spacing: 0;
}

.app-brand strong span,
.app-brand small {
    color: #ff7a18;
}

.app-brand small {
    display: block;
    margin-top: 5px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
}

.sidebar-nav {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 16px;
    height: auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 6px 4px;
    scrollbar-width: thin;
    scrollbar-color: #ff7a18 rgba(148, 163, 184, .14);
}

.sidebar-nav::-webkit-scrollbar {
    width: 10px;
}

.sidebar-nav::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(148, 163, 184, .12);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    border: 2px solid rgba(7, 24, 39, .9);
    border-radius: 999px;
    background: linear-gradient(180deg, #ff9a2f, #f97316 58%, #ea580c);
}

.nav-section-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(15, 35, 56, .92), rgba(3, 18, 32, .78)),
        rgba(15, 23, 42, .58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 16px 36px rgba(2, 6, 23, .22);
    backdrop-filter: blur(12px);
}

.nav-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    margin: 0;
    padding: 18px 18px 13px;
    color: #ff7a18;
    font-size: 15px;
    font-weight: 950;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.nav-heading:first-child {
    margin-top: 0;
}

.nav-heading-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid rgba(249, 115, 22, .32);
    border-radius: 12px;
    color: #7dd3fc;
    background: rgba(15, 35, 56, .92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    font-size: 13px;
    font-weight: 950;
}

.nav-section-card > .nav-accordion,
.nav-section-card > .nav-link {
    border-top: 1px solid rgba(148, 163, 184, .13);
}

.nav-accordion {
    border-radius: 0;
}

.nav-link,
.nav-sublink {
    border: 0;
    border-radius: 0;
    text-decoration: none;
}

.nav-link {
    min-height: 64px;
    padding: 0 18px;
    color: #f8fafc;
    background: transparent;
    font-size: 16px;
    font-weight: 900;
}

.nav-link:hover,
.nav-link.active,
.nav-accordion.open > .nav-toggle,
.nav-accordion[data-active-section="true"] > .nav-toggle {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(90deg, rgba(249, 115, 22, .17), rgba(37, 99, 235, .08));
    box-shadow: inset 4px 0 0 #f97316;
}

.nav-label {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.nav-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 12px;
    color: #7dd3fc;
    background: rgba(15, 35, 56, .86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 10px 24px rgba(2, 6, 23, .17);
    font-size: 14px;
    font-weight: 950;
}

.nav-accordion.open > .nav-toggle .nav-icon,
.nav-accordion[data-active-section="true"] > .nav-toggle .nav-icon,
.nav-link.active .nav-icon {
    color: #fff;
    border-color: rgba(249, 115, 22, .45);
    background: linear-gradient(135deg, #ff7a18, #ea580c);
}

.chevron {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    border-radius: 12px;
    color: #f8fafc;
    background: rgba(148, 163, 184, .12);
    transition: transform .2s ease, background .2s ease, color .2s ease;
    font-size: 0;
}

.chevron::before {
    content: ">";
    font-size: 22px;
    font-weight: 950;
    line-height: 1;
}

.nav-accordion.open .chevron {
    color: #fff;
    background: rgba(249, 115, 22, .24);
    transform: rotate(90deg);
}

.nav-submenu {
    display: none;
    padding: 3px 16px 15px 76px;
    background: rgba(2, 6, 23, .08);
}

.nav-accordion.open .nav-submenu,
.nav-accordion[data-active-section="true"] .nav-submenu {
    display: grid;
    gap: 2px;
}

.nav-sublink {
    position: relative;
    min-height: 34px;
    padding: 9px 11px 9px 16px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
}

.nav-sublink::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(148, 163, 184, .24);
}

.nav-sublink:hover,
.nav-sublink.active {
    color: #fff;
    border-radius: 10px;
    background: rgba(249, 115, 22, .13);
}

.nav-sublink.active::before {
    width: 3px;
    background: #f97316;
}

.nav-link.disabled,
.nav-sublink.disabled {
    opacity: .45;
}

.sidebar-store {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 7px;
    min-height: 118px;
    margin: 18px 8px 0;
    padding: 24px 78px 22px 24px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 18px;
    background:
        radial-gradient(circle at 12% 18%, rgba(34, 197, 94, .16), transparent 22%),
        linear-gradient(135deg, rgba(15, 35, 56, .95), rgba(3, 18, 32, .84));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 18px 38px rgba(2, 6, 23, .22);
}

.sidebar-store::before {
    content: none;
}

.sidebar-store .store-status-dot {
    position: absolute;
    left: 24px;
    top: 24px;
    width: 15px;
    height: 15px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 8px rgba(34, 197, 94, .12);
}

.sidebar-store .store-label {
    display: block;
    margin-left: 32px;
    color: #ff7a18;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.sidebar-store strong {
    display: block;
    margin-top: 6px;
    overflow: hidden;
    color: #f8fafc;
    font-size: 22px;
    font-weight: 950;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-store .store-icon {
    position: absolute;
    right: 24px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    transform: translateY(-50%);
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 16px;
    color: #fff;
    background: rgba(15, 35, 56, .88);
    font-size: 20px;
    font-weight: 950;
}

.sidebar-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 18px 12px 0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
}

.sidebar-footer strong {
    color: #cbd5e1;
    font-size: 14px;
}

@media (max-width: 980px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(312px, 88vw);
        min-height: 100vh;
        max-height: 100vh;
        overflow: hidden;
        transform: translateX(-105%);
        transition: transform .22s ease;
    }

    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }
}

/* Finance center */
.finance-page {
    display: grid;
    gap: 18px;
    color: #0f172a;
}

.finance-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 4px 0 2px;
}

.finance-heading h1 {
    margin: 8px 0 6px;
    font-size: 30px;
    line-height: 1.1;
}

.finance-heading p,
.finance-heading .breadcrumb {
    margin: 0;
    color: #64748b;
}

.finance-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 14px;
}

.finance-kpis article {
    min-height: 118px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .07);
}

.finance-kpis span,
.finance-kpis small {
    display: block;
    color: #64748b;
    font-weight: 700;
}

.finance-kpis strong {
    display: block;
    margin: 10px 0 6px;
    font-size: 22px;
    color: #0f172a;
}

.finance-filter-card,
.finance-form-card,
.finance-panel {
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .07);
}

.finance-filter-card {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, minmax(160px, 1fr)) auto auto;
    align-items: end;
    gap: 14px;
}

.finance-filter-card.compact {
    grid-template-columns: 1fr;
    align-items: stretch;
}

.finance-filter-card h2,
.finance-form-card h2,
.panel-title h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.finance-filter-card label,
.finance-form-card label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.finance-filter-card input,
.finance-filter-card select,
.finance-form-card input,
.finance-form-card select {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #0f172a;
    font: inherit;
}

.finance-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, .9fr);
    gap: 16px;
    align-items: start;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.form-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .full {
    grid-column: 1 / -1;
}

.panel-title {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}

.panel-title span {
    color: #64748b;
    font-weight: 700;
}

.finance-table th {
    background: #0f172a;
    color: #fff;
}

.finance-table td {
    vertical-align: middle;
}

.finance-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 800;
    font-size: 12px;
}

.finance-badge.warning {
    background: #ffedd5;
    color: #c2410c;
}

.finance-badge.success {
    background: #dcfce7;
    color: #15803d;
}

.text-right {
    text-align: right;
}

.text-success {
    color: #16a34a !important;
}

.text-danger {
    color: #dc2626 !important;
}

@media (max-width: 1180px) {
    .finance-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .finance-filter-card,
    .finance-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .finance-heading {
        display: grid;
    }

    .finance-kpis,
    .form-grid.two {
        grid-template-columns: 1fr;
    }
}

/* Premium stock report refinement */
.reports-page--stock {
    padding: 26px;
    background:
        linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
}

.reports-page--stock .reports-hero {
    border: 1px solid rgba(37, 99, 235, .16);
    border-radius: 14px;
    background:
        radial-gradient(circle at 8% 5%, rgba(37, 99, 235, .13), transparent 30%),
        radial-gradient(circle at 92% 10%, rgba(249, 115, 22, .11), transparent 26%),
        #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.reports-page--stock .reports-hero h1 {
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 900;
}

.reports-page--stock .reports-filter-card {
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    align-items: end;
    border-radius: 14px;
    padding: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 45px rgba(15, 23, 42, .07);
}

.reports-page--stock .reports-filter-card label span {
    text-transform: uppercase;
    letter-spacing: .03em;
}

.reports-page--stock .reports-filter-card input,
.reports-page--stock .reports-filter-card select {
    min-height: 44px;
    border-radius: 10px;
    background: #f8fafc;
}

.reports-page--stock .reports-filter-actions {
    grid-column: span 2;
}

.reports-page--stock .reports-kpi-grid {
    grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.reports-page--stock .reports-kpi {
    position: relative;
    overflow: hidden;
    min-height: 122px;
    border-radius: 14px;
    padding: 18px;
    background: #fff;
}

.reports-page--stock .reports-kpi::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -44px;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    background: var(--report-soft, #dbeafe);
    opacity: .7;
}

.reports-page--stock .reports-kpi > span,
.reports-page--stock .reports-kpi small,
.reports-page--stock .reports-kpi strong {
    position: relative;
    z-index: 1;
}

.reports-page--stock .reports-kpi strong {
    font-size: 24px;
    line-height: 1.12;
}

.reports-page--stock .reports-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reports-page--stock .reports-chart-card {
    border-radius: 14px;
    padding: 20px;
}

.reports-page--stock .report-bars div {
    min-height: 38px;
    border-radius: 10px;
    background: #f8fafc;
}

.reports-page--stock .report-bars i {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #16a34a);
}

.reports-page--stock .reports-table-card {
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .08);
}

.reports-page--stock .reports-table-card header {
    padding: 20px 22px;
    border-bottom: 1px solid #e2e8f0;
}

.reports-page--stock .reports-table {
    min-width: 1280px;
}

.reports-page--stock .reports-table thead th {
    height: 52px;
    background: linear-gradient(180deg, #0b1f4d, #061338);
    font-size: 12px;
    letter-spacing: .02em;
}

.reports-page--stock .reports-table tbody td {
    height: 54px;
    background: #fff;
}

.reports-page--stock .reports-table tbody tr:hover td {
    background: #f8fbff;
}

.reports-page--stock .report-status {
    min-width: 90px;
    justify-content: center;
}

.reports-page--stock .report-row-btn {
    border-color: #bfdbfe;
    color: #1d4ed8;
    background: #eff6ff;
}

@media (max-width: 1280px) {
    .reports-page--stock .reports-filter-card,
    .reports-page--stock .reports-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .reports-page--stock {
        padding: 16px;
    }

    .reports-page--stock .reports-filter-card,
    .reports-page--stock .reports-kpi-grid,
    .reports-page--stock .reports-chart-grid {
        grid-template-columns: 1fr;
    }

    .reports-page--stock .reports-filter-actions {
        grid-column: auto;
    }
}

/* Administration Center */
.admin-page {
    display: grid;
    gap: 18px;
    color: #0f172a;
}

.admin-hero,
.admin-panel,
.admin-form-card,
.admin-filter-card,
.admin-table-card,
.admin-module-card,
.admin-kpi {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.admin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
}

.admin-hero nav {
    display: flex;
    gap: 9px;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 13px;
}

.admin-hero nav a {
    color: #2563eb;
    text-decoration: none;
}

.admin-hero h1 {
    margin: 0;
    font-size: clamp(25px, 2.6vw, 34px);
    letter-spacing: 0;
}

.admin-hero p {
    margin: 6px 0 0;
    color: #475569;
}

.admin-actions,
.admin-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.admin-btn,
.admin-row-actions button,
.admin-inline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #dbe5f3;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.admin-btn.primary {
    border-color: #2563eb;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
}

.admin-alert {
    padding: 13px 16px;
    border-radius: 10px;
    font-weight: 800;
}

.admin-alert.success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.admin-alert.error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.admin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 14px;
}

.admin-kpi {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
}

.admin-kpi > span,
.admin-module-card > span,
.admin-avatar {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: #dbeafe;
    color: #2563eb;
    font-weight: 900;
}

.admin-kpi small {
    display: block;
    color: #64748b;
    font-weight: 800;
}

.admin-kpi strong {
    display: block;
    margin-top: 3px;
    font-size: 22px;
}

.admin-kpi.green > span { background: #dcfce7; color: #16a34a; }
.admin-kpi.orange > span { background: #ffedd5; color: #f97316; }
.admin-kpi.purple > span { background: #ede9fe; color: #7c3aed; }
.admin-kpi.red > span { background: #fee2e2; color: #dc2626; }
.admin-kpi.slate > span { background: #f1f5f9; color: #475569; }

.admin-module-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 14px;
}

.admin-module-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease;
}

.admin-module-card:hover {
    border-color: #2563eb;
    transform: translateY(-2px);
}

.admin-module-card strong {
    font-size: 17px;
}

.admin-module-card small,
.admin-empty,
.admin-note {
    color: #64748b;
}

.admin-two-col,
.admin-grid-main,
.admin-settings-grid {
    display: grid;
    grid-template-columns: minmax(300px, .95fr) minmax(0, 1.65fr);
    gap: 16px;
    align-items: start;
}

.admin-panel,
.admin-form-card,
.admin-filter-card,
.admin-table-card {
    padding: 18px;
}

.admin-panel h2,
.admin-form-card h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-form-grid label,
.admin-filter-card label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-weight: 800;
}

.admin-form-grid span,
.admin-filter-card span {
    font-size: 12px;
}

.admin-form-grid input,
.admin-form-grid select,
.admin-form-grid textarea,
.admin-filter-card input,
.admin-filter-card select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #dbe5f3;
    border-radius: 8px;
    padding: 0 12px;
    background: #fff;
    color: #0f172a;
}

.admin-form-grid textarea {
    min-height: 86px;
    padding-top: 11px;
    resize: vertical;
}

.admin-form-grid .wide,
.admin-note {
    grid-column: 1 / -1;
}

.checkline {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.checkline input {
    width: auto;
    min-height: auto;
}

.admin-store-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-store-checks strong {
    flex-basis: 100%;
}

.admin-store-checks label {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.admin-list-wrap {
    display: grid;
    gap: 14px;
}

.admin-filter-card {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) repeat(2, minmax(150px, .5fr)) auto;
    gap: 12px;
    align-items: end;
}

.admin-table-card {
    overflow-x: auto;
}

.admin-table-card.flat {
    box-shadow: none;
    padding: 0;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.admin-table th {
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    text-align: left;
    text-transform: uppercase;
}

.admin-table th,
.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.admin-table td small {
    display: block;
    color: #64748b;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.admin-badge.green { background: #dcfce7; color: #15803d; }
.admin-badge.gray { background: #f1f5f9; color: #475569; }
.admin-badge.purple { background: #ede9fe; color: #6d28d9; }
.admin-badge.blue { background: #dbeafe; color: #1d4ed8; }
.admin-badge.red { background: #fee2e2; color: #b91c1c; }

.admin-row-actions form {
    display: inline;
}

.admin-row-actions button {
    min-height: 32px;
    padding: 0 9px;
    font-size: 12px;
}

.admin-timeline,
.admin-mini-list,
.admin-role-list {
    display: grid;
    gap: 10px;
}

.admin-timeline div,
.admin-mini-list div {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.admin-timeline span,
.admin-mini-list span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
}

.admin-mini-list em {
    display: inline-flex;
    margin-top: 8px;
    font-style: normal;
    font-weight: 900;
}

.admin-mini-list em.ok,
.admin-role-pill em.ok { color: #16a34a; }
.admin-mini-list em.off,
.admin-role-pill em.off { color: #64748b; }

.permissions-layout {
    grid-template-columns: 310px minmax(0, 1fr);
}

.admin-role-pill {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 8px 12px;
    align-items: center;
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
}

.admin-role-pill.active {
    border-color: #2563eb;
    background: #eff6ff;
}

.admin-role-pill span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #dbeafe;
    color: #2563eb;
    font-weight: 900;
}

.admin-role-pill small {
    color: #64748b;
}

.admin-permission-form {
    display: none;
}

.admin-permission-form.active {
    display: grid;
    gap: 14px;
}

.permission-form-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.permission-table th,
.permission-table td {
    text-align: center;
}

.permission-table td:first-child,
.permission-table th:first-child {
    text-align: left;
}

.admin-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.admin-switch input {
    display: none;
}

.admin-switch span {
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
}

.admin-switch span::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform .18s ease;
}

.admin-switch input:checked + span {
    background: #2563eb;
}

.admin-switch input:checked + span::after {
    transform: translateX(16px);
}

.admin-roles-page {
    background: #f8fafc;
}

.roles-hero-light {
    background: transparent;
    box-shadow: none;
    border: 0;
    padding: 0 0 8px;
}

.roles-create-btn {
    min-height: 48px;
    padding: 0 22px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .22);
}

.roles-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 18px;
}

.roles-kpi {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 18px;
    min-height: 150px;
    padding: 24px;
    border: 1px solid #dbe5f3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.roles-kpi > span {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    font-weight: 900;
}

.roles-kpi small,
.roles-kpi em {
    color: #475569;
    font-style: normal;
}

.roles-kpi strong {
    display: block;
    margin: 12px 0 26px;
    color: #0f172a;
    font-size: 28px;
}

.roles-kpi em::before {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 10px;
    border-radius: 999px;
    content: "";
}

.roles-kpi.purple > span { color: #6d28d9; background: #ede9fe; }
.roles-kpi.purple em::before { background: #7c3aed; }
.roles-kpi.green > span { color: #16a34a; background: #dcfce7; }
.roles-kpi.green em::before { background: #22c55e; }
.roles-kpi.orange > span { color: #f59e0b; background: #ffedd5; }
.roles-kpi.orange em::before { background: #f59e0b; }
.roles-kpi.red > span { color: #dc2626; background: #fee2e2; }
.roles-kpi.red em::before { background: #ef4444; }

.roles-table-card {
    overflow: hidden;
    border: 1px solid #dbe5f3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .06);
}

.roles-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px;
    border-bottom: 1px solid #e2e8f0;
}

.roles-search,
.roles-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    border: 1px solid #dbe5f3;
    border-radius: 8px;
    background: #fff;
}

.roles-search {
    width: min(360px, 100%);
    padding: 0 14px;
}

.roles-filter {
    padding: 0 12px;
}

.roles-search span,
.roles-filter span {
    color: #64748b;
    font-weight: 900;
}

.roles-search input,
.roles-filter select {
    width: 100%;
    border: 0;
    color: #0f172a;
    background: transparent;
    outline: 0;
    font: inherit;
}

.roles-table-wrap {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.roles-table th,
.roles-table td {
    padding: 18px;
}

.roles-name-cell {
    display: flex;
    align-items: center;
    gap: 14px;
}

.roles-name-cell > span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    color: #fff;
    background: var(--role-color);
    font-size: 12px;
    font-weight: 900;
}

.roles-name-cell strong,
.roles-name-cell small {
    display: block;
}

.roles-name-cell small {
    margin-top: 3px;
    color: #64748b;
}

.roles-pill,
.roles-status {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 7px;
    padding: 0 10px;
    font-weight: 800;
}

.roles-pill.users {
    color: #6d28d9;
    background: #f1e8ff;
    border: 1px solid #ddd6fe;
}

.roles-pill.empty {
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.roles-status {
    gap: 8px;
}

.roles-status i {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.roles-status.active {
    color: #16a34a;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

.roles-status.active i { background: #22c55e; }

.roles-status.inactive {
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.roles-status.inactive i { background: #94a3b8; }

.roles-actions {
    display: flex;
    gap: 10px;
}

.roles-actions form {
    margin: 0;
}

.roles-action {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    font-weight: 900;
}

.roles-action.edit {
    color: #6d28d9;
    background: #ede9fe;
}

.roles-action.delete {
    color: #dc2626;
    background: #fee2e2;
}

.roles-action:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.roles-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-top: 1px solid #e2e8f0;
}

.roles-pagination p {
    margin: 0;
    color: #475569;
}

.roles-pagination div {
    display: flex;
    gap: 8px;
    align-items: center;
}

.roles-pagination button,
.roles-pagination strong {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #dbe5f3;
    border-radius: 8px;
    background: #fff;
    color: #334155;
}

.roles-pagination strong {
    border: 0;
    background: #2563eb;
    color: #fff;
}

.roles-form-panel textarea {
    min-height: 96px;
    resize: vertical;
}

.roles-form-panel .wide {
    grid-column: 1 / -1;
}

.admin-step-card,
.admin-note {
    padding: 12px 14px;
    border-radius: 8px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
}

.admin-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-sticky-actions {
    position: sticky;
    bottom: 14px;
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dbe5f3;
    border-radius: 10px;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(12px);
    box-shadow: 0 14px 34px rgba(15, 23, 42, .12);
}

@media (max-width: 1280px) {
    .admin-kpi-grid,
    .roles-kpi-grid,
    .admin-module-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .admin-grid-main,
    .admin-two-col,
    .permissions-layout,
    .admin-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .admin-hero,
    .permission-form-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-kpi-grid,
    .roles-kpi-grid,
    .admin-module-grid,
    .admin-form-grid,
    .admin-filter-card {
        grid-template-columns: 1fr;
    }

    .roles-toolbar,
    .roles-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .roles-search,
    .roles-filter {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .erp-dashboard {
        padding: 18px;
    }

    .dashboard-kpi-grid,
    .dashboard-mini-stats,
    .dashboard-period {
        grid-template-columns: 1fr;
        display: grid;
    }
}

.finance-page {
    padding: 28px;
    background: #f8fafc;
    min-height: calc(100vh - 74px);
}

.finance-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.finance-header h1 {
    margin: 8px 0 6px;
    color: #0f172a;
    font-size: 30px;
    letter-spacing: 0;
}

.finance-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.finance-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.finance-kpis article {
    display: grid;
    grid-template-columns: 54px 1fr;
    grid-template-rows: auto auto;
    gap: 2px 14px;
    align-items: center;
    padding: 18px;
    border: 1px solid #e5edf8;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.finance-kpis article span {
    grid-row: span 2;
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    color: #2563eb;
    font-weight: 900;
}

.finance-kpis article p {
    margin: 0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.finance-kpis article strong {
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
}

.finance-filter-card,
.finance-card {
    border: 1px solid #e5edf8;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.finance-filter-card {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr)) auto auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    margin-bottom: 18px;
}

.finance-filter-card.compact {
    grid-template-columns: minmax(180px, 260px) auto;
}

.finance-filter-card label,
.finance-card label {
    display: grid;
    gap: 7px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
}

.finance-filter-card input,
.finance-filter-card select,
.finance-card input,
.finance-card select,
.finance-card textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d8e3f1;
    border-radius: 10px;
    padding: 0 12px;
    color: #0f172a;
    background: #fff;
    font: inherit;
}

.finance-card textarea {
    padding-top: 12px;
    resize: vertical;
}

.finance-card {
    padding: 20px;
}

.finance-card h2 {
    margin: 0 0 16px;
    color: #0f172a;
    font-size: 18px;
}

.finance-card > label + label,
.finance-card > .finance-check,
.finance-card > button {
    margin-top: 12px;
}

.finance-check {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px;
}

.finance-check input {
    width: 18px;
    min-height: 18px;
}

.finance-split,
.finance-transfer-layout,
.payment-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.payment-form-layout {
    grid-template-columns: minmax(0, 1fr) 420px;
}

.finance-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.finance-transfer-card {
    min-height: 420px;
}

.finance-account-list,
.payment-allocation-list {
    display: grid;
    gap: 12px;
}

.finance-account-list article,
.payment-allocation-list article {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid #e5edf8;
    border-radius: 12px;
    background: #f8fbff;
}

.payment-allocation-list article {
    grid-template-columns: 1fr auto;
    gap: 8px 14px;
}

.finance-empty,
.muted-empty {
    padding: 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    background: #f8fafc;
}

.finance-help {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 12px;
}

.finance-form-footer {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 0 0;
}

.finance-card .wide {
    grid-column: 1 / -1;
}

.finance-account-list span,
.payment-allocation-list small {
    color: #64748b;
    font-size: 12px;
}

.finance-account-list b {
    color: #2563eb;
}

.finance-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.finance-badge.green {
    color: #047857;
    background: #dcfce7;
}

.finance-badge.orange {
    color: #c2410c;
    background: #ffedd5;
}

.finance-badge.blue {
    color: #1d4ed8;
    background: #dbeafe;
}

.finance-badge.gray {
    color: #475569;
    background: #e2e8f0;
}

.amount-in {
    color: #16a34a;
}

.amount-out {
    color: #dc2626;
}

.axen-alert {
    margin-bottom: 16px;
    padding: 13px 16px;
    border-radius: 14px;
    font-weight: 800;
}

.axen-alert.success {
    color: #047857;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.axen-alert.danger {
    color: #b91c1c;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.cash-closing-card {
    max-width: 980px;
}

.payment-receipt {
    max-width: 760px;
    margin: 24px auto;
    padding: 32px;
    background: #fff;
    color: #111827;
    border: 1px solid #d1d5db;
}

.payment-receipt header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 2px solid #111827;
    padding-bottom: 16px;
    margin-bottom: 18px;
}

.payment-receipt h1 {
    margin: 0;
    font-size: 26px;
}

.payment-receipt dl {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 8px 14px;
}

.payment-receipt dt {
    font-weight: 800;
}

.payment-receipt table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 18px;
}

.payment-receipt th,
.payment-receipt td {
    border: 1px solid #9ca3af;
    padding: 8px;
    text-align: left;
}

.payment-receipt .receipt-total {
    margin-top: 20px;
    text-align: right;
    font-size: 20px;
    font-weight: 900;
}

@media print {
    .payment-receipt {
        margin: 0;
        max-width: none;
        border: 0;
        box-shadow: none;
    }
}

@media (max-width: 1180px) {
    .finance-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .finance-split,
    .finance-transfer-layout,
    .payment-form-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .finance-page {
        padding: 18px;
    }

    .finance-header {
        display: grid;
    }

    .finance-kpis,
    .finance-filter-card,
    .finance-entry-grid {
        grid-template-columns: 1fr;
    }
}

/* Sales creation and invoice center */
.sales-filter-card {
    grid-template-columns: minmax(240px, 1.3fr) repeat(4, minmax(150px, 1fr)) auto;
}

.sales-filter-card .wide {
    grid-column: span 2;
}

.filter-card input[type="search"],
.filter-card input[type="number"],
.sale-card input,
.sale-card select,
.sale-card textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    padding: 0 12px;
    background: #fff;
    color: #0f172a;
    outline: none;
}

.sale-card textarea {
    padding: 10px 12px;
    resize: vertical;
}

.sales-create-page,
.invoice-page {
    display: grid;
    gap: 18px;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.btn-primary,
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 8px;
    padding: 0 14px;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

.btn-light {
    color: #0f172a;
    background: #fff;
    border-color: #d9e4f2;
}

.sales-create-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
}

.sale-workspace,
.sale-side-panel {
    display: grid;
    gap: 16px;
}

.sale-card {
    border: 1px solid #e2eaf5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
    padding: 16px;
}

.sale-card header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.sale-card h2 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 16px;
}

.sale-card p,
.sale-card small {
    color: #64748b;
}

.sale-chip {
    display: inline-flex;
    border-radius: 999px;
    padding: 7px 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 800;
}

.sale-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dbe5f1;
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 12px;
}

.sale-search-box input {
    border: 0;
    min-height: 34px;
}

.sale-search-box span {
    padding: 5px 8px;
    border-radius: 7px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.sale-product-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.sale-product-card {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 10px;
    align-items: center;
    min-height: 72px;
    border: 1px solid #e4ebf5;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.sale-product-card:hover {
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12);
}

.sale-product-card img {
    width: 44px;
    height: 44px;
    border-radius: 9px;
    object-fit: cover;
    background: #eef2f7;
}

.sale-product-card strong,
.sale-product-card small,
.sale-product-card em,
.sale-product-card b {
    display: block;
}

.sale-product-card em {
    color: #0f172a;
    font-style: normal;
    font-weight: 900;
}

.sale-product-card b,
.stock-pill {
    justify-self: start;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 900;
}

.sale-product-card b.ok,
.stock-pill.ok { background: #dcfce7; color: #15803d; }
.sale-product-card b.warning,
.stock-pill.warning { background: #ffedd5; color: #c2410c; }
.sale-product-card b.danger,
.stock-pill.danger { background: #fee2e2; color: #b91c1c; }

.sale-empty-state {
    grid-column: 1 / -1;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 22px;
    color: #64748b;
    text-align: center;
}

.sale-cart-table {
    min-width: 980px;
}

.sale-cart-table td small {
    display: block;
    margin-top: 3px;
    color: #64748b;
}

.sale-cart-input {
    width: 92px;
    min-height: 34px;
    border: 1px solid #dbe5f1;
    border-radius: 7px;
    padding: 0 8px;
}

.sale-side-panel {
    position: sticky;
    top: 86px;
}

.sale-card label {
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
    color: #334155;
    font-weight: 800;
    font-size: 12px;
}

.sale-customer-preview {
    border-radius: 10px;
    padding: 12px;
    background: #f8fafc;
    color: #475569;
}

.sale-customer-preview strong,
.sale-customer-preview span {
    display: block;
    color: #0f172a;
    font-weight: 900;
}

.sale-summary-card dl,
.invoice-totals {
    display: grid;
    gap: 10px;
    margin: 0;
}

.sale-summary-card dl div,
.invoice-totals div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 8px;
}

.sale-summary-card dt,
.invoice-totals dt {
    color: #64748b;
    font-weight: 700;
}

.sale-summary-card dd,
.invoice-totals dd {
    margin: 0;
    color: #0f172a;
    font-weight: 900;
}

.sale-summary-card .grand,
.invoice-totals .grand {
    border-radius: 10px;
    border-bottom: 0;
    background: linear-gradient(135deg, #eff6ff, #fff7ed);
    padding: 12px;
}

.sale-save-button {
    width: 100%;
    margin-top: 14px;
}

.sales-row-actions {
    flex-wrap: wrap;
}

.action-btn.danger,
.status-badge.neutral {
    background: #fee2e2;
    color: #b91c1c;
}

.action-btn.print {
    background: #eef2ff;
    color: #3730a3;
}

.text-danger {
    color: #dc2626;
}

.invoice-document {
    max-width: 980px;
    margin: 0 auto;
    border: 1px solid #dbe5f1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    padding: 28px;
    color: #0f172a;
}

.invoice-document p,
.invoice-document span,
.invoice-document small,
.invoice-document td,
.invoice-document dt {
    color: #1f2a44;
}

.invoice-document h3,
.invoice-document strong,
.invoice-document dd {
    color: #07152d;
}

.invoice-brand-logo {
    display: block;
    width: auto;
    max-width: 260px;
    max-height: 74px;
    margin: 0 0 12px;
    object-fit: contain;
}

.invoice-brand {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    margin-bottom: 10px;
    color: var(--doc-primary, #0b1b36);
    font-size: 34px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: 0;
}

.invoice-brand__ax {
    color: var(--doc-secondary, #ff8500);
}

.invoice-brand small {
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
}

.invoice-header,
.invoice-parties,
.invoice-footer {
    display: flex;
    justify-content: space-between;
    gap: 22px;
}

.invoice-header {
    border-bottom: 3px solid var(--doc-primary, #0f172a);
    padding-bottom: 18px;
}

.invoice-header h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 30px;
}

.invoice-meta {
    display: grid;
    gap: 6px;
    text-align: right;
}

.invoice-meta strong {
    color: var(--doc-secondary, #f97316);
    font-size: 22px;
}

.invoice-parties {
    margin: 22px 0;
}

.invoice-parties > div {
    flex: 1;
    border: 1px solid #e5edf8;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    padding: 14px;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-table th {
    background: var(--doc-primary, #0f172a);
    color: #fff;
    text-align: left;
    padding: 11px;
}

.invoice-table td {
    border-bottom: 1px solid #e5edf8;
    padding: 10px 11px;
}

.invoice-table tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.invoice-footer {
    align-items: flex-start;
    margin-top: 22px;
}

.invoice-totals {
    min-width: 320px;
}

.print-body {
    margin: 0;
    background: #fff;
}

@media print {
    .invoice-document {
        max-width: none;
        border: 0;
        box-shadow: none;
        padding: 0;
    }
}

@media (max-width: 1100px) {
    .sales-create-grid {
        grid-template-columns: 1fr;
    }

    .sale-side-panel {
        position: static;
    }

    .sales-filter-card,
    .sales-filter-card .wide {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .sales-filter-card {
        grid-template-columns: 1fr;
    }

    .invoice-header,
    .invoice-parties,
    .invoice-footer {
        display: grid;
    }

    .invoice-meta {
        text-align: left;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    html,
    body.print-body {
        width: 210mm;
        min-height: 297mm;
        background: #fff !important;
    }

    body.print-body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .print-body .invoice-page {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .print-body .invoice-document {
        width: 100%;
        max-width: none;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        color: #0f172a;
        font-size: 10.5px;
        line-height: 1.25;
    }

    .print-body .invoice-document p,
    .print-body .invoice-document span,
    .print-body .invoice-document small,
    .print-body .invoice-document td,
    .print-body .invoice-document dt,
    .print-body .invoice-document h3,
    .print-body .invoice-document strong,
    .print-body .invoice-document dd {
        color: #0f172a !important;
    }

    .print-body .invoice-meta strong {
        color: var(--doc-secondary, #f97316) !important;
    }

    .print-body .invoice-brand-logo {
        max-width: 220px;
        max-height: 52px;
        margin-bottom: 3mm;
    }

    .print-body .invoice-header,
    .print-body .invoice-parties,
    .print-body .invoice-footer {
        display: flex !important;
        justify-content: space-between;
        gap: 10mm;
    }

    .print-body .invoice-header {
        align-items: flex-start;
        border-bottom: 2px solid #0f172a;
        padding-bottom: 5mm;
        margin-bottom: 5mm;
    }

    .print-body .invoice-header h2 {
        margin-bottom: 2mm;
        font-size: 20px;
    }

    .print-body .invoice-header p {
        margin: 0 0 2mm;
    }

    .print-body .invoice-meta {
        gap: 2mm;
        min-width: 58mm;
        text-align: right !important;
    }

    .print-body .invoice-meta strong {
        font-size: 16px;
    }

    .print-body .invoice-parties {
        margin: 0 0 5mm;
    }

    .print-body .invoice-parties > div {
        flex: 1 1 0;
        min-height: 0;
        border-radius: 4px;
        padding: 4mm;
    }

    .print-body .invoice-parties h3 {
        margin: 0 0 3mm;
        font-size: 14px;
    }

    .print-body .invoice-parties p {
        margin: 0 0 2mm;
    }

    .print-body .invoice-table-wrap {
        width: 100%;
        overflow: visible;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .print-body .invoice-table {
        width: 100%;
        table-layout: fixed;
        border-collapse: collapse;
        font-size: 9.5px;
    }

    .print-body .invoice-table th,
    .print-body .invoice-table td {
        padding: 2.5mm 2mm;
        vertical-align: top;
    }

    .print-body .invoice-table th:nth-child(1),
    .print-body .invoice-table td:nth-child(1) {
        width: 7%;
    }

    .print-body .invoice-table th:nth-child(2),
    .print-body .invoice-table td:nth-child(2) {
        width: 53%;
    }

    .print-body .invoice-table th:nth-child(3),
    .print-body .invoice-table td:nth-child(3) {
        width: 8%;
        text-align: center;
    }

    .print-body .invoice-table th:nth-child(4),
    .print-body .invoice-table td:nth-child(4) {
        width: 11%;
    }

    .print-body .invoice-table th:nth-child(5),
    .print-body .invoice-table td:nth-child(5) {
        width: 10%;
    }

    .print-body .invoice-table th:nth-child(6),
    .print-body .invoice-table td:nth-child(6) {
        width: 11%;
    }

    .print-body .invoice-table tr,
    .print-body .invoice-footer,
    .print-body .invoice-totals {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .print-body .invoice-footer {
        align-items: flex-start;
        margin-top: 6mm;
    }

    .print-body .invoice-totals {
        min-width: 72mm;
        gap: 2mm;
    }

    .print-body .invoice-totals div {
        padding-bottom: 2mm;
    }

    .print-body .invoice-totals .grand {
        border-radius: 4px;
        padding: 3mm;
    }
}

/* Premium ERP sidebar final cascade */
.app-shell {
    grid-template-columns: 292px minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    overflow: hidden;
    height: 100vh;
    min-height: 100vh;
    padding: 18px 12px 14px;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 106, 0, .22), transparent 24%),
        radial-gradient(circle at 85% 100%, rgba(37, 99, 235, .2), transparent 28%),
        linear-gradient(180deg, #061425 0%, #081827 54%, #05101d 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08), 18px 0 50px rgba(15, 23, 42, .14);
}

.app-brand {
    min-height: 54px;
    margin: 0 4px 14px;
    padding: 4px 6px;
    border-radius: 8px;
}

.sidebar-nav {
    height: calc(100vh - 172px);
    overflow-y: auto;
    gap: 4px;
    padding: 8px 4px 14px 0;
    scrollbar-color: rgba(255, 106, 0, .55) rgba(255, 255, 255, .06);
}

.nav-heading {
    margin: 16px 8px 6px;
    color: rgba(190, 215, 224, .58);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.nav-heading:first-child {
    margin-top: 4px;
}

.nav-link,
.nav-sublink {
    border: 1px solid transparent;
    border-radius: 7px;
    color: #c7d7e6;
    text-decoration: none;
}

.nav-link {
    min-height: 40px;
    padding: 0 10px;
}

.nav-link:hover,
.nav-link.active,
.nav-accordion.open > .nav-toggle {
    color: #fff;
    background: linear-gradient(90deg, rgba(255, 106, 0, .16), rgba(37, 99, 235, .08));
    border-color: rgba(255, 255, 255, .08);
    box-shadow: inset 3px 0 0 #ff6a00, 0 8px 18px rgba(0, 0, 0, .14);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(255, 106, 0, .24), rgba(255, 106, 0, .08));
}

.nav-icon {
    width: 26px;
    height: 26px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 7px;
    color: #7dd3fc;
    background: rgba(255, 255, 255, .06);
    font-size: 10px;
    font-weight: 900;
}

.nav-accordion.open > .nav-toggle .nav-icon,
.nav-link.active .nav-icon {
    color: #fff;
    border-color: rgba(255, 106, 0, .36);
    background: linear-gradient(135deg, #ff6a00, #ff3d00);
}

.chevron {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    color: rgba(226, 238, 244, .78);
    font-size: 20px;
    background: rgba(255, 255, 255, .04);
}

.nav-accordion.open .chevron {
    color: #fff;
    background: rgba(255, 106, 0, .2);
    transform: rotate(90deg);
}

.nav-submenu {
    margin: 4px 0 7px 23px;
    border-left: 1px solid rgba(125, 211, 252, .18);
    transition: max-height .26s ease;
}

.nav-sublink {
    min-height: 32px;
    margin: 2px 0 2px 9px;
    padding: 0 10px 0 17px;
    color: #9fb3c8;
    font-size: 12px;
    font-weight: 700;
}

.nav-sublink::before {
    left: -9px;
    width: 13px;
    background: rgba(125, 211, 252, .28);
}

.nav-sublink:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.nav-sublink.active {
    color: #fff;
    background: rgba(255, 106, 0, .17);
    box-shadow: inset 2px 0 0 #ff6a00;
}

.nav-sublink.active::before {
    background: #ff6a00;
}

.nav-link.disabled,
.nav-sublink.disabled {
    cursor: default;
    opacity: .52;
}

.nav-link.disabled:hover,
.nav-sublink.disabled:hover {
    color: #9fb3c8;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.sidebar-store {
    margin: 12px 4px 0;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035));
    box-shadow: 0 16px 30px rgba(0, 0, 0, .16);
}

.sidebar-store span {
    color: #9fb3c8;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.sidebar-store strong {
    margin-top: 7px;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-control {
    display: none;
    flex: 0 0 42px;
    height: 42px;
    border: 1px solid #dbe5f3;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    place-items: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
}

.sidebar-control span {
    display: block;
    width: 17px;
    height: 2px;
    margin: 3px auto;
    border-radius: 999px;
    background: #0f172a;
}

.sidebar-scrim {
    display: none;
}

@media (max-width: 980px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(292px, 86vw);
        min-height: 100vh;
        max-height: none;
        transform: translateX(-105%);
        transition: transform .22s ease;
    }

    .app-sidebar:focus-within,
    .app-sidebar:hover {
        max-height: none;
    }

    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-open .sidebar-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(15, 23, 42, .46);
        backdrop-filter: blur(3px);
    }

    .sidebar-control {
        display: grid;
    }

    .app-main {
        padding: 18px;
    }
}

/* AXEN premium sidebar - last cascade */
body.app-body .app-shell { grid-template-columns: 312px minmax(0, 1fr); }
body.app-body .app-sidebar {
    width: 312px;
    max-height: 100vh;
    padding: 22px 14px 18px;
    overflow: hidden;
    border-right: 1px solid rgba(148, 163, 184, .18);
    background: radial-gradient(circle at 14% 8%, rgba(37, 99, 235, .24), transparent 30%), radial-gradient(circle at 94% 42%, rgba(14, 165, 233, .12), transparent 28%), linear-gradient(180deg, #071827 0%, #051322 48%, #06101d 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .04), 18px 0 42px rgba(2, 6, 23, .18);
}
body.app-body .app-sidebar::before {
    content: "";
    position: absolute;
    inset: 10px;
    pointer-events: none;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 22px;
}
body.app-body .app-brand { position: relative; z-index: 1; min-height: 74px; margin: 0 8px 18px; padding: 8px 4px 14px; }
body.app-body .app-brand .brand-mark { width: 46px; height: 46px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #ff7a18, #f04405); box-shadow: 0 18px 34px rgba(249, 115, 22, .28); }
body.app-body .app-brand strong { color: #fff; font-size: 22px; }
body.app-body .app-brand strong span { color: #ff7a18; }
body.app-body .app-brand small { margin-top: 5px; color: #cbd5e1; font-size: 13px; }
body.app-body .sidebar-nav { flex: 1 1 auto; height: auto; min-height: 0; gap: 16px; padding: 0 6px 4px; scrollbar-width: thin; scrollbar-color: #ff7a18 rgba(148, 163, 184, .14); }
body.app-body .nav-section-card { overflow: hidden; border: 1px solid rgba(148, 163, 184, .22); border-radius: 18px; background: linear-gradient(135deg, rgba(15, 35, 56, .92), rgba(3, 18, 32, .78)); box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 16px 36px rgba(2,6,23,.22); }
body.app-body .nav-heading { display: flex; align-items: center; gap: 14px; min-height: 58px; margin: 0; padding: 18px 18px 13px; color: #ff7a18; font-size: 15px; font-weight: 950; letter-spacing: .02em; }
body.app-body .nav-heading-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid rgba(249, 115, 22, .32); border-radius: 12px; color: #7dd3fc; background: rgba(15, 35, 56, .92); font-size: 13px; font-weight: 950; }
body.app-body .nav-section-card > .nav-accordion,
body.app-body .nav-section-card > .nav-link { border-top: 1px solid rgba(148, 163, 184, .13); }
body.app-body .nav-link { min-height: 64px; padding: 0 18px; border: 0; border-radius: 0; color: #f8fafc; font-size: 16px; font-weight: 900; }
body.app-body .nav-link:hover,
body.app-body .nav-link.active,
body.app-body .nav-accordion.open > .nav-toggle,
body.app-body .nav-accordion[data-active-section="true"] > .nav-toggle { color: #fff; background: linear-gradient(90deg, rgba(249, 115, 22, .17), rgba(37, 99, 235, .08)); box-shadow: inset 4px 0 0 #f97316; }
body.app-body .nav-icon { width: 44px; height: 44px; border: 1px solid rgba(148, 163, 184, .2); border-radius: 12px; color: #7dd3fc; background: rgba(15, 35, 56, .86); font-size: 14px; font-weight: 950; }
body.app-body .nav-accordion.open > .nav-toggle .nav-icon,
body.app-body .nav-accordion[data-active-section="true"] > .nav-toggle .nav-icon,
body.app-body .nav-link.active .nav-icon { color: #fff; border-color: rgba(249, 115, 22, .45); background: linear-gradient(135deg, #ff7a18, #ea580c); }
body.app-body .chevron { width: 40px; height: 40px; border-radius: 12px; color: #f8fafc; background: rgba(148, 163, 184, .12); font-size: 0; }
body.app-body .chevron::before { content: ">"; font-size: 22px; font-weight: 950; }
body.app-body .nav-submenu { margin: 0; padding: 3px 16px 15px 76px; border-left: 0; }
body.app-body .nav-sublink { min-height: 34px; margin: 2px 0; padding: 9px 11px 9px 16px; border: 0; border-radius: 0; color: #cbd5e1; font-size: 12px; font-weight: 800; }
body.app-body .nav-sublink::before { left: 0; top: 0; bottom: 0; width: 1px; height: auto; background: rgba(148, 163, 184, .24); }
body.app-body .nav-sublink:hover,
body.app-body .nav-sublink.active { color: #fff; border-radius: 10px; background: rgba(249, 115, 22, .13); }
body.app-body .sidebar-store { position: relative; z-index: 1; min-height: 118px; margin: 18px 8px 0; padding: 24px 78px 22px 24px; border: 1px solid rgba(148, 163, 184, .24); border-radius: 18px; background: linear-gradient(135deg, rgba(15, 35, 56, .95), rgba(3, 18, 32, .84)); box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 18px 38px rgba(2,6,23,.22); }
body.app-body .sidebar-store::before { content: none; }
body.app-body .sidebar-store .store-status-dot { position: absolute; left: 24px; top: 24px; width: 15px; height: 15px; border-radius: 999px; background: #22c55e; box-shadow: 0 0 0 8px rgba(34, 197, 94, .12); }
body.app-body .sidebar-store .store-label { display: block; margin-left: 32px; color: #ff7a18; font-size: 13px; font-weight: 950; }
body.app-body .sidebar-store strong { display: block; margin-top: 12px; color: #f8fafc; font-size: 22px; font-weight: 950; }
body.app-body .sidebar-store .store-icon { position: absolute; right: 24px; top: 50%; display: grid; place-items: center; width: 52px; height: 52px; transform: translateY(-50%); border: 1px solid rgba(148, 163, 184, .28); border-radius: 16px; color: #fff; background: rgba(15, 35, 56, .88); font-size: 20px; font-weight: 950; }
body.app-body .sidebar-footer { position: relative; z-index: 1; display: flex; justify-content: space-between; margin: 18px 12px 0; color: #94a3b8; font-size: 13px; font-weight: 700; }
body.app-body .sidebar-footer strong { color: #cbd5e1; }
@media (max-width: 980px) {
    body.app-body .app-shell { display: block; }
    body.app-body .app-sidebar { position: fixed; left: 0; top: 0; width: min(312px, 88vw); min-height: 100vh; max-height: 100vh; transform: translateX(-105%); }
    body.app-body.sidebar-open .app-sidebar { transform: translateX(0); }
}

.app-shell {
    grid-template-columns: 312px minmax(0, 1fr);
}

.app-sidebar {
    width: 312px;
    max-height: 100vh;
    padding: 22px 14px 18px;
    overflow: hidden;
    border-right: 1px solid rgba(148, 163, 184, .18);
    background:
        radial-gradient(circle at 14% 8%, rgba(37, 99, 235, .24), transparent 30%),
        radial-gradient(circle at 94% 42%, rgba(14, 165, 233, .12), transparent 28%),
        linear-gradient(180deg, #071827 0%, #051322 48%, #06101d 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .04), 18px 0 42px rgba(2, 6, 23, .18);
}

.app-sidebar::before {
    content: "";
    position: absolute;
    inset: 10px;
    pointer-events: none;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 22px;
}

.app-brand {
    position: relative;
    z-index: 1;
    min-height: 74px;
    margin: 0 8px 18px;
    padding: 8px 4px 14px;
}

.app-brand .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #ff7a18, #f04405);
    box-shadow: 0 18px 34px rgba(249, 115, 22, .28);
}

.app-brand strong {
    color: #fff;
    font-size: 22px;
}

.app-brand strong span {
    color: #ff7a18;
}

.app-brand small {
    margin-top: 5px;
    color: #cbd5e1;
    font-size: 13px;
}

.sidebar-nav {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    gap: 16px;
    padding: 0 6px 4px;
    scrollbar-width: thin;
    scrollbar-color: #ff7a18 rgba(148, 163, 184, .14);
}

.sidebar-nav::-webkit-scrollbar {
    width: 10px;
}

.sidebar-nav::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(148, 163, 184, .12);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    border: 2px solid rgba(7, 24, 39, .9);
    border-radius: 999px;
    background: linear-gradient(180deg, #ff9a2f, #f97316 58%, #ea580c);
}

.nav-section-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(15, 35, 56, .92), rgba(3, 18, 32, .78));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 16px 36px rgba(2, 6, 23, .22);
}

.nav-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    margin: 0;
    padding: 18px 18px 13px;
    color: #ff7a18;
    font-size: 15px;
    font-weight: 950;
    letter-spacing: .02em;
}

.nav-heading-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid rgba(249, 115, 22, .32);
    border-radius: 12px;
    color: #7dd3fc;
    background: rgba(15, 35, 56, .92);
    font-size: 13px;
    font-weight: 950;
}

.nav-section-card > .nav-accordion,
.nav-section-card > .nav-link {
    border-top: 1px solid rgba(148, 163, 184, .13);
}

.nav-link {
    min-height: 64px;
    padding: 0 18px;
    border: 0;
    border-radius: 0;
    color: #f8fafc;
    font-size: 16px;
    font-weight: 900;
}

.nav-link:hover,
.nav-link.active,
.nav-accordion.open > .nav-toggle,
.nav-accordion[data-active-section="true"] > .nav-toggle {
    color: #fff;
    background: linear-gradient(90deg, rgba(249, 115, 22, .17), rgba(37, 99, 235, .08));
    box-shadow: inset 4px 0 0 #f97316;
}

.nav-icon {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: 12px;
    color: #7dd3fc;
    background: rgba(15, 35, 56, .86);
    font-size: 14px;
    font-weight: 950;
}

.nav-accordion.open > .nav-toggle .nav-icon,
.nav-accordion[data-active-section="true"] > .nav-toggle .nav-icon,
.nav-link.active .nav-icon {
    color: #fff;
    border-color: rgba(249, 115, 22, .45);
    background: linear-gradient(135deg, #ff7a18, #ea580c);
}

.chevron {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #f8fafc;
    background: rgba(148, 163, 184, .12);
    font-size: 0;
}

.chevron::before {
    content: ">";
    font-size: 22px;
    font-weight: 950;
}

.nav-accordion.open .chevron {
    background: rgba(249, 115, 22, .24);
}

.nav-submenu {
    margin: 0;
    padding: 3px 16px 15px 76px;
    border-left: 0;
}

.nav-sublink {
    min-height: 34px;
    margin: 2px 0;
    padding: 9px 11px 9px 16px;
    border: 0;
    border-radius: 0;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
}

.nav-sublink::before {
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    height: auto;
    background: rgba(148, 163, 184, .24);
}

.nav-sublink:hover,
.nav-sublink.active {
    color: #fff;
    border-radius: 10px;
    background: rgba(249, 115, 22, .13);
}

.nav-sublink.active::before {
    width: 3px;
    background: #f97316;
}

.sidebar-store {
    position: relative;
    z-index: 1;
    min-height: 118px;
    margin: 18px 8px 0;
    padding: 24px 78px 22px 24px;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(15, 35, 56, .95), rgba(3, 18, 32, .84));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 18px 38px rgba(2, 6, 23, .22);
}

.sidebar-store::before {
    content: none;
}

.sidebar-store .store-status-dot {
    position: absolute;
    left: 24px;
    top: 24px;
    width: 15px;
    height: 15px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 8px rgba(34, 197, 94, .12);
}

.sidebar-store .store-label {
    display: block;
    margin-left: 32px;
    color: #ff7a18;
    font-size: 13px;
    font-weight: 950;
}

.sidebar-store strong {
    display: block;
    margin-top: 12px;
    color: #f8fafc;
    font-size: 22px;
    font-weight: 950;
}

.sidebar-store .store-icon {
    position: absolute;
    right: 24px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    transform: translateY(-50%);
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 16px;
    color: #fff;
    background: rgba(15, 35, 56, .88);
    font-size: 20px;
    font-weight: 950;
}

.sidebar-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    margin: 18px 12px 0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 700;
}

.sidebar-footer strong {
    color: #cbd5e1;
}

@media (max-width: 980px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(312px, 88vw);
        min-height: 100vh;
        max-height: 100vh;
        transform: translateX(-105%);
    }

    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }
}

/* Reports module */
.reports-page {
    display: grid;
    gap: 18px;
    color: #0f172a;
}

.reports-hero,
.reports-filter-card,
.report-module-card,
.reports-index-panel,
.reports-kpi,
.reports-chart-card,
.reports-table-card,
.reports-warning,
.reports-note {
    border: 1px solid #dbe5f3;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.reports-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    background:
        radial-gradient(circle at 12% 0%, rgba(37, 99, 235, .09), transparent 26%),
        linear-gradient(180deg, #fff, #f8fafc);
}

.reports-breadcrumb,
.reports-context,
.reports-actions,
.reports-filter-card,
.reports-filter-actions,
.reports-table-card header,
.reports-table-footer,
.reports-table-footer nav,
.reports-index-panel > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reports-breadcrumb {
    margin-bottom: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.reports-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.reports-hero h1 {
    margin: 0;
    font-size: 30px;
    letter-spacing: 0;
}

.reports-hero p,
.reports-index-panel p,
.reports-empty {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
}

.reports-context {
    flex-wrap: wrap;
    margin-top: 14px;
}

.reports-context span {
    padding: 8px 11px;
    border-radius: 999px;
    color: #1e3a8a;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 900;
}

.reports-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.report-btn,
.report-row-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #dbe5f3;
    border-radius: 8px;
    color: #0f172a;
    background: #fff;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.report-btn:hover,
.report-row-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
}

.report-btn.primary {
    border-color: #2563eb;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.report-btn.muted {
    color: #64748b;
    background: #f8fafc;
}

.reports-filter-card {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 12px;
    padding: 16px;
}

.reports-filter-card label {
    display: grid;
    gap: 7px;
}

.reports-filter-card label span {
    color: #334155;
    font-size: 11px;
    font-weight: 900;
}

.reports-filter-card input,
.reports-filter-card select {
    width: 100%;
    height: 40px;
    border: 1px solid #dbe5f3;
    border-radius: 8px;
    padding: 0 11px;
    color: #0f172a;
    background: #fff;
    font: inherit;
    font-size: 13px;
}

.reports-filter-card input:focus,
.reports-filter-card select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.reports-filter-actions {
    align-self: end;
    justify-content: flex-end;
}

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

.report-module-card {
    position: relative;
    overflow: hidden;
    padding: 18px;
}

.report-module-card::after {
    content: "";
    position: absolute;
    inset: auto -35px -50px auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--report-soft, #dbeafe);
}

.report-module-card > span,
.reports-kpi > span {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 12px;
    color: var(--report-color, #2563eb);
    background: var(--report-soft, #dbeafe);
    font-weight: 1000;
}

.report-module-card h2,
.reports-chart-card h2,
.reports-table-card h2,
.reports-index-panel h2 {
    margin: 14px 0 8px;
    font-size: 17px;
}

.report-module-card p {
    min-height: 42px;
    margin: 0;
    color: #64748b;
    line-height: 1.45;
}

.report-module-card strong {
    display: block;
    margin-top: 16px;
    font-size: 22px;
}

.report-module-card small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-weight: 800;
}

.report-module-card a {
    display: inline-flex;
    margin-top: 16px;
    color: #2563eb;
    font-weight: 900;
    text-decoration: none;
}

.report-module-card.blue,
.reports-kpi.kpi-0 { --report-color: #2563eb; --report-soft: #dbeafe; }
.report-module-card.orange,
.reports-kpi.kpi-1 { --report-color: #f97316; --report-soft: #ffedd5; }
.report-module-card.green,
.reports-kpi.kpi-2 { --report-color: #16a34a; --report-soft: #dcfce7; }
.report-module-card.purple,
.reports-kpi.kpi-3 { --report-color: #7c3aed; --report-soft: #ede9fe; }
.report-module-card.red,
.reports-kpi.kpi-4 { --report-color: #dc2626; --report-soft: #fee2e2; }
.report-module-card.cyan,
.reports-kpi.kpi-5 { --report-color: #0891b2; --report-soft: #cffafe; }

.reports-index-panel {
    padding: 18px;
}

.reports-index-panel h2 {
    margin-top: 0;
}

.reports-warning,
.reports-note {
    padding: 13px 16px;
    color: #92400e;
    background: #fffbeb;
    font-weight: 800;
}

.reports-note {
    color: #1e40af;
    background: #eff6ff;
}

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

.reports-kpi {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    padding: 15px;
}

.reports-kpi small,
.reports-kpi strong {
    display: block;
}

.reports-kpi small {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
}

.reports-kpi strong {
    margin-top: 6px;
    font-size: 18px;
}

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

.reports-chart-card {
    padding: 16px;
}

.reports-chart-card h2 {
    margin-top: 0;
}

.report-bars {
    display: grid;
    gap: 10px;
}

.report-bars div {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 28px;
    align-items: center;
    padding-bottom: 8px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.report-bars i {
    position: absolute;
    left: 0;
    right: auto;
    bottom: 0;
    height: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2563eb, #f97316);
}

.reports-table-card {
    overflow: hidden;
}

.reports-table-card header {
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.reports-table-card header h2 {
    margin: 0;
}

.reports-table-card header span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.reports-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
}

.reports-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 13px 14px;
    color: #e2e8f0;
    background: #0f172a;
    font-size: 11px;
    font-weight: 1000;
    text-align: left;
    text-transform: uppercase;
}

.reports-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 13px;
    vertical-align: middle;
}

.reports-table tbody tr:hover {
    background: #f8fafc;
}

.report-status {
    display: inline-flex;
    min-width: 76px;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 1000;
}

.report-status.success { color: #15803d; background: #dcfce7; }
.report-status.warning { color: #c2410c; background: #ffedd5; }
.report-status.danger { color: #dc2626; background: #fee2e2; }
.report-status.neutral { color: #475569; background: #e2e8f0; }

.report-row-btn {
    min-height: 30px;
    padding: 0 10px;
    color: #2563eb;
}

.reports-empty {
    padding: 18px;
    text-align: center;
}

.reports-table-footer {
    justify-content: space-between;
    padding: 14px 18px;
}

.reports-table-footer select {
    height: 36px;
    border: 1px solid #dbe5f3;
    border-radius: 8px;
    padding: 0 10px;
}

@media (max-width: 1240px) {
    .reports-filter-card,
    .reports-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .report-card-grid,
    .reports-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .reports-hero,
    .reports-table-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .reports-filter-card,
    .reports-kpi-grid,
    .report-card-grid,
    .reports-chart-grid {
        grid-template-columns: 1fr;
    }

    .reports-actions,
    .reports-filter-actions,
    .report-btn {
        width: 100%;
    }
}

@media print {
    .reports-page {
        padding: 0;
        background: #fff;
    }

    .no-print,
    .app-sidebar,
    .topbar,
    .sidebar-scrim {
        display: none !important;
    }

    .reports-hero,
    .reports-kpi,
    .reports-chart-card,
    .reports-table-card {
        box-shadow: none;
        border-color: #cbd5e1;
    }

    .reports-table {
        min-width: 0;
        font-size: 10px;
    }
}

.sales-filter-card {
    grid-template-columns: minmax(240px, 1.3fr) repeat(4, minmax(150px, 1fr)) auto;
}

.sales-filter-card .wide {
    grid-column: span 2;
}

@media (max-width: 1100px) {
    .sales-filter-card,
    .sales-filter-card .wide {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .sales-filter-card {
        grid-template-columns: 1fr;
    }
}

/* Premium Sells Log */
.sells-log-page {
    display: grid;
    gap: 18px;
}

.sells-log-heading {
    padding: 18px;
    border: 1px solid #dbe7f5;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(249, 115, 22, .06)),
        #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.sells-log-heading h1 {
    color: #081827;
    font-size: clamp(30px, 3vw, 46px);
}

.sells-log-heading p {
    color: #64748b;
    font-weight: 800;
}

.sells-log-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    padding: 0;
    overflow: hidden;
}

.sells-log-kpis .kpi-card {
    min-height: 118px;
    padding: 18px;
}

.sells-log-filter {
    grid-template-columns: repeat(5, minmax(150px, 1fr)) minmax(260px, 1.4fr) auto;
    align-items: end;
}

.sells-log-filter .wide {
    grid-column: auto;
}

.sells-log-table-card {
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, .09);
}

.sales-log-monitor-table {
    min-width: 980px;
}

.sales-log-monitor-table thead th {
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    letter-spacing: .04em;
}

.sales-log-monitor-table tbody td {
    height: 58px;
}

.sales-log-monitor-table tbody tr:hover td {
    background: #eef6ff;
}

.sales-log-monitor-table .order-number {
    color: #061a3a;
    font-weight: 950;
}

.sells-log-page .status-badge.paid {
    color: #047857;
    background: #d1fae5;
}

.sells-log-page .status-badge.unpaid {
    color: #dc2626;
    background: #fee2e2;
}

.sells-log-page .status-badge.partial {
    color: #c2410c;
    background: #ffedd5;
}

.sells-log-page .sales-row-actions {
    flex-wrap: wrap;
}

.sells-log-page .action-btn {
    border-radius: 9px;
    font-size: 11px;
    font-weight: 900;
}

@media (max-width: 1280px) {
    .sells-log-kpis {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }

    .sells-log-filter {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}

@media (max-width: 760px) {
    .sells-log-heading {
        align-items: flex-start;
    }

    .sells-log-kpis,
    .sells-log-filter {
        grid-template-columns: 1fr;
    }
}

/* Premium ERP sidebar */
.app-shell {
    grid-template-columns: 292px minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    overflow: hidden;
    height: 100vh;
    padding: 18px 12px 14px;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 106, 0, .22), transparent 24%),
        radial-gradient(circle at 85% 100%, rgba(37, 99, 235, .2), transparent 28%),
        linear-gradient(180deg, #061425 0%, #081827 54%, #05101d 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08), 18px 0 50px rgba(15, 23, 42, .14);
}

.app-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(255, 255, 255, .05), transparent 34%);
}

.app-brand {
    position: relative;
    z-index: 1;
    min-height: 54px;
    margin: 0 4px 14px;
    padding: 4px 6px;
    border-radius: 8px;
}

.app-brand .brand-mark {
    box-shadow: 0 12px 28px rgba(255, 106, 0, .28);
}

.sidebar-nav {
    position: relative;
    z-index: 1;
    height: calc(100vh - 172px);
    overflow-y: auto;
    padding: 8px 4px 14px 0;
    gap: 4px;
    scrollbar-color: rgba(255, 106, 0, .55) rgba(255, 255, 255, .06);
    scrollbar-width: thin;
}

.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, .04);
    border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff8a26, #ff4d00);
    border-radius: 999px;
}

.nav-heading {
    margin: 16px 8px 6px;
    color: rgba(190, 215, 224, .58);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.nav-heading:first-child {
    margin-top: 4px;
}

.nav-accordion {
    border-radius: 8px;
}

.nav-link,
.nav-sublink {
    border: 1px solid transparent;
    border-radius: 7px;
    color: #c7d7e6;
    min-height: 40px;
    text-decoration: none;
}

.nav-link {
    padding: 0 10px;
}

.nav-link:hover,
.nav-link.active,
.nav-accordion.open > .nav-toggle {
    color: #fff;
    background: linear-gradient(90deg, rgba(255, 106, 0, .16), rgba(37, 99, 235, .08));
    border-color: rgba(255, 255, 255, .08);
    box-shadow: inset 3px 0 0 #ff6a00, 0 8px 18px rgba(0, 0, 0, .14);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(255, 106, 0, .24), rgba(255, 106, 0, .08));
}

.nav-label {
    gap: 10px;
}

.nav-icon {
    width: 26px;
    height: 26px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 7px;
    color: #7dd3fc;
    background: rgba(255, 255, 255, .06);
    font-size: 10px;
    font-weight: 900;
}

.nav-accordion.open > .nav-toggle .nav-icon,
.nav-link.active .nav-icon {
    color: #fff;
    border-color: rgba(255, 106, 0, .36);
    background: linear-gradient(135deg, #ff6a00, #ff3d00);
}

.nav-toggle {
    font-family: inherit;
}

.chevron {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    color: rgba(226, 238, 244, .78);
    font-size: 20px;
    background: rgba(255, 255, 255, .04);
    transition: transform .22s ease, color .18s ease, background .18s ease;
}

.nav-accordion.open .chevron {
    color: #fff;
    background: rgba(255, 106, 0, .2);
    transform: rotate(90deg);
}

.nav-submenu {
    margin: 4px 0 7px 23px;
    border-left: 1px solid rgba(125, 211, 252, .18);
    transition: max-height .26s ease;
}

.nav-sublink {
    min-height: 32px;
    margin: 2px 0 2px 9px;
    padding: 0 10px 0 17px;
    color: #9fb3c8;
    font-size: 12px;
    font-weight: 700;
}

.nav-sublink::before {
    left: -9px;
    width: 13px;
    background: rgba(125, 211, 252, .28);
}

.nav-sublink:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.nav-sublink.active {
    color: #fff;
    background: rgba(255, 106, 0, .17);
    box-shadow: inset 2px 0 0 #ff6a00;
}

.nav-sublink.active::before {
    background: #ff6a00;
}

.nav-link.disabled,
.nav-sublink.disabled {
    cursor: default;
    opacity: .52;
}

.nav-link.disabled:hover,
.nav-sublink.disabled:hover {
    color: #9fb3c8;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.sidebar-store {
    position: relative;
    z-index: 1;
    margin: 12px 4px 0;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035));
    box-shadow: 0 16px 30px rgba(0, 0, 0, .16);
}

.sidebar-store::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .15);
}

.sidebar-store span {
    display: inline;
    color: #9fb3c8;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.sidebar-store strong {
    display: block;
    margin-top: 7px;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-control {
    display: none;
    flex: 0 0 42px;
    height: 42px;
    border: 1px solid #dbe5f3;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    place-items: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
}

.sidebar-control span {
    display: block;
    width: 17px;
    height: 2px;
    margin: 3px auto;
    border-radius: 999px;
    background: #0f172a;
}

.sidebar-scrim {
    display: none;
}

@media (max-width: 980px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(292px, 86vw);
        min-height: 100vh;
        max-height: none;
        transform: translateX(-105%);
        transition: transform .22s ease;
    }

    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-open .sidebar-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(15, 23, 42, .46);
        backdrop-filter: blur(3px);
    }

    .sidebar-control {
        display: grid;
    }

    .topbar {
        margin-left: -18px;
        margin-right: -18px;
        padding-left: 18px;
        padding-right: 18px;
    }

    .app-main {
        padding: 18px;
    }
}

/* Supplier onboarding */
.supplier-onboarding {
    color: #10203f;
    padding: 4px 2px 34px;
}

.supplier-onboarding-header {
    align-items: flex-end;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.supplier-onboarding-breadcrumb {
    align-items: center;
    color: #6c7d9d;
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 8px;
    margin-bottom: 9px;
}

.supplier-onboarding-breadcrumb a {
    color: #46699d;
    text-decoration: none;
}

.supplier-onboarding-header h1 {
    font-size: 28px;
    line-height: 1.2;
    margin: 0;
}

.supplier-onboarding-header p {
    color: #6c7d9d;
    margin: 6px 0 0;
}

.supplier-onboarding-actions,
.supplier-form-footer {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.supplier-btn {
    align-items: center;
    border: 1px solid #d8e1ef;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.supplier-btn:hover {
    transform: translateY(-1px);
}

.supplier-btn.primary {
    background: #1769ed;
    border-color: #1769ed;
    box-shadow: 0 8px 18px rgba(23, 105, 237, .2);
    color: #fff;
}

.supplier-btn.secondary {
    background: #fff;
    color: #10203f;
}

.supplier-btn:disabled {
    cursor: wait;
    opacity: .65;
    transform: none;
}

.supplier-onboarding-alert {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 8px;
    color: #be123c;
    font-weight: 700;
    margin-bottom: 18px;
    padding: 13px 16px;
}

.supplier-onboarding-layout {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) 310px;
}

.supplier-onboarding-main,
.supplier-onboarding-aside {
    display: grid;
    gap: 16px;
}

.supplier-onboarding-aside {
    position: sticky;
    top: 78px;
}

.supplier-form-card,
.supplier-preview-card,
.supplier-finance-card {
    background: #fff;
    border: 1px solid #e2e9f4;
    border-radius: 9px;
    box-shadow: 0 7px 22px rgba(15, 35, 68, .045);
    padding: 18px;
}

.supplier-form-card-split {
    display: grid;
    gap: 24px;
    grid-template-columns: 1.15fr .85fr;
}

.supplier-form-card-split > section + section {
    border-left: 1px solid #e6ebf3;
    padding-left: 24px;
}

.supplier-card-heading,
.supplier-preview-card > header,
.supplier-finance-card > header {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 17px;
}

.supplier-card-heading h2,
.supplier-preview-card h2,
.supplier-finance-card h2 {
    font-size: 15px;
    margin: 0;
}

.supplier-card-heading p {
    color: #8997ad;
    font-size: 11px;
    margin: 3px 0 0;
}

.supplier-card-icon {
    align-items: center;
    background: #eef5ff;
    border-radius: 50%;
    color: #1769ed;
    display: inline-flex;
    flex: 0 0 26px;
    font-size: 12px;
    font-weight: 800;
    height: 26px;
    justify-content: center;
}

.supplier-form-grid {
    display: grid;
    gap: 14px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.supplier-form-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.supplier-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.supplier-field.full {
    grid-column: 1 / -1;
}

.supplier-field > span:first-child {
    color: #203457;
    font-size: 12px;
    font-weight: 700;
}

.supplier-field b {
    color: #ef4444;
}

.supplier-field input,
.supplier-field select,
.supplier-field textarea {
    background: #fff;
    border: 1px solid #d8e1ee;
    border-radius: 6px;
    color: #15294c;
    font: inherit;
    min-height: 40px;
    outline: none;
    padding: 9px 11px;
    width: 100%;
}

.supplier-field textarea {
    min-height: 72px;
    resize: vertical;
}

.supplier-field input:focus,
.supplier-field select:focus,
.supplier-field textarea:focus {
    border-color: #4386ef;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.supplier-field-with-button,
.supplier-phone-field,
.supplier-money-field {
    display: flex;
}

.supplier-field-with-button input,
.supplier-field-with-button select {
    border-radius: 6px 0 0 6px;
}

.supplier-field-with-button button {
    background: #fff;
    border: 1px solid #d8e1ee;
    border-left: 0;
    border-radius: 0 6px 6px 0;
    color: #1769ed;
    cursor: pointer;
    flex: 0 0 42px;
    font-size: 18px;
    font-weight: 700;
}

.supplier-phone-field select {
    border-radius: 6px 0 0 6px;
    flex: 0 0 105px;
}

.supplier-phone-field input {
    border-left: 0;
    border-radius: 0 6px 6px 0;
}

.supplier-money-field input {
    border-radius: 6px 0 0 6px;
}

.supplier-money-field em {
    align-items: center;
    background: #f5f7fb;
    border: 1px solid #d8e1ee;
    border-left: 0;
    border-radius: 0 6px 6px 0;
    color: #657692;
    display: flex;
    font-size: 12px;
    font-style: normal;
    padding: 0 12px;
}

.supplier-document-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.supplier-upload-card {
    border: 1px solid #e2e8f2;
    border-radius: 7px;
    color: #657692;
    cursor: pointer;
    display: grid;
    gap: 7px;
    min-height: 160px;
    padding: 13px;
    text-align: center;
}

.supplier-upload-card input {
    display: none;
}

.supplier-upload-card strong {
    color: #203457;
    font-size: 12px;
    text-align: left;
}

.supplier-upload-card b {
    color: #1769ed;
    font-size: 12px;
}

.supplier-upload-card small {
    font-size: 10px;
}

.supplier-upload-card:not(.disabled):hover,
.supplier-upload-card.dragging {
    background: #f7faff;
    border-color: #4e8df0;
}

.supplier-upload-card.disabled {
    background: #fafbfc;
    cursor: not-allowed;
    opacity: .68;
}

.supplier-upload-icon {
    align-items: center;
    border: 2px dashed #7da9ee;
    border-radius: 8px;
    color: #1769ed;
    display: flex;
    font-size: 22px;
    height: 56px;
    justify-content: center;
    margin: auto;
    overflow: hidden;
    width: 64px;
}

.supplier-upload-icon img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.supplier-form-footer {
    background: #fff;
    border: 1px solid #e2e9f4;
    border-radius: 8px;
    bottom: 12px;
    justify-content: flex-end;
    padding: 12px;
    position: sticky;
    z-index: 5;
}

.supplier-preview-card {
    text-align: center;
}

.supplier-preview-card > header,
.supplier-finance-card > header {
    text-align: left;
}

.supplier-preview-avatar {
    align-items: center;
    background: linear-gradient(145deg, #ece9ff, #dcd6ff);
    border-radius: 50%;
    color: #4f46e5;
    display: flex;
    font-size: 25px;
    font-weight: 800;
    height: 76px;
    justify-content: center;
    margin: 6px auto 12px;
    overflow: hidden;
    width: 76px;
}

.supplier-preview-avatar img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.supplier-preview-card h3 {
    font-size: 16px;
    margin: 0 0 8px;
}

.supplier-preview-type,
.supplier-active-badge {
    background: #eef1ff;
    border-radius: 999px;
    color: #7257df;
    display: inline-flex;
    font-size: 10px;
    font-weight: 800;
    padding: 5px 9px;
}

.supplier-preview-card dl {
    border-top: 1px solid #edf1f7;
    display: grid;
    gap: 13px;
    margin: 18px 0 0;
    padding-top: 17px;
    text-align: left;
}

.supplier-preview-card dl > div {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 88px minmax(0, 1fr);
}

.supplier-preview-card dt {
    color: #637492;
    font-size: 11px;
    font-weight: 700;
}

.supplier-preview-card dd {
    color: #172a4c;
    font-size: 11px;
    margin: 0;
    overflow-wrap: anywhere;
    text-align: right;
}

.supplier-active-badge {
    background: #dcfce7;
    color: #168546;
}

.supplier-active-badge.inactive {
    background: #edf0f4;
    color: #69758a;
}

.supplier-finance-card {
    display: grid;
    gap: 14px;
}

.supplier-switch-row {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 10px;
    margin-top: 3px;
}

.supplier-switch-row input {
    position: absolute;
    opacity: 0;
}

.supplier-switch {
    background: #cbd5e1;
    border-radius: 999px;
    height: 22px;
    position: relative;
    transition: background .2s ease;
    width: 40px;
}

.supplier-switch::after {
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    content: "";
    height: 16px;
    left: 3px;
    position: absolute;
    top: 3px;
    transition: transform .2s ease;
    width: 16px;
}

.supplier-switch-row input:checked + .supplier-switch {
    background: #1769ed;
}

.supplier-switch-row input:checked + .supplier-switch::after {
    transform: translateX(18px);
}

.supplier-switch-row strong,
.supplier-switch-row small {
    display: block;
}

.supplier-switch-row strong {
    font-size: 12px;
}

.supplier-switch-row small {
    color: #7b899e;
    font-size: 10px;
    margin-top: 2px;
}

@media (max-width: 1180px) {
    .supplier-onboarding-layout {
        grid-template-columns: 1fr;
    }

    .supplier-onboarding-aside {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        position: static;
    }
}

@media (max-width: 900px) {
    .supplier-form-card-split,
    .supplier-form-grid.three,
    .supplier-document-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .supplier-form-card-split > section + section {
        border-left: 0;
        padding-left: 0;
    }
}

@media (max-width: 680px) {
    .supplier-onboarding-header {
        align-items: stretch;
        flex-direction: column;
    }

    .supplier-onboarding-actions,
    .supplier-form-footer {
        display: grid;
        grid-template-columns: 1fr;
    }

    .supplier-form-card-split,
    .supplier-form-grid,
    .supplier-form-grid.three,
    .supplier-document-grid,
    .supplier-onboarding-aside {
        grid-template-columns: 1fr;
    }

    .supplier-form-card,
    .supplier-preview-card,
    .supplier-finance-card {
        padding: 15px;
    }
}

/* Customer onboarding */
.customer-create-page,
.customer-list-page {
    color: #14213d;
    min-width: 0;
}

.customer-create-header,
.customer-list-header {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.customer-create-heading {
    align-items: center;
    display: flex;
    gap: 14px;
    min-width: 0;
}

.customer-title-icon {
    align-items: center;
    background: #e8efff;
    border: 1px solid #cfe0ff;
    border-radius: 8px;
    color: #2563eb;
    display: inline-flex;
    flex: 0 0 42px;
    font-size: 17px;
    font-weight: 800;
    height: 42px;
    justify-content: center;
}

.customer-create-header h1,
.customer-list-header h1 {
    color: #0f172a;
    font-size: 27px;
    line-height: 1.15;
    margin: 3px 0 4px;
}

.customer-create-header p,
.customer-list-header p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

.customer-breadcrumb {
    align-items: center;
    color: #7a879c;
    display: flex;
    flex-wrap: wrap;
    font-size: 11px;
    gap: 7px;
}

.customer-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

.customer-breadcrumb strong {
    color: #334155;
}

.customer-header-actions,
.customer-sticky-footer > div,
.customer-map-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.customer-button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.customer-button:hover {
    transform: translateY(-1px);
}

.customer-button.primary {
    background: #2563eb;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
    color: #fff;
}

.customer-button.primary:hover {
    background: #1d4ed8;
}

.customer-button.outline {
    background: #fff;
    border-color: #9dbbff;
    color: #1d4ed8;
}

.customer-button.ghost {
    background: #fff;
    border-color: #dce4ef;
    color: #334155;
}

.customer-button.danger-outline {
    background: #fff;
    border-color: #fca5a5;
    color: #dc2626;
}

.customer-button.small {
    min-height: 34px;
    padding: 0 11px;
}

.customer-form-alert,
.customer-duplicate-warning {
    background: #fff3f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #b42318;
    font-size: 12px;
    font-weight: 650;
    margin-bottom: 14px;
    padding: 11px 13px;
}

.customer-duplicate-warning {
    grid-column: 1 / -1;
    margin: -2px 0 0;
}

.customer-kpi-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
}

.customer-kpi-card {
    align-items: center;
    background: #fff;
    border: 1px solid #e3e9f2;
    border-radius: 8px;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .045);
    display: flex;
    gap: 13px;
    min-height: 96px;
    padding: 16px;
}

.customer-kpi-icon {
    align-items: center;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 48px;
    font-size: 15px;
    font-weight: 850;
    height: 48px;
    justify-content: center;
}

.customer-kpi-card.blue .customer-kpi-icon { background: #e7edff; color: #4f46e5; }
.customer-kpi-card.green .customer-kpi-icon { background: #dcfce7; color: #15803d; }
.customer-kpi-card.cyan .customer-kpi-icon { background: #dff7ff; color: #0284c7; }
.customer-kpi-card.orange .customer-kpi-icon { background: #fff0df; color: #f97316; }

.customer-kpi-card div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.customer-kpi-card small {
    color: #536176;
    font-size: 11px;
    font-weight: 700;
}

.customer-kpi-card strong {
    color: #0f274a;
    font-size: 20px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.customer-kpi-card em {
    color: #16a34a;
    font-size: 10px;
    font-style: normal;
}

.customer-form-layout {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr) minmax(300px, .88fr);
}

.customer-form-column {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.customer-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 7px 20px rgba(15, 23, 42, .045);
    min-width: 0;
    padding: 15px;
}

.customer-card-title {
    align-items: flex-start;
    border-bottom: 1px solid #edf1f6;
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 11px;
}

.customer-card-title > span {
    align-items: center;
    background: #e9f0ff;
    border-radius: 6px;
    color: #2563eb;
    display: inline-flex;
    flex: 0 0 29px;
    font-size: 10px;
    font-weight: 850;
    height: 29px;
    justify-content: center;
}

.customer-card-title h2 {
    color: #123360;
    font-size: 13px;
    line-height: 1.25;
    margin: 0 0 2px;
}

.customer-card-title p {
    color: #8a96a8;
    font-size: 10px;
    margin: 0;
}

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

.customer-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.customer-field.full {
    grid-column: 1 / -1;
}

.customer-field > span,
.customer-switch-field > span > strong {
    color: #253858;
    font-size: 11px;
    font-weight: 750;
}

.customer-field b {
    color: #dc2626;
}

.customer-field input,
.customer-field select,
.customer-field textarea {
    background: #fff;
    border: 1px solid #d7e0eb;
    border-radius: 6px;
    color: #17233b;
    font: inherit;
    font-size: 12px;
    min-height: 39px;
    min-width: 0;
    padding: 9px 10px;
    width: 100%;
}

.customer-field textarea {
    min-height: 72px;
    resize: vertical;
}

.customer-field input:focus,
.customer-field select:focus,
.customer-field textarea:focus {
    border-color: #5d8df5;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
    outline: 0;
}

.customer-field .is-readonly {
    background: #f4f7fb;
    color: #5b687c;
}

.customer-input-suffix,
.customer-password-field {
    display: flex;
    min-width: 0;
}

.customer-input-suffix input,
.customer-password-field input {
    border-radius: 6px 0 0 6px;
    flex: 1 1 auto;
}

.customer-input-suffix span,
.customer-password-field button {
    align-items: center;
    background: #f6f8fb;
    border: 1px solid #d7e0eb;
    border-left: 0;
    color: #536176;
    display: inline-flex;
    font-size: 10px;
    font-weight: 700;
    justify-content: center;
    padding: 0 9px;
}

.customer-password-field button {
    cursor: pointer;
}

.customer-password-field button:last-child {
    border-radius: 0 6px 6px 0;
}

.customer-switch-field {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.customer-switch-field > span {
    display: grid;
    gap: 2px;
}

.customer-switch-field small {
    color: #8793a5;
    font-size: 10px;
}

.customer-switch-field input {
    accent-color: #2563eb;
    height: 18px;
    width: 34px;
}

.customer-map-preview {
    background: #eef3f8;
    border: 1px solid #d9e2ec;
    border-radius: 7px;
    height: 190px;
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
}

.customer-map-preview iframe {
    border: 0;
    height: 100%;
    width: 100%;
}

.customer-map-empty {
    align-items: center;
    background-color: #edf3f8;
    background-image: linear-gradient(#dfe8f1 1px, transparent 1px), linear-gradient(90deg, #dfe8f1 1px, transparent 1px);
    background-size: 24px 24px;
    color: #516077;
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: 100%;
    justify-content: center;
    padding: 25px;
    text-align: center;
}

.customer-map-empty strong {
    color: #263a57;
    font-size: 13px;
}

.customer-map-empty span {
    font-size: 10px;
}

.customer-map-actions {
    margin-bottom: 13px;
}

.customer-live-preview {
    position: relative;
}

.customer-avatar-preview {
    align-items: center;
    background: #e5ecf6;
    border: 5px solid #f4f7fb;
    border-radius: 50%;
    color: #718198;
    display: flex;
    font-size: 17px;
    font-weight: 850;
    height: 76px;
    justify-content: center;
    margin: 2px auto 15px;
    width: 76px;
}

.customer-live-preview dl,
.customer-new-stats dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.customer-live-preview dl > div,
.customer-new-stats dl > div {
    align-items: center;
    border-bottom: 1px solid #edf1f6;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 37px;
    padding: 7px 0;
}

.customer-live-preview dl > div:last-child,
.customer-new-stats dl > div:last-child {
    border-bottom: 0;
}

.customer-live-preview dt,
.customer-new-stats dt {
    color: #536176;
    font-size: 10px;
    font-weight: 700;
}

.customer-live-preview dd,
.customer-new-stats dd {
    color: #13223c;
    font-size: 11px;
    font-weight: 700;
    margin: 0;
    max-width: 62%;
    overflow-wrap: anywhere;
    text-align: right;
}

.customer-live-preview dd.is-accent {
    color: #2563eb;
}

.customer-status-badge {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    color: #15803d;
    display: inline-flex;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
}

.customer-rating {
    color: #f59e0b !important;
    letter-spacing: 0 !important;
}

.customer-bottom-tabs {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 7px 20px rgba(15, 23, 42, .04);
    margin-top: 12px;
    overflow: hidden;
}

.customer-bottom-tabs > nav {
    border-bottom: 1px solid #e5eaf1;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 0 12px;
}

.customer-bottom-tabs > nav button {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #637087;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    min-height: 44px;
    padding: 0 13px;
    white-space: nowrap;
}

.customer-bottom-tabs > nav button.active {
    border-bottom-color: #2563eb;
    color: #2563eb;
}

.customer-tab-panel {
    color: #667085;
    display: none;
    font-size: 12px;
    min-height: 90px;
    padding: 16px;
}

.customer-tab-panel.active {
    display: flex;
    gap: 35px;
}

.customer-tab-panel article {
    border-left: 2px solid #b9d2ff;
    display: grid;
    gap: 3px;
    padding-left: 12px;
}

.customer-tab-panel article span {
    color: #7d899b;
    font-size: 10px;
}

.customer-tab-panel article strong {
    color: #172b4d;
}

.customer-tab-panel article p,
.customer-tab-panel > p {
    margin: 0;
}

.customer-sticky-footer {
    align-items: center;
    background: rgba(255, 255, 255, .96);
    border: 1px solid #dfe6ef;
    border-radius: 8px;
    bottom: 10px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 12px;
    padding: 11px 13px;
    position: sticky;
    z-index: 20;
}

.customer-list-card {
    padding: 0;
    overflow: hidden;
}

.customer-table {
    border-collapse: collapse;
    min-width: 900px;
    width: 100%;
}

.customer-table th {
    background: #0f274a;
    color: #fff;
    font-size: 10px;
    padding: 13px 14px;
    text-align: left;
}

.customer-table td {
    border-bottom: 1px solid #e8edf3;
    color: #334155;
    font-size: 11px;
    padding: 12px 14px;
}

.customer-table tbody tr:hover {
    background: #f8fbff;
}

.customer-empty-row {
    padding: 35px !important;
    text-align: center;
}

@media (max-width: 1240px) {
    .customer-form-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .customer-right-column {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .customer-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .customer-create-header,
    .customer-list-header,
    .customer-sticky-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-header-actions,
    .customer-sticky-footer > div {
        display: grid;
        grid-template-columns: 1fr;
    }

    .customer-form-layout,
    .customer-right-column {
        display: grid;
        grid-template-columns: 1fr;
    }

    .customer-right-column {
        grid-column: auto;
    }

    .customer-tab-panel.active {
        flex-direction: column;
        gap: 18px;
    }
}

@media (max-width: 540px) {
    .customer-kpi-grid,
    .customer-fields {
        grid-template-columns: 1fr;
    }

    .customer-field.full {
        grid-column: auto;
    }

    .customer-create-heading {
        align-items: flex-start;
    }

    .customer-create-header h1,
    .customer-list-header h1 {
        font-size: 23px;
    }

    .customer-kpi-card {
        min-height: 82px;
    }

    .customer-map-actions {
        align-items: stretch;
        display: grid;
    }
}

/* Customer management dashboard */
.clients-command-page {
    color: #13223c;
    min-width: 0;
}

.clients-page-header {
    align-items: flex-end;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.clients-page-header h1 {
    color: #0f172a;
    font-size: 27px;
    line-height: 1.1;
    margin: 8px 0 5px;
}

.clients-page-header h1 span {
    color: #2563eb;
    font-size: 14px;
    vertical-align: middle;
}

.clients-page-header p {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}

.clients-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.clients-kpi-grid {
    display: grid;
    gap: 11px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 13px;
}

.clients-kpi-card {
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .045);
    display: grid;
    gap: 11px;
    grid-template-columns: 47px minmax(0, 1fr) 53px;
    min-height: 98px;
    padding: 14px;
}

.clients-kpi-icon {
    align-items: center;
    border-radius: 50%;
    display: flex;
    font-size: 11px;
    font-weight: 850;
    height: 47px;
    justify-content: center;
    width: 47px;
}

.clients-kpi-card.blue .clients-kpi-icon { background: #e4edff; color: #2563eb; }
.clients-kpi-card.green .clients-kpi-icon { background: #dcfce7; color: #16a34a; }
.clients-kpi-card.orange .clients-kpi-icon { background: #fff0d8; color: #ea8a00; }
.clients-kpi-card.purple .clients-kpi-icon { background: #f1e8ff; color: #9333ea; }
.clients-kpi-card.cyan .clients-kpi-icon { background: #def8ff; color: #0891b2; }

.clients-kpi-card > div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.clients-kpi-card small {
    color: #5c6980;
    font-size: 10px;
    font-weight: 700;
}

.clients-kpi-card strong {
    color: #0f274a;
    font-size: 17px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.clients-kpi-card em {
    color: #66809f;
    font-size: 9px;
    font-style: normal;
}

.clients-sparkline {
    align-items: flex-end;
    display: flex;
    gap: 3px;
    height: 28px;
}

.clients-sparkline b {
    background: #80a9ff;
    border-radius: 2px 2px 0 0;
    display: block;
    flex: 1;
}

.clients-sparkline b:nth-child(1) { height: 28%; }
.clients-sparkline b:nth-child(2) { height: 70%; }
.clients-sparkline b:nth-child(3) { height: 43%; }
.clients-sparkline b:nth-child(4) { height: 88%; }
.clients-sparkline b:nth-child(5) { height: 57%; }
.clients-kpi-card.green .clients-sparkline b { background: #5dd48c; }
.clients-kpi-card.orange .clients-sparkline b { background: #f8b84f; }
.clients-kpi-card.purple .clients-sparkline b { background: #b67bfa; }
.clients-kpi-card.cyan .clients-sparkline b { background: #51c8df; }

.clients-filter-card {
    background: #fff;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    box-shadow: 0 7px 19px rgba(15, 23, 42, .04);
    margin-bottom: 12px;
    padding: 14px;
}

.clients-search-row {
    align-items: end;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(280px, 1fr) auto;
    margin-bottom: 11px;
}

.clients-filter-grid {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(7, minmax(110px, 1fr)) auto;
}

.clients-filter-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.clients-filter-field > span {
    color: #243754;
    font-size: 10px;
    font-weight: 800;
}

.clients-filter-field input,
.clients-filter-field select,
.clients-bulk-tools select,
.clients-rows-selector select {
    background: #fff;
    border: 1px solid #d6e0eb;
    border-radius: 6px;
    color: #23344f;
    font: inherit;
    font-size: 11px;
    height: 38px;
    min-width: 0;
    padding: 0 10px;
    width: 100%;
}

.clients-filter-field input:focus,
.clients-filter-field select:focus {
    border-color: #6d98f7;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
    outline: 0;
}

.clients-filter-actions {
    display: flex;
    gap: 7px;
}

.clients-table-card {
    background: #fff;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    box-shadow: 0 9px 24px rgba(15, 23, 42, .05);
    min-width: 0;
    overflow: visible;
}

.clients-tabs {
    align-items: center;
    border-bottom: 1px solid #e8edf3;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 14px;
}

.clients-tabs a {
    align-items: center;
    border-bottom: 2px solid transparent;
    color: #5d6b81;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 700;
    gap: 5px;
    min-height: 45px;
    padding: 0 6px;
    text-decoration: none;
}

.clients-tabs a.active {
    border-bottom-color: #2563eb;
    color: #2563eb;
}

.clients-tabs i {
    border-radius: 50%;
    display: inline-block;
    height: 7px;
    width: 7px;
}

.clients-tabs i.blue { background: #3b82f6; }
.clients-tabs i.green { background: #22c55e; }
.clients-tabs i.gray { background: #94a3b8; }
.clients-tabs i.orange { background: #f59e0b; }
.clients-tabs i.purple { background: #a855f7; }
.clients-tabs i.red { background: #ef4444; }

.clients-table-tools {
    align-items: center;
    display: flex;
    gap: 15px;
    justify-content: space-between;
    padding: 10px 14px;
}

.clients-bulk-tools {
    align-items: center;
    display: flex;
    gap: 7px;
}

.clients-bulk-tools select {
    width: 165px;
}

.clients-bulk-tools > span,
.clients-rows-selector > span {
    color: #718096;
    font-size: 10px;
}

.clients-rows-selector {
    align-items: center;
    display: flex;
    gap: 7px;
}

.clients-rows-selector select {
    height: 34px;
    width: 68px;
}

.clients-table-scroll {
    overflow-x: auto;
}

.clients-table {
    border-collapse: collapse;
    min-width: 1300px;
    table-layout: fixed;
    width: 100%;
}

.clients-table th {
    background: #f6f8fc;
    border-bottom: 1px solid #e1e7ef;
    color: #253754;
    font-size: 9px;
    font-weight: 850;
    padding: 10px 9px;
    text-align: left;
    white-space: nowrap;
}

.clients-table th:first-child,
.clients-table td:first-child { width: 38px; text-align: center; }
.clients-table th:nth-child(2) { width: 255px; }
.clients-table th:nth-child(3) { width: 170px; }
.clients-table th:nth-child(4) { width: 125px; }
.clients-table th:nth-child(5) { width: 100px; }
.clients-table th:nth-child(6) { width: 110px; }
.clients-table th:nth-child(7),
.clients-table th:nth-child(8) { width: 120px; }
.clients-table th:nth-child(9) { width: 100px; }
.clients-table th:nth-child(10) { width: 100px; }
.clients-table th:nth-child(11) { width: 120px; }

.clients-table td {
    border-bottom: 1px solid #e8edf3;
    color: #263650;
    font-size: 10px;
    height: 58px;
    padding: 8px 9px;
    vertical-align: middle;
}

.clients-table tbody tr {
    transition: background-color 140ms ease;
}

.clients-table tbody tr:hover {
    background: #f7faff;
}

.clients-table input[type="checkbox"] {
    accent-color: #2563eb;
    height: 14px;
    width: 14px;
}

.clients-client-cell {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    min-width: 0;
}

.clients-client-cell > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.clients-client-cell strong {
    color: #102748;
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clients-client-cell small {
    color: #7a879a;
    font-size: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clients-avatar {
    align-items: center;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 9px;
    font-weight: 850;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.clients-avatar.blue { background: #2563eb; }
.clients-avatar.purple { background: #9333ea; }
.clients-avatar.green { background: #16a34a; }
.clients-avatar.orange { background: #f59e0b; }
.clients-avatar.cyan { background: #0891b2; }

.clients-type-chip,
.clients-category-badge,
.clients-status {
    border-radius: 999px;
    display: inline-flex;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    padding: 5px 7px;
    white-space: nowrap;
}

.clients-type-chip.individual,
.clients-category-badge.individual { background: #e7efff; color: #2563eb; }
.clients-type-chip.company,
.clients-category-badge.company { background: #dcfce7; color: #15803d; }
.clients-type-chip.reseller,
.clients-category-badge.reseller { background: #fff2d8; color: #b66b00; }
.clients-type-chip.wholesaler,
.clients-category-badge.wholesaler { background: #f0e5ff; color: #7e22ce; }

.clients-phone {
    align-items: center;
    display: flex;
    gap: 5px;
}

.clients-phone a {
    align-items: center;
    background: #dcfce7;
    border-radius: 50%;
    color: #16a34a;
    display: inline-flex;
    font-size: 7px;
    font-weight: 900;
    height: 16px;
    justify-content: center;
    text-decoration: none;
    width: 16px;
}

.clients-contact {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clients-table .numeric {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.clients-balance {
    font-weight: 800;
}

.clients-balance.positive { color: #dc2626; }
.clients-balance.neutral { color: #334155; }

.clients-status.active { background: #dcfce7; color: #15803d; }
.clients-status.inactive { background: #e8edf3; color: #5f6c7e; }
.clients-status.credit { background: #fff0d8; color: #c66c00; }
.clients-status.suspended { background: #fee2e2; color: #dc2626; }

.clients-table time {
    color: #4a607d;
    display: grid;
    gap: 2px;
}

.clients-table time small {
    color: #8090a7;
}

.clients-row-actions {
    align-items: center;
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.clients-icon-button {
    align-items: center;
    background: #fff;
    border: 1px solid #d4dfea;
    border-radius: 5px;
    color: #31527a;
    cursor: pointer;
    display: inline-flex;
    font-size: 8px;
    font-weight: 850;
    height: 29px;
    justify-content: center;
    min-width: 29px;
    padding: 0 6px;
}

.clients-icon-button.view,
.clients-icon-button.edit {
    color: #2563eb;
}

.clients-icon-button:hover {
    background: #edf4ff;
    border-color: #a9c6ff;
}

.clients-more {
    position: relative;
}

.clients-more-menu {
    background: #fff;
    border: 1px solid #dce4ef;
    border-radius: 6px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .18);
    display: none;
    min-width: 155px;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    z-index: 35;
}

.clients-more.open .clients-more-menu {
    display: grid;
}

.clients-more-menu a,
.clients-more-menu button {
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #334155;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    padding: 8px 9px;
    text-align: left;
    text-decoration: none;
}

.clients-more-menu a:hover,
.clients-more-menu button:hover {
    background: #f1f5f9;
}

.clients-more-menu .danger {
    color: #dc2626;
}

.clients-empty-state {
    color: #64748b !important;
    padding: 55px 20px !important;
    text-align: center;
}

.clients-empty-state strong,
.clients-empty-state span {
    display: block;
    margin: 4px;
}

.clients-table-footer {
    align-items: center;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 12px 14px;
}

.clients-table-footer p {
    color: #607087;
    font-size: 10px;
    margin: 0;
}

.clients-pagination {
    align-items: center;
    display: flex;
    gap: 4px;
}

.clients-pagination a,
.clients-pagination span {
    align-items: center;
    border: 1px solid #d8e1ec;
    border-radius: 5px;
    color: #3f5270;
    display: inline-flex;
    font-size: 10px;
    height: 29px;
    justify-content: center;
    min-width: 29px;
    padding: 0 7px;
    text-decoration: none;
}

.clients-pagination a.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.clients-pagination a.disabled {
    opacity: .38;
    pointer-events: none;
}

.clients-modal {
    align-items: center;
    display: none;
    inset: 0;
    justify-content: center;
    padding: 20px;
    position: fixed;
    z-index: 900;
}

.clients-modal.open {
    display: flex;
}

.clients-modal-overlay {
    backdrop-filter: blur(5px);
    background: rgba(5, 13, 27, .7);
    inset: 0;
    position: absolute;
}

.clients-modal-dialog {
    animation: clients-modal-in 180ms ease both;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 30px 80px rgba(2, 8, 23, .35);
    max-height: 88vh;
    max-width: 720px;
    overflow: auto;
    position: relative;
    width: min(720px, 96vw);
    z-index: 1;
}

@keyframes clients-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.clients-modal-dialog > header {
    align-items: center;
    background: #0f274a;
    border-bottom: 3px solid #f97316;
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: 17px 20px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.clients-modal-dialog > header small {
    color: #a9bad0;
    font-size: 9px;
    font-weight: 700;
}

.clients-modal-dialog > header h2 {
    font-size: 18px;
    margin: 3px 0 0;
}

.clients-modal-dialog > header > button {
    background: rgba(255, 255, 255, .1);
    border: 0;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    height: 32px;
    width: 32px;
}

.clients-modal-body {
    padding: 18px;
}

.clients-modal-dialog > footer,
.clients-edit-dialog form > footer {
    align-items: center;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 13px 18px;
    position: sticky;
    bottom: 0;
}

.clients-profile-hero {
    align-items: center;
    background: #f4f8ff;
    border: 1px solid #dce8fb;
    border-radius: 7px;
    display: grid;
    gap: 13px;
    grid-template-columns: 56px 1fr auto;
    margin-bottom: 13px;
    padding: 15px;
}

.clients-profile-hero .clients-avatar {
    font-size: 14px;
    height: 56px;
    width: 56px;
}

.clients-profile-hero h3 {
    font-size: 16px;
    margin: 0 0 4px;
}

.clients-profile-hero p {
    color: #65758c;
    font-size: 10px;
    margin: 0;
}

.clients-profile-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clients-profile-section {
    border: 1px solid #e3e9f1;
    border-radius: 7px;
    padding: 13px;
}

.clients-profile-section h4 {
    color: #1e3a62;
    font-size: 11px;
    margin: 0 0 10px;
}

.clients-profile-section dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.clients-profile-section dl div {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.clients-profile-section dt {
    color: #748196;
    font-size: 9px;
}

.clients-profile-section dd {
    color: #1f304a;
    font-size: 10px;
    font-weight: 700;
    margin: 0;
    max-width: 64%;
    overflow-wrap: anywhere;
    text-align: right;
}

.clients-loading {
    display: grid;
    gap: 10px;
}

.clients-loading span {
    animation: clients-loading 1.2s ease infinite;
    background: #edf2f7;
    border-radius: 5px;
    height: 42px;
}

@keyframes clients-loading {
    50% { opacity: .45; }
}

.clients-edit-dialog form {
    min-width: 0;
}

.clients-edit-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 18px;
}

.clients-edit-grid label {
    display: grid;
    gap: 6px;
}

.clients-edit-grid label.full {
    grid-column: 1 / -1;
}

.clients-edit-grid label > span {
    color: #34445d;
    font-size: 10px;
    font-weight: 800;
}

.clients-edit-grid input,
.clients-edit-grid select {
    border: 1px solid #d6e0eb;
    border-radius: 6px;
    font: inherit;
    font-size: 11px;
    height: 39px;
    padding: 0 10px;
    width: 100%;
}

@media (max-width: 1320px) {
    .clients-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .clients-filter-grid {
        grid-template-columns: repeat(4, minmax(130px, 1fr));
    }
}

@media (max-width: 900px) {
    .clients-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .clients-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .clients-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .clients-filter-actions {
        grid-column: 1 / -1;
    }

    .clients-table-tools,
    .clients-table-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .clients-rows-selector {
        justify-content: flex-end;
    }
}

@media (max-width: 620px) {
    .clients-header-actions,
    .clients-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .clients-kpi-grid,
    .clients-filter-grid,
    .clients-search-row,
    .clients-profile-grid,
    .clients-edit-grid {
        grid-template-columns: 1fr;
    }

    .clients-kpi-card {
        grid-template-columns: 47px minmax(0, 1fr) 45px;
    }

    .clients-table-tools {
        gap: 10px;
    }

    .clients-bulk-tools {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }

    .clients-bulk-tools select {
        width: 100%;
    }

    .clients-table-scroll {
        overflow: visible;
    }

    .clients-table,
    .clients-table tbody,
    .clients-table tr,
    .clients-table td {
        display: block;
        min-width: 0;
        width: 100%;
    }

    .clients-table thead {
        display: none;
    }

    .clients-table tbody {
        display: grid;
        gap: 10px;
        padding: 10px;
    }

    .clients-table tbody tr {
        border: 1px solid #dde5ef;
        border-radius: 7px;
        box-shadow: 0 5px 14px rgba(15, 23, 42, .04);
        padding: 9px;
    }

    .clients-table td {
        align-items: center;
        border-bottom: 1px solid #eef2f6;
        display: flex;
        height: auto;
        justify-content: space-between;
        min-height: 36px;
        padding: 7px 3px;
        text-align: right;
    }

    .clients-table td::before {
        color: #718096;
        content: attr(data-label);
        font-size: 9px;
        font-weight: 800;
        margin-right: 12px;
        text-align: left;
    }

    .clients-table td:nth-child(2) {
        display: block;
    }

    .clients-table td:nth-child(2)::before {
        display: none;
    }

    .clients-table .numeric {
        text-align: right;
    }

    .clients-row-actions {
        justify-content: flex-end;
    }

    .clients-more-menu {
        bottom: calc(100% + 5px);
        top: auto;
    }

    .clients-pagination {
        flex-wrap: wrap;
    }

    .clients-profile-hero {
        grid-template-columns: 50px 1fr;
    }

    .clients-profile-hero > :last-child {
        grid-column: 1 / -1;
    }

    .clients-edit-grid label.full {
        grid-column: auto;
    }
}

/* Supplier management dashboard */
.suppliers-command-page,
.supplier-create-page {
    color: #13223c;
    min-width: 0;
}

.supplier-filter-grid {
    grid-template-columns: repeat(7, minmax(115px, 1fr)) auto;
}

.suppliers-table {
    min-width: 1580px;
}

.suppliers-table th:nth-child(2) { width: 230px; }
.suppliers-table th:nth-child(3) { width: 115px; }
.suppliers-table th:nth-child(4) { width: 145px; }
.suppliers-table th:nth-child(5) { width: 125px; }
.suppliers-table th:nth-child(6) { width: 180px; }
.suppliers-table th:nth-child(7) { width: 105px; }
.suppliers-table th:nth-child(8) { width: 95px; }
.suppliers-table th:nth-child(9) { width: 95px; }
.suppliers-table th:nth-child(10),
.suppliers-table th:nth-child(11) { width: 120px; }
.suppliers-table th:nth-child(12) { width: 95px; }
.suppliers-table th:nth-child(13) { width: 100px; }
.suppliers-table th:nth-child(14) { width: 120px; }

.clients-balance.supplier-credit {
    color: #16a34a;
}

.supplier-create-grid {
    align-items: start;
    display: grid;
    gap: 13px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.supplier-create-grid .customer-sticky-footer {
    grid-column: 1 / -1;
}

.supplier-create-note {
    background: #edf5ff;
    border: 1px solid #cfe1ff;
    border-radius: 6px;
    color: #45617f;
    font-size: 10px;
    grid-column: 1 / -1;
    line-height: 1.55;
    padding: 11px;
}

@media (max-width: 1300px) {
    .supplier-filter-grid {
        grid-template-columns: repeat(4, minmax(130px, 1fr));
    }
}

@media (max-width: 900px) {
    .supplier-create-grid {
        grid-template-columns: 1fr;
    }

    .supplier-create-grid .customer-sticky-footer {
        grid-column: auto;
    }
}

@media (max-width: 620px) {
    .supplier-filter-grid {
        grid-template-columns: 1fr;
    }

    .suppliers-table {
        min-width: 0;
    }
}

/* Product inventory command center */
.products-page {
    display: grid;
    gap: 16px;
}

.product-page-header,
.product-title-block,
.product-header-actions,
.product-actions,
.product-table-footer,
.product-pagination-tools {
    display: flex;
    align-items: center;
}

.product-page-header {
    justify-content: space-between;
    gap: 20px;
}

.product-title-block {
    gap: 13px;
}

.product-title-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    color: #f97316;
    font-size: 20px;
    font-weight: 900;
    background: #fff1e8;
}

.product-title-block h1 {
    margin: 0;
    color: #0f172a;
    font-size: 28px;
    line-height: 1.1;
}

.product-title-block p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
}

.product-header-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.product-command {
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid #dbe4f0;
    border-radius: 6px;
    color: #1e293b;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.product-command:hover {
    border-color: #93b4ee;
    box-shadow: 0 7px 18px rgba(37, 99, 235, 0.11);
    transform: translateY(-1px);
}

.product-command.primary {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
}

.product-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(145px, 1fr));
    gap: 10px;
}

.product-kpi {
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: center;
    gap: 11px;
    min-height: 98px;
    padding: 14px;
    border: 1px solid #e5ebf3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.055);
}

.product-kpi > span {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 900;
}

.product-kpi small,
.product-kpi em,
.product-kpi a {
    display: block;
    color: #64748b;
    font-size: 10px;
    font-style: normal;
    text-decoration: none;
}

.product-kpi strong {
    display: block;
    margin: 4px 0;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.15;
}

.product-kpi.blue > span { color: #2563eb; background: #dbeafe; }
.product-kpi.green > span { color: #16a34a; background: #dcfce7; }
.product-kpi.orange > span { color: #ea580c; background: #ffedd5; }
.product-kpi.amber > span { color: #d97706; background: #fef3c7; }
.product-kpi.red > span { color: #dc2626; background: #fee2e2; }
.product-kpi.purple > span { color: #7c3aed; background: #ede9fe; }

.product-filter-card {
    padding: 16px;
    border: 1px solid #e4ebf5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
}

.product-filter-card label {
    display: grid;
    gap: 7px;
}

.product-filter-card label > span {
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.product-search-field {
    max-width: 480px;
    margin-bottom: 13px;
}

.product-filter-card input,
.product-filter-card select {
    width: 100%;
    min-height: 38px;
    padding: 0 11px;
    border: 1px solid #dce5f1;
    border-radius: 5px;
    color: #172033;
    background: #fff;
    outline: none;
}

.product-filter-card input:focus,
.product-filter-card select:focus {
    border-color: #4f86ed;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.11);
}

.product-filter-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(110px, 1fr)) auto;
    align-items: end;
    gap: 10px;
}

.product-filter-actions {
    display: flex;
    gap: 7px;
}

.product-filter-btn {
    display: inline-grid;
    place-items: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #dce5f1;
    border-radius: 5px;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    background: #fff;
}

.product-filter-btn.primary {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
}

.product-alert-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 10px;
}

.product-alert {
    display: flex;
    min-height: 114px;
    padding: 15px;
    border: 1px solid #e4ebf5;
    border-radius: 8px;
    flex-direction: column;
    justify-content: space-between;
    background: #fff;
}

.product-alert strong,
.product-alert b,
.product-alert span {
    display: block;
}

.product-alert strong {
    margin-bottom: 7px;
    font-size: 12px;
}

.product-alert b {
    color: #0f172a;
    font-size: 14px;
}

.product-alert span {
    margin-top: 4px;
    color: #64748b;
    font-size: 10px;
}

.product-alert a,
.product-alert-disabled {
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
}

.product-alert.amber strong, .product-alert.amber a { color: #d97706; }
.product-alert.red strong, .product-alert.red a { color: #dc2626; }
.product-alert.blue strong, .product-alert.blue a { color: #2563eb; }
.product-alert.green strong { color: #16a34a; }
.product-alert.purple strong { color: #7c3aed; }

.product-table-card {
    overflow: visible;
    border: 1px solid #e3eaf4;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.065);
}

.product-table {
    min-width: 1180px;
}

.product-table tbody td {
    height: 78px;
    padding: 9px 12px;
    font-size: 11px;
}

.product-table tbody tr {
    cursor: pointer;
}

.product-table tbody tr:focus {
    outline: 2px solid #60a5fa;
    outline-offset: -2px;
}

.product-cell {
    display: grid;
    grid-template-columns: 46px minmax(170px, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 250px;
}

.product-thumb,
.drawer-product-image {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #2563eb;
    font-weight: 900;
    background: #eef4ff;
}

.product-thumb {
    width: 46px;
    height: 52px;
    border: 1px solid #e4eaf3;
    border-radius: 6px;
}

.product-thumb img,
.drawer-product-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.product-cell strong,
.product-cell small {
    display: block;
}

.product-cell strong {
    overflow: hidden;
    max-width: 310px;
    color: #0f172a;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-cell small {
    margin-top: 2px;
    color: #64748b;
    font-size: 9px;
}

.stock-pill,
.product-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.stock-pill.ok, .product-status.active { color: #15803d; background: #dcfce7; }
.stock-pill.low, .product-status.promotion { color: #b45309; background: #fef3c7; }
.stock-pill.out, .product-status.out { color: #dc2626; background: #fee2e2; }
.product-status.inactive { color: #64748b; background: #e2e8f0; }

.stock-caption {
    display: block;
    margin-top: 5px;
    font-size: 9px;
    font-weight: 700;
}

.stock-caption.ok { color: #16a34a; }
.stock-caption.low { color: #d97706; }
.stock-caption.out { color: #dc2626; }

.product-price-lines {
    display: grid;
    gap: 7px;
    min-width: 125px;
}

.product-price-lines span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
}

.product-price-lines strong {
    color: #0f172a;
}

.margin-value.good { color: #16a34a; }
.margin-value.medium { color: #d97706; }
.margin-value.bad { color: #dc2626; }
.margin-value.neutral { color: #94a3b8; }

.supplier-cell {
    min-width: 125px;
}

.supplier-cell strong,
.supplier-cell small {
    display: block;
}

.supplier-cell small {
    margin-top: 4px;
    color: #64748b;
    font-size: 9px;
}

.product-actions {
    gap: 4px;
    min-width: 224px;
}

.product-icon-btn {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    padding: 0;
    border: 1px solid #dce5f1;
    border-radius: 5px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    background: #fff;
    cursor: pointer;
}

.product-icon-btn:hover {
    border-color: currentColor;
    background: #f8fbff;
}

.product-icon-btn.stock { color: #f97316; }
.product-icon-btn.label { color: #7c3aed; }
.product-icon-btn.buy { color: #16a34a; }
.product-icon-btn.more { color: #475569; }

.product-more {
    position: relative;
}

.product-more-menu {
    position: absolute;
    z-index: 15;
    top: 36px;
    right: 0;
    display: none;
    width: 205px;
    padding: 6px;
    border: 1px solid #dfe7f1;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.product-more.open .product-more-menu {
    display: grid;
}

.product-more-menu a {
    padding: 9px 10px;
    border-radius: 4px;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.product-more-menu a:hover {
    background: #f1f5f9;
}

.product-more-menu a.danger {
    color: #dc2626;
}

.product-empty {
    height: 150px !important;
    color: #64748b !important;
    text-align: center;
}

.product-table-footer {
    justify-content: space-between;
    gap: 14px;
    min-height: 56px;
    padding: 10px 14px;
    color: #475569;
    font-size: 11px;
}

.product-pagination-tools {
    gap: 12px;
}

.product-pagination-tools select {
    min-height: 34px;
    border: 1px solid #dce5f1;
    border-radius: 5px;
}

.product-summary-bar {
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    min-height: 68px;
    color: #fff;
    background: #071d43;
}

.product-summary-bar > div {
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 11px 16px;
}

.product-summary-bar > div + div {
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.product-summary-bar small {
    color: #b9c9e6;
    font-size: 9px;
}

.product-summary-bar strong {
    color: #fff;
    font-size: 13px;
}

.product-summary-bar > div:nth-child(2) strong,
.product-summary-bar > div:nth-child(5) strong {
    color: #4ade80;
}

.product-summary-bar > div:nth-child(3) strong {
    color: #fbbf24;
}

.product-summary-bar > div:nth-child(4) strong {
    color: #60a5fa;
}

.product-drawer-shell {
    position: fixed;
    z-index: 80;
    inset: 0;
    visibility: hidden;
    pointer-events: none;
}

.product-drawer-shell.open {
    visibility: visible;
    pointer-events: auto;
}

.product-drawer-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    opacity: 0;
    background: rgba(15, 23, 42, 0.28);
    transition: opacity 0.22s ease;
}

.product-drawer-shell.open .product-drawer-overlay {
    opacity: 1;
}

.product-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: min(470px, 96vw);
    height: 100vh;
    overflow: hidden;
    background: #f8fafc;
    box-shadow: -20px 0 55px rgba(15, 23, 42, 0.2);
    transform: translateX(102%);
    transition: transform 0.24s ease;
}

.product-drawer-shell.open .product-drawer {
    transform: translateX(0);
}

.product-drawer-content {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    height: 100%;
}

.product-drawer-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 21px;
    border-bottom: 1px solid #e3e9f2;
    background: #fff;
}

.product-drawer-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
}

.product-drawer-header p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0;
    color: #64748b;
    font-size: 10px;
}

.product-drawer-header > button {
    width: 32px;
    height: 32px;
    border: 0;
    color: #64748b;
    font-size: 25px;
    background: transparent;
    cursor: pointer;
}

.product-drawer-tabs {
    display: flex;
    overflow-x: auto;
    padding: 0 12px;
    border-bottom: 1px solid #e3e9f2;
    background: #fff;
}

.product-drawer-tabs button {
    min-width: max-content;
    padding: 14px 9px 11px;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
    background: transparent;
    cursor: pointer;
}

.product-drawer-tabs button.active {
    border-bottom-color: #2563eb;
    color: #2563eb;
}

.product-drawer-body {
    overflow-y: auto;
    padding: 13px;
}

.product-tab-panel {
    display: none;
}

.product-tab-panel.active {
    display: grid;
    gap: 11px;
}

.drawer-card {
    padding: 14px;
    border: 1px solid #e2e9f2;
    border-radius: 8px;
    background: #fff;
}

.drawer-card h3 {
    margin: 0 0 14px;
    color: #2563eb;
    font-size: 11px;
}

.drawer-product-overview {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 14px;
}

.drawer-product-image {
    width: 120px;
    height: 155px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 24px;
}

.drawer-detail-grid,
.drawer-metric-grid {
    display: grid;
    gap: 12px;
}

.drawer-metric-grid {
    grid-template-columns: repeat(3, 1fr);
}

.drawer-detail-grid small,
.drawer-detail-grid strong,
.drawer-metric-grid small,
.drawer-metric-grid strong {
    display: block;
}

.drawer-detail-grid small,
.drawer-metric-grid small {
    margin-bottom: 4px;
    color: #64748b;
    font-size: 9px;
}

.drawer-detail-grid strong,
.drawer-metric-grid strong {
    overflow-wrap: anywhere;
    color: #172033;
    font-size: 10px;
    line-height: 1.5;
}

.drawer-empty-state,
.product-drawer-error {
    padding: 28px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #475569;
    text-align: center;
    background: #fff;
}

.drawer-empty-state strong {
    color: #0f172a;
}

.product-drawer-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 13px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.drawer-action {
    display: grid;
    place-items: center;
    min-height: 42px;
    border: 1px solid #dce5f1;
    border-radius: 5px;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    background: #fff;
}

.drawer-action.primary {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
}

.drawer-action.danger {
    color: #dc2626;
}

.product-drawer-loading {
    display: grid;
    gap: 13px;
    padding: 24px;
}

.product-drawer-loading > * {
    height: 18px;
    border-radius: 5px;
    background: linear-gradient(90deg, #e8edf4, #f8fafc, #e8edf4);
    background-size: 200% 100%;
    animation: product-skeleton 1.2s linear infinite;
}

.product-drawer-loading > div {
    height: 80px;
}

.product-drawer-loading > strong {
    height: 180px;
}

@keyframes product-skeleton {
    to { background-position: -200% 0; }
}

@media (max-width: 1380px) {
    .product-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-filter-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .product-alert-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 920px) {
    .product-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-header-actions {
        justify-content: flex-start;
    }

    .product-alert-grid,
    .product-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-summary-bar {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 620px) {
    .product-kpi-grid,
    .product-alert-grid,
    .product-filter-grid,
    .product-summary-bar {
        grid-template-columns: 1fr;
    }

    .product-header-actions,
    .product-command,
    .product-filter-actions,
    .product-filter-btn {
        width: 100%;
    }

    .product-command {
        display: grid;
        place-items: center;
    }

    .product-table-footer,
    .product-pagination-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .product-summary-bar {
        position: static;
    }

    .product-summary-bar > div + div {
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        border-left: 0;
    }

    .product-drawer {
        width: 100vw;
    }

    .drawer-product-overview,
    .drawer-metric-grid,
    .product-drawer-footer {
        grid-template-columns: 1fr;
    }

    .drawer-product-image {
        width: 100%;
        height: 210px;
    }
}

/* Calculated stock alerts center */
.stock-alert-page {
    color: #0f172a;
    letter-spacing: 0;
}

.stock-alert-header,
.stock-alert-header-actions,
.stock-alert-filter-actions,
.stock-alert-table-footer,
.stock-alert-table-footer > div,
.stock-threshold-dialog header,
.stock-threshold-dialog header > div,
.stock-threshold-dialog footer {
    display: flex;
    align-items: center;
}

.stock-alert-header {
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.stock-alert-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 12px;
}

.stock-alert-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

.stock-alert-breadcrumb strong {
    color: #2563eb;
}

.stock-alert-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.stock-alert-header p {
    margin: 6px 0 0;
    color: #54709a;
    font-size: 13px;
}

.stock-alert-header-actions,
.stock-alert-filter-actions {
    gap: 9px;
}

.stock-alert-button {
    display: inline-flex;
    min-height: 40px;
    padding: 0 16px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d7e1ef;
    border-radius: 6px;
    background: #fff;
    color: #1e3a5f;
    font: inherit;
    font-size: 12px;
    font-weight: 780;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.stock-alert-button:hover {
    border-color: #8eb2ec;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .12);
    transform: translateY(-1px);
}

.stock-alert-button.primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.stock-alert-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.stock-alert-kpi {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    min-height: 105px;
    padding: 15px;
    border: 1px solid #e2e9f3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045);
}

.stock-alert-kpi > span {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 900;
}

.stock-alert-kpi small,
.stock-alert-kpi strong,
.stock-alert-kpi em {
    display: block;
}

.stock-alert-kpi small {
    color: #405779;
    font-size: 11px;
}

.stock-alert-kpi strong {
    margin-top: 5px;
    font-size: 20px;
    line-height: 1.1;
}

.stock-alert-kpi em {
    margin-top: 7px;
    color: #64748b;
    font-size: 9px;
    font-style: normal;
}

.stock-alert-kpi.danger > span { background: #fee2e2; color: #dc2626; }
.stock-alert-kpi.warning > span { background: #ffedd5; color: #f97316; }
.stock-alert-kpi.blue > span { background: #dbeafe; color: #2563eb; }
.stock-alert-kpi.success > span { background: #dcfce7; color: #16a34a; }
.stock-alert-kpi.purple > span { background: #ede9fe; color: #7c3aed; }

.stock-alert-filters {
    position: relative;
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid #e1e8f2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(15, 23, 42, .045);
}

.stock-alert-filters label {
    display: block;
    min-width: 0;
}

.stock-alert-filters label > span {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 10px;
    font-weight: 800;
}

.stock-alert-filters input,
.stock-alert-filters select {
    width: 100%;
    min-height: 39px;
    padding: 9px 11px;
    border: 1px solid #dbe4f0;
    border-radius: 6px;
    outline: 0;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 11px;
}

.stock-alert-filters input:focus,
.stock-alert-filters select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
}

.stock-alert-filters select:disabled {
    background: #f8fafc;
}

.stock-alert-search {
    width: min(390px, 100%);
    margin-bottom: 12px;
}

.stock-alert-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(130px, 1fr));
    gap: 10px;
}

.stock-alert-filter-actions {
    justify-content: flex-end;
    margin-top: 12px;
}

.stock-alert-table-card {
    overflow: visible;
    border: 1px solid #e1e8f2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .055);
}

.stock-alert-tabs {
    display: flex;
    gap: 26px;
    padding: 0 16px;
    overflow-x: auto;
    border-bottom: 1px solid #e8eef6;
}

.stock-alert-tabs a {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    color: #526887;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}

.stock-alert-tabs a.active {
    border-bottom-color: #2563eb;
    color: #2563eb;
}

.stock-alert-tabs b {
    display: grid;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    place-items: center;
    border-radius: 999px;
    background: #eef3fa;
    font-size: 9px;
}

.stock-alert-tabs a.active b {
    background: #dbeafe;
}

.stock-alert-table {
    width: 100%;
    min-width: 1280px;
    border-collapse: collapse;
}

.stock-alert-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 13px 10px;
    border-bottom: 1px solid #dbe4f0;
    background: #f7f9fc;
    color: #263c5a;
    font-size: 9px;
    text-align: left;
    white-space: nowrap;
}

.stock-alert-table td {
    padding: 10px;
    border-bottom: 1px solid #e9eef5;
    color: #334155;
    font-size: 10px;
    vertical-align: middle;
}

.stock-alert-table tbody tr {
    transition: background .16s ease;
}

.stock-alert-table tbody tr:hover {
    background: #f8fbff;
}

.stock-alert-product {
    display: grid;
    grid-template-columns: 42px minmax(180px, 1fr);
    gap: 10px;
    align-items: center;
}

.stock-alert-thumb {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #e1e8f2;
    border-radius: 6px;
    background: #f8fafc;
    color: #2563eb;
    font-weight: 850;
}

.stock-alert-thumb img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.stock-alert-product strong,
.stock-alert-product small {
    display: block;
}

.stock-alert-product strong {
    max-width: 270px;
    overflow: hidden;
    color: #142642;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-alert-product small {
    margin-top: 5px;
    color: #2563eb;
    font-size: 9px;
}

.stock-alert-number,
.stock-alert-risk {
    font-size: 11px;
}

.stock-alert-number.rupture { color: #dc2626; }
.stock-alert-number.low { color: #f97316; }
.stock-alert-number.monitored { color: #16a34a; }
.stock-alert-risk.active { color: #ea580c; }

.stock-alert-status {
    display: inline-flex;
    min-height: 24px;
    padding: 0 9px;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.stock-alert-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.stock-alert-status.rupture { background: #fee2e2; color: #dc2626; }
.stock-alert-status.low { background: #ffedd5; color: #ea580c; }
.stock-alert-status.monitored { background: #dcfce7; color: #15803d; }

.stock-alert-menu {
    position: relative;
}

.stock-alert-menu > button {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #d9e3f0;
    border-radius: 6px;
    background: #fff;
    color: #1e3a5f;
    font-size: 17px;
    cursor: pointer;
}

.stock-alert-menu > div {
    position: absolute;
    z-index: 20;
    top: 34px;
    right: 0;
    display: none;
    width: 190px;
    padding: 6px;
    border: 1px solid #dfe7f2;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 15px 35px rgba(15, 23, 42, .16);
}

.stock-alert-menu.open > div {
    display: grid;
}

.stock-alert-menu a,
.stock-alert-menu > div button {
    padding: 9px 10px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #334155;
    font: inherit;
    font-size: 10px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.stock-alert-menu a:hover,
.stock-alert-menu > div button:hover {
    background: #eff6ff;
    color: #2563eb;
}

.stock-alert-empty {
    display: grid;
    min-height: 280px;
    place-items: center;
    align-content: center;
    text-align: center;
}

.stock-alert-empty > span {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 12px;
    place-items: center;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 24px;
    font-weight: 900;
}

.stock-alert-empty strong {
    font-size: 15px;
}

.stock-alert-empty p {
    margin: 8px 0 12px;
    color: #64748b;
    font-size: 11px;
}

.stock-alert-empty a {
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.stock-alert-table-footer {
    justify-content: space-between;
    gap: 15px;
    min-height: 58px;
    padding: 10px 15px;
    color: #526887;
    font-size: 10px;
}

.stock-alert-table-footer > div {
    gap: 10px;
}

.stock-alert-table-footer select {
    min-height: 34px;
    border: 1px solid #dbe4f0;
    border-radius: 6px;
    background: #fff;
}

/* Inventory movements and replenishment */
.inventory-page {
    color: #0f172a;
}

.inventory-filter-grid {
    grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.inventory-table {
    min-width: 1420px;
}

.inventory-type,
.inventory-change {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.inventory-type.in,
.inventory-change.in {
    background: #dcfce7;
    color: #15803d;
}

.inventory-type.out,
.inventory-change.out {
    background: #fee2e2;
    color: #dc2626;
}

.replenishment-groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.replenishment-card {
    padding: 16px;
    border: 1px solid #e1e8f2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .06);
}

.replenishment-card header,
.replenishment-card-metrics {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.replenishment-card h2 {
    margin: 4px 0 0;
    font-size: 16px;
}

.replenishment-card span,
.replenishment-card small {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.replenishment-card-metrics {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eaf0f7;
}

.replenishment-card-metrics p {
    margin: 0;
}

.replenishment-card-metrics strong {
    display: block;
    margin-top: 5px;
    color: #0f172a;
}

.replenishment-table {
    min-width: 1260px;
}

.stock-threshold-modal {
    position: fixed;
    z-index: 700;
    inset: 0;
    display: none;
    place-items: center;
    padding: 18px;
}

.stock-threshold-modal.open {
    display: grid;
}

.stock-threshold-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(7, 20, 38, .7);
    backdrop-filter: blur(6px);
}

.stock-threshold-dialog {
    position: relative;
    z-index: 1;
    width: min(470px, 95vw);
    padding: 21px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(2, 8, 23, .34);
}

.stock-threshold-dialog header {
    justify-content: space-between;
    margin-bottom: 20px;
}

.stock-threshold-dialog header > div {
    gap: 11px;
}

.stock-threshold-dialog header span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    background: #ffedd5;
    color: #f97316;
    font-size: 18px;
    font-weight: 900;
}

.stock-threshold-dialog h2,
.stock-threshold-dialog p {
    margin: 0;
}

.stock-threshold-dialog h2 {
    font-size: 17px;
}

.stock-threshold-dialog p {
    margin-top: 4px;
    color: #64748b;
    font-size: 10px;
}

.stock-threshold-dialog header > button {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 24px;
    cursor: pointer;
}

.stock-threshold-dialog label span {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.stock-threshold-dialog input {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #dbe4f0;
    border-radius: 6px;
    font: inherit;
}

.stock-threshold-dialog > small {
    display: block;
    margin-top: 8px;
    color: #64748b;
    font-size: 9px;
}

.stock-threshold-dialog footer {
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

@media (max-width: 1320px) {
    .stock-alert-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stock-alert-filter-grid {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 820px) {
    .stock-alert-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .stock-alert-header-actions {
        width: 100%;
    }

    .stock-alert-kpis,
    .stock-alert-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .stock-alert-header h1 {
        font-size: 23px;
    }

    .stock-alert-header-actions,
    .stock-alert-button,
    .stock-alert-filter-actions {
        width: 100%;
    }

    .stock-alert-kpis,
    .stock-alert-filter-grid {
        grid-template-columns: 1fr;
    }

    .stock-alert-filter-actions,
    .stock-alert-table-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .stock-alert-table-footer > div {
        justify-content: space-between;
    }
}

/* Premium product creation */
.product-create-page {
    color: #0f172a;
    letter-spacing: 0;
}

.product-create-header,
.product-create-actions,
.product-create-card-title,
.product-create-card-title > div,
.product-create-footer,
.product-create-footer > div,
.product-switch-line,
.quick-category-dialog header,
.quick-category-dialog header > div,
.quick-category-dialog footer {
    display: flex;
    align-items: center;
}

.product-create-header {
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.product-create-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 11px;
    color: #64748b;
    font-size: 12px;
}

.product-create-breadcrumb a {
    color: #64748b;
    text-decoration: none;
}

.product-create-breadcrumb strong {
    color: #2563eb;
}

.product-create-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

.product-create-header p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
}

.product-create-actions {
    justify-content: flex-end;
    gap: 9px;
}

.product-create-button {
    min-height: 40px;
    padding: 0 17px;
    border: 1px solid #dbe3ef;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.product-create-button:hover {
    border-color: #93b4ef;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .12);
    transform: translateY(-1px);
}

.product-create-button.primary {
    border-color: #2563eb;
    background: #2563eb;
    color: #fff;
}

.product-create-button:disabled {
    cursor: wait;
    opacity: .65;
    transform: none;
}

.product-create-alert {
    margin-bottom: 14px;
    padding: 13px 15px;
    border: 1px solid #fecaca;
    border-radius: 7px;
    background: #fff1f2;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 700;
}

.product-create-form {
    padding: 12px;
    border: 1px solid #e3eaf4;
    border-radius: 8px;
    background: rgba(255, 255, 255, .65);
    box-shadow: 0 18px 42px rgba(15, 23, 42, .06);
}

.product-create-tabs {
    position: sticky;
    top: 72px;
    z-index: 12;
    display: flex;
    gap: 4px;
    margin: -2px -2px 14px;
    padding: 0 8px;
    overflow-x: auto;
    border-bottom: 1px solid #e6edf6;
    background: rgba(255, 255, 255, .96);
    scrollbar-width: thin;
}

.product-create-tabs button {
    flex: 0 0 auto;
    min-height: 48px;
    padding: 0 15px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.product-create-tabs button:hover,
.product-create-tabs button.active {
    border-bottom-color: #2563eb;
    color: #2563eb;
}

.product-create-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.05fr) minmax(300px, .95fr) minmax(270px, .68fr);
    gap: 12px;
    align-items: start;
}

.product-create-side {
    display: grid;
    gap: 12px;
}

.product-create-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e1e8f2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 7px 22px rgba(15, 23, 42, .045);
}

.product-create-card:target {
    border-color: #93b4ef;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08), 0 12px 30px rgba(15, 23, 42, .07);
}

.product-create-card-title {
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 17px;
}

.product-create-card-title.compact {
    margin-bottom: 13px;
}

.product-create-card-title > div {
    gap: 9px;
}

.product-create-card-title span {
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    border-radius: 6px;
    background: #eef4ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 850;
}

.product-create-card-title h2 {
    margin: 0;
    font-size: 14px;
}

.product-create-card-title small {
    color: #94a3b8;
    font-size: 10px;
}

.product-type-fieldset {
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

.product-type-fieldset legend,
.product-create-field > span {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 11px;
    font-weight: 750;
}

.product-type-fieldset b,
.product-create-field > span b {
    color: #dc2626;
}

.product-segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    border: 1px solid #dce5f1;
    border-radius: 7px;
    background: #f8fafc;
}

.product-segmented input {
    position: absolute;
    opacity: 0;
}

.product-segmented span {
    display: grid;
    min-height: 35px;
    place-items: center;
    border-radius: 5px;
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.product-segmented input:checked + span {
    background: #fff;
    color: #2563eb;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .1);
}

.product-create-field {
    position: relative;
    display: block;
    min-width: 0;
    margin-bottom: 13px;
}

.product-create-field input,
.product-create-field select,
.product-create-field textarea {
    width: 100%;
    min-height: 40px;
    padding: 10px 11px;
    border: 1px solid #dce4ef;
    border-radius: 6px;
    outline: 0;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 12px;
    letter-spacing: 0;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.product-create-field textarea {
    resize: vertical;
}

.product-create-field input:focus,
.product-create-field select:focus,
.product-create-field textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .09);
}

.product-create-field input:disabled {
    background: #f8fafc;
    color: #475569;
}

.product-create-fields {
    display: grid;
    gap: 10px;
}

.product-create-fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-create-fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-create-fields.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.product-input-action,
.product-select-action,
.product-money-input {
    display: grid;
    grid-template-columns: 1fr 40px;
}

.product-input-action input,
.product-select-action select {
    border-radius: 6px 0 0 6px;
}

.product-input-action button,
.product-select-action button {
    border: 1px solid #dce4ef;
    border-left: 0;
    border-radius: 0 6px 6px 0;
    background: #f8fafc;
    color: #2563eb;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.product-char-count {
    display: block;
    margin-top: 5px;
    color: #94a3b8;
    font-size: 10px;
    text-align: right;
}

.product-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 5px;
    border: 1px solid #dce4ef;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    background: #f8fafc;
}

.product-editor-toolbar + textarea {
    border-radius: 0 0 6px 6px;
}

.product-editor-toolbar button {
    min-width: 28px;
    height: 27px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #475569;
    font-size: 11px;
}

.product-editor-toolbar span {
    width: 1px;
    height: 19px;
    background: #dbe3ef;
}

.product-upload-zone {
    display: grid;
    min-height: 150px;
    padding: 18px;
    place-items: center;
    align-content: center;
    border: 1px dashed #8fb2e9;
    border-radius: 7px;
    background: #f8fbff;
    text-align: center;
    cursor: pointer;
    transition: background .18s ease, border-color .18s ease;
}

.product-upload-zone.dragging {
    border-color: #2563eb;
    background: #eef5ff;
}

.product-upload-zone input,
.product-add-images input {
    display: none;
}

.product-upload-icon {
    margin-bottom: 5px;
    color: #2563eb;
    font-size: 29px;
    line-height: 1;
}

.product-upload-zone strong {
    font-size: 12px;
}

.product-upload-zone small {
    margin-top: 5px;
    color: #64748b;
    font-size: 9px;
    line-height: 1.5;
}

.product-image-previews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-top: 9px;
}

.product-image-preview,
.product-image-placeholder {
    position: relative;
    display: grid;
    aspect-ratio: 1;
    min-width: 0;
    place-items: center;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
}

.product-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-image-preview button {
    position: absolute;
    top: 4px;
    right: 4px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    cursor: pointer;
}

.product-image-placeholder {
    grid-column: 1 / -1;
    aspect-ratio: 3 / 1;
    color: #94a3b8;
}

.product-image-placeholder span { font-size: 12px; font-weight: 800; }
.product-image-placeholder small { font-size: 9px; }

.product-add-images {
    display: grid;
    min-height: 34px;
    margin-top: 8px;
    place-items: center;
    border: 1px solid #cfe0fa;
    border-radius: 6px;
    background: #f3f7ff;
    color: #2563eb;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.product-money-input {
    grid-template-columns: 50px 1fr;
}

.product-money-input b {
    display: grid;
    min-height: 40px;
    place-items: center;
    border: 1px solid #dce4ef;
    border-right: 0;
    border-radius: 6px 0 0 6px;
    background: #f8fafc;
    color: #64748b;
    font-size: 10px;
}

.product-money-input input {
    border-radius: 0 6px 6px 0;
}

.product-margin-preview,
.product-discount-preview {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3px 8px;
    padding: 10px 11px;
    border-radius: 6px;
    background: #effcf4;
    color: #166534;
}

.product-margin-preview span,
.product-discount-preview span {
    font-size: 10px;
    font-weight: 750;
}

.product-margin-preview strong,
.product-discount-preview strong {
    font-size: 12px;
}

.product-margin-preview small,
.product-discount-preview small {
    grid-column: 1 / -1;
    font-size: 9px;
}

.product-margin-preview.negative {
    background: #fff1f2;
    color: #b91c1c;
}

.product-live-summary dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.product-live-summary dl div {
    display: grid;
    grid-template-columns: 42% 58%;
    gap: 8px;
    align-items: center;
}

.product-live-summary dt {
    color: #64748b;
    font-size: 10px;
}

.product-live-summary dd {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #334155;
    font-size: 10px;
    font-weight: 750;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-summary-badge {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
}

.product-summary-badge.success {
    background: #dcfce7;
    color: #15803d;
}

.product-create-lower-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 12px;
    margin-top: 12px;
}

.product-promo-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.1fr;
    gap: 10px;
    align-items: end;
    margin-top: 13px;
}

.product-promo-fields.disabled {
    opacity: .45;
}

.product-switch-line {
    justify-content: space-between;
    gap: 14px;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px solid #e6edf6;
    border-radius: 7px;
    background: #fbfdff;
}

.product-switch-line strong,
.product-switch-line small {
    display: block;
}

.product-switch-line strong {
    font-size: 11px;
}

.product-switch-line small {
    margin-top: 4px;
    color: #64748b;
    font-size: 9px;
}

.product-switch {
    flex: 0 0 auto;
}

.product-switch input {
    position: absolute;
    opacity: 0;
}

.product-switch span {
    position: relative;
    display: block;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: #cbd5e1;
    cursor: pointer;
    transition: background .18s ease;
}

.product-switch span::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .2);
    content: "";
    transition: transform .18s ease;
}

.product-switch input:checked + span {
    background: #2563eb;
}

.product-switch input:checked + span::after {
    transform: translateX(16px);
}

.product-switch-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.product-options-card {
    margin-top: 12px;
}

.product-create-footer {
    justify-content: space-between;
    gap: 18px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #d8e7fb;
    border-radius: 7px;
    background: #f3f8ff;
}

.product-create-footer p {
    margin: 0;
    color: #3b5f91;
    font-size: 10px;
}

.product-create-footer > div {
    gap: 8px;
}

.quick-category-modal {
    position: fixed;
    z-index: 500;
    inset: 0;
    display: none;
    place-items: center;
    padding: 18px;
}

.quick-category-modal.open {
    display: grid;
}

.quick-category-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(7, 20, 38, .68);
    backdrop-filter: blur(5px);
}

.quick-category-dialog {
    position: relative;
    z-index: 1;
    width: min(460px, 96vw);
    padding: 20px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 26px 80px rgba(2, 8, 23, .32);
}

.quick-category-dialog header {
    justify-content: space-between;
    margin-bottom: 18px;
}

.quick-category-dialog header > div {
    gap: 10px;
}

.quick-category-dialog header span {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 900;
}

.quick-category-dialog h2 {
    margin: 0;
    font-size: 17px;
}

.quick-category-dialog header > button {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 24px;
    cursor: pointer;
}

.quick-category-dialog footer {
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

@media (max-width: 1320px) {
    .product-create-grid {
        grid-template-columns: 1fr 1fr;
    }

    .product-create-side {
        grid-column: 1 / -1;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-create-fields.five {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .product-create-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-create-actions {
        justify-content: flex-start;
        width: 100%;
        flex-wrap: wrap;
    }

    .product-create-grid,
    .product-create-lower-grid {
        grid-template-columns: 1fr;
    }

    .product-create-side {
        grid-column: auto;
        grid-template-columns: 1fr 1fr;
    }

    .product-live-summary {
        grid-column: 1 / -1;
    }

    .product-promo-fields,
    .product-create-fields.five {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .product-create-page {
        margin: -2px;
    }

    .product-create-header h1 {
        font-size: 22px;
    }

    .product-create-actions,
    .product-create-actions .product-create-button {
        width: 100%;
    }

    .product-create-form {
        padding: 8px;
    }

    .product-create-tabs {
        top: 0;
    }

    .product-create-side,
    .product-create-fields.two,
    .product-create-fields.three,
    .product-create-fields.five,
    .product-promo-fields,
    .product-switch-grid {
        grid-template-columns: 1fr;
    }

    .product-live-summary {
        grid-column: auto;
    }

    .product-create-card {
        padding: 13px;
    }

    .product-create-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .product-create-footer > div,
    .product-create-footer .product-create-button {
        width: 100%;
    }
}

/* Category Management Center */
.category-center {
    display: grid;
    gap: 16px;
    color: #14213d;
}

.category-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #71809e;
    font-size: 11px;
}

.category-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.category-page-header,
.category-page-header > div,
.category-top-actions,
.category-overview-card > header,
.category-view-tools,
.category-segmented,
.category-card-top,
.category-card-title,
.category-item-card footer,
.category-item-card footer nav,
.category-table-card > header,
.category-health-summary {
    display: flex;
    align-items: center;
}

.category-page-header {
    justify-content: space-between;
    gap: 18px;
}

.category-page-header > div:first-child {
    display: block;
}

.category-page-header h1 {
    margin: 0;
    color: #13203b;
    font-size: 26px;
    letter-spacing: 0;
}

.category-page-header h1 span {
    color: #2563eb;
    font-size: 15px;
}

.category-page-header p {
    margin: 6px 0 0;
    color: #657590;
    font-size: 12px;
}

.category-top-actions {
    gap: 9px;
}

.category-btn {
    display: inline-grid;
    place-items: center;
    min-height: 39px;
    padding: 0 15px;
    border: 1px solid #dbe4f0;
    border-radius: 6px;
    color: #24324b;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    background: #fff;
    cursor: pointer;
}

.category-btn.primary {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.category-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 10px;
}

.category-kpi {
    position: relative;
    display: grid;
    grid-template-columns: 46px 1fr;
    align-items: center;
    min-height: 104px;
    padding: 14px;
    overflow: hidden;
    border: 1px solid #e3e9f2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 9px 25px rgba(15, 23, 42, 0.06);
}

.category-kpi-icon {
    display: grid;
    place-items: center;
    width: 43px;
    height: 43px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 900;
}

.category-kpi.blue .category-kpi-icon { color: #2563eb; background: #dbeafe; }
.category-kpi.green .category-kpi-icon { color: #16a34a; background: #dcfce7; }
.category-kpi.orange .category-kpi-icon { color: #d97706; background: #fef3c7; }
.category-kpi.purple .category-kpi-icon { color: #7c3aed; background: #ede9fe; }

.category-kpi small,
.category-kpi strong,
.category-kpi em {
    display: block;
}

.category-kpi small {
    color: #334155;
    font-size: 10px;
    font-weight: 800;
}

.category-kpi strong {
    overflow: hidden;
    margin: 7px 0;
    color: #0f172a;
    font-size: 21px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-kpi em {
    color: #697997;
    font-size: 9px;
    font-style: normal;
}

.mini-spark {
    position: absolute;
    right: 12px;
    bottom: 14px;
    width: 72px;
    height: 18px;
    opacity: 0.9;
    clip-path: polygon(0 80%, 12% 65%, 23% 90%, 34% 28%, 48% 70%, 60% 42%, 74% 78%, 88% 35%, 100% 55%, 100% 70%, 88% 51%, 74% 94%, 60% 58%, 48% 87%, 34% 43%, 23% 100%, 12% 80%, 0 95%);
}

.mini-spark.blue { background: #2563eb; }
.mini-spark.green { background: #16a34a; }
.mini-spark.orange { background: #f59e0b; }

.category-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    align-items: start;
    gap: 14px;
}

.category-main-column,
.category-side-column {
    display: grid;
    gap: 14px;
}

.category-overview-card,
.category-table-card,
.category-side-card {
    border: 1px solid #e1e8f1;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
}

.category-overview-card {
    padding: 12px;
}

.category-overview-card > header {
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 11px;
}

.category-overview-card h2,
.category-table-card h2,
.category-side-card h2 {
    margin: 0;
    color: #17233e;
    font-size: 13px;
}

.category-view-tools {
    gap: 15px;
}

.category-segmented {
    padding: 2px;
    border: 1px solid #dce5f1;
    border-radius: 5px;
    background: #f8fafc;
}

.category-segmented button {
    min-height: 30px;
    padding: 0 11px;
    border: 0;
    border-radius: 4px;
    color: #52617a;
    font-size: 10px;
    font-weight: 800;
    background: transparent;
    cursor: pointer;
}

.category-segmented button.active {
    color: #fff;
    background: #2563eb;
}

.category-view-tools select {
    min-width: 220px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #dce5f1;
    border-radius: 5px;
    color: #334155;
    background: #fff;
}

.category-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 10px;
}

.category-card-grid[hidden] {
    display: none;
}

.category-item-card {
    overflow: hidden;
    border: 1px solid #dfe7f1;
    border-radius: 7px;
    background: #fff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.category-item-card:hover {
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.1);
    transform: translateY(-2px);
}

.category-card-top {
    gap: 11px;
    padding: 11px;
}

.category-icon-box,
.category-table-icon {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #1e40af;
    font-weight: 900;
    background: linear-gradient(145deg, #e0f2fe, #eff6ff);
}

.category-icon-box {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-size: 20px;
}

.category-icon-box img,
.category-table-icon img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #fff;
}

.category-card-title {
    min-width: 0;
    flex: 1;
    justify-content: space-between;
    gap: 8px;
}

.category-card-title strong {
    overflow: hidden;
    color: #14213d;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}

.category-status.active { color: #15803d; background: #dcfce7; }
.category-status.inactive { color: #64748b; background: #e2e8f0; }

.category-card-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0 11px 11px;
}

.category-card-metrics small,
.category-card-metrics strong {
    display: block;
}

.category-card-metrics small {
    margin-bottom: 5px;
    color: #71809b;
    font-size: 8px;
}

.category-card-metrics strong {
    color: #13203b;
    font-size: 11px;
}

.category-item-card footer {
    gap: 7px;
    padding: 8px 10px;
    border-top: 1px solid #e7edf5;
    background: #fbfdff;
}

.category-item-card footer b {
    color: #334155;
    font-size: 9px;
}

.category-item-card footer nav {
    gap: 4px;
    margin-left: auto;
}

.category-item-card footer button,
.category-row-actions button {
    display: grid;
    place-items: center;
    width: 29px;
    height: 27px;
    border: 1px solid #dce5f1;
    border-radius: 4px;
    color: #2563eb;
    background: #fff;
    cursor: pointer;
}

.category-health,
.category-score {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}

.category-health.excellent, .category-score.excellent { color: #15803d; background: #dcfce7; }
.category-health.good, .category-score.good { color: #a16207; background: #fef3c7; }
.category-health.attention, .category-score.attention { color: #c2410c; background: #ffedd5; }
.category-health.weak, .category-score.weak { color: #dc2626; background: #fee2e2; }

.category-table-card {
    overflow: hidden;
}

.category-table-card > header {
    padding: 13px;
}

.category-table-card h2 span {
    color: #64748b;
    font-weight: 500;
}

.category-table-filters {
    display: grid;
    grid-template-columns: 150px auto 90px 140px 140px minmax(150px, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 0 12px 11px;
}

.category-table-filters select,
.category-table-filters input,
.category-table-filters button {
    min-height: 34px;
    padding: 0 9px;
    border: 1px solid #dce5f1;
    border-radius: 5px;
    color: #40506a;
    font-size: 10px;
    background: #fff;
}

.category-table-filters button {
    color: #fff;
    font-weight: 800;
    background: #2563eb;
    cursor: pointer;
}

.category-table-filters span {
    color: #2563eb;
    font-size: 9px;
}

.category-table {
    width: 100%;
    min-width: 1160px;
    border-collapse: collapse;
}

.category-table th,
.category-table td {
    padding: 9px 8px;
    border-bottom: 1px solid #e8edf4;
    color: #26344e;
    text-align: left;
    font-size: 9px;
}

.category-table th {
    color: #43516a;
    font-weight: 800;
    background: #f6f8fb;
}

.category-table tbody tr:hover td {
    background: #f8fbff;
}

.category-table-icon {
    width: 31px;
    height: 31px;
    border-radius: 6px;
    font-size: 11px;
}

.category-row-actions {
    display: flex;
    gap: 3px;
}

.category-row-actions button {
    width: 25px;
    height: 25px;
    font-size: 10px;
}

.category-row-actions button.danger {
    color: #dc2626;
}

.category-table-card > footer {
    padding: 12px;
    color: #64748b;
    font-size: 10px;
}

.category-side-column {
    position: sticky;
    top: 75px;
}

.category-side-card {
    padding: 15px;
}

.category-side-card h2 {
    margin-bottom: 14px;
}

.category-insights {
    display: grid;
    gap: 13px;
}

.category-insights article {
    display: grid;
    grid-template-columns: 39px 1fr;
    align-items: center;
    gap: 10px;
}

.category-insights article > span {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    border-radius: 50%;
    font-weight: 900;
}

.category-insights article.success > span { color: #16a34a; background: #dcfce7; }
.category-insights article.warning > span { color: #ea580c; background: #ffedd5; }
.category-insights article.info > span { color: #2563eb; background: #dbeafe; }

.category-insights p {
    margin: 0;
    color: #40506a;
    font-size: 10px;
    line-height: 1.5;
}

.category-chart-wrap {
    display: grid;
    grid-template-columns: 135px 1fr;
    align-items: center;
    gap: 14px;
}

.category-doughnut {
    display: grid;
    place-items: center;
    width: 125px;
    height: 125px;
    border-radius: 50%;
    background: var(--category-chart);
}

.category-doughnut::before {
    grid-area: 1 / 1;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    content: "";
    background: #fff;
}

.category-doughnut span {
    z-index: 1;
    grid-area: 1 / 1;
    color: #17233e;
    font-size: 11px;
    font-weight: 900;
    text-align: center;
}

.category-doughnut small {
    display: block;
    color: #64748b;
    font-size: 8px;
}

.category-chart-legend {
    display: grid;
    gap: 8px;
}

.category-chart-legend > div {
    display: grid;
    grid-template-columns: 8px 1fr auto;
    align-items: center;
    gap: 7px;
    font-size: 9px;
}

.category-chart-legend i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.category-chart-legend span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-health-summary {
    gap: 15px;
}

.health-ring {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background: conic-gradient(#22c55e calc(var(--health) * 1%), #e5e7eb 0);
}

.health-ring::before {
    grid-area: 1 / 1;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    content: "";
    background: #fff;
}

.health-ring span {
    z-index: 1;
    grid-area: 1 / 1;
    color: #17233e;
    font-size: 14px;
    font-weight: 900;
}

.category-health-summary small,
.category-health-summary strong {
    display: block;
}

.category-health-summary small {
    color: #64748b;
    font-size: 9px;
}

.category-health-summary strong {
    margin: 7px 0;
    color: #16a34a;
    font-size: 12px;
}

.category-health-summary p {
    margin: 0;
    color: #697997;
    font-size: 9px;
    line-height: 1.5;
}

.health-trend {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    height: 48px;
    margin-top: 15px;
    border-bottom: 1px solid #d1fae5;
}

.health-trend i {
    flex: 1;
    height: 35%;
    background: linear-gradient(#22c55e, #bbf7d0);
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.health-trend i:nth-child(2) { height: 58%; }
.health-trend i:nth-child(3) { height: 32%; }
.health-trend i:nth-child(4) { height: 65%; }
.health-trend i:nth-child(5) { height: 44%; }
.health-trend i:nth-child(6) { height: 72%; }
.health-trend i:nth-child(7) { height: 51%; }
.health-trend i:nth-child(8) { height: 84%; }

.category-empty-state {
    grid-column: 1 / -1;
    padding: 40px;
    color: #64748b;
    text-align: center;
}

.category-modal-shell {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: none;
    place-items: center;
    padding: 18px;
}

.category-modal-shell.open {
    display: grid;
}

.category-modal-overlay {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(7, 20, 38, 0.64);
    backdrop-filter: blur(5px);
}

.category-modal {
    position: relative;
    width: min(600px, 96vw);
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(7, 20, 38, 0.32);
    animation: category-modal-in 0.2s ease;
}

@keyframes category-modal-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.category-modal > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 17px 20px;
    color: #fff;
    background: #0f172a;
}

.category-modal > header > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-modal h2 {
    margin: 0;
    font-size: 17px;
}

.category-modal > header button {
    border: 0;
    color: #fff;
    font-size: 24px;
    background: transparent;
    cursor: pointer;
}

.category-modal form {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.category-modal label {
    display: grid;
    gap: 7px;
}

.category-modal label > span {
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.category-modal input,
.category-modal select,
.category-modal textarea {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid #dce5f1;
    border-radius: 6px;
    color: #17233e;
    font: inherit;
    background: #fff;
}

.category-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.category-upload {
    padding: 13px;
    border: 1px dashed #93b4ee;
    border-radius: 7px;
    background: #f8fbff;
}

.category-upload small {
    color: #64748b;
    font-size: 9px;
}

.category-modal form footer {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-top: 6px;
}

.category-modal form footer button {
    min-height: 39px;
    padding: 0 16px;
    border: 1px solid #dce5f1;
    border-radius: 5px;
    color: #334155;
    font-weight: 800;
    background: #fff;
    cursor: pointer;
}

.category-modal form footer button.primary {
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
}

@media (max-width: 1280px) {
    .category-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .category-side-column {
        position: static;
        grid-template-columns: repeat(3, 1fr);
    }

    .category-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-table-filters {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .category-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-side-column {
        grid-template-columns: 1fr;
    }

    .category-overview-card > header,
    .category-view-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .category-view-tools select {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .category-page-header,
    .category-top-actions,
    .category-modal form footer {
        align-items: stretch;
        flex-direction: column;
    }

    .category-btn,
    .category-kpi-grid,
    .category-card-grid,
    .category-table-filters,
    .category-form-grid {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .category-chart-wrap {
        grid-template-columns: 1fr;
        justify-items: center;
    }
}

.db-architecture-page {
    display: grid;
    gap: 16px;
}

.db-architecture-banner,
.db-architecture-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.db-architecture-banner {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
}

.db-architecture-banner.success {
    border-left: 4px solid #16a34a;
}

.db-architecture-card {
    padding: 18px;
}

.db-architecture-card > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.db-architecture-card h2,
.db-architecture-card p {
    margin: 0;
}

.db-architecture-card p {
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
}

.db-status-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 8px;
}

.db-status-grid article,
.db-table-cloud span {
    padding: 9px 10px;
    border: 1px solid #dfe7f1;
    border-radius: 5px;
    font-size: 11px;
    background: #f8fafc;
}

.db-status-grid article strong,
.db-status-grid article span {
    display: block;
}

.db-status-grid article span {
    margin-top: 3px;
    color: #64748b;
    font-size: 10px;
}

.db-status-grid article.ok {
    border-left: 3px solid #16a34a;
}

.db-status-grid article.warning {
    border-left: 3px solid #dc2626;
}

.db-table-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.db-warning-list {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 6px;
    color: #9a3412;
    font-size: 12px;
    background: #fff7ed;
}

.success-text {
    color: #16a34a;
    font-weight: 800;
}

.warning-text {
    color: #dc2626;
    font-weight: 800;
}

@media (max-width: 920px) {
    .db-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 620px) {
    .db-architecture-banner,
    .db-architecture-card > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .db-status-grid {
        grid-template-columns: 1fr;
    }
}

/* Purchase creation */
.purchase-page {
    color: #0f172a;
}

.purchase-page__heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.purchase-page__heading h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 6px 0 0;
    color: #0f172a;
    font-size: 28px;
    letter-spacing: 0;
}

.purchase-title-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: #f97316;
    font-size: 25px;
    font-weight: 800;
    background: #fff1e7;
}

.purchase-breadcrumb {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.purchase-breadcrumb span {
    margin: 0 6px;
    color: #94a3b8;
}

.purchase-form {
    display: grid;
    gap: 16px;
}

.purchase-card {
    border: 1px solid #e5eaf2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.purchase-overview-grid {
    display: grid;
    grid-template-columns: 1fr 0.9fr 0.9fr 0.72fr;
    gap: 0;
    padding: 18px;
}

.purchase-section {
    display: grid;
    align-content: start;
    gap: 13px;
    padding: 2px 18px;
    border-right: 1px solid #edf1f6;
}

.purchase-section:first-child {
    padding-left: 0;
}

.purchase-section h2,
.purchase-live-summary h2,
.purchase-products-title h2,
.purchase-recap-card h2 {
    margin: 0 0 2px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
}

.purchase-fields {
    display: grid;
    gap: 12px;
}

.purchase-fields.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.purchase-section label,
.purchase-search-grid label,
.purchase-adjustments label,
.purchase-payment-card label {
    display: grid;
    gap: 7px;
    min-width: 0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.purchase-section label > span em,
.purchase-search-grid label > span em {
    color: #dc2626;
    font-style: normal;
}

.purchase-page input,
.purchase-page select,
.purchase-page textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #dce3ed;
    border-radius: 6px;
    outline: 0;
    color: #0f172a;
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.purchase-page input,
.purchase-page select {
    height: 40px;
    padding: 0 11px;
}

.purchase-page textarea {
    padding: 10px 11px;
    resize: vertical;
}

.purchase-page input:focus,
.purchase-page select:focus,
.purchase-page textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.purchase-page input[readonly] {
    background: #f8fafc;
}

.supplier-select-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    align-items: end;
    gap: 8px;
}

.purchase-square-btn {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    font-size: 22px;
    background: #2563eb;
    box-shadow: 0 7px 16px rgba(37, 99, 235, 0.22);
    cursor: pointer;
}

.purchase-live-summary {
    align-self: stretch;
    margin-left: 18px;
    padding: 17px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(145deg, #f8fbff, #eef6ff);
}

.purchase-live-summary h2 {
    margin-bottom: 15px;
    color: #1d4ed8;
}

.purchase-live-summary p,
.purchase-recap-card p,
.purchase-due,
.purchase-change {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0;
    padding: 7px 0;
    color: #475569;
    font-size: 12px;
}

.purchase-live-summary strong,
.purchase-recap-card strong {
    color: #0f172a;
}

.purchase-live-summary .purchase-live-total {
    margin-top: 12px;
    padding: 13px 12px;
    border-radius: 6px;
    color: #1d4ed8;
    background: #dbeafe;
}

.purchase-live-total strong {
    color: #1d4ed8;
    font-size: 16px;
}

.purchase-products-card {
    overflow: visible;
}

.purchase-search-grid {
    display: grid;
    grid-template-columns: minmax(210px, 0.8fr) minmax(320px, 1.25fr) auto;
    align-items: end;
    gap: 22px;
    padding: 18px;
    border-bottom: 1px solid #edf1f6;
}

.purchase-product-search {
    position: relative;
}

.purchase-product-search > div:first-of-type {
    position: relative;
}

.purchase-product-search > div:first-of-type span {
    position: absolute;
    top: 50%;
    right: 13px;
    color: #64748b;
    transform: translateY(-50%);
}

.purchase-product-search input {
    padding-right: 38px;
}

.purchase-search-results {
    position: absolute;
    z-index: 30;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    overflow: auto;
    max-height: 330px;
    padding: 6px;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}

.purchase-search-results button {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 6px;
    color: #0f172a;
    text-align: left;
    background: transparent;
    cursor: pointer;
}

.purchase-search-results button:hover {
    background: #f1f5f9;
}

.purchase-search-results button strong,
.purchase-search-results button small {
    display: block;
}

.purchase-search-results button strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.purchase-search-results button small {
    margin-top: 3px;
    color: #64748b;
    font-weight: 500;
}

.purchase-search-results button em {
    color: #2563eb;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.purchase-search-icon,
.purchase-product-thumb {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    color: #1d4ed8;
    font-weight: 800;
    background: #dbeafe;
}

.purchase-search-empty {
    padding: 18px;
    color: #64748b;
    text-align: center;
}

.purchase-search-empty.error {
    color: #dc2626;
}

.purchase-outline-btn,
.purchase-text-btn {
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    color: #0f172a;
    font-weight: 700;
    background: #fff;
    cursor: pointer;
}

.purchase-outline-btn {
    height: 40px;
    padding: 0 16px;
}

.purchase-outline-btn:hover,
.purchase-text-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.purchase-products-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 10px;
}

.purchase-text-btn {
    padding: 7px 10px;
    font-size: 12px;
}

.purchase-text-btn.danger {
    color: #dc2626;
}

.purchase-table-scroll {
    overflow-x: auto;
    padding: 0 12px 14px;
}

.purchase-table {
    width: 100%;
    min-width: 1260px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.purchase-table th {
    padding: 12px 10px;
    color: #fff;
    font-size: 11px;
    text-align: left;
    white-space: nowrap;
    background: #0b1d45;
}

.purchase-table th:first-child {
    border-radius: 7px 0 0;
}

.purchase-table th:last-child {
    border-radius: 0 7px 0 0;
}

.purchase-table td {
    padding: 10px;
    border-bottom: 1px solid #e8edf4;
    color: #334155;
    vertical-align: middle;
    background: #fff;
}

.purchase-table tbody tr:hover td {
    background: #fbfdff;
}

.purchase-product-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
}

.purchase-product-cell strong,
.purchase-product-cell small {
    display: block;
}

.purchase-product-cell strong {
    max-width: 300px;
    color: #0f172a;
}

.purchase-product-cell small {
    margin-top: 4px;
    color: #64748b;
}

.purchase-stock {
    color: #16a34a;
}

.purchase-page .purchase-line-input {
    height: 34px;
    min-width: 90px;
    padding: 0 8px;
}

.purchase-page .purchase-line-input.compact {
    min-width: 70px;
}

.purchase-delete-btn {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    font-size: 19px;
    background: #ef4444;
    cursor: pointer;
}

.purchase-delete-btn:hover {
    background: #dc2626;
}

.purchase-empty-state {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 32px;
    color: #64748b;
}

.purchase-empty-state strong {
    color: #334155;
}

.purchase-recap-grid {
    display: grid;
    grid-template-columns: 0.78fr 1.15fr 1fr;
    gap: 16px;
}

.purchase-recap-card,
.purchase-adjustments,
.purchase-payment-card {
    padding: 18px;
}

.purchase-recap-card h2 {
    margin-bottom: 10px;
    color: #2563eb;
}

.purchase-recap-card p + p {
    border-top: 1px solid #edf1f6;
}

.purchase-adjustments {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px 18px;
}

.purchase-payment-card {
    display: grid;
    gap: 12px;
}

.purchase-grand-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid #edf1f6;
    font-weight: 800;
}

.purchase-grand-total strong {
    color: #f97316;
    font-size: 21px;
}

.purchase-due,
.purchase-change {
    padding: 11px 12px;
    border-radius: 6px;
    color: #15803d;
    background: #ecfdf3;
}

.purchase-change {
    color: #1d4ed8;
    background: #eff6ff;
}

.purchase-form-actions {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 14px;
}

.purchase-submit-btn,
.purchase-reset-btn {
    min-height: 48px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, filter 160ms ease;
}

.purchase-submit-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

.purchase-reset-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.16);
}

.purchase-submit-btn:hover,
.purchase-reset-btn:hover {
    filter: brightness(1.07);
    transform: translateY(-1px);
}

.purchase-submit-btn:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

@media (max-width: 1380px) {
    .purchase-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .purchase-section {
        padding: 0;
        border-right: 0;
    }

    .purchase-live-summary {
        margin-left: 0;
    }
}

@media (max-width: 1050px) {
    .purchase-search-grid,
    .purchase-recap-grid {
        grid-template-columns: 1fr;
    }

    .purchase-outline-btn {
        justify-self: start;
    }
}

@media (max-width: 680px) {
    .purchase-overview-grid,
    .purchase-fields.two-columns,
    .purchase-adjustments,
    .purchase-form-actions {
        grid-template-columns: 1fr;
    }

    .purchase-page__heading h1 {
        font-size: 23px;
    }

    .purchase-overview-grid,
    .purchase-search-grid,
    .purchase-recap-card,
    .purchase-adjustments,
    .purchase-payment-card {
        padding: 14px;
    }

    .purchase-search-grid {
        gap: 14px;
    }

    .purchase-search-results {
        position: fixed;
        top: 20%;
        right: 14px;
        left: 14px;
        max-height: 55vh;
    }

    .purchase-outline-btn {
        width: 100%;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #e8eefc;
    background: var(--axen-dark);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark,
.login-emblem {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--axen-orange), var(--axen-orange-2));
    box-shadow: 0 12px 32px rgba(255, 106, 0, 0.28);
}

.brand strong {
    display: block;
    font-size: 21px;
    line-height: 1;
    letter-spacing: 0;
}

.brand strong span {
    color: var(--axen-orange);
}

.brand small {
    display: block;
    margin-top: 4px;
    color: var(--axen-muted);
    font-size: 14px;
}

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 75% 18%, rgba(255, 106, 0, 0.16), transparent 24%),
        linear-gradient(135deg, #020713, #0b1220 56%, #081527);
}

.login-screen {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 1.08fr) minmax(380px, 0.92fr);
    padding: 28px;
}

.login-marketing {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(28px, 5vw, 62px);
    border-radius: var(--radius) 0 0 var(--radius);
    background:
        linear-gradient(90deg, rgba(7, 20, 38, 0.96), rgba(7, 20, 38, 0.68), rgba(7, 20, 38, 0.24)),
        url("../img/login-city.png") center right / cover no-repeat,
        linear-gradient(135deg, #071426, #0f172a);
}

.login-marketing::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.25), transparent 45%);
    pointer-events: none;
}

.login-marketing > * {
    position: relative;
    z-index: 1;
}

.marketing-copy {
    max-width: 470px;
}

.orange-line {
    display: block;
    width: 44px;
    height: 2px;
    margin-bottom: 22px;
    background: linear-gradient(90deg, var(--axen-orange), transparent);
}

.marketing-copy h1,
.marketing-copy h2,
.login-card h2,
.store-header h1,
.topbar h1,
.welcome-card h2 {
    margin: 0;
    letter-spacing: 0;
}

.marketing-copy h1 {
    font-size: clamp(26px, 3vw, 40px);
}

.marketing-copy h2 {
    margin-top: 6px;
    color: #fff;
    font-size: clamp(19px, 2.1vw, 28px);
}

.marketing-copy h2 span {
    color: var(--axen-orange);
}

.marketing-copy p,
.feature-stack p,
.login-card p,
.store-sidebar-card p,
.store-user-box p,
.store-header p,
.metric-card p,
.help-banner p,
.welcome-card p {
    color: var(--axen-muted);
    line-height: 1.6;
}

.feature-stack {
    display: grid;
    gap: 18px;
    max-width: 460px;
    margin: 28px 0;
}

.feature-stack article,
.store-sidebar-card,
.store-user-box {
    display: flex;
    gap: 14px;
    align-items: center;
}

.feature-icon,
.mini-icon,
.avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.78);
    color: var(--axen-orange);
    border: 1px solid var(--axen-border);
    font-size: 12px;
    font-weight: 800;
}

.feature-stack strong {
    color: #fff;
}

.feature-stack p,
.store-sidebar-card p,
.store-user-box p,
.login-card p,
.help-banner p,
.metric-card p,
.welcome-card p {
    margin: 4px 0 0;
    font-size: 13px;
}

.login-marketing footer,
.store-sidebar footer {
    color: var(--axen-muted);
    font-size: 12px;
}

.login-marketing footer strong,
.store-sidebar footer strong {
    color: var(--axen-orange);
}

.login-panel {
    display: grid;
    place-items: center;
    padding: clamp(24px, 5vw, 64px);
    border-radius: 0 var(--radius) var(--radius) 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 106, 0, 0.08), transparent 24%),
        rgba(7, 20, 38, 0.84);
}

.login-card {
    width: min(100%, 430px);
    padding: clamp(26px, 4vw, 44px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background: rgba(8, 16, 31, 0.72);
    backdrop-filter: blur(20px);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.login-emblem {
    margin: 0 auto 22px;
}

.login-card h2 {
    text-align: center;
    font-size: 25px;
}

.login-card > p {
    margin: 8px 0 28px;
    text-align: center;
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.field span {
    font-size: 13px;
    font-weight: 700;
    color: #e5edff;
}

.field input,
.field select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 6px;
    color: #fff;
    background: rgba(4, 10, 21, 0.72);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
    border-color: rgba(255, 106, 0, 0.76);
    box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.12);
}

.field select {
    appearance: none;
    padding-right: 42px;
    background-image:
        linear-gradient(45deg, transparent 50%, #94a3b8 50%),
        linear-gradient(135deg, #94a3b8 50%, transparent 50%);
    background-position:
        calc(100% - 20px) 21px,
        calc(100% - 15px) 21px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.field select option {
    color: #0f172a;
    background: #fff;
}

.primary-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.exercice-switcher {
    position: relative;
}

.exercice-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 13px;
    border: 1px solid #dbe4ef;
    border-radius: 7px;
    color: #1e3a8a;
    font-weight: 800;
    background: #eff6ff;
    cursor: pointer;
}

.exercice-dropdown {
    position: absolute;
    z-index: 80;
    top: calc(100% + 9px);
    right: 0;
    width: 260px;
    padding: 14px;
    border: 1px solid #dce4ee;
    border-radius: 8px;
    color: #0f172a;
    background: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.exercice-dropdown strong,
.exercice-dropdown small,
.exercice-dropdown em {
    display: block;
}

.exercice-dropdown small {
    margin: 5px 0 10px;
    color: #64748b;
}

.exercice-dropdown em {
    margin-bottom: 9px;
    color: #c2410c;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.exercice-dropdown a {
    display: block;
    padding: 9px 8px;
    border-top: 1px solid #edf1f6;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.exercice-dropdown a:hover {
    color: #2563eb;
    background: #f8fafc;
}

.read-only-banner {
    margin: -8px 0 18px;
    padding: 11px 14px;
    border: 1px solid #fed7aa;
    border-radius: 7px;
    color: #9a3412;
    font-size: 13px;
    font-weight: 800;
    background: #fff7ed;
}

.exercice-read-only .js-edit-sale,
.exercice-read-only .js-cancel-vendor-sale,
.exercice-read-only .js-cancel-sale,
.exercice-read-only [data-purchase-submit],
.exercice-read-only [data-purchase-reset],
.exercice-read-only .purchase-delete-btn,
.exercice-read-only [data-clear-products],
.exercice-read-only [data-new-supplier] {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

.purchase-subtitle {
    margin: 6px 0 0;
    color: #617089;
    font-size: 13px;
}

.purchase-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.purchase-submit-btn.compact {
    min-height: 40px;
    padding: 0 15px;
    border-radius: 7px;
}

.purchase-submit-btn.orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.purchase-history-page .kpi-strip,
.purchase-reception-page .purchase-reception-info {
    margin-bottom: 16px;
}

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

.purchase-reception-table td small {
    display: block;
    margin-top: 4px;
    color: #64748b;
}

.purchase-reception-table input.sale-cart-input {
    width: 110px;
    min-width: 92px;
}

.status-badge.received,
.status-badge.paid {
    background: #dcfce7;
    color: #15803d;
}

.status-badge.ordered,
.status-badge.info {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-badge.draft,
.status-badge.neutral {
    background: #eef2f7;
    color: #475569;
}

.status-badge.partial,
.status-badge.warning {
    background: #ffedd5;
    color: #c2410c;
}

.status-badge.cancelled,
.status-badge.unpaid,
.status-badge.danger {
    background: #fee2e2;
    color: #b91c1c;
}

.text-danger {
    color: #dc2626;
}

@media (max-width: 1100px) {
    .purchase-reception-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .purchase-header-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .purchase-reception-info {
        grid-template-columns: 1fr;
    }
}

.exercice-page {
    color: #0f172a;
}

.module-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.module-heading h1 {
    margin: 5px 0;
    font-size: 29px;
    letter-spacing: 0;
}

.module-heading > div > p:last-child {
    margin: 0;
    color: #64748b;
}

.module-breadcrumb {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.module-breadcrumb span {
    margin: 0 6px;
}

.exercice-primary-btn,
.exercice-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 17px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    cursor: pointer;
}

.exercice-secondary-btn {
    border: 1px solid #dbe4ef;
    color: #334155;
    background: #fff;
}

.module-alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 7px;
    font-weight: 700;
}

.module-alert.success {
    border: 1px solid #bbf7d0;
    color: #166534;
    background: #f0fdf4;
}

.module-alert.error {
    border: 1px solid #fecaca;
    color: #b91c1c;
    background: #fef2f2;
}

.exercice-table-card,
.exercice-create-card {
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.table-responsive {
    overflow-x: auto;
}

.exercice-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.exercice-table th {
    padding: 13px 12px;
    color: #fff;
    text-align: left;
    background: #0f172a;
}

.exercice-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #e8edf4;
}

.exercice-table code,
.exercice-warning code {
    color: #1d4ed8;
    font-weight: 800;
}

.exercice-status,
.default-badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.exercice-status.active,
.default-badge {
    color: #15803d;
    background: #dcfce7;
}

.exercice-status.closed {
    color: #c2410c;
    background: #ffedd5;
}

.exercice-status.archived {
    color: #475569;
    background: #e2e8f0;
}

.exercice-actions {
    display: flex;
    gap: 7px;
}

.exercice-actions button {
    padding: 7px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #1d4ed8;
    font-weight: 700;
    background: #eff6ff;
    cursor: pointer;
}

.exercice-actions button.danger {
    border-color: #fed7aa;
    color: #c2410c;
    background: #fff7ed;
}

.exercice-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.exercice-form-grid label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.exercice-form-grid label.wide {
    grid-column: 1 / -1;
}

.exercice-form-grid input,
.exercice-form-grid select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #dbe3ed;
    border-radius: 6px;
    outline: 0;
}

.exercice-form-grid input:focus,
.exercice-form-grid select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.exercice-copy-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    background: #eff6ff;
}

.exercice-copy-option strong,
.exercice-copy-option small {
    display: block;
}

.exercice-copy-option small {
    margin-top: 5px;
    color: #64748b;
    line-height: 1.5;
}

.exercice-warning {
    margin-bottom: 18px;
    padding: 13px;
    border-radius: 7px;
    color: #9a3412;
    background: #fff7ed;
}

.exercice-error-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 20px;
    background: #071426;
}

.exercice-error-page section {
    width: min(100%, 560px);
    padding: 38px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    text-align: center;
    background: #111827;
    box-shadow: var(--shadow-soft);
}

.exercice-error-page section > span {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 30px;
    font-weight: 900;
    background: linear-gradient(135deg, #f97316, #dc2626);
}

.exercice-error-page a {
    display: inline-flex;
    margin-top: 20px;
    padding: 11px 17px;
    border-radius: 7px;
    color: #fff;
    font-weight: 800;
    background: #2563eb;
}

@media (max-width: 760px) {
    .module-heading,
    .exercice-form-grid {
        grid-template-columns: 1fr;
    }

    .module-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .exercice-form-grid label.wide {
        grid-column: auto;
    }

    .exercice-switcher,
    .exercice-chip {
        width: 100%;
    }

    .exercice-dropdown {
        right: auto;
        left: 0;
        width: min(280px, 90vw);
    }
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 70px;
}

.ghost-icon {
    position: absolute;
    right: 10px;
    bottom: 8px;
    height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    color: #cbd5e1;
    background: transparent;
    cursor: pointer;
}

.form-row,
.social-row,
.topbar-actions,
.store-header-tools,
.welcome-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #dbe5f8;
    font-size: 13px;
}

.checkbox input {
    width: 15px;
    height: 15px;
    accent-color: var(--axen-orange);
}

.forgot-link {
    color: var(--axen-orange);
    font-size: 13px;
}

.primary-btn,
.logout-btn,
.help-banner button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, var(--axen-orange), var(--axen-orange-2));
    box-shadow: 0 14px 28px rgba(255, 106, 0, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn {
    width: 100%;
    margin-top: 22px;
}

.primary-btn:hover,
.logout-btn:hover,
.help-banner button:hover,
.arrow-btn:hover {
    transform: translateY(-2px);
}

.primary-btn.small {
    width: auto;
    min-height: 40px;
    margin: 0;
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 18px;
    color: var(--axen-muted);
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--axen-border);
}

.social-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    border: 1px solid var(--axen-border);
    border-radius: 6px;
    color: #e6eefc;
    background: rgba(255, 255, 255, 0.04);
}

.google-dot,
.microsoft-grid {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: conic-gradient(#4285f4, #34a853, #fbbc05, #ea4335, #4285f4);
}

.microsoft-grid {
    border-radius: 2px;
    background: conic-gradient(#7fba00 0 25%, #ffb900 0 50%, #00a4ef 0 75%, #f25022 0);
}

.secure-note {
    display: block;
    margin-top: 26px;
    text-align: center;
    color: var(--axen-muted);
}

.alert {
    margin-bottom: 20px;
    padding: 13px 14px;
    border-radius: 6px;
    font-size: 14px;
}

.alert-error {
    color: #fecaca;
    border: 1px solid rgba(248, 113, 113, 0.28);
    background: rgba(127, 29, 29, 0.24);
}

.alert.light {
    color: #9f1239;
    background: #fff1f2;
}

.store-body {
    min-height: 100vh;
    color: var(--axen-dark);
    background: linear-gradient(135deg, #071426 0 32%, #eef3fb 32% 100%);
}

.store-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 292px 1fr;
    padding: 24px;
}

.store-sidebar,
.app-sidebar {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 48px);
    padding: 28px 20px;
    border-radius: var(--radius) 0 0 var(--radius);
    color: #fff;
    background:
        linear-gradient(180deg, rgba(7, 20, 38, 0.95), rgba(10, 18, 32, 0.98)),
        radial-gradient(circle at 25% 92%, rgba(255, 106, 0, 0.16), transparent 22%);
}

.store-sidebar .brand {
    margin-bottom: 34px;
}

.store-sidebar-card {
    padding: 15px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius);
}

.store-sidebar-card.active {
    border-color: rgba(255, 106, 0, 0.35);
    background: linear-gradient(90deg, rgba(255, 106, 0, 0.16), transparent);
    box-shadow: inset -3px 0 0 var(--axen-orange);
}

.store-sidebar-card + .store-sidebar-card {
    margin-top: 10px;
}

.store-user-box {
    margin-top: auto;
    padding: 14px;
    border: 1px solid var(--axen-border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.05);
}

.logout-btn {
    min-height: 42px;
    margin: 12px 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    box-shadow: none;
}

.store-workspace {
    min-width: 0;
    min-height: calc(100vh - 48px);
    padding: clamp(24px, 4vw, 44px);
    border-radius: 0 var(--radius) var(--radius) 0;
    background:
        radial-gradient(circle at 75% 9%, rgba(37, 99, 235, 0.08), transparent 14%),
        #fff;
    box-shadow: var(--shadow-soft);
}

.store-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 26px;
    border-bottom: 1px solid #e7edf6;
}

.eyebrow {
    margin: 0 0 8px;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
}

.store-header h1 {
    color: #111827;
    font-size: clamp(30px, 4vw, 46px);
}

.time-card,
.time-chip,
.notification-btn,
.user-pill {
    border: 1px solid #e5edf8;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.time-card {
    min-width: 126px;
    padding: 12px 14px;
}

.time-card span {
    display: block;
    color: #0f172a;
    font-weight: 900;
}

.time-card small {
    color: #718096;
}

.notification-btn {
    width: 44px;
    height: 44px;
    color: #1d4ed8;
    font-weight: 900;
}

.stores-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    gap: 22px;
    margin: 28px 0;
}

.store-card {
    position: relative;
    overflow: hidden;
    min-height: 250px;
    border: 1px solid #e5edf8;
    border-radius: var(--radius);
    text-align: center;
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.store-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 106, 0, 0.38);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.store-cover {
    position: relative;
    overflow: hidden;
    height: 96px;
    background: linear-gradient(135deg, #111827, #1d4ed8);
}

.store-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(15, 23, 42, 0.46)),
        linear-gradient(90deg, rgba(255, 122, 0, 0.2), transparent 42%);
    pointer-events: none;
}

.store-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.01);
}

.store-cover.external-cover img {
    filter: saturate(1.05) contrast(1.04);
}

.store-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: -27px auto 12px;
    border: 5px solid #fff;
    border-radius: 50%;
    color: var(--axen-orange);
    font-weight: 900;
    background: #fff7ed;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.store-card h2 {
    margin: 0;
    padding: 0 16px;
    color: #0f172a;
    font-size: 18px;
}

.store-card p {
    margin: 6px 0;
    color: #64748b;
    font-size: 13px;
}

.location-dot {
    display: block;
    min-height: 38px;
    padding: 0 18px;
    color: #475569;
    font-size: 12px;
}

.arrow-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin: 8px auto 18px;
    border-radius: 50%;
    color: var(--axen-orange);
    border: 1px solid #fed7aa;
    background: #fff7ed;
    transition: transform 0.2s ease;
}

.store-enter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 132px;
    min-height: 44px;
    margin: 10px auto 22px;
    padding: 0 22px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 0;
    text-decoration: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 34%),
        linear-gradient(135deg, #ff8a00, #ff4d00);
    box-shadow: 0 16px 30px rgba(255, 106, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.34);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.store-enter-btn::after {
    content: "\2192";
    font-size: 15px;
    line-height: 1;
    transform: translateY(-1px);
}

.store-enter-btn:hover,
.store-enter-btn:focus-visible {
    color: #fff;
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 22px 40px rgba(255, 106, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.store-enter-btn:focus-visible {
    outline: 3px solid rgba(255, 138, 0, 0.28);
    outline-offset: 3px;
}

.import-customers-page {
    display: grid;
    gap: 22px;
}

.import-hero,
.import-card {
    border: 1px solid #e5edf8;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.08);
}

.import-hero {
    padding: 28px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 138, 0, 0.12), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 58%, #eef5ff 100%);
}

.import-hero-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.2fr) minmax(320px, 1fr);
    gap: 24px;
    align-items: end;
}

.import-eyebrow {
    margin: 14px 0 8px;
    color: #ff7a00;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.import-hero h1 {
    margin: 0;
    color: #07152d;
    font-size: clamp(30px, 4vw, 48px);
    letter-spacing: 0;
}

.import-hero p {
    margin: 10px 0 0;
    color: #64748b;
}

.import-stat-grid,
.import-result-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.import-stat-grid article,
.import-result-grid article {
    padding: 16px;
    border: 1px solid #e5edf8;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
}

.import-stat-grid span,
.import-result-grid span {
    display: block;
    color: #07152d;
    font-size: 22px;
    font-weight: 950;
}

.import-stat-grid small,
.import-result-grid small {
    color: #64748b;
    font-weight: 800;
}

.import-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .75fr);
    gap: 22px;
}

.import-card {
    padding: 24px;
}

.import-card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.import-card-title div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
}

.import-card-title span:first-child {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #ff8a00, #ff4d00);
    font-size: 12px;
    font-weight: 950;
}

.import-card-title h2 {
    margin: 0;
    color: #0f172a;
    font-size: 20px;
}

.import-table-scroll {
    overflow-x: auto;
}

.import-structure-table,
.import-preview-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.import-structure-table th,
.import-structure-table td,
.import-preview-table th,
.import-preview-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: top;
}

.import-structure-table th,
.import-preview-table th {
    color: #475569;
    background: #f8fafc;
    font-size: 12px;
    text-transform: uppercase;
}

.import-structure-table code,
.import-example code {
    color: #0f172a;
    font-weight: 900;
}

.import-example {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    color: #475569;
    background: #f8fafc;
}

.import-dropzone {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 160px;
    padding: 22px;
    border: 2px dashed #cbd5e1;
    border-radius: 22px;
    background: linear-gradient(135deg, #f8fafc, #fff7ed);
    text-align: center;
    cursor: pointer;
}

.import-dropzone input {
    max-width: 260px;
}

.import-dropzone span {
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
}

.import-dropzone small,
.import-muted,
.import-preview-table small {
    display: block;
    color: #64748b;
    font-size: 12px;
}

.import-options {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.import-options label:not(.import-check) {
    display: grid;
    gap: 6px;
}

.import-options span {
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.import-options small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.import-options select {
    min-height: 42px;
    border: 1px solid #dbe6f3;
    border-radius: 12px;
    padding: 0 12px;
    background: #fff;
}

.import-check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-weight: 800;
}

.import-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}

.import-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    font-weight: 950;
    text-decoration: none;
}

.import-button.primary {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #ff8a00, #ff4d00);
    box-shadow: 0 16px 30px rgba(255, 106, 0, .26);
}

.import-button.ghost {
    border: 1px solid #fed7aa;
    color: #c2410c;
    background: #fff7ed;
}

.import-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.import-alert {
    padding: 14px 18px;
    border-radius: 16px;
    font-weight: 900;
}

.import-alert.error {
    color: #991b1b;
    background: #fee2e2;
}

.import-alert.success {
    color: #166534;
    background: #dcfce7;
}

.import-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 950;
}

.import-badge.valid,
.import-badge.success,
.import-result-grid .success {
    color: #166534;
    background: #dcfce7;
}

.import-badge.warning,
.import-result-grid .warning {
    color: #92400e;
    background: #fef3c7;
}

.import-badge.error,
.import-result-grid .error {
    color: #991b1b;
    background: #fee2e2;
}

.import-badge.muted {
    color: #475569;
    background: #f1f5f9;
}

.import-mini-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.import-mini-stats span {
    padding: 8px 10px;
    border-radius: 999px;
    color: #334155;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 900;
}

.import-result-grid {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    margin-bottom: 18px;
}

@media (max-width: 1080px) {
    .import-hero-grid,
    .import-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .import-stat-grid,
    .import-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .import-card-title {
        align-items: flex-start;
        flex-direction: column;
    }
}

.help-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 24px;
    border-radius: var(--radius);
    color: #fff;
    background: linear-gradient(135deg, #172554, #0f172a);
}

.help-banner button {
    min-height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    box-shadow: none;
}

.empty-state {
    margin: 28px 0;
    padding: 36px;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
    color: #334155;
    text-align: center;
}

.app-body {
    color: #0f172a;
    background: var(--axen-light);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 282px 1fr;
}

.app-sidebar {
    min-height: 100vh;
    border-radius: 0;
    padding: 22px 14px;
    background:
        linear-gradient(180deg, #111f24 0%, #0b151b 48%, #071014 100%),
        var(--axen-dark);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
}

.app-brand {
    margin: 0 8px 22px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;
    padding: 0 4px 18px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 106, 0, 0.42) rgba(255, 255, 255, 0.06);
}

.nav-link,
.nav-sublink {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 38px;
    padding: 0 11px;
    border-radius: 4px;
    color: #bed0d5;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nav-label {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
}

.nav-label span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: #68d5ca;
    font-size: 13px;
    filter: saturate(0.85);
}

.nav-link:hover,
.nav-link.active,
.nav-accordion.open > .nav-toggle {
    color: #fff;
    background: rgba(104, 211, 202, 0.1);
}

.nav-link.active,
.nav-accordion.open > .nav-toggle {
    box-shadow: inset 3px 0 0 var(--axen-orange);
}

.nav-accordion.open > .nav-toggle .nav-icon,
.nav-link.active .nav-icon {
    color: var(--axen-orange);
}

.nav-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.chevron {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: #d7e7ea;
    font-size: 22px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.22s ease, color 0.2s ease;
}

.nav-accordion.open .chevron {
    color: var(--axen-orange);
    transform: rotate(90deg);
}

.nav-submenu {
    display: grid;
    max-height: 0;
    overflow: hidden;
    margin-left: 18px;
    border-left: 1px solid rgba(104, 211, 202, 0.22);
    transition: max-height 0.24s ease;
}

.nav-sublink {
    position: relative;
    min-height: 31px;
    justify-content: flex-start;
    padding: 0 12px 0 18px;
    color: #91aeb4;
    font-size: 12px;
    font-weight: 650;
    background: transparent;
}

.nav-sublink::before {
    content: "";
    position: absolute;
    left: 0;
    width: 9px;
    height: 1px;
    background: rgba(104, 211, 202, 0.36);
}

.nav-sublink:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.app-main {
    min-width: 0;
    padding: 28px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}

.topbar h1 {
    color: #0f172a;
    font-size: 34px;
}

.time-chip,
.user-pill {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    color: #0f172a;
    font-weight: 800;
}

.user-pill .avatar {
    width: 30px;
    height: 30px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, var(--axen-orange));
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    gap: 18px;
}

.welcome-card,
.metric-card {
    padding: 24px;
    border: 1px solid #e5edf8;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-card);
}

.welcome-card {
    grid-column: 1 / -1;
    min-height: 190px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.68)),
        radial-gradient(circle at 88% 20%, rgba(255, 106, 0, 0.32), transparent 25%),
        #111827;
}

.welcome-card .eyebrow {
    color: #fed7aa;
}

.welcome-card h2 {
    font-size: clamp(30px, 4vw, 48px);
}

.welcome-actions {
    justify-content: flex-start;
    margin-top: 24px;
}

.metric-card span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.metric-card strong {
    display: block;
    margin-top: 8px;
    color: #0f172a;
    font-size: 26px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    margin: -28px -28px 24px;
    padding: 14px 28px;
    border-bottom: 1px solid #e7edf6;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
}

.top-search {
    position: relative;
    display: flex;
    align-items: center;
    width: min(520px, 100%);
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    color: #64748b;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.top-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 10px;
    color: #0f172a;
    background: transparent;
}

.top-search kbd {
    padding: 4px 8px;
    border-radius: 5px;
    color: #475569;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 800;
}

.top-store-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    max-width: 220px;
    padding: 0 12px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    color: #1d4ed8;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.09);
}

.top-store-chip span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.top-store-chip strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-store-chip:hover {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.top-icon-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 8px;
    color: #0f172a;
    background: transparent;
    cursor: pointer;
}

.top-icon-btn:hover {
    background: #f1f5f9;
}

.top-icon-btn span {
    position: absolute;
    top: 1px;
    right: 0;
    display: grid;
    place-items: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    color: #fff;
    background: #ef4444;
    font-size: 10px;
    font-weight: 900;
}

.time-chip {
    min-width: 126px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
}

.time-chip strong {
    color: #0f172a;
    font-size: 14px;
}

.time-chip small {
    color: #64748b;
    font-size: 11px;
}

.nav-sublink.active {
    color: #fff;
    background: rgba(255, 106, 0, 0.11);
}

.nav-sublink.active::before {
    background: var(--axen-orange);
}

.sidebar-store {
    margin-top: auto;
    padding: 13px 12px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-store span {
    display: block;
    color: #91aeb4;
    font-size: 11px;
}

.sidebar-store strong {
    display: block;
    margin-top: 4px;
    color: #fff;
    font-size: 13px;
}

.sales-page {
    display: grid;
    gap: 18px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
}

.page-heading h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: 0;
}

.title-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff3d8;
    font-size: 20px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 10px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a {
    color: #475569;
}

.breadcrumb strong {
    color: #0f172a;
}

.filter-card,
.kpi-strip,
.table-card,
.placeholder-card {
    border: 1px solid #e5edf8;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.filter-card {
    display: grid;
    grid-template-columns: 1.05fr 1.05fr 0.95fr 0.95fr auto;
    align-items: end;
    gap: 16px;
    padding: 22px;
}

.filter-card label {
    display: grid;
    gap: 8px;
}

.filter-card label span {
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
}

.filter-card select,
.filter-card input[type="date"] {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid #d8e2ef;
    border-radius: 6px;
    color: #0f172a;
    background: #fff;
    outline: 0;
}

.filter-card select:focus,
.filter-card input[type="date"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 6px;
    font-weight: 900;
    cursor: pointer;
}

.filter-btn.primary {
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.22);
}

.filter-btn.neutral {
    color: #334155;
    background: #eef2f7;
}

.filter-btn.pdf {
    color: #fff;
    background: linear-gradient(135deg, #6d28d9, #4c1d95);
    box-shadow: 0 12px 24px rgba(91, 33, 182, 0.2);
}

.kpi-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    overflow: hidden;
}

.kpi-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
}

.kpi-card + .kpi-card {
    border-left: 1px solid #e7edf6;
}

.kpi-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-weight: 900;
}

.kpi-card.blue .kpi-icon {
    color: #2563eb;
    background: #dbeafe;
}

.kpi-card.green .kpi-icon {
    color: #059669;
    background: #d1fae5;
}

.kpi-card.orange .kpi-icon {
    color: #d97706;
    background: #fef3c7;
}

.kpi-card.red .kpi-icon {
    color: #dc2626;
    background: #fee2e2;
}

.kpi-card.purple .kpi-icon {
    color: #7c3aed;
    background: #ede9fe;
}

.kpi-card p {
    margin: 0 0 5px;
    color: #475569;
    font-size: 13px;
}

.kpi-card strong {
    display: block;
    color: #0f172a;
    font-size: 22px;
}

.kpi-card small {
    color: #64748b;
    font-size: 12px;
}

.table-card {
    overflow: hidden;
}

.table-scroll {
    overflow-x: auto;
}

.premium-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
}

.premium-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    height: 54px;
    padding: 0 18px;
    color: #fff;
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    background: linear-gradient(180deg, #101f3e, #071426);
}

.premium-table tbody td {
    height: 62px;
    padding: 0 18px;
    border-bottom: 1px solid #e9eef6;
    color: #0f172a;
    font-size: 14px;
    background: #fff;
}

.premium-table tbody tr:hover td {
    background: #f8fbff;
}

.order-number {
    color: #020617;
}

.axen-checkbox {
    width: 17px;
    height: 17px;
    border-radius: 5px;
    accent-color: #2563eb;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 82px;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.status-badge.unpaid {
    color: #b91c1c;
    background: #fee2e2;
}

.status-badge.paid {
    color: #047857;
    background: #d1fae5;
}

.status-badge.partial {
    color: #c2410c;
    background: #ffedd5;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 36px;
    overflow: hidden;
    border-radius: 6px;
    color: transparent;
    font-size: 0;
    font-weight: 900;
}

.action-btn::before {
    color: #fff;
    font-size: 15px;
}

.action-btn.view {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.action-btn.view::before {
    content: "◉";
}

.action-btn.edit {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.action-btn.edit::before {
    content: "✎";
}

.empty-row {
    text-align: center;
    color: #64748b;
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
}

.table-footer p {
    margin: 0;
    color: #334155;
    font-size: 14px;
}

.pagination-tools,
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-tools select {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid #d8e2ef;
    border-radius: 6px;
    background: #fff;
}

.pagination a {
    display: grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    border: 1px solid #d8e2ef;
    border-radius: 6px;
    color: #334155;
    background: #fff;
    font-weight: 800;
}

.pagination a.active {
    color: #fff;
    border-color: #2563eb;
    background: #2563eb;
}

.pagination a.disabled {
    color: #cbd5e1;
    pointer-events: none;
}

.sales-log-page {
    display: grid;
    gap: 18px;
}

.log-heading {
    margin-bottom: 2px;
}

.log-filter-card,
.log-kpi-card,
.log-table-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.log-filter-card {
    display: grid;
    gap: 18px;
    padding: 22px;
}

.log-filter-grid {
    display: grid;
    grid-template-columns: 140px minmax(260px, 1.35fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr) minmax(210px, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.log-filter-grid label {
    display: grid;
    gap: 8px;
}

.log-filter-grid label > span {
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
}

.log-filter-grid input,
.log-filter-grid select {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #d8e2ef;
    border-radius: 7px;
    color: #0f172a;
    background: #fff;
    outline: 0;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.log-filter-grid input:focus,
.log-filter-grid select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.log-search-field div {
    position: relative;
}

.log-search-field input {
    padding-right: 42px;
}

.log-search-field b {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 18px;
}

.log-filter-actions,
.log-export-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.log-filter-actions {
    justify-content: flex-end;
}

.log-export-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.log-export-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 15px;
    border: 0;
    border-radius: 7px;
    color: #0f172a;
    background: #f1f5f9;
    cursor: pointer;
    font-size: 13px;
    font-weight: 900;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.log-export-actions button::before {
    margin-right: 8px;
    font-size: 15px;
}

.log-export-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.log-export-actions button::before { content: "⎙"; }
.log-export-actions .copy { color: #5b21b6; background: #f3e8ff; }
.log-export-actions .copy::before { content: "⧉"; }
.log-export-actions .excel { color: #15803d; background: #dcfce7; }
.log-export-actions .excel::before { content: "▣"; }
.log-export-actions .csv { color: #c2410c; background: #ffedd5; }
.log-export-actions .csv::before { content: "□"; }
.log-export-actions .pdf { color: #dc2626; background: #fee2e2; }
.log-export-actions .pdf::before { content: "▧"; }
.log-export-actions .email { color: #2563eb; background: #dbeafe; }
.log-export-actions .email::before { content: "✉"; }

.log-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 18px;
}

.log-kpi-card {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 124px;
    padding: 22px;
}

.log-kpi-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-size: 21px;
    font-weight: 900;
}

.log-kpi-card.blue .log-kpi-icon {
    color: #2563eb;
    background: #dbeafe;
}

.log-kpi-card.green .log-kpi-icon {
    color: #059669;
    background: #d1fae5;
}

.log-kpi-card.orange .log-kpi-icon {
    color: #f97316;
    background: #ffedd5;
}

.log-kpi-card.purple .log-kpi-icon {
    color: #7c3aed;
    background: #ede9fe;
}

.log-kpi-card p {
    margin: 0 0 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.log-kpi-card strong {
    display: block;
    color: #0f172a;
    font-size: clamp(22px, 2vw, 28px);
    line-height: 1.1;
}

.log-kpi-card small {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
}

.log-kpi-card small b {
    color: #16a34a;
}

.log-table-card {
    overflow: hidden;
}

.log-table {
    min-width: 1180px;
}

.log-table thead th {
    height: 50px;
    background: linear-gradient(180deg, #0b1f4d, #061338);
}

.log-table tbody td {
    height: 54px;
}

.log-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
}

.log-sort-link.right {
    justify-content: flex-end;
    width: 100%;
}

.log-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 12px;
    border-radius: 999px;
    color: #ea580c;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 900;
}

.text-right {
    text-align: right;
}

.log-table-footer {
    border-top: 1px solid #e9eef6;
}

.pagination-ellipsis {
    display: grid;
    place-items: center;
    min-width: 28px;
    height: 38px;
    color: #64748b;
    font-weight: 900;
}

.placeholder-card {
    padding: 30px;
}

.placeholder-card h2 {
    margin: 0 0 10px;
    color: #0f172a;
}

.placeholder-card p {
    color: #475569;
}

.vendor-sales-page {
    display: grid;
    gap: 22px;
}

.vendor-sales-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.vendor-sales-heading h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(24px, 2.6vw, 34px);
}

.vendor-sales-heading h1 span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-left: 8px;
    padding: 0 14px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    font-size: 15px;
}

.vendor-sales-heading p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.vendor-switcher {
    display: grid;
    gap: 6px;
    min-width: 210px;
}

.vendor-switcher span {
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.vendor-switcher select {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    color: #0f172a;
    background: #fff;
}

.vendor-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    gap: 18px;
}

.vendor-kpi-card,
.vendor-day-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.vendor-kpi-card {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 112px;
    padding: 20px;
}

.vendor-kpi-card > span {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 900;
}

.vendor-kpi-card.blue > span { color: #2563eb; background: #dbeafe; }
.vendor-kpi-card.green > span { color: #059669; background: #d1fae5; }
.vendor-kpi-card.orange > span { color: #f97316; background: #ffedd5; }
.vendor-kpi-card.purple > span { color: #7c3aed; background: #ede9fe; }
.vendor-kpi-card.cyan > span { color: #0891b2; background: #cffafe; }

.vendor-kpi-card p {
    margin: 0 0 5px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.vendor-kpi-card strong {
    display: block;
    color: #0f172a;
    font-size: 22px;
}

.vendor-kpi-card small {
    display: block;
    margin-top: 6px;
    color: #059669;
    font-size: 12px;
    font-weight: 800;
}

.vendor-days {
    display: grid;
    gap: 22px;
}

.vendor-day-card {
    overflow: hidden;
}

.vendor-day-header,
.vendor-day-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
}

.vendor-day-header h2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #0f172a;
    font-size: 20px;
}

.vendor-day-header span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    margin-left: 10px;
    padding: 0 10px;
    border-radius: 6px;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    font-size: 12px;
    font-weight: 900;
}

.vendor-day-title {
    min-width: 170px;
}

.vendor-day-qr {
    display: grid;
    grid-template-columns: 96px minmax(220px, 1fr);
    align-items: center;
    gap: 14px;
    max-width: 560px;
    padding: 12px;
    border: 1px solid #dbe7f5;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.vendor-day-qr__image {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.vendor-day-qr__image img {
    width: 82px;
    height: 82px;
    object-fit: contain;
    image-rendering: pixelated;
}

.vendor-day-qr__placeholder {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 8px;
    color: #0f2f66;
    background: #eef4fb;
    font-size: 18px;
    font-weight: 950;
}

.vendor-day-qr__meta {
    min-width: 0;
}

.vendor-day-qr__meta small {
    display: block;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.vendor-day-qr__meta strong {
    display: block;
    margin-top: 3px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
}

.vendor-day-qr__meta code {
    display: block;
    max-width: 100%;
    margin-top: 5px;
    padding: 5px 7px;
    overflow: hidden;
    border-radius: 7px;
    color: #334155;
    background: #eef4fb;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vendor-day-qr__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.vendor-day-qr__actions a,
.vendor-day-qr__actions button {
    min-height: 28px;
    padding: 0 9px;
    border: 0;
    border-radius: 7px;
    color: #ffffff;
    background: #0f2f66;
    cursor: pointer;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
}

.vendor-day-qr__actions button {
    background: #f97316;
}

.vendor-day-bl-menu {
    position: relative;
    z-index: 5;
}

.vendor-day-bl-menu summary {
    list-style: none;
}

.vendor-day-bl-menu summary::-webkit-details-marker {
    display: none;
}

.vendor-day-bl-menu[open] .vendor-day-bl-list {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 20;
    width: min(540px, 72vw);
}

.vendor-day-bl-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    width: min(540px, 100%);
    max-height: 174px;
    overflow-y: auto;
    padding: 2px 4px 2px 2px;
}

.vendor-day-bl-card {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #dbe7f5;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.vendor-day-bl-card__body {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.vendor-day-bl-card__body strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 950;
}

.vendor-day-header .vendor-day-bl-card__body span {
    display: block;
    min-height: 0;
    margin-left: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 0;
    color: #475569;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vendor-day-bl-card__body small {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.vendor-day-bl-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.vendor-day-bl-card__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border-radius: 7px;
    color: #ffffff;
    background: #0f2f66;
    font-size: 11px;
    font-weight: 950;
    text-decoration: none;
}

.vendor-day-bl-card__actions a:first-child {
    background: #f97316;
}

.vendor-day-header > .vendor-download-btn {
    display: none;
}

.vendor-download-btn,
.vendor-products-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.vendor-download-btn {
    padding: 0 16px;
    color: #0f172a;
    background: #f1f5f9;
}

.vendor-download-btn::before {
    content: "⇩";
    margin-right: 8px;
}

.vendor-products-btn {
    padding: 0 18px;
    color: #fff;
    background: linear-gradient(135deg, #102044, #071426);
}

.vendor-products-btn::before {
    content: "▣";
    margin-right: 8px;
}

.vendor-download-btn:hover,
.vendor-products-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.vendor-sales-table {
    min-width: 1320px;
}

.vendor-sales-table thead th {
    height: 48px;
    background: linear-gradient(180deg, #0b1f4d, #061338);
}

.vendor-sales-table tbody td {
    height: 48px;
}

.vendor-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.vendor-status.active {
    color: #047857;
    background: #d1fae5;
}

.vendor-status.pending {
    color: #b91c1c;
    background: #fee2e2;
}

.vendor-status.pending-wh {
    color: #c2410c;
    background: #ffedd5;
}

.vendor-status.wh-validated {
    color: #fff;
    background: #0f2f66;
}

.vendor-status.on-delivery {
    color: #fff;
    background: #2563eb;
}

.vendor-status.delivered {
    color: #fff;
    background: #065f46;
}

.vendor-status.returned {
    color: #fff;
    background: #7c3aed;
}

.vendor-status.undelivered {
    color: #fff;
    background: #7f1d1d;
}

.vendor-status.canceled {
    color: #334155;
    background: #e2e8f0;
}

.vendor-order-actions {
    flex-wrap: wrap;
    min-width: 230px;
}

.vendor-mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 36px;
    padding: 0 9px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
}

.vendor-mini-btn.cancel {
    color: #713f12;
    background: #fef3c7;
}

.vendor-mini-btn.bl {
    background: linear-gradient(135deg, #06b6d4, #0284c7);
}

.vendor-delete-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 36px;
    overflow: hidden;
    border: 0;
    border-radius: 6px;
    color: transparent;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    cursor: pointer;
    font-size: 0;
    font-weight: 900;
}

.vendor-delete-btn::before {
    content: "×";
    color: #fff;
    font-size: 22px;
    line-height: 1;
}

.vendor-day-footer {
    border-top: 1px solid #e9eef6;
}

.vendor-day-footer p {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
}

.ca-danger {
    color: #dc2626;
    font-weight: 800;
}

.ca-success {
    color: #16a34a;
    font-weight: 800;
}

.vendor-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.vendor-pagination a {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #ffffff;
    color: #334155;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.vendor-pagination a.active,
.vendor-pagination a:hover {
    border-color: #f97316;
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #ffffff;
}

.day-products-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}

.day-products-table th {
    height: 44px;
    padding: 0 14px;
    color: #fff;
    text-align: left;
    background: #0b1f4d;
}

.day-products-table td {
    height: 48px;
    padding: 0 14px;
    border-bottom: 1px solid #e5edf8;
    color: #0f172a;
}

.day-products-table td:last-child {
    font-weight: 900;
}

.vendor-qr-print-body {
    min-height: 100vh;
    margin: 0;
    background: #eef3f8;
    color: #0f172a;
    font-family: Inter, Arial, sans-serif;
}

.vendor-qr-print-sheet {
    width: min(920px, calc(100% - 32px));
    margin: 24px auto;
    padding: 24px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
}

.vendor-qr-print-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.vendor-qr-print-header button {
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 9px;
    color: #fff;
    background: #0f2f66;
    cursor: pointer;
    font-weight: 900;
}

.vendor-qr-print-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px;
    border: 1px solid #dbe7f5;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.vendor-qr-print-main p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.vendor-qr-print-main h1 {
    margin: 4px 0 14px;
    font-size: 30px;
}

.vendor-qr-print-main dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

.vendor-qr-print-main dt {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.vendor-qr-print-main dd {
    margin: 2px 0 0;
    font-weight: 900;
}

.vendor-qr-print-main code {
    display: block;
    max-width: 100%;
    padding: 8px 10px;
    overflow: hidden;
    border-radius: 8px;
    color: #334155;
    background: #eef4fb;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vendor-qr-print-main figure {
    margin: 0;
    text-align: center;
}

.vendor-qr-print-main figure img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    image-rendering: pixelated;
}

.vendor-qr-print-main figcaption {
    max-width: 260px;
    margin-top: 8px;
    color: #64748b;
    font-size: 11px;
    word-break: break-word;
}

.vendor-qr-print-orders {
    margin-top: 22px;
}

.vendor-qr-print-orders h2 {
    font-size: 18px;
}

.vendor-qr-print-orders table {
    width: 100%;
    border-collapse: collapse;
}

.vendor-qr-print-orders th,
.vendor-qr-print-orders td {
    padding: 10px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    font-size: 13px;
}

.vendor-qr-print-orders th {
    color: #fff;
    background: #0b1f4d;
}

@media print {
    .vendor-qr-print-body {
        background: #fff;
    }

    .vendor-qr-print-sheet {
        width: auto;
        margin: 0;
        box-shadow: none;
        border-radius: 0;
    }

    .vendor-qr-print-header button {
        display: none;
    }
}

.products-day-page {
    display: grid;
    gap: 20px;
}

.products-day-info,
.products-day-table-card,
.unit-recap-card,
.general-total-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.products-day-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
}

.products-info-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.products-info-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    color: #0f172a;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 800;
}

.products-info-chips strong {
    margin-right: 6px;
}

.products-info-chips .orders-chip {
    color: #1d4ed8;
    background: #dbeafe;
}

.products-print-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    color: #0f172a;
    background: #fff;
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.products-print-btn::before {
    content: "⎙";
    margin-right: 8px;
}

.products-print-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

.products-day-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: stretch;
}

.products-day-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 18px;
}

.products-day-charge-card {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 14px;
    align-items: stretch;
    padding: 18px;
    border: 1px solid #dbe7f5;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff, #f7fbff);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.products-day-charge-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.products-day-charge-card__header small {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.products-day-charge-card__header h2 {
    margin: 3px 0 0;
    color: #0f172a;
    font-size: 20px;
    font-weight: 950;
}

.products-day-charge-card__header span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #0f2f66;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 900;
}

.products-day-charge-card__body {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
    justify-items: center;
    gap: 12px;
    text-align: center;
}

.products-day-charge-card__body img,
.products-day-charge-card__placeholder {
    width: 126px;
    height: 126px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

.products-day-charge-card__body img {
    object-fit: contain;
    image-rendering: pixelated;
}

.products-day-charge-card__placeholder {
    display: grid;
    place-items: center;
    color: #0f2f66;
    background: #eef4fb;
    font-size: 24px;
    font-weight: 950;
}

.products-day-charge-card__body strong {
    display: block;
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
}

.products-day-charge-card__body code {
    display: block;
    width: 100%;
    max-width: 270px;
    margin-top: 7px;
    padding: 8px 10px;
    overflow: hidden;
    border-radius: 8px;
    color: #334155;
    background: #eef4fb;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.products-day-charge-card__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.products-day-charge-card__actions a,
.products-day-charge-card__actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: #0f2f66;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.products-day-charge-card__actions button {
    background: #f97316;
}

.products-day-charge-toast {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 9999;
    padding: 12px 16px;
    border-radius: 10px;
    color: #ffffff;
    background: #0f2f66;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.24);
    font-size: 13px;
    font-weight: 900;
}

.products-day-kpi {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 112px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.products-day-kpi > span {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    font-size: 20px;
    font-weight: 900;
}

.products-day-kpi.blue > span { color: #2563eb; background: #dbeafe; }
.products-day-kpi.green > span { color: #059669; background: #d1fae5; }
.products-day-kpi.purple > span { color: #7c3aed; background: #ede9fe; }
.products-day-kpi.orange > span { color: #f97316; background: #ffedd5; }

.products-day-kpi p {
    margin: 0 0 5px;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.products-day-kpi strong {
    color: #0f172a;
    font-size: 22px;
}

.products-day-kpi small {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.products-day-table-card {
    overflow: hidden;
}

.products-day-table {
    min-width: 1120px;
}

.products-day-table thead th {
    height: 48px;
    background: linear-gradient(180deg, #0b1f4d, #061338);
}

.products-day-table tbody td {
    height: 50px;
}

.product-name-cell {
    max-width: 560px;
    direction: auto;
    unicode-bidi: plaintext;
    line-height: 1.45;
}

.products-day-footer {
    border-top: 1px solid #e9eef6;
}

.products-day-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.38fr);
    gap: 18px;
    align-items: stretch;
}

.unit-recap-card,
.general-total-card {
    padding: 20px;
}

.unit-recap-card h2,
.general-total-card h2 {
    margin: 0 0 16px;
    color: #0f172a;
    font-size: 16px;
}

.unit-recap-card > div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.unit-recap-card span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #334155;
    background: #fff;
    font-weight: 800;
}

.unit-recap-card span b {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #2563eb;
}

.unit-recap-card span:nth-child(2n) b { background: #10b981; }
.unit-recap-card span:nth-child(3n) b { background: #f59e0b; }
.unit-recap-card span:nth-child(4n) b { background: #8b5cf6; }

.general-total-card h2 {
    text-align: right;
}

.general-total-card > div {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border: 1px solid #e9eef6;
    border-radius: 8px;
    overflow: hidden;
}

.general-total-card p {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 20px;
    text-align: center;
}

.general-total-card p + p {
    border-left: 1px solid #e9eef6;
}

.general-total-card span {
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.general-total-card strong {
    color: #16a34a;
    font-size: 20px;
}

.general-total-card p:last-child strong {
    color: #dc2626;
}

.vendor-products-print {
    min-height: 100vh;
    margin: 0;
    color: #000;
    background: #fff;
    font-family: Arial, "Segoe UI", Tahoma, sans-serif;
}

.print-sheet {
    width: min(190mm, calc(100% - 32px));
    margin: 18px auto;
    color: #000;
    background: #fff;
}

.print-document-header {
    margin-bottom: 12px;
}

.print-document-header h1 {
    margin: 0 0 5px;
    font-size: 22px;
    letter-spacing: 0;
}

.print-document-header p {
    margin: 0 0 10px;
    font-size: 10px;
}

.print-document-header h2 {
    margin: 0;
    font-size: 15px;
}

.print-table-wrap {
    overflow: visible;
}

.print-products-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 9px;
}

.print-products-table th,
.print-products-table td {
    padding: 4px 6px;
    border: 1px solid #333;
    color: #000;
    vertical-align: middle;
    background: #fff;
}

.print-products-table th {
    font-weight: 800;
    text-align: left;
}

.print-products-table th:nth-child(1),
.print-products-table td:nth-child(1) {
    width: 11%;
}

.print-products-table th:nth-child(2),
.print-products-table td:nth-child(2) {
    width: 48%;
}

.print-products-table th:nth-child(3),
.print-products-table td:nth-child(3) {
    width: 10%;
    text-align: center;
}

.print-products-table th:nth-child(4),
.print-products-table td:nth-child(4) {
    width: 12%;
}

.print-products-table th:nth-child(5),
.print-products-table td:nth-child(5) {
    width: 7%;
}

.print-products-table th:nth-child(6),
.print-products-table td:nth-child(6) {
    width: 12%;
}

.print-products-table tfoot th {
    font-weight: 900;
}

.print-product-name {
    direction: auto;
    unicode-bidi: plaintext;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.number-cell {
    text-align: right !important;
    white-space: nowrap;
}

.print-unit-recap {
    margin-top: 18px;
    font-size: 10px;
}

.print-unit-recap h2 {
    margin: 0 0 6px;
    font-size: 12px;
}

.print-unit-recap p {
    margin: 2px 0;
}

.print-fallback-button {
    min-height: 38px;
    margin-top: 18px;
    padding: 0 18px;
    border: 1px solid #111;
    color: #000;
    background: #fff;
    cursor: pointer;
    font-weight: 800;
}

@page {
    size: A4 portrait;
    margin: 10mm;
}

@media print {
    .vendor-products-print {
        min-height: auto;
    }

    .print-sheet {
        width: 100%;
        margin: 0;
    }

    .print-fallback-button {
        display: none !important;
    }

    .print-products-table thead {
        display: table-header-group;
    }

    .print-products-table tfoot {
        display: table-row-group;
    }

    .print-products-table tr,
    .print-unit-recap {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

.bl-center-page {
    display: grid;
    gap: 20px;
}

.bl-center-summary,
.bl-kpi,
.bl-preview-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.bl-center-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    padding: 22px;
}

.bl-center-summary__info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.bl-center-summary__info > span {
    display: grid;
    gap: 5px;
    min-width: 128px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f8fafc;
}

.bl-center-summary__info small {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.bl-center-summary__info strong {
    color: #0f172a;
    font-size: 15px;
}

.bl-center-summary__info > b {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    color: #047857;
    background: #d1fae5;
    font-size: 12px;
}

.bl-center-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 10px;
    align-content: start;
}

.bl-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #d8e2ef;
    border-radius: 8px;
    color: #0f172a;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.bl-action::before {
    margin-right: 8px;
}

.bl-action.primary {
    color: #fff;
    border-color: #1d4ed8;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.bl-action.primary::before { content: "⎙"; }
.bl-action.neutral::before { content: "▧"; }
.bl-action.download::before { content: "⇩"; }
.bl-action.email::before { content: "✉"; }

.bl-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.11);
}

.bl-center-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
}

.bl-kpi {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 106px;
    padding: 20px;
}

.bl-kpi > span {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 950;
}

.bl-kpi.blue > span { color: #2563eb; background: #dbeafe; }
.bl-kpi.orange > span { color: #ea580c; background: #ffedd5; }
.bl-kpi.green > span { color: #059669; background: #d1fae5; }
.bl-kpi.purple > span { color: #7c3aed; background: #ede9fe; }

.bl-kpi p {
    margin: 0 0 6px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.bl-kpi strong {
    color: #0f172a;
    font-size: 22px;
}

.bl-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(230px, 1fr));
    gap: 18px;
}

.bl-preview-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bl-preview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.13);
}

.bl-preview-thumb {
    position: relative;
    height: 176px;
    padding: 18px;
    border-bottom: 1px solid #e2e8f0;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(249, 115, 22, 0.04)),
        #f8fafc;
}

.bl-preview-thumb::before {
    content: "";
    position: absolute;
    inset: 14px 32px;
    border: 1px solid #cbd5e1;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.bl-preview-thumb > * {
    position: relative;
    z-index: 1;
    width: calc(100% - 56px);
    margin-right: auto;
    margin-left: auto;
}

.bl-preview-thumb__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    font-size: 8px;
}

.bl-preview-thumb__head span {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    color: #fff;
    background: #f97316;
    font-weight: 950;
}

.bl-preview-thumb__line {
    height: 4px;
    margin-top: 9px;
    background: #cbd5e1;
}

.bl-preview-thumb__line.wide {
    width: 72%;
}

.bl-preview-thumb__table {
    display: grid;
    gap: 4px;
    margin-top: 12px;
}

.bl-preview-thumb__table i {
    display: block;
    height: 7px;
    border: 1px solid #cbd5e1;
}

.bl-preview-thumb__total {
    width: 34%;
    height: 16px;
    margin-top: 10px;
    margin-right: 28px;
    margin-left: auto;
    border: 1px solid #94a3b8;
}

.bl-preview-card__body {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.bl-preview-card__body p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.bl-preview-card__body strong {
    max-width: 66%;
    color: #0f172a;
    text-align: right;
}

.bl-preview-card__actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 18px 18px;
}

.bl-preview-card__actions button,
.bl-preview-card__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 0;
    border-radius: 7px;
    color: #fff;
    background: #2563eb;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.bl-preview-card__actions a:nth-of-type(1) { background: #0f172a; }
.bl-preview-card__actions a:nth-of-type(2) { background: #f97316; }

.bl-document {
    width: 100%;
    min-height: 275mm;
    padding: 15mm;
    color: #111;
    background: #fff;
    font-family: Arial, "Segoe UI", Tahoma, sans-serif;
}

.bl-document__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #111;
}

.bl-document__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bl-document__brand > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #fff;
    background: #f97316;
    font-size: 23px;
    font-weight: 950;
}

.bl-document__brand strong,
.bl-document__brand small,
.bl-document__store span {
    display: block;
}

.bl-document__brand strong {
    font-size: 17px;
}

.bl-document__brand small,
.bl-document__store span {
    margin-top: 3px;
    color: #444;
    font-size: 9px;
}

.bl-document__store {
    max-width: 48%;
    text-align: right;
}

.bl-document > h2 {
    margin: 20px 0 14px;
    text-align: center;
    font-size: 20px;
    letter-spacing: 2px;
}

.bl-document__meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 14px;
    border: 1px solid #333;
}

.bl-document__meta p {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 8px;
    margin: 0;
    padding: 7px 8px;
    border-right: 1px solid #777;
    border-bottom: 1px solid #777;
    font-size: 10px;
}

.bl-document__meta p:nth-child(2n),
.bl-document__meta p.wide {
    border-right: 0;
}

.bl-document__meta p.wide {
    grid-column: 1 / -1;
    border-bottom: 0;
}

.bl-document__meta span {
    font-weight: 900;
}

.bl-document__table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 9px;
}

.bl-document__table th,
.bl-document__table td {
    padding: 6px;
    border: 1px solid #444;
    color: #111;
    background: #fff;
}

.bl-document__table th:nth-child(1) { width: 5%; }
.bl-document__table th:nth-child(2) { width: 47%; }
.bl-document__table th:nth-child(3) { width: 10%; }
.bl-document__table th:nth-child(4) { width: 8%; }
.bl-document__table th:nth-child(5) { width: 15%; }
.bl-document__table th:nth-child(6) { width: 15%; }

.bl-document__table td[dir="auto"] {
    unicode-bidi: plaintext;
    overflow-wrap: anywhere;
}

.bl-document__footer {
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 30px;
    margin-top: 18px;
    font-size: 9px;
}

.bl-document__footer > p {
    font-style: italic;
    font-weight: 700;
}

.bl-document__footer > div {
    display: grid;
    border: 1px solid #444;
}

.bl-document__footer span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 8px;
    border-bottom: 1px solid #777;
}

.bl-document__footer span:last-child {
    border-bottom: 0;
}

.bl-viewer {
    position: fixed;
    inset: 0;
    z-index: 1500;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.bl-viewer.open {
    opacity: 1;
}

.bl-viewer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.82);
    backdrop-filter: blur(8px);
}

.bl-viewer__panel {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    width: min(1420px, calc(100vw - 32px));
    height: calc(100vh - 32px);
    margin: 16px auto;
    overflow: hidden;
    border-radius: 12px;
    background: #e2e8f0;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
    transform: scale(0.98);
    transition: transform 0.2s ease;
}

.bl-viewer.open .bl-viewer__panel {
    transform: scale(1);
}

.bl-viewer__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 18px;
    color: #fff;
    background: #0f172a;
}

.bl-viewer__toolbar > div {
    display: grid;
    gap: 3px;
}

.bl-viewer__toolbar span {
    color: #94a3b8;
    font-size: 11px;
}

.bl-viewer__toolbar nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bl-viewer__toolbar button,
.bl-viewer__toolbar a,
.bl-viewer__toolbar b {
    display: inline-grid;
    place-items: center;
    min-width: 38px;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    font-size: 12px;
    font-weight: 900;
}

.bl-viewer__toolbar button {
    cursor: pointer;
}

.bl-viewer__canvas {
    overflow: auto;
    padding: 28px;
}

.bl-viewer__document {
    width: min(210mm, 100%);
    margin: 0 auto;
    transform: scale(var(--bl-zoom, 1));
    transform-origin: top center;
}

.bl-print-body {
    margin: 0;
    color: #111;
    background: #fff;
}

.bl-print-stack {
    width: 210mm;
    margin: 0 auto;
}

.bl-document--print {
    page-break-after: always;
    break-after: page;
}

.bl-document--print:last-child {
    page-break-after: auto;
    break-after: auto;
}

.bl-print-fallback {
    position: fixed;
    right: 18px;
    bottom: 18px;
    min-height: 40px;
    padding: 0 18px;
    border: 0;
    color: #fff;
    background: #0f172a;
    cursor: pointer;
    font-weight: 900;
}

@media print {
    .bl-print-fallback {
        display: none !important;
    }

    .bl-print-stack {
        width: 100%;
        margin: 0;
    }

    .bl-document {
        min-height: 277mm;
        padding: 10mm;
    }

    .bl-document--print {
        page-break-after: always;
        break-after: page;
    }
}

body.modal-open {
    overflow: hidden;
}

.sales-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
}

.sales-modal.open {
    display: block;
}

.sales-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(5px);
}

.sales-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(1120px, calc(100vw - 36px));
    max-height: calc(100vh - 36px);
    margin: 18px auto;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.38);
}

.sales-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 26px;
    color: #fff;
    background: linear-gradient(135deg, #071426, #102044);
}

.sales-modal__accent {
    display: block;
    width: 58px;
    height: 3px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--axen-orange), transparent);
}

.sales-modal__header h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 30px);
    letter-spacing: 0;
}

.sales-modal__close {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
}

.sales-modal__body {
    overflow-y: auto;
    padding: 22px;
    background: #f8fafc;
}

.order-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 16px;
}

.order-detail-card,
.order-map-card,
.order-products,
.unit-totals,
.order-total-footer {
    border: 1px solid #e5edf8;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.order-detail-card {
    min-height: 198px;
    padding: 18px;
}

.order-detail-card h3,
.order-products h3,
.unit-totals h3 {
    margin: 0 0 14px;
    color: #1e293b;
    font-size: 16px;
}

.order-detail-card p {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin: 9px 0;
    color: #475569;
    font-size: 13px;
}

.order-detail-card p span {
    font-weight: 800;
}

.order-detail-card p strong {
    max-width: 58%;
    color: #0f172a;
    text-align: right;
}

.summary-card {
    border-top: 3px solid var(--axen-orange);
}

.client-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.modal-btn.blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.modal-btn.orange {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.modal-btn.disabled {
    opacity: 0.48;
    pointer-events: none;
}

.order-map-card {
    height: 300px;
    margin-top: 16px;
    overflow: hidden;
}

.order-map-card iframe,
.map-empty {
    width: 100%;
    height: 100%;
    border: 0;
}

.map-empty {
    display: grid;
    place-items: center;
    color: #64748b;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.04), rgba(255, 106, 0, 0.05)),
        #fff;
    font-weight: 900;
}

.order-products {
    margin-top: 16px;
    overflow: hidden;
}

.order-products h3,
.unit-totals h3 {
    padding: 18px 18px 0;
}

.order-products-scroll {
    overflow-x: auto;
    padding: 0 16px 16px;
}

.order-products table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.order-products th {
    height: 44px;
    padding: 0 12px;
    color: #fff;
    text-align: left;
    background: #0f5592;
    font-size: 13px;
}

.order-products td {
    height: 44px;
    padding: 0 12px;
    border: 1px solid #e5edf8;
    color: #0f172a;
    font-size: 13px;
}

.order-products tbody tr:nth-child(even) td {
    background: #f8fafc;
}

.unit-totals {
    margin-top: 16px;
    padding-bottom: 18px;
}

.unit-totals > div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 18px;
}

.unit-badge {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid #93c5fd;
    border-radius: 7px;
    color: #1d4ed8;
    background: #eff6ff;
    font-weight: 900;
}

.order-total-footer {
    position: sticky;
    bottom: -22px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px -22px -22px;
    padding: 16px 22px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
}

.order-total-footer div {
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 8px;
    background: #f8fafc;
}

.order-total-footer span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.order-total-footer strong {
    color: #0f172a;
    font-size: 20px;
}

.modal-error,
.muted-empty {
    padding: 18px;
    border-radius: 8px;
    color: #9f1239;
    background: #fff1f2;
    font-weight: 800;
}

.muted-empty {
    color: #64748b;
    background: #f8fafc;
}

.order-skeleton {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.order-skeleton div,
.order-skeleton span,
.order-skeleton strong {
    display: block;
    min-height: 150px;
    border-radius: 10px;
    background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7);
    background-size: 200% 100%;
    animation: shimmer 1.1s infinite linear;
}

.order-skeleton span {
    min-height: 42px;
}

.order-skeleton strong {
    grid-column: 1 / -1;
    min-height: 250px;
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.edit-order-dialog {
    width: min(1460px, 92vw);
    max-height: 86vh;
}

.edit-modal-body {
    padding: 0;
    background: #f6f8fb;
}

.edit-order-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    min-height: calc(86vh - 88px);
}

.edit-order-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 24px;
    background: #fff;
}

.edit-order-meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.edit-order-meta p,
.edit-order-meta h3 {
    margin: 0;
}

.edit-order-meta p {
    color: #334155;
    font-size: 14px;
}

.edit-order-meta p span {
    font-weight: 900;
}

.edit-order-meta p strong {
    color: #2563eb;
}

.edit-order-meta h3 {
    color: #0f172a;
    text-align: center;
    font-size: 22px;
}

.edit-product-search {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 46px;
    border: 1px solid #d8e2ef;
    border-radius: 7px;
    background: #fff;
}

.edit-product-search span {
    display: grid;
    place-items: center;
    width: 42px;
    color: #64748b;
}

.edit-product-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #0f172a;
}

.future-autocomplete {
    margin: 8px 0 18px;
    color: #94a3b8;
    font-size: 12px;
}

.edit-products-table {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 0;
    border-top: 1px solid #e5edf8;
}

[data-edit-products] {
    max-height: 430px;
    overflow-y: auto;
}

.edit-product-row {
    display: grid;
    grid-template-columns: 64px minmax(240px, 1fr) 90px 100px 110px 70px;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    border-bottom: 1px dashed #dbe4ef;
    color: #0f172a;
    font-size: 13px;
}

.edit-product-head {
    position: sticky;
    top: 0;
    z-index: 1;
    min-height: 46px;
    border-bottom: 1px solid #d8e2ef;
    color: #334155;
    background: #fff;
    font-weight: 900;
}

.edit-product-row strong {
    display: block;
    color: #0f172a;
}

.edit-product-row small {
    display: block;
    margin-top: 3px;
    color: #64748b;
}

.edit-line-input {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid #d8e2ef;
    border-radius: 6px;
    color: #0f172a;
    text-align: center;
}

.edit-line-input.js-edit-qty::-webkit-outer-spin-button,
.edit-line-input.js-edit-qty::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.edit-line-input.js-edit-qty {
    -moz-appearance: textfield;
    appearance: textfield;
}

.edit-line-input--readonly {
    color: #334155;
    background: #f8fafc;
    cursor: default;
    user-select: none;
}

.edit-line-input:focus {
    border-color: #3b82f6;
    outline: 0;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.edit-remove-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #dc2626;
    background: #fee2e2;
    cursor: pointer;
    font-size: 20px;
    font-weight: 900;
}

.edit-empty-products {
    margin: 18px 0;
    padding: 18px;
    border-radius: 8px;
    color: #64748b;
    background: #f8fafc;
    text-align: center;
    font-weight: 800;
}

.edit-empty-products.warning {
    color: #b45309;
    background: #fffbeb;
}

.edit-grand-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 2px solid #e5edf8;
    color: #0f172a;
}

.edit-grand-total span {
    color: #475569;
    font-weight: 900;
}

.edit-grand-total strong {
    font-size: 20px;
}

.order-lifecycle-panel {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background:
        radial-gradient(circle at 8% 0%, rgba(255, 133, 0, 0.12), transparent 28%),
        linear-gradient(135deg, #f8fbff 0%, #ffffff 46%, #f1f7ff 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.order-lifecycle-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.order-lifecycle-panel__head span {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.order-lifecycle-panel__head h3 {
    margin: 3px 0 0;
    color: #071b3f;
    font-size: 20px;
}

.order-lifecycle-panel__head strong {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 12px;
    font-weight: 1000;
    box-shadow: inset 0 0 0 1px rgba(255, 133, 0, 0.22);
}

.order-lifecycle-gantt {
    display: grid;
    grid-template-columns: repeat(7, minmax(92px, 1fr));
    align-items: start;
    gap: 0;
}

.order-lifecycle-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 9px;
    min-width: 0;
    color: #64748b;
    text-align: center;
}

.order-lifecycle-dot {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    border: 2px solid #cbd5e1;
    background: #ffffff;
    color: #64748b;
    font-size: 13px;
    font-weight: 1000;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.order-lifecycle-connector {
    position: absolute;
    z-index: 1;
    top: 18px;
    left: calc(-50% + 19px);
    width: calc(100% - 38px);
    height: 4px;
    border-radius: 999px;
    background: #dbe4ef;
}

.order-lifecycle-connector.is-done {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.order-lifecycle-step strong {
    display: block;
    color: #334155;
    font-size: 12px;
    font-weight: 1000;
}

.order-lifecycle-step small {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.25;
}

.order-lifecycle-step.is-done .order-lifecycle-dot {
    border-color: rgba(34, 197, 94, 0.25);
    background: linear-gradient(135deg, #22c55e, #15803d);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(34, 197, 94, 0.24);
}

.order-lifecycle-step.is-done strong {
    color: #166534;
}

.order-lifecycle-step.is-active .order-lifecycle-dot {
    border-color: rgba(255, 133, 0, 0.32);
    background: linear-gradient(135deg, #ffb347, #ff7a00);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(255, 122, 0, 0.28);
}

.order-lifecycle-step.is-active strong {
    color: #c2410c;
}

.order-lifecycle-step[data-step="paid"].is-done .order-lifecycle-dot {
    border-radius: 999px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.edit-order-side {
    display: grid;
    align-content: start;
    gap: 16px;
    overflow-y: auto;
    padding: 24px;
    border-left: 1px solid #e5edf8;
    background: #f8fafc;
}

.edit-side-card {
    padding: 18px;
    border: 1px solid #e5edf8;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.edit-side-card h3 {
    margin: 0 0 16px;
    color: #0f172a;
    font-size: 16px;
}

.edit-side-card p {
    display: grid;
    gap: 4px;
    margin: 0 0 12px;
    color: #64748b;
    font-size: 13px;
}

.edit-side-card p span,
.edit-side-card label {
    color: #334155;
    font-size: 13px;
    font-weight: 900;
}

.edit-side-card p strong {
    color: #0f172a;
}

.edit-side-card label {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.edit-side-card select {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #d8e2ef;
    border-radius: 6px;
    color: #0f172a;
    background: #fff;
}

.edit-map {
    height: 188px;
    margin: 14px 0;
    overflow: hidden;
    border-radius: 8px;
    background: #eef2f7;
}

.edit-map iframe,
.edit-map div {
    width: 100%;
    height: 100%;
    border: 0;
}

.edit-map div {
    display: grid;
    place-items: center;
    color: #64748b;
    font-weight: 900;
}

.edit-save-footer {
    position: sticky;
    bottom: 0;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 18px 24px;
    border-top: 1px solid #e5edf8;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
}

.edit-save-footer > div {
    display: grid;
    gap: 2px;
}

.edit-save-footer span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.edit-save-footer strong {
    color: #0f172a;
    font-size: 18px;
}

.axen-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1300;
    transform: translateY(18px);
    opacity: 0;
    max-width: min(420px, calc(100vw - 44px));
    padding: 14px 18px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
    font-weight: 900;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.axen-toast.error {
    background: linear-gradient(135deg, #dc2626, #991b1b);
}

.axen-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.axen-confirm {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: grid;
    place-items: center;
    padding: 22px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.axen-confirm.open {
    opacity: 1;
    pointer-events: auto;
}

.axen-confirm.closing {
    opacity: 0;
}

.axen-confirm__overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 30%, rgba(249, 115, 22, 0.12), transparent 32%),
        rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(8px);
}

.axen-confirm__dialog {
    position: relative;
    width: min(550px, 95vw);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.86)),
        rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(24px);
    box-shadow: 0 28px 90px rgba(2, 6, 23, 0.36);
    transform: scale(0.95) translateY(8px);
    transition: transform 0.2s ease;
}

.axen-confirm.open .axen-confirm__dialog {
    transform: scale(1) translateY(0);
}

.axen-confirm.closing .axen-confirm__dialog {
    transform: scale(0.95) translateY(8px);
}

.axen-confirm__dialog::before {
    content: "";
    display: block;
    height: 5px;
    background: linear-gradient(135deg, #f97316, #dc2626);
}

.axen-confirm--success .axen-confirm__dialog::before {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.axen-confirm--error .axen-confirm__dialog::before {
    background: linear-gradient(135deg, #ef4444, #991b1b);
}

.axen-confirm__header {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 18px;
    padding: 26px 28px 10px;
}

.axen-confirm__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #dc2626);
    box-shadow: 0 18px 40px rgba(249, 115, 22, 0.34);
    font-size: 34px;
    font-weight: 950;
}

.axen-confirm--success .axen-confirm__icon {
    margin: 28px auto 16px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 18px 40px rgba(22, 163, 74, 0.28);
}

.axen-confirm--error .axen-confirm__icon {
    margin: 28px auto 16px;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    box-shadow: 0 18px 40px rgba(220, 38, 38, 0.28);
}

.axen-confirm__header h2,
.axen-confirm__dialog > h2 {
    margin: 0;
    color: #0f172a;
    font-size: 25px;
    letter-spacing: 0;
}

.axen-confirm__header p,
.axen-confirm__dialog > p {
    margin: 8px 0 0;
    color: #475569;
    line-height: 1.6;
    font-size: 15px;
}

.axen-confirm__dialog > h2,
.axen-confirm__dialog > p {
    padding: 0 34px;
    text-align: center;
}

.axen-confirm__order {
    display: grid;
    gap: 4px;
    margin: 16px 28px 0;
    padding: 16px 18px;
    border: 1px solid #fed7aa;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff7ed, #fff);
}

.axen-confirm__order span,
.axen-confirm__details span {
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.axen-confirm__order strong {
    color: #0f172a;
    font-size: 22px;
}

.axen-confirm__details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 12px 28px 0;
}

.axen-confirm__details div {
    display: grid;
    gap: 5px;
    min-height: 74px;
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.86);
}

.axen-confirm__details strong {
    color: #0f172a;
    font-size: 14px;
    line-height: 1.35;
}

.axen-confirm__warning {
    margin: 14px 28px 0;
    padding: 14px 16px;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    color: #9a3412;
    background: #fff7ed;
    line-height: 1.55;
    font-size: 14px;
    font-weight: 750;
}

.axen-confirm__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 22px 28px 28px;
}

.axen-confirm__secondary,
.axen-confirm__primary {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 900;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.axen-confirm__secondary {
    color: #0f172a;
    background: #fff;
    border: 1px solid #d8e2ef;
}

.axen-confirm__primary {
    color: #fff;
    background: linear-gradient(135deg, #f97316, #ea580c);
    box-shadow: 0 16px 32px rgba(249, 115, 22, 0.26);
}

.axen-confirm--success .axen-confirm__primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 16px 32px rgba(22, 163, 74, 0.22);
}

.axen-confirm--error .axen-confirm__primary {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 16px 32px rgba(220, 38, 38, 0.22);
}

.axen-confirm__secondary:hover,
.axen-confirm__primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.axen-confirm__primary:disabled {
    opacity: 0.72;
    cursor: wait;
    transform: none;
}

@media (max-width: 1080px) {
    .stores-grid,
    .dashboard-grid,
    .kpi-strip,
    .log-kpi-grid,
    .vendor-kpi-grid,
    .products-day-kpis,
    .bl-center-kpis {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .bl-preview-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .bl-center-summary {
        grid-template-columns: 1fr;
    }

    .filter-card,
    .log-filter-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .filter-actions,
    .log-filter-actions {
        grid-column: 1 / -1;
        flex-wrap: wrap;
    }

    .order-modal-grid,
    .order-skeleton {
        grid-template-columns: 1fr;
    }

    .vendor-day-header,
    .vendor-day-footer,
    .vendor-sales-heading,
    .products-day-info {
        align-items: flex-start;
        flex-direction: column;
    }

    .products-day-bottom {
        grid-template-columns: 1fr;
    }

    .order-total-footer {
        grid-template-columns: 1fr;
    }

    .edit-order-form {
        grid-template-columns: 1fr;
    }

    .edit-order-side {
        border-left: 0;
        border-top: 1px solid #e5edf8;
    }

    .edit-order-meta {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .edit-order-meta h3 {
        text-align: left;
    }

    .login-screen {
        grid-template-columns: 1fr;
    }

    .login-marketing,
    .login-panel {
        border-radius: var(--radius);
    }

    .login-marketing {
        min-height: 520px;
    }
}

@media (max-width: 820px) {
    .store-shell,
    .app-shell {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .store-sidebar,
    .app-sidebar {
        min-height: auto;
        border-radius: 0;
    }

    .store-workspace {
        min-height: auto;
        border-radius: 0;
    }

    .store-header,
    .topbar,
    .help-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-main {
        padding: 18px;
    }

    .topbar {
        margin: -18px -18px 18px;
        padding: 12px 18px;
    }

    .top-search {
        width: 100%;
    }

    .app-sidebar {
        max-height: 82px;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .app-sidebar:focus-within,
    .app-sidebar:hover {
        max-height: 80vh;
        overflow-y: auto;
    }
}

@media (max-width: 620px) {
    .login-screen {
        padding: 0;
    }

    .login-marketing {
        min-height: auto;
        padding: 28px;
    }

    .feature-stack,
    .login-marketing footer {
        display: none;
    }

    .login-panel {
        padding: 20px;
    }

    .stores-grid,
    .dashboard-grid,
    .kpi-strip,
    .vendor-kpi-grid,
    .products-day-kpis,
    .bl-center-kpis,
    .filter-card {
        grid-template-columns: 1fr;
    }

    .bl-preview-grid {
        grid-template-columns: 1fr;
    }

    .bl-center-actions {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .bl-viewer__panel {
        width: 100vw;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .bl-viewer__toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .bl-viewer__toolbar nav {
        width: 100%;
        overflow-x: auto;
    }

    .bl-viewer__canvas {
        padding: 14px;
    }

    .bl-document {
        min-width: 720px;
    }

    .social-row,
    .form-row,
    .store-header-tools,
    .topbar-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .filter-actions,
    .log-filter-actions,
    .log-export-actions,
    .table-footer,
    .pagination-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .filter-btn,
    .log-export-actions button,
    .pagination {
        width: 100%;
    }

    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }

    .kpi-card + .kpi-card {
        border-left: 0;
        border-top: 1px solid #e7edf6;
    }

    .sales-modal__dialog {
        width: 100vw;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .sales-modal__body {
        padding: 14px;
    }

    .sales-modal__header {
        padding: 18px;
    }

    .order-map-card {
        height: 230px;
    }

    .order-detail-card p {
        display: grid;
        gap: 4px;
    }

    .order-detail-card p strong {
        max-width: none;
        text-align: left;
    }

    .edit-order-dialog {
        width: 100vw;
        max-height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .edit-order-left,
    .edit-order-side {
        padding: 16px;
    }

    .edit-product-row {
        grid-template-columns: 48px minmax(180px, 1fr) 78px 86px 96px 52px;
        min-width: 640px;
    }

    .edit-products-table {
        overflow-x: auto;
    }

    .order-lifecycle-panel {
        padding: 14px;
    }

    .order-lifecycle-panel__head {
        flex-direction: column;
    }

    .order-lifecycle-gantt {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .order-lifecycle-step {
        grid-template-columns: 40px 1fr;
        justify-items: start;
        text-align: left;
    }

    .order-lifecycle-connector {
        top: -10px;
        left: 18px;
        width: 4px;
        height: 20px;
    }

    .edit-save-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .products-print-btn,
    .products-info-chips,
    .products-info-chips span {
        width: 100%;
    }

    .general-total-card > div {
        grid-template-columns: 1fr;
    }

    .general-total-card p + p {
        border-left: 0;
        border-top: 1px solid #e9eef6;
    }

    .axen-confirm {
        padding: 12px;
    }

    .axen-confirm__header {
        grid-template-columns: 1fr;
        padding: 22px 20px 8px;
        text-align: center;
    }

    .axen-confirm__icon {
        margin: 0 auto;
    }

    .axen-confirm__order,
    .axen-confirm__details,
    .axen-confirm__warning {
        margin-right: 18px;
        margin-left: 18px;
    }

    .axen-confirm__details {
        grid-template-columns: 1fr;
    }

    .axen-confirm__footer {
        align-items: stretch;
        flex-direction: column-reverse;
        padding: 18px;
    }
}

/* Premium ERP sidebar final cascade */
.app-shell {
    grid-template-columns: 292px minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    overflow: hidden;
    height: 100vh;
    min-height: 100vh;
    padding: 18px 12px 14px;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 106, 0, .22), transparent 24%),
        radial-gradient(circle at 85% 100%, rgba(37, 99, 235, .2), transparent 28%),
        linear-gradient(180deg, #061425 0%, #081827 54%, #05101d 100%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .08), 18px 0 50px rgba(15, 23, 42, .14);
}

.app-brand {
    min-height: 54px;
    margin: 0 4px 14px;
    padding: 4px 6px;
    border-radius: 8px;
}

.sidebar-nav {
    height: calc(100vh - 172px);
    overflow-y: auto;
    gap: 4px;
    padding: 8px 4px 14px 0;
    scrollbar-color: rgba(255, 106, 0, .55) rgba(255, 255, 255, .06);
}

.nav-heading {
    margin: 16px 8px 6px;
    color: rgba(190, 215, 224, .58);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.nav-heading:first-child {
    margin-top: 4px;
}

.nav-link,
.nav-sublink {
    border: 1px solid transparent;
    border-radius: 7px;
    color: #c7d7e6;
    text-decoration: none;
}

.nav-link {
    min-height: 40px;
    padding: 0 10px;
}

.nav-link:hover,
.nav-link.active,
.nav-accordion.open > .nav-toggle {
    color: #fff;
    background: linear-gradient(90deg, rgba(255, 106, 0, .16), rgba(37, 99, 235, .08));
    border-color: rgba(255, 255, 255, .08);
    box-shadow: inset 3px 0 0 #ff6a00, 0 8px 18px rgba(0, 0, 0, .14);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(255, 106, 0, .24), rgba(255, 106, 0, .08));
}

.nav-icon {
    width: 26px;
    height: 26px;
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 7px;
    color: #7dd3fc;
    background: rgba(255, 255, 255, .06);
    font-size: 10px;
    font-weight: 900;
}

.nav-accordion.open > .nav-toggle .nav-icon,
.nav-link.active .nav-icon {
    color: #fff;
    border-color: rgba(255, 106, 0, .36);
    background: linear-gradient(135deg, #ff6a00, #ff3d00);
}

.chevron {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    color: rgba(226, 238, 244, .78);
    font-size: 20px;
    background: rgba(255, 255, 255, .04);
}

.nav-accordion.open .chevron {
    color: #fff;
    background: rgba(255, 106, 0, .2);
    transform: rotate(90deg);
}

.nav-submenu {
    margin: 4px 0 7px 23px;
    border-left: 1px solid rgba(125, 211, 252, .18);
    transition: max-height .26s ease;
}

.nav-sublink {
    min-height: 32px;
    margin: 2px 0 2px 9px;
    padding: 0 10px 0 17px;
    color: #9fb3c8;
    font-size: 12px;
    font-weight: 700;
}

.nav-sublink::before {
    left: -9px;
    width: 13px;
    background: rgba(125, 211, 252, .28);
}

.nav-sublink:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.nav-sublink.active {
    color: #fff;
    background: rgba(255, 106, 0, .17);
    box-shadow: inset 2px 0 0 #ff6a00;
}

.nav-sublink.active::before {
    background: #ff6a00;
}

.nav-link.disabled,
.nav-sublink.disabled {
    cursor: default;
    opacity: .52;
}

.nav-link.disabled:hover,
.nav-sublink.disabled:hover {
    color: #9fb3c8;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.sidebar-store {
    margin: 12px 4px 0;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .16);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035));
    box-shadow: 0 16px 30px rgba(0, 0, 0, .16);
}

.sidebar-store span {
    color: #9fb3c8;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.sidebar-store strong {
    margin-top: 7px;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-control {
    display: none;
    flex: 0 0 42px;
    height: 42px;
    border: 1px solid #dbe5f3;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    place-items: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
}

.sidebar-control span {
    display: block;
    width: 17px;
    height: 2px;
    margin: 3px auto;
    border-radius: 999px;
    background: #0f172a;
}

.sidebar-scrim {
    display: none;
}

@media (max-width: 980px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(292px, 86vw);
        min-height: 100vh;
        max-height: none;
        transform: translateX(-105%);
        transition: transform .22s ease;
    }

    .app-sidebar:focus-within,
    .app-sidebar:hover {
        max-height: none;
    }

    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-open .sidebar-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(15, 23, 42, .46);
        backdrop-filter: blur(3px);
    }

    .sidebar-control {
        display: grid;
    }

    .app-main {
        padding: 18px;
    }
}

/* Codex: vendor Print All button */
.vendor-print-all-btn {
    position: relative;
    z-index: 30;
    pointer-events: auto;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 24px;
    border: 2px solid #4f46e5;
    border-radius: 10px;
    color: #3730a3;
    background: #ffffff;
    font-size: 18px;
    font-weight: 950;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(79, 70, 229, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.vendor-print-all-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(79, 70, 229, 0.18);
}
/* End Codex: vendor Print All button */


/* Codex: vendor day bulk invoice print */
.bulk-invoice-page {
    background: #fff;
}

.bulk-invoice-item {
    break-after: page;
    page-break-after: always;
}

.bulk-invoice-item:last-child {
    break-after: auto;
    page-break-after: auto;
}

@media print {
    .bulk-invoice-item {
        break-after: page;
        page-break-after: always;
    }

    .bulk-invoice-item:last-child {
        break-after: auto;
        page-break-after: auto;
    }
}
/* End Codex: vendor day bulk invoice print */

/* Codex: company settings screen */
.company-settings-page {
    display: grid;
    gap: 18px;
}

.company-settings-hero {
    align-items: center;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 133, 0, .12), transparent 30%),
        linear-gradient(135deg, #ffffff, #f8fbff);
}

.company-settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
    gap: 18px;
}

.company-settings-card {
    background: rgba(255, 255, 255, .96);
    border: 1px solid #dbe5f4;
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
    padding: 20px;
}

.company-settings-card__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.company-settings-card__head h2 {
    margin: 0;
    color: #071d3a;
    font-size: 18px;
}

.company-settings-card__head p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 13px;
}

.company-settings-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #fff4e8;
    color: #ff7a00;
    font-size: 12px;
    font-weight: 950;
    border: 1px solid rgba(255, 122, 0, .24);
}

.company-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.company-form-grid label,
.company-checkline {
    display: grid;
    gap: 7px;
    color: #0b1b36;
    font-size: 12px;
    font-weight: 850;
}

.company-form-grid input,
.company-form-grid textarea,
.company-form-grid select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #d6e2f2;
    border-radius: 10px;
    background: #fff;
    color: #0b1b36;
    padding: 10px 12px;
    font-weight: 700;
    outline: none;
}

.company-form-grid textarea {
    resize: vertical;
}

.company-form-grid input:focus,
.company-form-grid textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.company-form-grid__full {
    grid-column: 1 / -1;
}

.company-checkline {
    display: flex;
    align-items: center;
    gap: 8px;
    align-self: end;
    min-height: 42px;
}

.company-logo-drop,
.company-stamp-drop {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 250px;
    border: 1.5px dashed #b8c7dc;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 0%, rgba(37, 99, 235, .08), transparent 38%),
        #f8fbff;
    color: #0b1b36;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.company-stamp-drop {
    min-height: 118px;
    margin-top: 14px;
}

.company-logo-drop.dragging,
.company-stamp-drop.dragging {
    border-color: #ff7a00;
    box-shadow: 0 18px 34px rgba(255, 122, 0, .16);
    transform: translateY(-1px);
}

.company-logo-drop input,
.company-stamp-drop input {
    display: none;
}

.company-logo-preview {
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
    border-radius: 28px;
    background: #fff;
    border: 1px solid #dbe5f4;
    box-shadow: 0 16px 32px rgba(15, 23, 42, .08);
    overflow: hidden;
}

.company-logo-preview img,
.company-stamp-drop img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.company-logo-preview b {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ff7a00, #f97316);
    color: #fff;
    font-size: 34px;
}

.company-stamp-drop span {
    display: grid;
    place-items: center;
    width: 160px;
    height: 70px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #dbe5f4;
    color: #64748b;
    font-weight: 900;
    overflow: hidden;
}

.company-settings-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.company-settings-footer {
    grid-column: 1 / -1;
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px;
    border: 1px solid #dbe5f4;
    border-radius: 16px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px);
    box-shadow: 0 -12px 30px rgba(15, 23, 42, .08);
}

@media (max-width: 1100px) {
    .company-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .company-form-grid {
        grid-template-columns: 1fr;
    }

    .company-settings-footer,
    .company-settings-hero {
        align-items: stretch;
    }
}
/* End Codex: company settings screen */

/* Dynamic sidebar brand logo from Settings > Societe. */
.ax-sidebar .ax-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 18px 20px 16px;
    color: #f8fafc;
    text-decoration: none;
}

.ax-sidebar .ax-brand-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 56px;
}

.ax-sidebar .ax-brand-logo img {
    display: block;
    max-width: 190px;
    max-height: 62px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.ax-sidebar .ax-brand.has-logo {
    justify-content: flex-start;
    padding-left: 18px;
    padding-right: 18px;
}

/* Remove remote top whitespace around the AXEN shell. */
html,
body.app-body {
    margin: 0 !important;
    padding: 0 !important;
}

body.app-body .app-shell {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.app-body .ax-sidebar {
    position: sticky;
    top: 0 !important;
    align-self: start;
    height: 100vh;
    min-height: 100vh;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.app-body .ax-sidebar .ax-brand {
    margin-top: 0 !important;
    padding-top: 14px !important;
}

.payment-toggle-field {
    gap: 0.5rem;
}

.payment-status-toggle {
    width: 100%;
    min-height: 3.1rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    padding: 0.42rem 0.72rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.04);
    color: #0f172a;
    font-weight: 900;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.payment-status-toggle__track {
    position: relative;
    width: 4.25rem;
    height: 2rem;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
    transition: background 0.2s ease;
}

.payment-status-toggle__knob {
    position: absolute;
    top: 0.25rem;
    left: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
    transition: transform 0.2s ease;
}

.payment-status-toggle__label {
    font-size: 0.92rem;
}

.payment-status-toggle.is-paid {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(34, 197, 94, 0.12);
    color: #047857;
}

.payment-status-toggle.is-paid .payment-status-toggle__track {
    background: #22c55e;
}

.payment-status-toggle.is-paid .payment-status-toggle__knob {
    transform: translateX(2.25rem);
}

.payment-status-toggle.is-unpaid {
    border-color: rgba(239, 68, 68, 0.42);
    background: rgba(239, 68, 68, 0.1);
    color: #b91c1c;
}

.payment-status-toggle:focus-visible {
    outline: 3px solid rgba(255, 122, 0, 0.35);
    outline-offset: 2px;
}

/* Store administration: keep the creation/edit form horizontal above the list. */
.stores-admin-layout {
    grid-template-columns: 1fr;
}

.stores-form-card {
    display: grid;
    gap: 16px;
}

.stores-form-card .admin-form-grid {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    align-items: end;
}

.stores-form-card .admin-form-grid .wide {
    grid-column: span 2;
}

.stores-form-card .admin-form-grid textarea {
    min-height: 74px;
}

.stores-form-card .checkline {
    min-height: 42px;
    align-self: end;
    padding: 0 4px;
}

.stores-form-submit {
    justify-self: start;
}

@media (max-width: 1280px) {
    .stores-form-card .admin-form-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }
}

@media (max-width: 900px) {
    .stores-form-card .admin-form-grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
}

@media (max-width: 640px) {
    .stores-form-card .admin-form-grid,
    .stores-form-card .admin-form-grid .wide {
        grid-template-columns: 1fr;
        grid-column: 1 / -1;
    }
}

.store-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(18px, 4vw, 48px);
}

.store-modal.is-open {
    display: flex;
}

.store-modal__scrim {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.62);
    backdrop-filter: blur(6px);
}

.store-modal__panel {
    position: relative;
    z-index: 1;
    width: min(1480px, 96vw);
    max-height: calc(100vh - 54px);
    overflow: auto;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 34px 90px rgba(2, 6, 23, 0.32);
}

.store-modal__panel .stores-form-card {
    border: 0;
    border-radius: 18px;
    box-shadow: none;
}

.store-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 999px;
    background: #eff6ff;
    color: #0f172a;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
}

.store-modal__close:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.admin-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-delete-form {
    margin: 0;
}

.admin-inline-action.delete {
    border-color: #ef4444;
    background: #ef4444;
    color: #fff;
}

.admin-inline-action.delete:hover {
    border-color: #dc2626;
    background: #dc2626;
    color: #fff;
}

.premium-confirm {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.premium-confirm.is-open {
    display: flex;
}

.premium-confirm__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 12, 24, 0.62);
    backdrop-filter: blur(10px);
}

.premium-confirm__panel {
    position: relative;
    width: min(440px, 100%);
    padding: 30px;
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: 22px;
    background:
        radial-gradient(circle at 20% 0%, rgba(255, 122, 0, 0.2), transparent 34%),
        linear-gradient(145deg, #07162c 0%, #0f2745 100%);
    color: #fff;
    box-shadow: 0 28px 80px rgba(2, 8, 23, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    text-align: center;
    transform: translateY(8px) scale(0.98);
    animation: premium-confirm-enter 160ms ease-out forwards;
}

.premium-confirm__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff9f1c, #ef4444);
    box-shadow: 0 16px 40px rgba(255, 122, 0, 0.38);
}

.premium-confirm__icon span {
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
}

.premium-confirm__eyebrow {
    margin: 0 0 6px;
    color: #fdba74;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.premium-confirm__panel h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
    line-height: 1.2;
    font-weight: 900;
}

.premium-confirm__message {
    margin: 12px 0 0;
    color: #dbeafe;
    font-size: 15px;
    line-height: 1.55;
}

.premium-confirm__target {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    text-align: left;
}

.premium-confirm__target span {
    display: block;
    color: #fff;
    font-weight: 900;
}

.premium-confirm__target small {
    display: block;
    margin-top: 3px;
    color: #93c5fd;
    font-weight: 800;
}

.premium-confirm__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

.premium-confirm__btn {
    min-width: 132px;
    border: 0;
    border-radius: 14px;
    padding: 13px 18px;
    font-weight: 900;
    cursor: pointer;
}

.premium-confirm__btn--ghost {
    background: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

.premium-confirm__btn--ghost:hover {
    background: rgba(148, 163, 184, 0.3);
}

.premium-confirm__btn--danger {
    background: linear-gradient(135deg, #ef4444, #ff7a00);
    color: #fff;
    box-shadow: 0 14px 34px rgba(239, 68, 68, 0.34);
}

.premium-confirm__btn--danger:hover {
    filter: brightness(1.05);
}

@keyframes premium-confirm-enter {
    to {
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 560px) {
    .premium-confirm__panel {
        padding: 24px;
    }

    .premium-confirm__actions {
        flex-direction: column-reverse;
    }

    .premium-confirm__btn {
        width: 100%;
    }
}

.order-audit-card {
    overflow: hidden;
}

.order-audit-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.order-audit-card__head h3 {
    margin: 0;
}

.order-audit-card__head span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(255, 122, 0, 0.14);
    color: #ff7a00;
    font-weight: 900;
}

.order-audit-list {
    position: relative;
    display: grid;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.order-audit-item {
    position: relative;
    display: grid;
    grid-template-columns: 16px 1fr;
    gap: 10px;
}

.order-audit-dot {
    width: 11px;
    height: 11px;
    margin-top: 6px;
    border-radius: 999px;
    background: #ff7a00;
    box-shadow: 0 0 0 4px rgba(255, 122, 0, 0.16);
}

.order-audit-item--payment_received .order-audit-dot,
.order-audit-item--delivered .order-audit-dot {
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16);
}

.order-audit-item--canceled .order-audit-dot {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}

.order-audit-content {
    padding: 11px 12px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.86));
}

.order-audit-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.order-audit-title strong {
    color: #0f172a;
    font-size: 13px;
}

.order-audit-title time {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.order-audit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.order-audit-meta span {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #334155;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
}

.order-audit-change {
    margin-top: 8px;
    color: #0f172a;
    font-size: 12px;
    font-weight: 900;
}

.order-audit-change span {
    color: #ff7a00;
    padding: 0 6px;
}

.order-audit-content p {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.order-audit-empty {
    border: 1px dashed rgba(148, 163, 184, 0.42);
    border-radius: 14px;
    padding: 14px;
    color: #64748b;
    font-weight: 800;
    text-align: center;
}

.ax-notification-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(2, 6, 23, 0.66);
    backdrop-filter: blur(10px);
}

.ax-notification-panel {
    position: relative;
    width: min(980px, 100%);
    max-height: min(86vh, 820px);
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 24px;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 122, 0, 0.22), transparent 34%),
        linear-gradient(145deg, #081426 0%, #10233b 52%, #07111f 100%);
    color: #f8fafc;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.52);
    padding: 24px;
}

.ax-notification-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.ax-notification-hero {
    display: flex;
    gap: 16px;
    align-items: center;
    padding-right: 48px;
}

.ax-notification-orb {
    display: grid;
    place-items: center;
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffb020, #ff5a00);
    color: #fff7ed;
    box-shadow: 0 16px 34px rgba(255, 122, 0, 0.34);
    font-size: 26px;
    font-weight: 1000;
}

.ax-notification-hero p,
.ax-notification-hero h2,
.ax-notification-hero span {
    margin: 0;
}

.ax-notification-hero p {
    color: #ffb020;
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ax-notification-hero h2 {
    margin-top: 5px;
    color: #ffffff;
    font-size: 28px;
    line-height: 1.1;
}

.ax-notification-hero span {
    display: block;
    margin-top: 7px;
    color: #cbd5e1;
    font-weight: 700;
}

.ax-notification-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0;
}

.ax-notification-summary div {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    padding: 14px;
}

.ax-notification-summary strong {
    display: block;
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
}

.ax-notification-summary span {
    display: block;
    margin-top: 7px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.ax-notification-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ax-notification-group {
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.075);
    padding: 14px;
}

.ax-notification-group--danger {
    border-color: rgba(248, 113, 113, 0.35);
}

.ax-notification-group--warning {
    border-color: rgba(251, 191, 36, 0.38);
}

.ax-notification-group--success {
    border-color: rgba(34, 197, 94, 0.35);
}

.ax-notification-group-head {
    display: flex;
    gap: 11px;
    align-items: center;
}

.ax-notification-symbol {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 122, 0, 0.16);
    color: #ffb020;
    font-size: 12px;
    font-weight: 1000;
}

.ax-notification-group-head strong {
    display: block;
    color: #ffffff;
    font-size: 15px;
}

.ax-notification-group-head small {
    display: block;
    margin-top: 3px;
    color: #94a3b8;
    font-weight: 900;
}

.ax-notification-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.ax-notification-item,
.ax-notification-empty,
.ax-notification-all-clear {
    display: block;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 13px;
    background: rgba(2, 6, 23, 0.22);
    color: #e2e8f0;
    padding: 10px 11px;
    text-decoration: none;
}

.ax-notification-item strong {
    display: block;
    color: #ffffff;
    font-size: 13px;
}

.ax-notification-item span,
.ax-notification-empty,
.ax-notification-all-clear span {
    display: block;
    margin-top: 4px;
    color: #aebed2;
    font-size: 12px;
    font-weight: 750;
}

.ax-notification-all-clear {
    padding: 26px;
    text-align: center;
}

.ax-notification-all-clear strong {
    display: block;
    color: #ffffff;
    font-size: 18px;
}

.ax-notification-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.ax-notification-primary,
.ax-notification-secondary {
    border: 0;
    border-radius: 13px;
    padding: 12px 16px;
    font-weight: 1000;
    cursor: pointer;
    text-decoration: none;
}

.ax-notification-primary {
    background: linear-gradient(135deg, #ff8a00, #ff5a00);
    color: #ffffff;
}

.ax-notification-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

@media (max-width: 760px) {
    .ax-notification-panel {
        padding: 18px;
    }

    .ax-notification-summary,
    .ax-notification-grid {
        grid-template-columns: 1fr;
    }

    .ax-notification-actions {
        flex-direction: column;
    }
}

.ax-notification-modal {
    padding: 24px 34px;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(12px) saturate(1.15);
}

.ax-notification-panel {
    width: min(1220px, calc(100vw - 72px));
    max-height: none;
    overflow: visible;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 184, 77, 0.24), transparent 28%),
        radial-gradient(circle at 88% 4%, rgba(59, 130, 246, 0.14), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 46%, #fff7ed 100%);
    color: #0f172a;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
    padding: 28px;
}

.ax-notification-close {
    border-color: rgba(148, 163, 184, 0.42);
    background: #ffffff;
    color: #475569;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.ax-notification-close:hover {
    background: #fff7ed;
    color: #ff6a00;
}

.ax-notification-hero {
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.88));
    padding: 18px 58px 18px 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.ax-notification-orb {
    background: linear-gradient(135deg, #fff7cc, #ffb020 52%, #ff6a00);
    color: #7c2d12;
    box-shadow: 0 16px 34px rgba(255, 122, 0, 0.22);
}

.ax-notification-orb svg,
.ax-notification-symbol svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ax-notification-hero p {
    color: #f97316;
}

.ax-notification-hero h2 {
    color: #0f172a;
    font-size: 31px;
}

.ax-notification-hero span {
    color: #64748b;
}

.ax-notification-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 18px 0;
}

.ax-notification-summary div {
    border-color: rgba(203, 213, 225, 0.82);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.ax-notification-summary strong {
    color: #0f172a;
}

.ax-notification-summary span {
    color: #64748b;
}

.ax-notification-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ax-notification-group {
    border-color: rgba(203, 213, 225, 0.86);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.075);
}

.ax-notification-group--danger {
    background: linear-gradient(180deg, #fffafa 0%, #ffffff 100%);
    border-color: rgba(248, 113, 113, 0.35);
}

.ax-notification-group--warning {
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 100%);
    border-color: rgba(251, 191, 36, 0.42);
}

.ax-notification-group--success {
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    border-color: rgba(34, 197, 94, 0.35);
}

.ax-notification-symbol {
    background: #fff7ed;
    color: #f97316;
}

.ax-notification-group--danger .ax-notification-symbol {
    background: #fee2e2;
    color: #dc2626;
}

.ax-notification-group--warning .ax-notification-symbol {
    background: #fef3c7;
    color: #d97706;
}

.ax-notification-group--success .ax-notification-symbol {
    background: #dcfce7;
    color: #16a34a;
}

.ax-notification-group-head strong,
.ax-notification-item strong,
.ax-notification-all-clear strong {
    color: #0f172a;
}

.ax-notification-group-head small {
    color: #64748b;
}

.ax-notification-item,
.ax-notification-empty,
.ax-notification-all-clear {
    border-color: rgba(226, 232, 240, 0.92);
    background: rgba(248, 250, 252, 0.82);
    color: #0f172a;
}

.ax-notification-item:hover {
    border-color: rgba(255, 122, 0, 0.32);
    background: #fff7ed;
    transform: translateY(-1px);
}

.ax-notification-item span,
.ax-notification-empty,
.ax-notification-all-clear span {
    color: #64748b;
}

.ax-notification-secondary {
    border: 1px solid rgba(203, 213, 225, 0.9);
    background: #ffffff;
    color: #334155;
}

.ax-notification-primary {
    background: linear-gradient(135deg, #ff9f1a, #ff6a00);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(255, 122, 0, 0.24);
}

@media (max-width: 980px) {
    .ax-notification-panel {
        width: min(760px, calc(100vw - 32px));
        max-height: calc(100vh - 32px);
        overflow: auto;
    }

    .ax-notification-grid {
        grid-template-columns: 1fr;
    }
}

/* Youjad compact login fit - deployed 2026-07-02 */
.auth-body {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
}

.auth-body .login-screen {
    width: 100vw;
    height: 100vh;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(350px, 0.82fr);
    padding: clamp(10px, 1.15vw, 18px);
    overflow: hidden;
}

.auth-body .login-marketing {
    min-height: 0;
    height: calc(100vh - (clamp(10px, 1.15vw, 18px) * 2));
    justify-content: flex-start;
    gap: clamp(24px, 5vh, 48px);
    padding: clamp(32px, 4.4vw, 70px) clamp(24px, 4vw, 56px) clamp(18px, 2.4vw, 32px);
    background:
        linear-gradient(90deg, rgba(7, 20, 38, 0.97), rgba(7, 20, 38, 0.68) 46%, rgba(7, 20, 38, 0.18)),
        url("../img/login-city.png") center right / cover no-repeat,
        linear-gradient(135deg, #071426, #0f172a);
}

.auth-body .login-marketing .login-brand {
    display: none !important;
}

.auth-body .marketing-copy {
    max-width: min(620px, 54vw);
    margin-top: clamp(28px, 8vh, 76px);
}

.auth-body .orange-line {
    width: clamp(28px, 3vw, 44px);
    margin-bottom: clamp(12px, 2vh, 18px);
}

.auth-body .marketing-copy h1 {
    max-width: 100%;
    font-size: clamp(28px, 2vw, 34px);
    line-height: 1.12;
    white-space: nowrap;
}

.auth-body .marketing-copy h2 {
    margin-top: clamp(8px, 1.2vh, 12px);
    font-size: clamp(21px, 2.1vw, 30px);
    line-height: 1.18;
}

.auth-body .marketing-copy p {
    max-width: 430px;
    margin-top: clamp(12px, 1.8vh, 18px);
    font-size: clamp(13px, 0.95vw, 15px);
    line-height: 1.55;
}

.auth-body .feature-stack {
    gap: clamp(10px, 1.6vh, 16px);
    max-width: min(420px, 44vw);
    margin: 0;
}

.auth-body .feature-stack article {
    gap: 12px;
}

.auth-body .feature-icon {
    width: clamp(34px, 3.2vw, 42px);
    height: clamp(34px, 3.2vw, 42px);
    font-size: 11px;
}

.auth-body .feature-stack strong {
    font-size: clamp(13px, 0.92vw, 15px);
}

.auth-body .feature-stack p {
    margin-top: 2px;
    font-size: clamp(11px, 0.8vw, 13px);
    line-height: 1.45;
}

.auth-body .login-marketing footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: clamp(86px, 15vh, 150px);
    font-size: 11px;
}

.auth-body .login-marketing footer a {
    color: var(--axen-orange);
    font-weight: 800;
    text-decoration: none;
}

.auth-body .login-marketing footer a:hover {
    color: #ffb35c;
    text-decoration: underline;
}

.auth-body .login-panel {
    min-height: 0;
    height: calc(100vh - (clamp(10px, 1.15vw, 18px) * 2));
    padding: clamp(14px, 2.2vw, 34px);
    overflow: hidden;
}

.auth-body .login-card {
    width: min(100%, 360px);
    max-height: calc(100vh - 48px);
    padding: clamp(18px, 2.25vw, 28px);
    border-radius: 8px;
    display: grid;
    align-content: center;
    background: rgba(8, 16, 31, 0.78);
}

.auth-body .login-card-logo {
    display: block;
    width: min(100%, 390px);
    max-width: 390px;
    height: clamp(78px, 11vh, 104px);
    object-fit: cover;
    object-position: center;
    margin: 0 auto clamp(12px, 2.6vh, 22px);
}

.auth-body .login-card h2 {
    font-size: clamp(20px, 1.55vw, 24px);
    line-height: 1.15;
}

.auth-body .login-card > p {
    margin: 6px 0 clamp(14px, 2.2vh, 22px);
    font-size: 12px;
}

.auth-body .field {
    gap: 6px;
    margin-bottom: clamp(10px, 1.45vh, 14px);
}

.auth-body .field span {
    font-size: 11px;
}

.auth-body .field input,
.auth-body .field select {
    min-height: clamp(39px, 5.1vh, 45px);
    padding: 0 14px;
    font-size: 12px;
}

.auth-body .field select {
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 13px) 50%;
}

.auth-body .password-field input {
    padding-right: 70px;
}

.auth-body .ghost-icon {
    bottom: 5px;
    height: 30px;
    font-size: 12px;
}

.auth-body .form-row {
    gap: 10px;
    margin-top: 2px;
}

.auth-body .checkbox,
.auth-body .forgot-link {
    font-size: 11px;
}

.auth-body .primary-btn {
    min-height: clamp(42px, 5.4vh, 48px);
    margin-top: clamp(12px, 2vh, 18px);
    font-size: 13px;
}

.auth-body .secure-note {
    margin-top: clamp(14px, 2.2vh, 20px);
    font-size: 11px;
}

.auth-body .axen-security-logo {
    display: block;
    width: min(200px, 62%);
    max-width: 200px;
    max-height: 77px;
    height: auto;
    object-fit: contain;
    margin: 14px auto 0;
    opacity: 1;
}

.auth-body .alert {
    margin-bottom: 12px;
    padding: 10px 12px;
    font-size: 12px;
}

@media (max-width: 1180px) {
    .auth-body {
        overflow: auto;
    }

    .auth-body .login-screen {
        min-height: 100vh;
        height: auto;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        overflow: visible;
    }

    .auth-body .login-marketing,
    .auth-body .login-panel {
        height: auto;
        min-height: 0;
        border-radius: 8px;
    }

    .auth-body .login-marketing {
        padding: clamp(28px, 5vw, 44px);
    }

    .auth-body .marketing-copy {
        max-width: 560px;
        margin-top: 0;
    }

    .auth-body .marketing-copy h1 {
        white-space: normal;
    }
}

@media (max-width: 760px) {
    .auth-body {
        width: 100%;
        min-height: 100vh;
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .auth-body .login-screen {
        width: 100%;
        min-height: 100vh;
        padding: 0;
        gap: 0;
    }

    .auth-body .login-marketing {
        display: none;
    }

    .auth-body .login-panel {
        min-height: 100vh;
        padding: 18px;
        border-radius: 0;
        overflow: visible;
    }

    .auth-body .login-card {
        width: min(100%, 380px);
        max-height: none;
        padding: 22px;
    }

    .auth-body .login-card-logo {
        width: min(100%, 340px);
        max-width: 340px;
        height: 88px;
        margin-bottom: 18px;
    }

    .auth-body .axen-security-logo {
        width: min(180px, 62%);
        max-width: 180px;
    }
}

.audit-panel { display: grid; gap: 16px; }
.audit-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.audit-panel-head h2 { margin-bottom: 6px; }
.audit-panel-head p { margin: 0; color: #64748b; font-size: 13px; }
.audit-panel-head > strong { padding: 8px 12px; border-radius: 999px; background: #eef6ff; color: #2563eb; white-space: nowrap; }
.audit-filters { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 12px; padding: 14px; border: 1px solid #dbe5f3; border-radius: 10px; background: #f8fafc; }
.audit-filters label { display: grid; gap: 6px; color: #334155; font-size: 12px; font-weight: 800; }
.audit-filters input, .audit-filters select { min-height: 38px; border: 1px solid #dbe5f3; border-radius: 8px; padding: 0 10px; background: #fff; color: #0f172a; }
.audit-search { grid-column: span 2; }
.audit-filter-actions { display: flex; align-items: end; gap: 8px; }
.audit-filter-actions a, .audit-filter-actions button, .audit-detail-btn { min-height: 38px; border: 1px solid #dbe5f3; border-radius: 8px; padding: 0 12px; background: #fff; color: #0f172a; font-weight: 900; text-decoration: none; cursor: pointer; }
.audit-filter-actions button, .audit-detail-btn { border-color: #2563eb; background: #2563eb; color: #fff; }
.audit-table-wrap { overflow-x: auto; border: 1px solid #dbe5f3; border-radius: 10px; background: #fff; }
.audit-table { width: 100%; min-width: 2000px; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.audit-table th, .audit-table td { padding: 11px 12px; border-bottom: 1px solid #e5edf7; text-align: left; vertical-align: top; }
.audit-table th { position: sticky; top: 0; z-index: 1; background: #f8fafc; color: #475569; font-size: 11px; text-transform: uppercase; white-space: nowrap; }
.audit-table td strong, .audit-table td small { display: block; }
.audit-table td small { margin-top: 3px; color: #64748b; }
.audit-table code { padding: 3px 6px; border-radius: 6px; background: #f1f5f9; color: #0f172a; }
.audit-coordinate-link { display: inline-flex; flex-direction: column; gap: 3px; color: #2563eb; font-weight: 900; text-decoration: none; }
.audit-coordinate-link span { text-decoration: underline; text-underline-offset: 3px; }
.audit-coordinate-link small { color: #0f172a; font-weight: 700; }
.audit-coordinate-link:hover span { color: #1d4ed8; }
.audit-badge, .audit-status { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.audit-badge { background: #e0f2fe; color: #0369a1; }
.audit-status.success { background: #dcfce7; color: #15803d; }
.audit-status.failed { background: #fee2e2; color: #b91c1c; }
.audit-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #64748b; }
.audit-pagination div { display: inline-flex; align-items: center; gap: 8px; }
.audit-pagination a, .audit-pagination strong { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid #dbe5f3; border-radius: 8px; text-decoration: none; color: #0f172a; background: #fff; font-weight: 900; }
.audit-pagination a.disabled { opacity: .45; pointer-events: none; }
.audit-modal { width: min(820px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 32px)); border: 0; border-radius: 14px; padding: 22px; box-shadow: 0 24px 80px rgba(15, 23, 42, .32); }
.audit-modal::backdrop { background: rgba(15, 23, 42, .55); }
.audit-modal form { float: right; }
.audit-modal button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f1f5f9; color: #0f172a; font-size: 18px; font-weight: 900; cursor: pointer; }
.audit-modal h3 { margin: 0 0 16px; font-size: 20px; }
.audit-modal dl { display: grid; gap: 10px; margin: 0; }
.audit-modal dl div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid #e5edf7; }
.audit-modal dt { color: #64748b; font-weight: 900; }
.audit-modal dd { margin: 0; color: #0f172a; overflow-wrap: anywhere; }
.audit-modal .audit-map-row { align-items: center; }
.audit-map-link { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 14px; border-radius: 8px; background: #2563eb; color: #fff; font-weight: 900; text-decoration: none; box-shadow: 0 10px 20px rgba(37, 99, 235, .18); }
.audit-map-link:hover { background: #1d4ed8; color: #fff; }

@media (max-width: 1180px) {
    .audit-filters { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 720px) {
    .audit-panel-head, .audit-pagination { align-items: flex-start; flex-direction: column; }
    .audit-filters { grid-template-columns: 1fr; }
    .audit-search { grid-column: auto; }
    .audit-modal dl div { grid-template-columns: 1fr; gap: 4px; }
}
