:root {
    --primary-color: #2740cc;
    --primary-dark: #1e30a0;
    --secondary-color: #4f46e5;
    --accent-color: #8b5cf6;
    --text-main: #1e293b;
    --text-dim: #4b5563;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shine: rgba(255, 255, 255, 0.8);
    --sidebar-bg: rgba(255, 255, 255, 0.85);


    /* Z-Index Scale */
    --z-sidebar: 100;
    --z-sidebar-mobile: 200;
    --z-cart-mobile: 300;
    --z-modal: 400;
    --z-toast: 500;
    --z-overlay: 600;


    /* Type Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.85rem;
    --text-base: 1rem;
    --text-lg: 1.15rem;
    --text-xl: 1.4rem;
    --text-2xl: 1.8rem;
}

/* Screen reader only - visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}


body {
    background-color: #f8fafc;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}


/* Dynamic Background */
.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 10% 20%, rgba(39, 64, 204, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(39, 64, 204, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, #ffffff 0%, #f1f5f9 100%);
    filter: blur(60px);
}


.dashboard-container,
.app-layout {
    display: flex;
    min-height: 100vh;
}


/* Glassmorphism Common Class */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-radius: 20px;
}


/* Sidebar */
/* Sidebar - Responsive Logic */
.sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    /* RTL default */
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    z-index: var(--z-sidebar-mobile);
    transform: translateX(100%);
    /* Hidden on Mobile by default */
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
}


/* Desktop: Always Show Sidebar */
@media (min-width: 900px) {
    .sidebar {
        position: sticky;
        transform: none !important;
        box-shadow: none;
        border-inline-end: 1px solid rgba(0, 0, 0, 0.05);
        height: 100vh;
        z-index: var(--z-sidebar);
        width: 280px;
        display: flex !important;
    }
}


.logo {
    margin-bottom: 18px;
    padding: 0 4px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}


.logo i {
    color: var(--secondary-color);
}


.nav-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex-grow: 1;
    overflow-y: auto;
    padding-inline-end: 2px;
    scrollbar-width: none;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-group-label {
    padding: 0 14px 3px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0;
    text-transform: uppercase;
}


.nav-item {
    text-decoration: none;
    color: var(--text-dim);
    padding: 9px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.88rem;
    font-weight: 650;
}


.nav-item:hover,
.nav-item.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}


.nav-badge {
    background: #10b981;
    color: white;
    border-radius: 10px;
    font-size: 0.7rem;
    padding: 1px 6px;
    margin-inline-start: 4px;
    font-weight: 700;
}


.nav-item i {
    width: 20px;
    text-align: center;
    color: inherit;
}


.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}


.avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}


.user-info {
    display: flex;
    flex-direction: column;
}


.user-info .name {
    font-weight: 600;
    font-size: 0.95rem;
}


.user-info .role {
    font-size: 0.8rem;
    color: var(--text-dim);
}


/* Main Content */
.main-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 100%;
    background: #f8fafc;
}

.header {
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.045);
    gap: 16px;
}

.welcome-text h1 {
    font-size: 1.55rem;
    margin-bottom: 3px;
    color: var(--text-main);
    line-height: 1.25;
}

.welcome-text p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    background: #eef2ff;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 7px;
}


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

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

.branch-chip {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 12px;
    border-radius: 13px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
}

.branch-chip i {
    color: var(--primary-color);
}

.branch-switcher {
    margin: 0;
}

.branch-switcher select {
    border: 0;
    background: transparent;
    color: #1e293b;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    outline: none;
    max-width: 220px;
}


.header-actions .platform-btn {
    width: auto;
    white-space: nowrap;
    padding: 10px 18px;
    font-size: var(--text-sm);
}


.shift-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}


.logout-btn {
    background: transparent;
    border: 1px solid #fee2e2;
    color: #ef4444;
    padding: 8px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Cairo', sans-serif;
    text-decoration: none;
    display: inline-block;
}


.logout-btn:hover {
    background: #fef2f2;
}


/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}


.card {
    padding: 30px;
    border-radius: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: white;
}


.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(39, 64, 204, 0.1);
}


.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: rgba(39, 64, 204, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 5px;
}


.icon-wrapper.secondary {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}


.icon-wrapper.accent {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}


.card h3 {
    font-size: 1.4rem;
    color: var(--text-main);
}


.card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}


/* Primary Card Special */
.card.primary {
    background: linear-gradient(135deg, white, #f8fafc);
    border: 1px solid rgba(39, 64, 204, 0.2);
}


.btn {
    padding: 10px 25px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    text-align: center;
    display: inline-block;
    text-decoration: none;
}


.btn-glow {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 5px 15px rgba(39, 64, 204, 0.3);
    margin-top: auto;
    width: 100%;
}


.btn-glow:hover {
    box-shadow: 0 8px 25px rgba(39, 64, 204, 0.4);
    transform: scale(1.02);
}


.btn-outline {
    background: white;
    border: 1px solid var(--text-dim);
    color: var(--text-main);
}


.btn-outline:hover {
    background: #f1f5f9;
}


/* Info Panel */
.info-panel {
    grid-column: 1 / -1;
    padding: 25px;
    margin-top: 20px;
    background: white;
}


.info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #10b981;
}


.info-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}


.info-body p {
    color: var(--text-dim);
    max-width: 600px;
}


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


/* Auth Pages & Forms */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}


.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    text-align: center;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}


.auth-card h1 {
    margin-bottom: 10px;
    color: var(--primary-color);
}


.auth-card .lead {
    margin-bottom: 30px;
    color: var(--text-dim);
}


.form-group {
    margin-bottom: 20px;
    text-align: start;
}


.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 600;
}


.form-group input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}


.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(39, 64, 204, 0.1);
}


.form-group select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: var(--text-main);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: 0.3s;
    cursor: pointer;
}


.form-actions {
    margin-top: 30px;
}


.platform-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}


.platform-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(39, 64, 204, 0.2);
}
.platform-btn.secondary {
    background: white;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}
.platform-btn.secondary:hover {
    background: #eef2ff;
    box-shadow: 0 4px 12px rgba(39, 64, 204, 0.12);
}


/* Activity Page */
.activity-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    text-align: start;
}


.activity-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}


.activity-card:hover {
    background: white;
    border-color: var(--primary-color);
}


.activity-card.selected {
    background: rgba(39, 64, 204, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: bold;
}


.activity-card input {
    accent-color: var(--primary-color);
}


/* Alerts */
.alert {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}


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


.alert.success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}


/* Simple Nav */
.simple-nav {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 0.9rem;
}


.simple-nav a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}


/* Responsiveness — Tablet (600-900px) */
@media (max-width: 900px) and (min-width: 601px) {
    .welcome-text h1 {
        font-size: 1.4rem;
    }


    .header {
        padding: 15px 20px;
    }


    .main-content {
        padding: 16px;
        gap: 16px;
    }


    .actions-panel h2 { font-size: var(--text-lg); }
}


/* Responsiveness — Small mobile (< 600px) */
@media (max-width: 600px) {
    .welcome-text h1 {
        font-size: 1.2rem;
    }


    .welcome-text p {
        font-size: 0.8rem;
    }


    .header {
        padding: 12px 16px;
    }


    .main-content {
        padding: 12px;
        gap: 14px;
    }


    /* Dashboard stat cards */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .stat-card { padding: 12px 14px; gap: 10px; }
    .stat-card .sc-icon { width: 34px; height: 34px; font-size: var(--text-sm); }
    .stat-card .sc-value { font-size: 1.05rem; }
    .stat-card .sc-label { font-size: 0.72rem; }
    .actions-panel { padding: 16px; gap: 12px; border-radius: 16px; }
    .actions-panel h2 { font-size: 1.1rem; }
    .actions-panel p { font-size: 0.82rem; }
    .history-panel { padding: 16px; border-radius: 16px; }
    .history-panel th, .history-panel td { padding: 10px 8px; font-size: 0.82rem; }
}


/* Responsiveness — Extra small (< 380px) */
@media (max-width: 380px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card .sc-value { font-size: var(--text-base); }
    .actions-panel h2 { font-size: var(--text-base); }
}


/* Responsiveness — Landscape phones (short viewport) */
@media (max-height: 500px) and (orientation: landscape) {
    .main-content {
        padding: 10px 16px;
        gap: 10px;
    }


    .header {
        padding: 8px 16px;
    }


    .welcome-text h1 {
        font-size: 1.1rem;
        margin-bottom: 0;
    }


    .welcome-text p {
        font-size: 0.75rem;
    }


    .sidebar {
        padding: 16px 14px;
    }


    .sidebar .logo {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }


    .nav-item {
        padding: 6px 12px;
        font-size: 0.85rem;
    }


    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px;
    }


    /* Dashboard landscape */
    .stats-section { margin-bottom: 14px; }
    .stats-grid { gap: 8px; }
    .stat-card { padding: 10px 14px; gap: 10px; }
    .stat-card .sc-icon { width: 32px; height: 32px; font-size: 0.8rem; }
    .stat-card .sc-value { font-size: var(--text-base); }
    .actions-panel { padding: 14px; gap: 10px; margin-bottom: 14px; }
    .actions-panel h2 { font-size: var(--text-base); }
    .history-panel { padding: 14px; }
    .history-panel th, .history-panel td { padding: 8px 6px; font-size: 0.8rem; }
}


/* Responsiveness — unified breakpoint: 1024px */
@media (max-width: 1024px) {


    .dashboard-container,
    .app-layout {
        flex-direction: column;
    }


    /* Mobile Sidebar Logic */
    .sidebar {
        width: 280px;
        height: 100vh;
        position: fixed;
        top: 0;
        right: 0;
        /* RTL default */
        background: var(--sidebar-bg);
        display: flex;
        flex-direction: column;
        padding: 30px 20px;
        z-index: var(--z-sidebar-mobile);
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }


    .sidebar.active {
        transform: translateX(0);
        /* Show on toggle */
    }


    .nav-links {
        display: flex;
        /* Always flex in column mode inside sidebar */
        overflow-x: visible;
        width: 100%;
        position: static;
        padding: 0;
        background: transparent;
        box-shadow: none;
    }


    .logo {
        margin-bottom: 20px;
    }


    .main-content {
        padding: 15px;
        padding-bottom: 80px;
    }


    .content-grid {
        grid-template-columns: 1fr;
    }
}


