:root{--sidebar-width:240px;--sidebar-collapsed:78px;--primary:#2563eb;--navy:#0f172a;--bg:#f4f7fb;--border:#e5e7eb;--muted:#64748b}*{box-sizing:border-box}body{margin:0;background:var(--bg);font-family:"Segoe UI",Arial,sans-serif;color:#172033;overflow-x:hidden}.app-shell{min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);background:linear-gradient(180deg,#111827,#0f172a);flex-direction:column;z-index:1040;transition:width .25s ease}.brand{height:72px;display:flex;align-items:center;gap:12px;padding:0 20px;color:#fff;text-decoration:none;border-bottom:1px solid rgba(255,255,255,.08);font-size:19px;font-weight:700;white-space:nowrap;overflow:hidden}.brand-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:var(--primary);flex:0 0 auto}.sidebar-nav{padding:14px 10px;display:flex;flex-direction:column;gap:5px}.sidebar-nav .nav-link{display:flex;align-items:center;gap:12px;min-height:44px;padding:10px 13px;border-radius:10px;color:#cbd5e1;text-decoration:none;white-space:nowrap;overflow:hidden}.sidebar-nav .nav-link i{width:22px;text-align:center;flex:0 0 auto}.sidebar-nav .nav-link:hover,.sidebar-nav .nav-link.active{background:var(--primary);color:#fff}.nav-divider{height:1px;background:rgba(255,255,255,.1);margin:10px 8px}.content-wrapper{margin-left:var(--sidebar-width);min-height:100vh;display:flex;flex-direction:column;transition:margin-left .25s ease}.topbar{height:72px;background:#fff;border-bottom:1px solid var(--border);padding:0 22px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:1020}.page-kicker{font-size:11px;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);font-weight:700}.page-title{font-size:19px;line-height:1.2;margin:2px 0 0;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.page-content{padding:22px;flex:1}.app-footer{padding:15px 22px;border-top:1px solid var(--border);background:#fff;color:var(--muted);font-size:13px}.card{border:0;border-radius:15px;box-shadow:0 8px 24px rgba(15,23,42,.06)}.module-card{min-height:220px}.placeholder-icon{width:62px;height:62px;display:grid;place-items:center;border-radius:18px;background:#eff6ff;color:var(--primary);font-size:24px}.table thead th{background:#f8fafc;color:#475569;font-size:12px;text-transform:uppercase;letter-spacing:.04em;border-bottom-width:1px}.empty-state{padding:40px 15px;text-align:center;color:var(--muted)}.form-control,.form-select,.btn{min-height:40px}.login-page{min-height:100vh;background:radial-gradient(circle at top right,#60a5fa,transparent 34%),linear-gradient(135deg,#0f172a,#1d4ed8);display:grid;place-items:center;padding:24px}.login-card{width:min(980px,100%);border-radius:24px;overflow:hidden;box-shadow:0 24px 70px rgba(0,0,0,.28)}.login-brand{background:linear-gradient(155deg,#111827,#1e3a8a);color:#fff;padding:50px}.login-form{background:#fff;padding:50px}.login-logo{width:64px;height:64px;border-radius:19px;background:#2563eb;display:grid;place-items:center;font-size:27px}.password-wrap{position:relative}.password-wrap .form-control{padding-right:48px}.password-toggle{position:absolute;right:6px;top:5px;width:36px;height:36px;border:0;background:transparent;color:#64748b}.mobile-sidebar{background:#0f172a;color:#fff}.mobile-sidebar .offcanvas-header{border-color:rgba(255,255,255,.12)!important}.mobile-sidebar .btn-close{filter:invert(1)}body.sidebar-collapsed .sidebar{width:var(--sidebar-collapsed)}body.sidebar-collapsed .content-wrapper{margin-left:var(--sidebar-collapsed)}body.sidebar-collapsed .brand-text,body.sidebar-collapsed .sidebar-nav span{display:none}@media(max-width:991.98px){.content-wrapper{margin-left:0}.page-content{padding:16px}.topbar{padding:0 14px}.login-brand{display:none}.login-form{padding:34px 24px}}@media(max-width:575.98px){.topbar .btn-outline-danger{font-size:0}.topbar .btn-outline-danger i{font-size:14px;margin:0!important}.page-title{max-width:190px}}

/* Thermal receipt preview and print styles */
.receipt-preview-scroll { overflow-x: auto; padding: 1rem 0 2rem; }
.thermal-receipt { background:#fff; color:#111; box-sizing:border-box; margin:0 auto; font-family:"Courier New",Courier,monospace; line-height:1.25; box-shadow:0 .5rem 1.5rem rgba(0,0,0,.12); }
.receipt-2inch { width:58mm; padding:2mm; font-size:9px; }
.receipt-3inch { width:80mm; padding:3mm; font-size:10px; }
.receipt-text { margin:0; padding:0; border:0; background:transparent; color:#111; font:inherit; line-height:inherit; white-space:pre; word-break:normal; overflow-wrap:normal; tab-size:1; }
@media print {
    @page { margin:0; }
    .no-print,.sidebar,.topbar,footer,nav { display:none!important; }
    html,body,.main-content,.content-wrapper,.receipt-preview-scroll { background:#fff!important; margin:0!important; padding:0!important; width:auto!important; min-width:0!important; overflow:visible!important; }
    .thermal-receipt { box-shadow:none!important; margin:0!important; }
    .receipt-2inch { width:58mm!important; }
    .receipt-3inch { width:80mm!important; }
}

/* Dashboard summary cards */
.dashboard-summary-row {
    align-items: stretch;
}

.dashboard-summary-card {
    min-height: 150px;
    overflow: hidden;
}

.dashboard-summary-card .card-body {
    padding: 1.5rem;
}

.dashboard-summary-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    flex: 0 0 58px;
    border-radius: 16px;
    font-size: 22px;
}

.dashboard-summary-icon-sales {
    background: #ecfdf5;
    color: #047857;
}

.dashboard-summary-icon-items {
    background: #eff6ff;
    color: #2563eb;
}

.dashboard-summary-label {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.dashboard-summary-value {
    color: var(--navy);
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 750;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

@media(max-width:575.98px) {
    .dashboard-summary-card {
        min-height: 128px;
    }

    .dashboard-summary-card .card-body {
        padding: 1.2rem;
    }
}


/* Physical thermal-print safety: the page owns the paper width and the receipt owns the inner margin. */
.thermal-receipt {
    background: #fff;
    color: #000;
    font-family: "Courier New", Courier, monospace;
    font-weight: 600;
    line-height: 1.18;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
}

.receipt-2inch {
    width: 58mm;
    padding: 2mm;
    font-size: 9.5px;
}

.receipt-3inch {
    width: 80mm;
    padding: 3mm;
    font-size: 10.5px;
}

.receipt-text {
    color: #000;
    white-space: pre;
    overflow: visible;
    font-weight: inherit;
    letter-spacing: 0;
}

@media print {
    @page { margin: 0; }

    .receipt-preview-scroll {
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .thermal-receipt {
        box-shadow: none !important;
        margin: 0 !important;
        page-break-inside: avoid;
    }

    .receipt-2inch {
        width: 58mm !important;
        padding: 2mm !important;
        font-size: 9.5px !important;
    }

    .receipt-3inch {
        width: 80mm !important;
        padding: 3mm !important;
        font-size: 10.5px !important;
    }
}
