body {
    background: radial-gradient(circle at top right, #eef6ff 0%, #f7f8fb 45%, #f4f6fb 100%);
    color: #1f2937;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.app-sidebar {
    width: 270px;
    border-right: 1px solid rgba(0,0,0,0.08);
    padding: 1rem 1rem 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 12px rgba(0,0,0,0.05);
}

.brand-wrap {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.brand-link {
    font-weight: 800;
    font-size: 1.05rem;
    color: #f1f5f9;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    transition: opacity 0.2s ease;
}

.brand-link:hover {
    opacity: 0.9;
}

.brand-name {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    margin-top: 0.2rem;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.7rem 0.9rem;
    border-radius: 0.65rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--theme-accent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    padding-left: 1rem;
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.15));
    color: #ffffff;
    font-weight: 600;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.1), 0 4px 12px rgba(0,0,0,0.15);
}

.sidebar-link.active::before {
    opacity: 1;
}

.sidebar-section-label {
    padding: 1rem 0.9rem 0.4rem;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin-top: 0.5rem;
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding: 1rem 0;
    margin-top: auto;
}

.sidebar-footer .small {
    color: rgba(255,255,255,0.6);
    font-size: 0.75rem;
}

.sidebar-footer .fw-semibold {
    color: #f1f5f9;
    margin: 0.4rem 0 0.6rem 0;
}

.sidebar-footer .btn-outline-light {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.sidebar-footer .btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
    color: #ffffff;
}

.app-main {
    flex: 1;
    min-width: 0;
    padding-bottom: 3rem;
}

.card-shadow {
    border: 0;
    box-shadow: 0 2px 16px rgba(20,27,45,0.07);
    border-radius: 0.75rem;
}

/* ── Dashboard KPI Cards ─────────────────────────────────── */
.dash-kpi-card {
    background: #fff;
    border-radius: 0.875rem;
    padding: 1rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 14px rgba(20,27,45,0.07);
    border-left: 4px solid var(--kpi-color, #2563eb);
    transition: transform 0.15s, box-shadow 0.15s;
}

.dash-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(20,27,45,0.12);
}

.dash-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.65rem;
    background: var(--kpi-bg, #eff6ff);
    color: var(--kpi-color, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.dash-kpi-body { flex: 1; min-width: 0; }

.dash-kpi-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-kpi-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-kpi-alert {
    animation: kpi-pulse 2s infinite;
}

@keyframes kpi-pulse {
    0%,100% { box-shadow: 0 2px 14px rgba(20,27,45,0.07); }
    50%      { box-shadow: 0 2px 20px rgba(234,88,12,0.35); }
}

/* ── Legacy kpi-card ─────────────────────────────────────── */
.kpi-card h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.table td,
.table th {
    vertical-align: middle;
}

/* ── Chart.js card ───────────────────────────────────────── */
.card-header {
    background: transparent;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.925rem;
}

.bg-primary-subtle { background: #eff6ff !important; }
.text-primary { color: #2563eb !important; }

/* ── POS Grid ────────────────────────────────────────────── */
.pos-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1rem;
}

@media (max-width: 992px) {
    .pos-grid {
        grid-template-columns: 1fr;
    }
}

.product-btn {
    text-align: left;
}

.receipt {
    max-width: 520px;
    margin: 0 auto;
}

.receipt-enhanced {
    max-width: 680px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.receipt-kicker {
    display: inline-block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    margin-bottom: 0.5rem;
}

.receipt-meta {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #ffffff;
    padding: 0.75rem 0.9rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 1rem;
    font-size: 0.92rem;
}

.receipt-table thead th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
}

.receipt-table tbody td {
    border-color: #eef2f7;
}

.receipt-totals {
    border-top: 1px dashed #cbd5e1;
    padding-top: 0.75rem;
}

.mobile-topbar {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 0.65rem 0.8rem;
}

@media (max-width: 992px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        width: 100%;
        height: auto;
        position: static;
    }

    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .receipt-meta {
        grid-template-columns: 1fr;
    }

    .dash-kpi-value {
        font-size: 1.1rem;
    }
}

/* ── Brand Logo ──────────────────────────────────────────── */
.brand-icon {
    flex-shrink: 0;
    line-height: 0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(29,78,216,0.45);
}

.brand-icon img {
    display: block;
    border-radius: 10px;
}

.brand-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: #f1f5f9;
    line-height: 1.2;
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
}

.login-header-logo {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(37,99,235,0.35);
}

.login-title {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 45%, #7c3aed 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}

.login-subtitle {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #64748b;
}

.site-copyright {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: rgba(248, 250, 252, 0.96);
    border-top: 1px solid #e2e8f0;
    text-align: center;
    font-size: 0.78rem;
    color: #64748b;
    padding: 0.55rem 1rem 0.65rem;
}

.login-copyright {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0.6rem;
    text-align: center;
    font-size: 0.76rem;
    color: #64748b;
    padding: 0 1rem;
}