/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}


.modal.show {
    opacity: 1;
}


.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}


.modal.show .modal-content {
    transform: translateY(0);
}


button.close-modal {
    position: absolute;
    top: 12px;
    inset-inline-end: 16px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}
button.close-modal:hover,
button.close-modal:focus-visible {
    background: #f1f5f9;
    color: #1e293b;
}


/* Status Badges */
.shift-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}


.shift-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}


.badge-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    position: absolute;
    top: 10px;
    inset-inline-end: 10px;
    box-shadow: 0 0 0 2px white;
}


.active-shift {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}


/* Action Buttons Grid (Equal Sizing) */
.action-buttons-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 0;
    min-width: 260px;
}

.big-btn.primary-btn {
    flex: 1;
    background: var(--primary-color);
    color: white;
    text-align: center;
    justify-content: center;
}

.big-btn.secondary-btn {
    flex: 1;
    background: #f8fafc;
    color: #475569;
    text-align: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
}


.big-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}


@media (max-width: 480px) {
    .action-buttons-grid {
        gap: 10px;
    }
    .action-buttons-grid .big-btn {
        flex: 1 1 100%;
        font-size: 0.95rem;
        padding: 11px 16px;
    }
}

@media (max-width: 980px) {
    .header {
        align-items: flex-start;
        flex-direction: column;
    }
    .sales-header-actions {
        width: 100%;
        justify-content: space-between;
    }
    .branch-chip {
        flex: 1;
        justify-content: flex-start;
    }
    .actions-panel {
        flex-direction: column;
        align-items: stretch;
    }
    .action-buttons-grid {
        min-width: 0;
    }
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stat-card--hero {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .main-content {
        padding: 14px;
        gap: 14px;
    }
    .header,
    .actions-panel,
    .history-panel {
        border-radius: 14px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stat-card--hero {
        min-height: auto;
    }
    .stat-card--hero .sc-value {
        font-size: 1.55rem;
    }
    .branch-switcher select {
        max-width: 150px;
    }
}


/* ========================================
   Dashboard (sales.php) — Base Rules
   ======================================== */


/* Stat Cards */
.stats-section { margin-bottom: 24px; }
.section-label {
    font-size: var(--text-xs);
    font-weight: 700;
    color: #94a3b8;
    text-transform: none;
    letter-spacing: 0;
    margin: 0 0 12px 0;
    padding: 0 4px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
}
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.045);
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid #eef2f7;
    border-top: 3px solid var(--card-accent, #6366f1);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
}
.stat-card .sc-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: var(--text-base);
    background: var(--icon-bg, #eef2ff);
    color: var(--card-accent, #6366f1);
}
.stat-card .sc-label {
    font-size: var(--text-xs);
    color: #64748b;
    margin-bottom: 2px;
    font-weight: 700;
}
.stat-card .sc-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}
.stat-card .sc-value .unit {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
}
.stat-card .sc-value--sm {
    font-size: var(--text-lg);
}

.stat-card--hero {
    grid-column: span 2;
    min-height: 112px;
    align-items: flex-end;
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(255,255,255,0) 55%),
        white;
}

.stat-card--hero .sc-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.stat-card--hero .sc-value {
    font-size: 2rem;
    letter-spacing: 0;
}

/* Shift Banner */
.actions-panel {
    background: white;
    color: #1e293b;
    padding: 14px;
    border-radius: 18px;
    margin-bottom: 18px;
    display: flex;
    flex-direction: row;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #e8edf6;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.045);
}

.shift-info {
    min-width: 0;
}

.shift-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.shift-status-pill.is-closed {
    background: #f1f5f9;
    color: #64748b;
}

.shift-mainline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: #475569;
    font-size: 0.88rem;
}

.shift-mainline span,
.shift-mainline strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.shift-mainline strong {
    color: #0f172a;
    font-size: 1rem;
}
.big-btn {
    background: var(--primary-color);
    color: var(--primary-color);
    padding: 11px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}


/* History Panel */
.history-panel {
    background: white;
    border-radius: 18px;
    padding: 20px;
    border: 1px solid #eef2f7;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.045);
}
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.history-header h3 { margin: 0; }
.table-responsive { overflow-x: auto; }
.history-panel table { width: 100%; border-collapse: collapse; }
.history-panel th { text-align: start; padding: 15px; color: var(--text-dim); font-size: var(--text-sm); }
.history-panel td { padding: 15px; border-top: 1px solid #f1f5f9; }
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: var(--text-sm);
    font-weight: bold;
}
.status-closed { background: #fee2e2; color: #ef4444; }
.status-open { background: #dcfce7; color: #16a34a; }


/* Shift Summary (close modal) */
.shift-summary {
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.shift-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}
.shift-summary-total {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
    margin-top: 10px;
    font-size: var(--text-lg);
}


/* Diff Display */
.diff-section { text-align: center; margin-bottom: 20px; }
.diff-label { color: #64748b; }
.diff-value {
    font-size: 1.5rem;
    font-weight: bold;
    unicode-bidi: plaintext;
}
.text-positive { color: green; }
.text-negative { color: red; }


/* Modal Helpers */
.modal-subtitle {
    color: #64748b;
    font-size: var(--text-sm);
    margin-bottom: 20px;
}
.section-label i {
    margin-inline-end: 4px;
}
.shift-summary-total strong {
    color: var(--primary-color);
}
.shift-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.6;
}
.shift-error a { color: #dc2626; font-size: 0.82rem; text-decoration: underline; }


/* Special Inputs */
.pin-input {
    width: 100%;
    padding: 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: var(--text-xl);
    letter-spacing: 10px;
    text-align: center;
    box-sizing: border-box;
}
.cash-input-lg {
    font-size: 1.5rem;
    text-align: center;
    padding: 15px;
}


/* Icon-Only Buttons */
.btn-icon {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1.2rem;
}


/* Print Render Target */
.print-render-target {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 600px;
    background: white;
    z-index: -1;
}


/* Close Shift Modal Buttons */
.close-shift-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.close-shift-actions .btn-close-final {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: #ef4444;
    color: white;
    font-size: var(--text-base);
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.close-shift-actions .btn-close-final:hover { background: #dc2626; }
.close-shift-actions .btn-print-report {
    width: 100%;
    padding: 11px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.close-shift-actions .btn-print-report:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #f8fafc;
}


/* Menu Toggle Button (Hamburger) */
.menu-toggle {
    background: var(--primary-color);
    border: none;
    font-size: 1.2rem;
    color: white;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 12px;
    transition: 0.2s;
    display: none;
    /* Hidden on Desktop */
    box-shadow: 0 4px 12px rgba(39, 64, 204, 0.25);
    align-items: center;
    gap: 8px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.92rem;
}
.menu-toggle i {
    font-size: 1.15rem;
}


.menu-toggle:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(39, 64, 204, 0.35);
}


@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
        /* Show on Tablet/Mobile */
    }


    /* Ensure Sidebar has Backdrop when active */
    .sidebar.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        /* Full screen width to cover right side */
        height: 100vh;
        background: rgba(0, 0, 0, 0.3);
        z-index: -1;
        backdrop-filter: blur(4px);
    }
}


/* Utility */
.text-dim { color: var(--text-dim); }
.text-xs { font-size: var(--text-xs); }
.text-primary { color: var(--primary-color); }


/* ========== Items Page ========== */


.table-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 20px;
    overflow-x: auto;
}


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


th, td {
    padding: 15px;
    text-align: start;
    border-bottom: 1px solid #f1f5f9;
}


th {
    font-weight: 700;
    color: var(--text-dim);
    background: #f8fafc;
}


tr:last-child td {
    border-bottom: none;
}


.item-thumb-small {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
}


.action-btn-small {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    color: white;
}


.action-btn-small:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}


.action-btn-small:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}


.btn-edit { background: var(--primary-color); }
.btn-delete { background: #ef4444; }
.btn-stock { background: #eef2ff; color: var(--primary-color); border: 1px solid rgba(39, 64, 204, 0.25); }


/* POS Display Section */
.pos-display-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}


.pos-title {
    font-size: var(--text-sm);
    color: #64748b;
    margin-bottom: 15px;
    display: block;
    text-align: start;
}


.pos-layout {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    direction: rtl;
}


.preview-box {
    width: 100px;
    height: 100px;
    background: #f1f5f9;
    border-radius: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    cursor: pointer;
}


.preview-box > i {
    font-size: 2rem;
    color: #cbd5e1;
}


.controls-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* Color & Shape Pickers */
.color-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


.color-label {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    display: block;
}


.color-label input[type="radio"] {
    position: absolute;
    top: 4px;
    inset-inline-start: 4px;
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--primary-color);
    margin: 0;
    display: block !important;
    background: white;
    border-radius: 50%;
}


.shape-grid {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}


.shape-label {
    cursor: pointer;
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.shape-label input {
    display: none !important;
}


.shape-svg {
    width: 48px;
    height: 48px;
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 2;
    transition: all 0.2s ease;
}


.shape-label:hover .shape-svg {
    stroke: #94a3b8;
}


.shape-label.selected .shape-svg {
    stroke: var(--primary-color);
    stroke-width: 3;
}


.shape-label.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    position: absolute;
    top: 50%;
    inset-inline-start: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    pointer-events: none;
}


/* Low Stock Alert */
.low-stock-alert {
    background: #fff7ed;
    border: 1.5px solid #fed7aa;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}


.low-stock-alert i {
    color: #ea580c;
    font-size: 1.2rem;
    flex-shrink: 0;
}


.low-stock-alert .alert-title {
    font-weight: 700;
    color: #ea580c;
}


.low-stock-alert .alert-count {
    color: #64748b;
    font-size: var(--text-sm);
    margin-inline-start: 8px;
}


.low-stock-badge {
    background: #fff7ed;
    color: #ea580c;
    border: 1px solid #fed7aa;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 700;
    margin: 2px;
    display: inline-block;
}


/* Search & Filter Bar */
.items-filter-bar {
    padding: 0 20px 16px;
}


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


.search-wrapper {
    position: relative;
    flex: 1;
    min-width: 200px;
}


.search-wrapper i {
    position: absolute;
    inset-inline-end: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: var(--text-sm);
}


.search-input {
    width: 100%;
    padding: 9px 12px;
    padding-inline-end: 36px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: var(--text-sm);
    box-sizing: border-box;
    outline: none;
    transition: border 0.2s;
}


.search-input:focus {
    border-color: var(--primary-color);
}


.filter-select {
    padding: 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: var(--text-sm);
    background: white;
    cursor: pointer;
}


.item-count {
    color: #64748b;
    font-size: var(--text-sm);
    white-space: nowrap;
}


/* Category Badge */
.cat-badge {
    background: #eef2ff;
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: var(--text-sm);
}


/* Variant Badge */
.variant-badge {
    background: #dbeafe;
    color: #1d4ed8;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--text-xs);
}


/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-dim);
}


.item-thumb-small.empty-state {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}


.item-thumb-small.empty-state i {
    font-size: 1rem;
    margin-bottom: 0;
}


.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}


/* Item Form Layout */
.item-image-upload {
    text-align: center;
    margin-bottom: 20px;
}


.item-image-upload label {
    cursor: pointer;
    display: inline-block;
}


.image-preview-box {
    width: 100px;
    height: 100px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto;
}


.image-preview-box i {
    font-size: 1.5rem;
    color: #cbd5e1;
}


.image-preview-box img,
.preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}


.image-upload-label {
    font-size: var(--text-xs);
    color: var(--primary-color);
}


.form-row {
    display: flex;
    gap: 15px;
}


.form-row .form-group {
    flex: 1;
}


.checkbox-row {
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
}


.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}


.stock-fields {
    display: none;
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}


/* Variants Section */
.variants-section {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}


.variants-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}


.variants-title {
    font-weight: 700;
    font-size: var(--text-sm);
}


.variants-title i {
    color: var(--primary-color);
    margin-inline-start: 6px;
}


.btn-add-variant {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: var(--text-sm);
}


/* Form Footer */
.form-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}


.btn-delete-item {
    background: #ef4444;
    width: auto;
    margin-top: 10px;
    border-radius: 10px;
}


.btn-delete-item:hover {
    background: #dc2626;
}


/* Stock Modal */
.stock-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}


.stock-modal-icon {
    width: 46px;
    height: 46px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}


.stock-modal-icon i {
    color: var(--primary-color);
    font-size: 1.2rem;
}


.stock-modal-name {
    font-weight: 700;
    color: #1e293b;
}


.stock-modal-current {
    font-size: var(--text-sm);
    color: #64748b;
}


.adj-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}


.adj-type-btn {
    padding: 12px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    font-size: var(--text-sm);
}


.adj-type-btn.active-add {
    border-color: #86efac;
    background: #f0fdf4;
    color: #16a34a;
}


.adj-type-btn.active-remove {
    border-color: #fecaca;
    background: #fef2f2;
    color: #ef4444;
}


.adj-qty-group {
    margin-bottom: 18px;
}


.adj-qty-group label {
    display: block;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
    font-size: var(--text-sm);
}


.adj-qty-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1.1rem;
    text-align: center;
    box-sizing: border-box;
}


.adj-footer {
    display: flex;
    gap: 10px;
}


.adj-submit {
    flex: 1;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 700;
    font-size: var(--text-sm);
    cursor: pointer;
}


.adj-cancel {
    flex: 1;
    padding: 12px;
    background: white;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}


/* Pagination */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 20px;
}


.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: white;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}


.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}


.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


.pagination-info {
    font-size: var(--text-sm);
    font-weight: 600;
    color: #64748b;
    min-width: 60px;
    text-align: center;
}


/* Items page content spacing */
.items-content {
    padding: 0 20px;
}


/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    font-size: var(--text-sm);
    z-index: var(--z-toast);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}


.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}


.toast.toast-success {
    background: #047857;
    color: white;
}


.toast.toast-error {
    background: #b91c1c;
    color: white;
}


/* Delete Confirmation Modal */
.delete-modal-body {
    text-align: center;
    padding: 10px 0 20px;
}


.delete-modal-icon {
    width: 60px;
    height: 60px;
    background: #fef2f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #ef4444;
    font-size: 1.5rem;
}


.delete-modal-text {
    color: #475569;
    font-size: var(--text-sm);
    margin-top: 8px;
}


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


.delete-modal-actions .btn-confirm-delete {
    flex: 1;
    padding: 12px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}


.delete-modal-actions .btn-confirm-delete:hover {
    background: #dc2626;
}


.delete-modal-actions .btn-cancel-delete {
    flex: 1;
    padding: 12px;
    background: white;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}


/* Variant Editor Classes */
.variant-group {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}


.variant-group-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}


.variant-group-header input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
}


.variant-group-delete {
    background: #fef2f2;
    color: #ef4444;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    flex-shrink: 0;
}


.variant-option-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}


.variant-option-row input:first-child {
    flex: 2;
}


.variant-option-row input:nth-child(2) {
    flex: 1;
}


.variant-option-row input {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
}


.variant-option-delete {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}


.variant-add-option {
    background: none;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    padding: 4px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: var(--text-xs);
    font-family: inherit;
}


.variant-empty {
    color: #94a3b8;
    font-size: var(--text-sm);
    margin: 0;
}


/* Empty search results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    display: none;
}


.no-results i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}


/* Loading spinner on button */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
}


.btn-loading i.fa-spinner {
    animation: spin 0.8s linear infinite;
}


@keyframes spin {
    to { transform: rotate(360deg); }
}


/* Responsive Table → Card View */
@media (max-width: 768px) {
    #itemsTable thead {
        display: none;
    }


    #itemsTable tbody tr {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 14px;
        border-bottom: 1px solid #f1f5f9;
        align-items: center;
    }


    #itemsTable tbody tr:last-child {
        border-bottom: none;
    }


    #itemsTable td {
        padding: 0;
        border-bottom: none;
    }


    /* Image */
    #itemsTable td:nth-child(1) {
        width: 44px;
    }


    /* Name */
    #itemsTable td:nth-child(2) {
        flex: 1;
        min-width: 0;
    }


    /* Price */
    #itemsTable td:nth-child(3) {
        width: 100%;
        order: 10;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }


    #itemsTable td:nth-child(3)::before {
        content: '\u0627\u0644\u0633\u0639\u0631';
        color: #94a3b8;
        font-size: var(--text-xs);
        font-weight: 600;
    }


    /* Category */
    #itemsTable td:nth-child(4) {
        order: 11;
    }


    /* Stock */
    #itemsTable td:nth-child(5) {
        order: 12;
    }


    /* Actions */
    #itemsTable td:nth-child(6) {
        order: 1;
        margin-inline-start: auto;
    }


    .table-container {
        padding: 10px;
    }
}

/* Sales dashboard polish v2: compact SaaS layout without changing behavior */
.dashboard-container .sidebar {
    width: 260px;
    background: #fff;
    border-inline-start: 1px solid #edf1f7;
    padding: 22px 16px 16px;
    box-shadow: none;
}

.dashboard-container .logo {
    margin-bottom: 12px;
    padding: 0 8px 14px;
    border-bottom: 1px solid #eef2f7;
}

.dashboard-container .logo a {
    justify-content: flex-start;
}

.dashboard-container .nav-links {
    gap: 10px;
}

.dashboard-container .nav-group {
    gap: 3px;
}

.dashboard-container .nav-group-label {
    padding: 0 12px 4px;
    color: #9aa8bc;
    font-size: 0.66rem;
    font-weight: 800;
}

.dashboard-container .nav-item {
    min-height: 39px;
    padding: 8px 12px;
    border-radius: 10px;
    color: #4b5563;
    font-size: 0.86rem;
    font-weight: 750;
}

.dashboard-container .nav-item:hover {
    background: #f8fafc;
    box-shadow: none;
}

.dashboard-container .nav-item.active {
    background: #eef2ff;
    color: var(--primary-color);
    box-shadow: inset 3px 0 0 var(--primary-color);
}

.dashboard-container .main-content {
    padding: 24px 28px;
    gap: 16px;
    background: linear-gradient(180deg, #f8fafc 0%, #f5f7fb 100%);
}

.dashboard-container .header {
    min-height: auto;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid #e9eef7;
    background:
        linear-gradient(135deg, rgba(39, 64, 204, 0.035), rgba(255, 255, 255, 0) 45%),
        #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
}

.dashboard-container .page-kicker {
    margin-bottom: 6px;
    padding: 4px 11px;
    background: #eef2ff;
    color: var(--primary-color);
    font-size: 0.72rem;
}

.dashboard-container .welcome-text h1 {
    margin: 0 0 4px;
    font-size: 1.45rem;
    letter-spacing: 0;
}

.dashboard-container .welcome-text p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
}

.dashboard-container .branch-chip {
    height: 42px;
    min-height: 42px;
    padding: 0 13px;
    border-radius: 12px;
    background: #fff;
    border-color: #dfe7f2;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.035);
}

.dashboard-container .actions-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    margin-bottom: 14px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(39, 64, 204, 0.045), rgba(16, 185, 129, 0.035)),
        #fff;
    border: 1px solid #e8edf6;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.dashboard-container .shift-status-pill {
    margin-bottom: 6px;
    padding: 5px 10px;
    font-size: 0.76rem;
}

.dashboard-container .shift-mainline {
    gap: 8px 12px;
    font-size: 0.86rem;
}

.dashboard-container .shift-mainline strong {
    color: var(--primary-color);
}

.dashboard-container .action-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
    min-width: 250px;
}

.dashboard-container .big-btn {
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    box-shadow: none;
}

.dashboard-container .big-btn.primary-btn {
    background: var(--primary-color);
    color: #fff;
}

.dashboard-container .big-btn.secondary-btn {
    background: #fff;
    color: #475569;
    border: 1px solid #dfe7f2;
}

.dashboard-container .stats-section {
    margin-bottom: 18px;
}

.dashboard-container .section-label {
    margin-bottom: 10px;
    padding: 0 2px;
    color: #8a9ab0;
    font-size: 0.78rem;
    font-weight: 850;
}

.dashboard-container .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px;
    grid-auto-flow: dense;
}

.dashboard-container .stat-card,
.dashboard-container .stat-card--hero {
    grid-column: auto !important;
    min-height: 112px;
    align-items: center;
    padding: 16px 18px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e9eef7;
    border-top: 3px solid var(--card-accent, #6366f1);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.dashboard-container .stat-card--hero {
    background:
        linear-gradient(135deg, rgba(16, 185, 129, 0.09), rgba(255, 255, 255, 0) 58%),
        #fff;
}

.dashboard-container .stat-card .sc-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
}

.dashboard-container .stat-card .sc-label {
    color: #718096;
    font-size: 0.8rem;
    font-weight: 800;
}

.dashboard-container .stat-card .sc-value {
    margin-top: 4px;
    color: #172033;
    font-size: 1.35rem;
}

.dashboard-container .stat-card--hero .sc-value {
    font-size: 1.7rem;
}

.dashboard-container .history-panel {
    border-radius: 18px;
    border: 1px solid #e9eef7;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

@media (max-width: 1120px) {
    .dashboard-container .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 980px) {
    .dashboard-container .actions-panel {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .dashboard-container .header {
        align-items: stretch;
    }

    .dashboard-container .action-buttons-grid {
        min-width: 0;
    }
}

@media (max-width: 560px) {
    .dashboard-container .main-content {
        padding: 14px;
    }

    .dashboard-container .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Sales dashboard premium pass: restrained SaaS layout, UI only. */
.dashboard-container {
    background: #f6f8fb;
}

.dashboard-container .sidebar {
    width: 272px;
    padding: 22px 14px 16px;
    background: #fff;
    border-inline-start: 1px solid #e8edf5;
    box-shadow: none;
}

.dashboard-container .logo {
    margin-bottom: 16px;
    padding: 0 10px 16px;
    border-bottom: 1px solid #eef2f7;
}

.dashboard-container .logo img {
    width: 34px !important;
    height: 34px !important;
    border-radius: 9px !important;
}

.dashboard-container .logo span {
    font-size: 1.28rem !important;
    letter-spacing: 0;
}

.dashboard-container .nav-links {
    gap: 14px;
}

.dashboard-container .nav-group {
    gap: 4px;
}

.dashboard-container .nav-group-label {
    padding: 0 12px 5px;
    color: #9aa7ba;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
}

.dashboard-container .nav-item {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    color: #4b5563;
    font-size: 0.88rem;
    font-weight: 750;
    box-shadow: none;
}

.dashboard-container .nav-item i {
    width: 20px;
    color: #64748b;
    font-size: 0.95rem;
}

.dashboard-container .nav-item:hover {
    background: #f7f9fc;
    color: #1f2937;
    transform: none;
}

.dashboard-container .nav-item.active {
    background: #eef2ff;
    color: var(--primary-color);
    box-shadow: inset 3px 0 0 var(--primary-color);
}

.dashboard-container .nav-item.active i {
    color: var(--primary-color);
}

.dashboard-container .main-content {
    padding: 26px 30px;
    gap: 18px;
    background: #f6f8fb;
}

.dashboard-container .header.sales-topbar {
    min-height: auto;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid #e6ecf5;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.045);
}

.dashboard-container .page-kicker {
    margin-bottom: 7px;
    padding: 4px 10px;
    border: 1px solid #dfe6ff;
    border-radius: 999px;
    background: #f4f6ff;
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 800;
}

.dashboard-container .welcome-text h1 {
    margin: 0 0 4px;
    color: #172033;
    font-size: 1.52rem;
    font-weight: 850;
    letter-spacing: 0;
}

.dashboard-container .welcome-text p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
    font-weight: 650;
}

.dashboard-container .sales-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-container .connection-chip,
.dashboard-container .branch-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 750;
    box-shadow: none;
}

.dashboard-container .connection-chip {
    color: #047857;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.dashboard-container .connection-chip i,
.dashboard-container .branch-chip i {
    color: currentColor;
}

.dashboard-container .branch-switcher select {
    height: 34px;
    max-width: 220px;
    border: 0;
    background: transparent;
    color: #334155;
    font: inherit;
    outline: none;
}

.dashboard-container .shift-card-premium {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 16px;
    padding: 18px;
    border: 1px solid #e6ecf5;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.045);
}

.dashboard-container .shift-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.dashboard-container .shift-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-container .shift-card-heading h2 {
    margin: 0;
    color: #172033;
    font-size: 1.05rem;
    font-weight: 850;
}

.dashboard-container .shift-status-pill {
    margin: 0;
    padding: 6px 11px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.78rem;
    font-weight: 850;
}

.dashboard-container .shift-status-pill.is-closed {
    background: #f1f5f9;
    color: #64748b;
}

.dashboard-container .shift-metrics-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-container .shift-metric {
    min-height: 74px;
    padding: 12px 14px;
    border: 1px solid #edf2f7;
    border-radius: 14px;
    background: #fbfcfe;
}

.dashboard-container .shift-metric span {
    display: block;
    margin-bottom: 6px;
    color: #7b8aa0;
    font-size: 0.76rem;
    font-weight: 800;
}

.dashboard-container .shift-metric strong {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #172033;
    font-size: 0.98rem;
    font-weight: 850;
    line-height: 1.25;
}

.dashboard-container .shift-metric-total {
    background: #f8fafc;
    border-color: #dfe7f2;
}

.dashboard-container .shift-metric-total strong {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.dashboard-container .shift-metric small {
    color: #8a98aa;
    font-size: 0.72rem;
    font-weight: 700;
}

.dashboard-container .action-buttons-grid {
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 10px;
    min-width: 190px;
}

.dashboard-container .big-btn {
    min-height: 44px;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 850;
    box-shadow: none;
}

.dashboard-container .big-btn.primary-btn {
    background: var(--primary-color);
    color: #fff;
}

.dashboard-container .big-btn.secondary-btn {
    background: #fff;
    color: #475569;
    border: 1px solid #d8e1ee;
}

.dashboard-container .stats-section {
    margin-bottom: 18px;
}

.dashboard-container .section-label {
    margin: 0 0 10px;
    padding: 0 2px;
    color: #7b8aa0;
    font-size: 0.8rem;
    font-weight: 850;
}

.dashboard-container .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
    gap: 14px;
}

.dashboard-container .stat-card,
.dashboard-container .stat-card--hero {
    grid-column: auto !important;
    min-height: 118px;
    align-items: center;
    gap: 14px;
    padding: 17px 18px;
    border: 1px solid #e6ecf5;
    border-top: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.dashboard-container .stat-card--hero {
    border-color: #cdeedd;
    background: #fff;
}

.dashboard-container .stat-card .sc-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: var(--icon-bg, #eef2ff);
    color: var(--card-accent, #6366f1);
    font-size: 1rem;
}

.dashboard-container .stat-card .sc-label {
    margin-bottom: 4px;
    color: #718096;
    font-size: 0.8rem;
    font-weight: 800;
}

.dashboard-container .stat-card .sc-value {
    color: #172033;
    font-size: 1.42rem;
    font-weight: 900;
    line-height: 1.12;
}

.dashboard-container .stat-card--hero .sc-value {
    color: #111827;
    font-size: 1.62rem;
}

.dashboard-container .stat-card .sc-value .unit {
    color: #8a98aa;
    font-size: 0.74rem;
    font-weight: 750;
}

.dashboard-container .history-panel {
    border: 1px solid #e6ecf5;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

@media (min-width: 1280px) {
    .dashboard-container .stat-card--hero {
        grid-column: span 2 !important;
    }
}

@media (max-width: 1100px) {
    .dashboard-container .shift-card-premium {
        grid-template-columns: 1fr;
    }

    .dashboard-container .action-buttons-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
    }
}

@media (max-width: 760px) {
    .dashboard-container .main-content {
        padding: 16px;
    }

    .dashboard-container .header.sales-topbar,
    .dashboard-container .sales-header-actions,
    .dashboard-container .shift-card-heading {
        align-items: stretch;
    }

    .dashboard-container .sales-header-actions,
    .dashboard-container .shift-metrics-row,
    .dashboard-container .action-buttons-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .dashboard-container .branch-chip,
    .dashboard-container .connection-chip {
        width: 100%;
        justify-content: center;
    }
}

/* Sales dashboard full rebuild: clean SaaS information architecture, UI only. */
.dashboard-container {
    background: #f6f8fb;
    color: #172033;
}

.dashboard-container .main-content {
    padding: 28px 32px;
    gap: 18px;
    background: #f6f8fb;
}

.dashboard-container .sidebar {
    width: 270px;
    padding: 22px 14px 16px;
    background: #fff;
    border-inline-start: 1px solid #e7edf5;
    box-shadow: none;
}

.dashboard-container .logo {
    margin-bottom: 18px;
    padding: 0 10px 16px;
    border-bottom: 1px solid #eef2f7;
}

.dashboard-container .logo a {
    justify-content: flex-start;
}

.dashboard-container .logo img {
    width: 34px !important;
    height: 34px !important;
    border-radius: 9px !important;
}

.dashboard-container .logo span {
    color: var(--primary-color) !important;
    font-size: 1.28rem !important;
    font-weight: 850 !important;
    letter-spacing: 0;
}

.dashboard-container .nav-links {
    gap: 14px;
}

.dashboard-container .nav-group {
    gap: 4px;
}

.dashboard-container .nav-group-label {
    padding: 0 12px 5px;
    color: #9aa7ba;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0;
}

.dashboard-container .nav-item {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 10px;
    color: #4b5563;
    font-size: 0.88rem;
    font-weight: 750;
    box-shadow: none;
}

.dashboard-container .nav-item i {
    width: 20px;
    color: #64748b;
    font-size: 0.95rem;
}

.dashboard-container .nav-item:hover {
    background: #f7f9fc;
    color: #1f2937;
    transform: none;
}

.dashboard-container .nav-item.active {
    background: #eef2ff;
    color: var(--primary-color);
    box-shadow: inset 3px 0 0 var(--primary-color);
}

.dashboard-container .nav-item.active i {
    color: var(--primary-color);
}

.dashboard-container .sales-hero {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border: 1px solid #e5ebf4;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.045);
}

.dashboard-container .sales-hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
}

.dashboard-container .page-kicker {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 4px 10px;
    border: 1px solid #dfe6ff;
    border-radius: 999px;
    background: #f4f6ff;
    color: var(--primary-color);
    font-size: 0.72rem;
    font-weight: 850;
}

.dashboard-container .sales-hero h1 {
    margin: 0;
    color: #172033;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: 0;
}

.dashboard-container .sales-hero p {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
    font-weight: 650;
}

.dashboard-container .branch-badge,
.dashboard-container .connection-chip,
.dashboard-container .branch-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 800;
}

.dashboard-container .branch-badge {
    margin-top: 4px;
    background: #f8fafc;
}

.dashboard-container .connection-chip {
    color: #047857;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.dashboard-container .sales-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-container .branch-switcher select {
    height: 32px;
    max-width: 220px;
    border: 0;
    background: transparent;
    color: #334155;
    font: inherit;
    outline: none;
}

.dashboard-container .kpi-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-container .kpi-card {
    min-height: 128px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 17px;
    border: 1px solid #e5ebf4;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.dashboard-container .kpi-card-primary {
    border-color: #cfd8ff;
}

.dashboard-container .kpi-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f4f6ff;
    color: var(--primary-color);
}

.dashboard-container .kpi-card span {
    color: #718096;
    font-size: 0.78rem;
    font-weight: 850;
}

.dashboard-container .kpi-card strong {
    color: #172033;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1.1;
}

.dashboard-container .kpi-card-primary strong {
    color: #111827;
    font-size: 1.65rem;
}

.dashboard-container .kpi-card small {
    color: #8a98aa;
    font-size: 0.72rem;
    font-weight: 750;
}

.dashboard-container .shift-command-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 18px;
    align-items: stretch;
    padding: 20px;
    border: 1px solid #e5ebf4;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.045);
}

.dashboard-container .shift-command-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.dashboard-container .shift-command-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.dashboard-container .shift-command-title h2 {
    margin: 0;
    color: #172033;
    font-size: 1.15rem;
    font-weight: 900;
}

.dashboard-container .shift-status-pill {
    margin: 0;
    padding: 6px 11px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.78rem;
    font-weight: 850;
}

.dashboard-container .shift-status-pill.is-closed {
    background: #f1f5f9;
    color: #64748b;
}

.dashboard-container .shift-command-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-container .shift-command-item {
    min-height: 82px;
    padding: 13px 14px;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    background: #fbfcfe;
}

.dashboard-container .shift-command-item span,
.dashboard-container .shift-command-empty {
    color: #718096;
    font-size: 0.78rem;
    font-weight: 850;
}

.dashboard-container .shift-command-item strong {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    color: #172033;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.25;
}

.dashboard-container .shift-command-total {
    background: #f8fafc;
    border-color: #dfe7f2;
}

.dashboard-container .shift-command-total strong {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.dashboard-container .shift-command-total small {
    color: #8a98aa;
    font-size: 0.72rem;
    font-weight: 750;
}

.dashboard-container .shift-command-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 10px;
    min-width: 0;
}

.dashboard-container .big-btn {
    min-height: 46px;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 850;
    box-shadow: none;
}

.dashboard-container .big-btn.primary-btn {
    background: var(--primary-color);
    color: #fff;
}

.dashboard-container .big-btn.secondary-btn {
    background: #fff;
    color: #475569;
    border: 1px solid #d8e1ee;
}

.dashboard-container .stats-section {
    margin-bottom: 18px;
}

.dashboard-container .section-label {
    margin: 0 0 10px;
    padding: 0 2px;
    color: #718096;
    font-size: 0.82rem;
    font-weight: 850;
}

.dashboard-container .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 14px;
}

.dashboard-container .stat-card,
.dashboard-container .stat-card--hero {
    grid-column: auto !important;
    min-height: 116px;
    align-items: center;
    gap: 14px;
    padding: 17px 18px;
    border: 1px solid #e5ebf4;
    border-top: 0;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.dashboard-container .stat-card .sc-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: #f4f6ff;
    color: var(--primary-color);
}

.dashboard-container .stat-card .sc-label {
    margin-bottom: 4px;
    color: #718096;
    font-size: 0.8rem;
    font-weight: 850;
}

.dashboard-container .stat-card .sc-value {
    color: #172033;
    font-size: 1.38rem;
    font-weight: 900;
    line-height: 1.14;
}

.dashboard-container .stat-card .sc-value .unit {
    color: #8a98aa;
    font-size: 0.72rem;
    font-weight: 750;
}

.dashboard-container .history-panel {
    border: 1px solid #e5ebf4;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

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

    .dashboard-container .shift-command-card {
        grid-template-columns: 1fr;
    }

    .dashboard-container .shift-command-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .dashboard-container .main-content {
        padding: 18px;
    }

    .dashboard-container .sales-hero,
    .dashboard-container .shift-command-title {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-container .sales-header-actions {
        justify-content: stretch;
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-container .connection-chip,
    .dashboard-container .branch-chip,
    .dashboard-container .menu-toggle {
        width: 100%;
        justify-content: center;
    }

    .dashboard-container .kpi-strip,
    .dashboard-container .shift-command-grid,
    .dashboard-container .shift-command-actions {
        grid-template-columns: 1fr;
    }
}

/* Sales dashboard visual energy pass: modern Arabic SaaS POS feel, UI only. */
.dashboard-container {
    background:
        radial-gradient(circle at 10% 0%, rgba(39, 64, 204, 0.08), transparent 30%),
        radial-gradient(circle at 92% 12%, rgba(16, 185, 129, 0.08), transparent 28%),
        linear-gradient(180deg, #f7f9fd 0%, #f3f6fb 100%);
}

.dashboard-container .main-content {
    background: transparent;
    gap: 16px;
}

.dashboard-container .sales-hero {
    position: relative;
    overflow: hidden;
    border-color: rgba(213, 222, 237, 0.95);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,255,0.94)),
        #fff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07);
}

.dashboard-container .sales-hero::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 4px;
    background: var(--primary-color);
}

.dashboard-container .sales-hero h1 {
    font-size: 1.62rem;
}

.dashboard-container .branch-badge {
    background: #eef2ff;
    border-color: #dfe6ff;
    color: var(--primary-color);
}

.dashboard-container .today-kpi-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-container .dashboard-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    padding: 0 2px;
}

.dashboard-container .dashboard-section-heading h2 {
    margin: 0;
    color: #172033;
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: 0;
}

.dashboard-container .dashboard-section-heading span {
    color: #7b8aa0;
    font-size: 0.82rem;
    font-weight: 750;
}

.dashboard-container .kpi-strip {
    gap: 12px;
}

.dashboard-container .kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    border-color: rgba(224, 231, 242, 0.95);
    background:
        linear-gradient(180deg, rgba(var(--kpi-rgb, 39, 64, 204), 0.07), rgba(255,255,255,0) 48%),
        #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.065);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    animation: salesCardIn 360ms ease both;
}

.dashboard-container .kpi-card::before {
    content: '';
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    height: 3px;
    background: rgb(var(--kpi-rgb, 39, 64, 204));
}

.dashboard-container .kpi-card:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--kpi-rgb, 39, 64, 204), 0.32);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.09);
}

.dashboard-container .kpi-card:nth-child(1) { --kpi-rgb: 99, 102, 241; animation-delay: 20ms; }
.dashboard-container .kpi-card:nth-child(2) { --kpi-rgb: 16, 185, 129; animation-delay: 70ms; }
.dashboard-container .kpi-card:nth-child(3) { --kpi-rgb: 37, 99, 235; animation-delay: 120ms; }
.dashboard-container .kpi-card:nth-child(4) { --kpi-rgb: 14, 165, 233; animation-delay: 170ms; }
.dashboard-container .kpi-card:nth-child(5) { --kpi-rgb: 245, 158, 11; animation-delay: 220ms; }

.dashboard-container .kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(var(--kpi-rgb, 39, 64, 204), 0.12);
    color: rgb(var(--kpi-rgb, 39, 64, 204));
    font-size: 1.08rem;
}

.dashboard-container .kpi-card span {
    color: #64748b;
    font-size: 0.8rem;
}

.dashboard-container .kpi-card strong {
    font-size: 1.54rem;
}

.dashboard-container .kpi-card-primary strong {
    font-size: 1.78rem;
}

.dashboard-container .shift-command-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(203, 213, 255, 0.8);
    background:
        linear-gradient(135deg, rgba(39, 64, 204, 0.10), rgba(255,255,255,0) 42%),
        linear-gradient(180deg, #ffffff, #fbfcff);
    box-shadow: 0 18px 48px rgba(39, 64, 204, 0.10);
}

.dashboard-container .shift-command-card::after {
    content: '';
    position: absolute;
    inset-block: 16px;
    inset-inline-start: 0;
    width: 4px;
    border-radius: 999px;
    background: var(--primary-color);
}

.dashboard-container .shift-command-item {
    background: rgba(255,255,255,0.72);
    border-color: rgba(218, 226, 238, 0.9);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
    transition: transform 180ms ease, border-color 180ms ease;
}

.dashboard-container .shift-command-item:hover {
    transform: translateY(-2px);
    border-color: #cdd7e8;
}

.dashboard-container .shift-command-total {
    background: #f2f6ff;
}

.dashboard-container .shift-status-pill {
    box-shadow: 0 8px 20px rgba(4, 120, 87, 0.12);
}

.dashboard-container .big-btn {
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.dashboard-container .big-btn:hover {
    transform: translateY(-2px);
}

.dashboard-container .big-btn.primary-btn {
    box-shadow: 0 14px 28px rgba(39, 64, 204, 0.18);
}

.dashboard-container .big-btn.secondary-btn:hover {
    border-color: #bfcbe0;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.07);
}

.dashboard-container .stat-card,
.dashboard-container .stat-card--hero,
.dashboard-container .history-panel {
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.055);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.dashboard-container .stat-card:hover,
.dashboard-container .stat-card--hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.dashboard-container .sidebar {
    background:
        linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.dashboard-container .nav-group-label {
    color: #8b9ab0;
}

.dashboard-container .nav-item {
    transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.dashboard-container .nav-item:hover {
    background: #f1f5ff;
    color: var(--primary-color);
    transform: translateX(-2px);
}

html[dir='ltr'] .dashboard-container .nav-item:hover {
    transform: translateX(2px);
}

.dashboard-container .nav-item:hover i {
    color: var(--primary-color);
}

.dashboard-container .nav-item.active {
    background: #eef2ff;
    border: 1px solid #dfe6ff;
    box-shadow: 0 10px 22px rgba(39, 64, 204, 0.10), inset 3px 0 0 var(--primary-color);
}

@keyframes salesCardIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-container .kpi-card,
    .dashboard-container .stat-card,
    .dashboard-container .big-btn,
    .dashboard-container .nav-item,
    .dashboard-container .shift-command-item {
        animation: none;
        transition: none;
    }
}

/* Items page layout repair: every new rule is scoped to .items-page. */
.items-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.items-page .items-header {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    border: 1px solid #e5ebf4;
    border-radius: 22px;
    background:
        radial-gradient(circle at 10% 0%, rgba(39, 64, 204, 0.08), transparent 32%),
        linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.items-page .items-header > div:first-child {
    min-width: 240px;
    flex: 1 1 280px;
}

.items-page .items-header h1 {
    margin-bottom: 4px;
    color: #172033;
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: 0;
}

.items-page .items-header .text-dim {
    color: #6b7a90;
    font-size: 0.92rem;
    font-weight: 650;
}

.items-page .items-toolbar {
    display: flex;
    flex: 1 1 520px;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.items-page .items-toolbar .platform-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    border-radius: 12px;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.items-page .items-toolbar .platform-btn:hover {
    transform: translateY(-2px);
}

.items-page .items-toolbar .platform-btn.ghost {
    background: #fff;
    color: #475569;
    border: 1px solid #dbe4f0;
}

.items-page .items-content .alert,
.items-page .import-result-panel,
.items-page .low-stock-alert,
.items-page .items-filter-bar,
.items-page .items-table-wrapper,
.items-page .pagination-bar {
    max-width: 100%;
    animation: itemsFadeUp 320ms ease both;
}

.items-page .low-stock-alert {
    align-items: flex-start;
    max-width: 100%;
    border: 1px solid #fed7aa;
    border-radius: 16px;
    background: #fff7ed;
    box-shadow: 0 12px 28px rgba(251, 146, 60, 0.08);
}

.items-page .low-stock-alert > i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ffedd5;
    color: #ea580c;
    flex: 0 0 auto;
}

.items-page .low-stock-badge {
    display: inline-flex;
    align-items: center;
    margin: 8px 6px 0 0;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff;
    color: #9a3412;
    border: 1px solid #fed7aa;
    font-size: 0.78rem;
    font-weight: 750;
}

.items-page .items-filter-bar {
    width: 100%;
    border: 1px solid #e6edf6;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.045);
}

.items-page .items-filter-row {
    max-width: 100%;
    flex-wrap: wrap;
}

.items-page .search-wrapper,
.items-page .filter-select {
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.items-page .search-wrapper {
    min-width: 240px;
    flex: 1 1 320px;
}

.items-page .filter-select:focus,
.items-page .search-wrapper:focus-within {
    border-color: #2740cc;
    box-shadow: 0 0 0 4px rgba(39, 64, 204, 0.09);
}

.items-page .items-table-wrapper {
    width: 100%;
    max-width: 100%;
    border: 1px solid #e6edf6;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.055);
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.items-page .items-table-wrapper #itemsTable {
    width: 100%;
    min-width: 920px;
    border-collapse: separate;
    border-spacing: 0;
}

.items-page #itemsTable thead th {
    background: #f8fafc;
    color: #667085;
    font-size: 0.78rem;
    font-weight: 850;
    border-bottom: 1px solid #edf2f7;
}

.items-page #itemsTable tbody tr {
    transition: background 170ms ease, transform 170ms ease, box-shadow 170ms ease;
    animation: itemsFadeUp 280ms ease both;
}

.items-page #itemsTable tbody tr:hover {
    background: #f8fbff;
    transform: translateY(-1px);
    box-shadow: inset 3px 0 0 #2740cc;
}

.items-page .item-thumb-small {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    object-fit: cover;
    border: 1px solid #e6edf6;
    background: #f8fafc;
}

.items-page .item-thumb-small.empty-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.items-page .barcode-chip {
    display: inline-flex;
    max-width: 180px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    direction: ltr;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.items-page .cat-badge {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #2740cc;
    font-size: 0.78rem;
    font-weight: 800;
}

.items-page .stock-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 850;
}

.items-page .stock-good { background: #ecfdf5; color: #047857; border: 1px solid #bbf7d0; }
.items-page .stock-low { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.items-page .stock-zero { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

.items-page .action-btn-small {
    transition: transform 170ms ease, box-shadow 170ms ease;
}

.items-page .action-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.items-page .import-modal-content,
#importProductsModal .import-modal-content {
    max-width: 680px;
    width: min(680px, calc(100vw - 28px));
}

#importProductsModal .import-modal-head {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 18px;
}

#importProductsModal .import-modal-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #eef2ff;
    color: #2740cc;
    font-size: 1.2rem;
}

#importProductsModal .import-modal-head h2 {
    margin: 0 0 4px;
    color: #172033;
    font-size: 1.18rem;
    font-weight: 900;
}

#importProductsModal .import-modal-head p,
#importProductsModal .import-template-note span {
    margin: 0;
    color: #64748b;
    font-size: 0.86rem;
}

#importProductsModal .import-template-note {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e6edf6;
    margin-bottom: 16px;
}

#importProductsModal .import-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#importProductsModal .import-drop-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 28px 18px;
    border: 1.8px dashed #cbd5e1;
    border-radius: 18px;
    background: #fbfdff;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

#importProductsModal .import-drop-zone:hover {
    border-color: #2740cc;
    background: #f5f7ff;
    transform: translateY(-2px);
}

#importProductsModal .import-drop-zone i {
    color: #2740cc;
    font-size: 1.8rem;
}

#importProductsModal .import-drop-zone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

#importProductsModal .import-drop-zone em {
    color: #047857;
    font-style: normal;
    font-size: 0.82rem;
    font-weight: 750;
}

#importProductsModal .import-columns-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#importProductsModal .import-columns-list span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.76rem;
    font-weight: 800;
}

#importProductsModal .import-columns-list small {
    color: #7b8aa0;
    font-weight: 700;
}

#importProductsModal .import-submit-btn {
    justify-content: center;
}

.items-page .import-result-panel {
    padding: 14px 16px;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    background: #f0fdf4;
    color: #166534;
}

.items-page .import-result-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.items-page .import-result-summary span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dcfce7;
    font-size: 0.82rem;
    font-weight: 800;
}

.items-page .import-result-panel details {
    margin-top: 10px;
    color: #92400e;
}

.items-page .import-result-panel li {
    margin-top: 4px;
}

@keyframes itemsFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
    .items-page .items-header {
        align-items: stretch;
    }

    .items-page .items-toolbar {
        justify-content: stretch;
    }

    .items-page .items-toolbar .platform-btn {
        flex: 1 1 180px;
    }
}

@media (max-width: 860px) {
    .items-page .items-filter-row,
    #importProductsModal .import-template-note {
        flex-direction: column;
        align-items: stretch;
    }

    .items-page .items-toolbar .platform-btn,
    #importProductsModal .import-template-note .platform-btn {
        width: 100%;
        justify-content: center;
    }

    .items-page .items-table-wrapper #itemsTable {
        min-width: 760px;
    }
}

/* Items page final layout clamp: scoped, no global layout selectors. */
.items-page {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-inline: clamp(14px, 2vw, 24px);
    padding-block: 18px 24px;
    gap: 12px;
    overflow-x: clip;
    background: #f7f9fc;
}

.items-page *,
.items-page *::before,
.items-page *::after {
    box-sizing: border-box;
}

.items-page .items-header {
    min-height: auto;
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(420px, auto);
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    margin: 0;
    border-radius: 18px;
    border: 1px solid #e4eaf3;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}

.items-page .items-header h1 {
    margin: 0 0 3px;
    font-size: 1.34rem;
    line-height: 1.25;
    color: #172033;
}

.items-page .items-header .text-dim {
    margin: 0;
    color: #6b7a90;
    font-size: 0.86rem;
    line-height: 1.5;
}

.items-page .items-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

.items-page .items-toolbar .platform-btn {
    height: 38px;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
}

.items-page .items-toolbar .platform-btn.ghost,
.items-page .items-toolbar .platform-btn.secondary {
    border: 1px solid #dbe4f0;
    background: #fff;
    color: #475569;
}

.items-page .items-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
}

.items-page .items-content .alert,
.items-page .import-result-panel {
    margin: 0;
    padding: 10px 14px;
    border-radius: 12px;
}

.items-page .low-stock-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    overflow: hidden;
}

.items-page .low-stock-alert > i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.92rem;
}

.items-page .low-stock-alert > div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.items-page .low-stock-alert .alert-title,
.items-page .low-stock-alert .alert-count {
    flex: 0 0 auto;
    margin: 0;
    font-size: 0.8rem;
}

.items-page .low-stock-badge {
    flex: 0 0 auto;
    margin: 0;
    padding: 5px 9px;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.items-page .items-filter-bar {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.items-page .items-filter-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 260px) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.items-page .search-wrapper {
    width: 100%;
    min-width: 0;
}

.items-page .search-input {
    min-height: 40px;
}

.items-page .filter-select {
    width: 100%;
    min-width: 0;
    height: 40px;
}

.items-page .item-count {
    justify-self: end;
    min-width: max-content;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef2ff;
    color: #2740cc;
    font-size: 0.78rem;
    font-weight: 850;
}

.items-page .items-table-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
}

.items-page .items-table-wrapper #itemsTable {
    width: 100%;
    min-width: 980px;
    table-layout: fixed;
}

.items-page #itemsTable th,
.items-page #itemsTable td {
    padding: 11px 12px;
    vertical-align: middle;
}

.items-page #itemsTable th:nth-child(1),
.items-page #itemsTable td:nth-child(1) { width: 66px; }
.items-page #itemsTable th:nth-child(2),
.items-page #itemsTable td:nth-child(2) { width: 28%; }
.items-page #itemsTable th:nth-child(3),
.items-page #itemsTable td:nth-child(3) { width: 150px; }
.items-page #itemsTable th:nth-child(4),
.items-page #itemsTable td:nth-child(4) { width: 120px; }
.items-page #itemsTable th:nth-child(5),
.items-page #itemsTable td:nth-child(5) { width: 150px; }
.items-page #itemsTable th:nth-child(6),
.items-page #itemsTable td:nth-child(6) { width: 120px; }
.items-page #itemsTable th:nth-child(7),
.items-page #itemsTable td:nth-child(7) { width: 132px; }

.items-page #itemsTable td:nth-child(2) strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.items-page .barcode-chip {
    max-width: 130px;
}

.items-page #itemsTable td:last-child .header-actions {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: nowrap;
}

.items-page .action-btn-small {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.items-page .item-thumb-small {
    width: 42px;
    height: 42px;
    border-radius: 11px;
}

.items-page .pagination-bar {
    margin-top: 0;
}

@media (max-width: 1200px) {
    .items-page .items-header {
        grid-template-columns: 1fr;
    }

    .items-page .items-toolbar {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .items-page {
        padding-inline: 12px;
        padding-block: 12px 18px;
    }

    .items-page .items-header {
        padding: 14px;
    }

    .items-page .items-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .items-page .items-toolbar .platform-btn {
        width: 100%;
        padding-inline: 8px;
    }

    .items-page .items-filter-row {
        grid-template-columns: 1fr;
    }

    .items-page .item-count {
        justify-self: stretch;
        text-align: center;
    }

    .items-page .items-table-wrapper #itemsTable {
        min-width: 880px;
    }
}

/* Items page table/low-stock final polish: scoped only. */
.items-page .low-stock-alert {
    min-height: 48px;
    max-height: 56px;
    padding: 8px 10px;
    border-radius: 13px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
}

.items-page .low-stock-alert > div {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding-bottom: 1px;
}

.items-page .low-stock-alert .alert-title {
    color: #7c2d12;
    font-size: 0.82rem;
    font-weight: 900;
}

.items-page .low-stock-alert .alert-count {
    padding: 4px 8px;
    border-radius: 999px;
    background: #ffedd5;
    color: #c2410c;
    font-size: 0.74rem;
    font-weight: 850;
}

.items-page .low-stock-badge {
    max-width: 180px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 9px;
    line-height: 1;
}

.items-page .low-stock-badge bdi {
    display: inline-block;
    min-width: 0;
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.items-page .items-table-wrapper {
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.items-page .items-table-wrapper #itemsTable {
    table-layout: fixed;
    min-width: 1120px;
}

.items-page #itemsTable col.col-image { width: 64px; }
.items-page #itemsTable col.col-name { width: 31%; }
.items-page #itemsTable col.col-barcode { width: 180px; }
.items-page #itemsTable col.col-price { width: 130px; }
.items-page #itemsTable col.col-category { width: 160px; }
.items-page #itemsTable col.col-stock { width: 130px; }
.items-page #itemsTable col.col-actions { width: 142px; }

.items-page #itemsTable th,
.items-page #itemsTable td {
    padding: 13px 14px;
    overflow: hidden;
}

.items-page #itemsTable th {
    white-space: nowrap;
}

.items-page .item-name-cell {
    display: block;
    max-width: 100%;
    color: #172033;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.items-page .variant-badge {
    max-width: 100%;
}

.items-page .barcode-chip {
    width: 100%;
    max-width: 154px;
    justify-content: center;
}

.items-page .cat-badge {
    max-width: 138px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.items-page #itemsTable td:last-child .header-actions {
    min-width: 108px;
    justify-content: center;
    gap: 7px;
}

.items-page .action-btn-small {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

@media (max-width: 720px) {
    .items-page .low-stock-alert {
        max-height: none;
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .items-page .items-table-wrapper #itemsTable {
        min-width: 1040px;
    }
}

/* Items page compact alert and table comfort pass: scoped only. */
.items-page .low-stock-alert {
    min-height: 48px;
    max-height: 56px;
    padding: 8px 12px;
    display: grid;
    grid-template-columns: 32px auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.items-page .low-stock-alert .low-stock-meta {
    min-width: max-content;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    overflow: visible;
    white-space: nowrap;
    padding: 0;
}

.items-page .low-stock-alert .low-stock-chips {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 2px 0 3px;
    scrollbar-width: none;
}

.items-page .low-stock-alert .alert-title {
    font-size: 0.84rem;
    line-height: 1.2;
}

.items-page .low-stock-alert .alert-count {
    min-width: 28px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    font-size: 0.75rem;
}

.items-page .low-stock-badge {
    flex: 0 0 auto;
    max-width: 190px;
    height: 26px;
    font-size: 0.74rem;
}

.items-page .low-stock-badge bdi {
    max-width: 124px;
}

.items-page .items-table-wrapper {
    max-width: 100%;
    border-radius: 16px;
}

.items-page .items-table-wrapper #itemsTable {
    min-width: 1180px;
    width: 100%;
    table-layout: fixed;
}

.items-page #itemsTable col.col-select { width: 54px; }
.items-page #itemsTable col.col-image { width: 68px; }
.items-page #itemsTable col.col-name { width: 31%; }
.items-page #itemsTable col.col-barcode { width: 190px; }
.items-page #itemsTable col.col-price { width: 130px; }
.items-page #itemsTable col.col-category { width: 160px; }
.items-page #itemsTable col.col-stock { width: 132px; }
.items-page #itemsTable col.col-actions { width: 168px; }

.items-page #itemsTable th:nth-child(1),
.items-page #itemsTable td:nth-child(1) { width: 54px; }
.items-page #itemsTable th:nth-child(2),
.items-page #itemsTable td:nth-child(2) { width: 68px; }
.items-page #itemsTable th:nth-child(3),
.items-page #itemsTable td:nth-child(3) { width: 31%; }
.items-page #itemsTable th:nth-child(4),
.items-page #itemsTable td:nth-child(4) { width: 190px; }
.items-page #itemsTable th:nth-child(5),
.items-page #itemsTable td:nth-child(5) { width: 130px; }
.items-page #itemsTable th:nth-child(6),
.items-page #itemsTable td:nth-child(6) { width: 160px; }
.items-page #itemsTable th:nth-child(7),
.items-page #itemsTable td:nth-child(7) { width: 132px; }
.items-page #itemsTable th:nth-child(8),
.items-page #itemsTable td:nth-child(8) { width: 168px; }

.items-page #itemsTable th,
.items-page #itemsTable td {
    padding: 15px 14px;
    vertical-align: middle;
}

.items-page #itemsTable td:nth-child(4),
.items-page #itemsTable td:nth-child(6) {
    white-space: nowrap;
}

.items-page .barcode-chip,
.items-page .cat-badge,
.items-page .stock-pill,
.items-page .empty-data-pill {
    max-width: 100%;
}

.items-page .select-cell {
    text-align: center;
    overflow: visible !important;
}

.items-page .item-check-wrap {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
}

.items-page .item-check-wrap input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
}

.items-page .item-check-wrap span {
    width: 18px;
    height: 18px;
    border: 1.6px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    transition: all .15s ease;
}

.items-page .item-check-wrap input:checked + span {
    border-color: #2740cc;
    background: #2740cc;
    box-shadow: 0 0 0 3px rgba(39,64,204,.11);
}

.items-page .item-check-wrap input:checked + span::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 5px;
    border-inline-start: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
    top: 8px;
    left: 8px;
}

.items-page .bulk-actions-bar {
    max-width: 100%;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #dbe3ff;
    border-radius: 14px;
    background: #f7f9ff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 10px 26px rgba(39,64,204,.08);
}

.items-page .bulk-actions-bar[hidden] {
    display: none;
}

.items-page .bulk-actions-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1f2f7a;
    font-weight: 850;
    font-size: .88rem;
}

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

.items-page .platform-btn.compact {
    min-height: 36px;
    padding: 8px 12px;
    font-size: .82rem;
}

.items-page .platform-btn.danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.items-page .platform-btn.danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.items-page .empty-data-pill,
.items-page .stock-none {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.items-page #itemsTable td:last-child {
    overflow: visible;
}

.items-page #itemsTable td:last-child .header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 140px;
}

.items-page .action-btn-small {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
}

.items-page .btn-delete-row {
    background: #fff1f2;
    color: #dc2626;
    border-color: #fecdd3;
}

.items-page .btn-delete-row:hover {
    background: #ffe4e6;
    color: #b91c1c;
}

@media (max-width: 720px) {
    .items-page .low-stock-alert {
        max-height: none;
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .items-page .low-stock-alert .low-stock-meta {
        grid-column: 2;
    }

    .items-page .low-stock-alert .low-stock-chips {
        grid-column: 1 / -1;
    }

    .items-page .items-table-wrapper #itemsTable {
        min-width: 1120px;
    }

    .items-page .bulk-actions-bar {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Items table width correction after bulk select/delete: scoped only. */
.items-page .items-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.items-page .items-table-wrapper #itemsTable {
    width: max(100%, 1320px);
    min-width: 1320px;
    table-layout: fixed;
}

.items-page #itemsTable col.col-select { width: 48px; }
.items-page #itemsTable col.col-image { width: 70px; }
.items-page #itemsTable col.col-name { width: 320px; }
.items-page #itemsTable col.col-barcode { width: 240px; }
.items-page #itemsTable col.col-price { width: 130px; }
.items-page #itemsTable col.col-category { width: 150px; }
.items-page #itemsTable col.col-stock { width: 140px; }
.items-page #itemsTable col.col-actions { width: 190px; }

.items-page #itemsTable th:nth-child(1),
.items-page #itemsTable td:nth-child(1) { width: 48px; min-width: 48px; max-width: 48px; }
.items-page #itemsTable th:nth-child(2),
.items-page #itemsTable td:nth-child(2) { width: 70px; min-width: 70px; max-width: 70px; }
.items-page #itemsTable th:nth-child(3),
.items-page #itemsTable td:nth-child(3) { width: 320px; min-width: 320px; }
.items-page #itemsTable th:nth-child(4),
.items-page #itemsTable td:nth-child(4) { width: 240px; min-width: 240px; }
.items-page #itemsTable th:nth-child(5),
.items-page #itemsTable td:nth-child(5) { width: 130px; min-width: 130px; }
.items-page #itemsTable th:nth-child(6),
.items-page #itemsTable td:nth-child(6) { width: 150px; min-width: 150px; }
.items-page #itemsTable th:nth-child(7),
.items-page #itemsTable td:nth-child(7) { width: 140px; min-width: 140px; }
.items-page #itemsTable th:nth-child(8),
.items-page #itemsTable td:nth-child(8) { width: 190px; min-width: 190px; }

.items-page #itemsTable th,
.items-page #itemsTable td {
    padding: 14px 12px;
}

.items-page #itemsTable td:nth-child(3),
.items-page #itemsTable td:nth-child(4) {
    min-width: 0;
}

.items-page .item-name-cell {
    max-width: 100%;
    text-align: start;
}

.items-page .barcode-chip {
    width: 100%;
    max-width: 216px;
    direction: ltr;
    unicode-bidi: plaintext;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.items-page .empty-data-pill {
    width: 100%;
    max-width: 150px;
}

.items-page #itemsTable td:last-child {
    width: 190px;
    min-width: 190px;
    max-width: 190px;
    overflow: visible;
}

.items-page #itemsTable td:last-child .header-actions {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.items-page .action-btn-small {
    flex: 0 0 36px;
}

.items-page .bulk-actions-bar {
    margin-block: 0 10px;
    min-height: 46px;
}

@media (max-width: 900px) {
    .items-page .items-table-wrapper #itemsTable {
        width: 1320px;
        min-width: 1320px;
    }

    .items-page #itemsTable td:last-child .header-actions {
        flex-wrap: nowrap;
    }
}

.delete-details-modal {
    max-width: 680px;
    width: min(92vw, 680px);
}

.delete-details-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.delete-details-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff7ed;
    color: #c2410c;
    flex: 0 0 42px;
}

.delete-details-head h3 {
    margin: 0 0 5px;
    color: #172033;
    font-size: 1.06rem;
}

.delete-details-head p {
    margin: 0;
    color: #64748b;
    font-size: .84rem;
    line-height: 1.7;
}

.delete-details-table-wrap {
    max-height: 300px;
    overflow: auto;
    border: 1px solid #e5eaf3;
    border-radius: 14px;
    background: #fff;
}

.delete-details-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.delete-details-table th,
.delete-details-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #eef2f7;
    text-align: start;
    font-size: .86rem;
}

.delete-details-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 850;
}

.delete-details-table td:first-child {
    width: 52%;
    color: #172033;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.delete-details-table td:last-child {
    color: #b45309;
    font-weight: 750;
}

.delete-details-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 14px;
}

.items-toast {
    max-width: min(420px, calc(100vw - 32px));
    max-height: 110px;
    overflow: hidden;
    line-height: 1.6;
    white-space: normal;
    text-align: start;
}

/* ===== Hide ALL scrollbars globally while keeping scroll functional ===== */
/* Target every element including html/body */
html, body, * {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

/* WebKit browsers: zero-size scrollbar everywhere */
::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    display: none !important;
}
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-track,
::-webkit-scrollbar-track-piece {
    background: transparent !important;
    display: none !important;
}

/* Specific layout elements (in case inline overflow-y:auto creates them) */
.sidebar,
.main-content,
.nav-links,
.slpos-modal-body,
.view-section,
.tax-rule-card,
#taxItemsList,
#taxRulesContainer,
.tabs-bar,
.chart-card {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.sidebar::-webkit-scrollbar,
.main-content::-webkit-scrollbar,
.nav-links::-webkit-scrollbar,
.slpos-modal-body::-webkit-scrollbar,
.view-section::-webkit-scrollbar,
#taxItemsList::-webkit-scrollbar,
#taxRulesContainer::-webkit-scrollbar,
.tabs-bar::-webkit-scrollbar,
.chart-card::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
}

/* ============================================
   BRAND COLOR - Official: #2740cc
   Used via: var(--primary-color)
   ============================================ */

/* ===== Store Settings — Modern Redesign (sps-*) ===== */

.sps-success-banner {
    display: flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
    color: #166534; padding: 14px 18px; border-radius: 14px;
    margin-bottom: 20px; border: 1px solid #bbf7d0;
    font-weight: 600; font-size: 0.9rem;
    animation: spsSlideIn 0.4s ease;
}
.sps-success-banner i { font-size: 1.2rem; }

@keyframes spsSlideIn { from { opacity:0; transform: translateY(-8px);} to {opacity:1; transform:translateY(0);} }

.sps-hero {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 28px; padding: 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 20px; color: white;
    box-shadow: 0 8px 24px rgba(39,64,204,0.18);
}
.sps-hero-icon {
    width: 56px; height: 56px; border-radius: 16px;
    background: rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; flex-shrink: 0;
}
.sps-hero-title { margin: 0; font-size: 1.3rem; font-weight: 800; }
.sps-hero-sub { margin: 4px 0 0; font-size: 0.85rem; opacity: 0.9; }

.sps-form { display: flex; flex-direction: column; gap: 20px; }

.sps-card {
    background: white; border-radius: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    border: 1px solid #f1f5f9; overflow: hidden;
    transition: box-shadow 0.2s;
}
.sps-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); }

.sps-section { padding: 0; }

.sps-section-head {
    display: flex; align-items: center; gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}
.sps-section-badge {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}
.sps-badge-blue { background: #eef2ff; color: var(--primary-color); }
.sps-badge-green { background: #dcfce7; color: #16a34a; }

.sps-section-title { margin: 0; font-size: 1rem; font-weight: 700; color: #1e293b; }
.sps-section-desc { margin: 2px 0 0; font-size: 0.78rem; color: #94a3b8; }

.sps-field-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px;
    padding: 24px;
}

.sps-field { display: flex; flex-direction: column; }
.sps-field--full { grid-column: 1 / -1; }

.sps-label {
    display: flex; align-items: center; gap: 6px;
    font-size: 0.85rem; font-weight: 600; color: #475569;
    margin-bottom: 8px;
}
.sps-req { color: #ef4444; font-size: 0.8rem; }
.sps-optional {
    background: #f1f5f9; color: #94a3b8;
    padding: 2px 8px; border-radius: 6px;
    font-size: 0.7rem; font-weight: 600;
}

.sps-input-wrap { position: relative; display: flex; align-items: center; }
.sps-input-icon {
    position: absolute; inset-inline-start: 14px;
    color: #94a3b8; font-size: 0.9rem; pointer-events: none;
    transition: color 0.2s;
}
.sps-input {
    width: 100%; padding: 12px 14px 12px 14px;
    padding-inline-start: 40px;
    border: 1.5px solid #e2e8f0; border-radius: 12px;
    font-size: 0.95rem; color: #1e293b;
    box-sizing: border-box; font-family: inherit;
    background: #fafbfc; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.sps-input:focus {
    border-color: var(--primary-color); background: white;
    box-shadow: 0 0 0 4px rgba(39,64,204,0.08);
}
.sps-input:focus ~ .sps-input-icon,
.sps-input-wrap:focus-within .sps-input-icon { color: var(--primary-color); }
.sps-input::placeholder { color: #cbd5e1; }
.sps-input--ltr { direction: ltr; text-align: start; }

.sps-save-bar {
    display: flex; justify-content: flex-end;
    padding-top: 8px;
}
.sps-save-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 36px; border: none; border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white; font-size: 1rem; font-weight: 700;
    font-family: inherit; cursor: pointer;
    box-shadow: 0 4px 14px rgba(39,64,204,0.25);
    transition: transform 0.15s, box-shadow 0.2s;
}
.sps-save-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(39,64,204,0.3); }
.sps-save-btn:active { transform: translateY(0); }

@media (max-width: 640px) {
    .sps-field-grid { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
    .sps-hero { flex-direction: column; text-align: center; padding: 20px; }
    .sps-section-head { padding: 16px 18px; }
    .sps-save-bar { justify-content: center; }
}

/* ===== Payment Types View — Modern Redesign ===== */
.sps-hero--cyan {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: 0 8px 24px rgba(39,64,204,0.18);
}
.sps-hero--cyan .sps-hero-icon { background: rgba(255,255,255,0.18); }

.sps-hero-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; margin-inline-start: auto;
    border: none; border-radius: 14px;
    background: rgba(255,255,255,0.95); color: var(--primary-color);
    font-size: 0.92rem; font-weight: 700; font-family: inherit;
    cursor: pointer; flex-shrink: 0; white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.15s, background 0.2s;
}
.sps-hero-btn:hover { transform: translateY(-2px); background: white; box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
.sps-hero-btn:active { transform: translateY(0); }

/* Payment method grid */
.pm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.pm-loading {
    grid-column: 1/-1; text-align: center; color: #94a3b8; padding: 30px;
    background: white; border-radius: 16px; border: 1.5px solid #f1f5f9;
}

/* Refine the JS-generated pm-card to match new style */
.pm-card {
    border-radius: 18px !important;
    padding: 22px !important;
    border: 1.5px solid #f1f5f9 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}
.pm-card:hover {
    box-shadow: 0 8px 24px rgba(39,64,204,0.1) !important;
    transform: translateY(-3px) !important;
}
@media (max-width: 640px) {
    .sps-hero--cyan { flex-wrap: wrap; }
    .sps-hero-btn { margin-inline-start: 0; width: 100%; justify-content: center; }
}
