/* ============================================
   SKY POS - Modern Professional Design
   Based on CEDICONNECT Design System
   ============================================ */

:root {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: #f0fdf4;
    --primary-lighter: #dcfce7;
    --primary-rgb: 34, 197, 94;
    --accent: #10b981;
    --accent-light: #d1fae5;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --info: #8b5cf6;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --sidebar-width: 270px;
    --topbar-height: 60px;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.05);
    --shadow-green: 0 4px 14px rgba(34, 197, 94, 0.2);
    --shadow-green-lg: 0 8px 30px rgba(34, 197, 94, 0.25);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8fafc;
    color: var(--gray-800);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary-dark); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary); text-decoration: none; }

/* --- Google Inter Font --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Offline Banner --- */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: #fff;
    text-align: center;
    padding: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: transform var(--transition);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.offline-banner.hidden { transform: translateY(-100%); }

/* --- Login Page - Ultramodern Split Panel --- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0fdf4;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* Decorative background shapes */
.login-bg-shape {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
}
.login-bg-shape-1 {
    width: 500px;
    height: 500px;
    top: -15%;
    right: -8%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.12) 0%, transparent 70%);
    animation: loginFloat 12s ease-in-out infinite;
}
.login-bg-shape-2 {
    width: 400px;
    height: 400px;
    bottom: -10%;
    left: -5%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
    animation: loginFloat 15s ease-in-out infinite reverse;
}
.login-bg-shape-3 {
    width: 200px;
    height: 200px;
    top: 15%;
    left: 20%;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, transparent 70%);
    animation: loginFloat 10s ease-in-out infinite 2s;
}
@keyframes loginFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -25px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.97); }
}

/* Login container - split panel */
.login-container {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 540px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.08), 0 8px 30px rgba(34, 197, 94, 0.06);
    position: relative;
    z-index: 1;
}

/* Left branding panel */
.login-brand {
    flex: 1;
    background: linear-gradient(160deg, #16a34a 0%, #22c55e 40%, #10b981 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 3rem 2.5rem;
}
.login-brand::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -40%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}
.login-brand::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -30%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}
.login-brand-content {
    position: relative;
    z-index: 1;
    color: #fff;
    text-align: center;
}
.login-brand-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.login-brand h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.4rem;
}
.login-brand p {
    font-size: 1rem;
    opacity: 0.85;
    font-weight: 400;
    margin-bottom: 2.5rem;
}
.login-brand-features {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    text-align: left;
}
.login-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
}
.login-feature i {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Right form panel */
.login-form-panel {
    flex: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}
.login-form-inner {
    width: 100%;
    max-width: 340px;
}
.login-form-inner h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.3rem;
    letter-spacing: -0.5px;
}
.login-form-subtitle {
    color: var(--gray-400);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Custom input groups */
.login-input-group {
    position: relative;
    margin-bottom: 1.1rem;
}
.login-input-icon {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    font-size: 0.9rem;
    pointer-events: none;
    transition: color var(--transition-fast);
    z-index: 1;
}
.login-input-group input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 48px;
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    font-size: 0.95rem;
    color: var(--gray-800);
    background: var(--gray-50);
    outline: none;
    transition: all var(--transition);
    font-family: inherit;
}
.login-input-group input:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}
.login-input-group input:focus + .login-input-icon,
.login-input-group input:focus ~ .login-input-icon {
    color: var(--primary);
}
.login-input-group:focus-within .login-input-icon {
    color: var(--primary);
}
.login-toggle-pw {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
    border-radius: 10px;
}
.login-toggle-pw:hover { color: var(--primary); }

/* Submit button */
.login-submit-btn {
    width: 100%;
    padding: 0.9rem;
    margin-top: 0.5rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
    letter-spacing: 0.2px;
}
.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(34, 197, 94, 0.35);
}
.login-submit-btn:active {
    transform: translateY(0);
}
.login-submit-btn i {
    transition: transform var(--transition);
}
.login-submit-btn:hover i {
    transform: translateX(3px);
}

/* Demo credentials */
.login-credentials {
    margin-top: 2rem;
}
.login-credentials-title {
    text-align: center;
    position: relative;
    margin-bottom: 1rem;
}
.login-credentials-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
}
.login-credentials-title span {
    background: #fff;
    padding: 0 0.75rem;
    position: relative;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    font-weight: 700;
}
.login-cred-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    font-size: 0.82rem;
    color: var(--gray-500);
}
.login-cred-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}
.login-cred-badge.manager {
    background: var(--primary-light);
    color: var(--primary-dark);
}
.login-cred-badge.cashier {
    background: #eff6ff;
    color: #3b82f6;
}
.login-cred-row code {
    background: var(--gray-100);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-700);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Login error */
.login-error {
    background: var(--danger-light);
    color: var(--danger);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.2rem;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid rgba(239, 68, 68, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Login/Signup switch link */
.login-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.88rem;
    color: var(--gray-500);
    font-weight: 500;
}
.login-switch a {
    color: var(--primary-dark);
    font-weight: 700;
    text-decoration: none;
    transition: color var(--transition-fast);
}
.login-switch a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Role dropdown */
.login-select {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 3rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--gray-700);
    background: var(--white);
    transition: all var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
}

.login-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.login-select:hover {
    border-color: var(--primary-light);
}

.login-select option {
    padding: 0.5rem;
    color: var(--gray-700);
}

/* Login/Signup success message */
.login-success {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.2rem;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    border: 1px solid rgba(34, 197, 94, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Login responsive */
@media (max-width: 768px) {
    .login-page { padding: 0; background: #fff; }
    .login-container {
        flex-direction: column;
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
    }
    .login-brand {
        padding: 2rem 1.5rem;
        min-height: auto;
    }
    .login-brand-features { display: none; }
    .login-brand p { margin-bottom: 0; }
    .login-form-panel { padding: 2rem 1.5rem; }
}

/* --- Sidebar --- */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    color: var(--gray-800);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform var(--transition);
    border-right: 1px solid rgba(34, 197, 94, 0.1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.03);
}
.sidebar-header {
    padding: 1.4rem 1.5rem;
    border-bottom: 1px solid var(--primary-lighter);
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(255,255,255,0.5) 100%);
}
.sidebar-badge {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.8);
}
.sidebar-badge svg {
    width: 100%;
    height: 100%;
}
.sidebar-badge text {
    font-weight: 700;
    font-size: 10px;
    fill: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-user {
    padding: 1.1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--primary-lighter);
    background: rgba(240, 253, 244, 0.5);
}
.user-avatar {
    font-size: 2rem;
    color: var(--primary);
    background: var(--primary-lighter);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.user-info { display: flex; flex-direction: column; }
.user-name { font-weight: 700; font-size: 1rem; color: var(--gray-800); }
.user-role {
    font-size: 0.72rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    background: var(--primary-lighter);
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    display: inline-block;
    margin-top: 2px;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    padding: 0.75rem 0.75rem;
}
.sidebar-menu .menu-label {
    padding: 0.85rem 0.75rem 0.35rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--gray-400);
    font-weight: 700;
}
.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-600);
    transition: all var(--transition);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border-left: none;
    margin-bottom: 2px;
}
.sidebar-menu li a:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    text-decoration: none;
    transform: translateX(3px);
}
.sidebar-menu li.active a {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: var(--shadow-green);
    border-left: none;
}
.sidebar-menu li.active a i { color: #fff; }
.sidebar-menu li a i { width: 22px; text-align: center; font-size: 1.0625rem; }

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--primary-lighter);
    background: rgba(240, 253, 244, 0.3);
}
.sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--success);
    margin-bottom: 0.75rem;
    font-weight: 500;
}
.sync-status.syncing { color: var(--warning); }
.sync-status.error { color: var(--danger); }
.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-400);
    font-size: 0.85rem;
    padding: 0.5rem 0;
    font-weight: 500;
    transition: color var(--transition-fast);
}
.logout-btn:hover { color: var(--danger); text-decoration: none; }

/* --- Main Content --- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin var(--transition);
    background: #f8fafc;
}
.top-bar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(34, 197, 94, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.02);
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray-600);
    padding: 0.5rem;
    border-radius: var(--radius-xs);
    transition: all var(--transition-fast);
}
.menu-toggle:hover { background: var(--primary-light); color: var(--primary); }
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 500;
}
.connection-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.1); }
}
.connection-dot.offline { background: var(--danger); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); animation: none; }

.page-content { padding: 1.75rem; }

/* --- Page Header --- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
    min-height: 50px;
}
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.3px;
    flex: 1;
    min-width: 200px;
}
.page-title i {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Cards --- */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(34, 197, 94, 0.06);
    transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid rgba(34, 197, 94, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.5) 0%, rgba(255,255,255,0.5) 100%);
}
.card-header h3 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-800);
}
.card-header h3 i { color: var(--primary); }
.card-body { padding: 1.5rem; }

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid transparent;
    border: 1px solid rgba(34, 197, 94, 0.06);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.05;
    transform: translate(20px, -20px);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-blue { border-left: 4px solid var(--primary); }
.stat-blue::after { background: var(--primary); }
.stat-green { border-left: 4px solid var(--success); }
.stat-green::after { background: var(--success); }
.stat-purple { border-left: 4px solid var(--info); }
.stat-purple::after { background: var(--info); }
.stat-orange { border-left: 4px solid var(--warning); }
.stat-orange::after { background: var(--warning); }
.stat-icon {
    font-size: 1.5rem;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-blue .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-green .stat-icon { background: var(--success-light); color: var(--success); }
.stat-purple .stat-icon { background: #f3f0ff; color: var(--info); }
.stat-orange .stat-icon { background: var(--warning-light); color: var(--warning); }
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--gray-900); letter-spacing: -0.5px; }
.stat-label { font-size: 0.875rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* --- Dashboard Grid --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* --- Data Table --- */
.table-responsive { overflow-x: auto; border-radius: var(--radius-sm); }
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th, .data-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(34, 197, 94, 0.06);
    font-size: 0.9375rem;
}
.data-table th {
    font-weight: 700;
    color: var(--gray-600);
    background: var(--primary-light);
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.5px;
}
.data-table tbody tr { transition: background var(--transition-fast); }
.data-table tbody tr:hover { background: rgba(240, 253, 244, 0.6); }
.data-table .row-warning { background: var(--warning-light); }
.text-center { text-align: center; }
.text-muted { color: var(--gray-400); }

/* --- Table Filters --- */
.table-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}
.table-filters .form-group { margin-bottom: 0; }
.table-filters label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-info { background: #f3f0ff; color: var(--info); }
.badge-warning { background: var(--warning-light); color: var(--warning); }

.stock-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}
.stock-ok { background: var(--success-light); color: var(--success); }
.stock-low { background: var(--warning-light); color: var(--warning); }
.stock-out { background: var(--danger-light); color: var(--danger); }

/* --- Alert List --- */
.alert-list { list-style: none; }
.alert-item {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}
.alert-warning { background: var(--warning-light); }
.alert-critical { background: var(--danger-light); }
.alert-name { font-weight: 500; }
.alert-qty { font-weight: 700; color: var(--danger); }

/* --- Forms --- */
.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--gray-800);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    font-family: inherit;
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}
.form-control-sm { padding: 0.4rem 0.6rem; font-size: 0.8rem; }
.form-group { margin-bottom: 1.1rem; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: var(--gray-700);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--gray-100);
    color: var(--gray-700);
    font-family: inherit;
}
.btn:hover { background: var(--gray-200); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    box-shadow: var(--shadow-green);
}
.btn-primary:hover {
    box-shadow: var(--shadow-green-lg);
    transform: translateY(-2px);
}
.btn-success { background: linear-gradient(135deg, var(--success) 0%, #059669 100%); color: #fff; box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2); }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3); }
.btn-danger { background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%); color: #fff; box-shadow: 0 4px 14px rgba(239, 68, 68, 0.2); }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3); }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.75rem; }
.btn-icon { padding: 0.4rem 0.55rem; }

/* --- Modals --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(34, 197, 94, 0.08);
}
.modal-sm { max-width: 450px; }
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid rgba(34, 197, 94, 0.08);
    background: linear-gradient(135deg, rgba(240, 253, 244, 0.5) 0%, rgba(255,255,255,0.5) 100%);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; }
.modal-close {
    background: var(--gray-100);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray-400);
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }
.modal-body { padding: 1.5rem; }
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(34, 197, 94, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    background: rgba(250, 250, 250, 0.5);
}

/* --- Categories Grid --- */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}
.category-card {
    background: #fff;
    border: 1px solid rgba(34, 197, 94, 0.1);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition);
}
.category-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--primary); }
.category-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    background: var(--primary-light);
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.category-card h3 { font-size: 1.1rem; margin-bottom: 0.25rem; font-weight: 700; }
.category-card p { color: var(--gray-500); font-size: 0.8rem; margin-bottom: 0.5rem; }
.category-count {
    display: inline-block;
    background: var(--primary-lighter);
    color: var(--primary-dark);
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.category-actions { display: flex; justify-content: center; gap: 0.5rem; }

/* --- Reports --- */
.report-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.tab {
    padding: 0.65rem 1.3rem;
    border: 1.5px solid transparent;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition);
}
.tab.active { background: var(--primary-light); color: var(--primary-dark); border-color: var(--primary); }
.tab:hover { background: var(--gray-200); }
.tab.active:hover { background: var(--primary-light); }
.report-section { display: none; }
.report-section.active { display: block; }

.sales-summary { margin-bottom: 1rem; }
.summary-row {
    display: flex;
    gap: 2rem;
    padding: 0.85rem 1.2rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- Receipt --- */
.receipt-preview { font-size: 0.85rem; }
.receipt-totals {
    border-top: 1px dashed var(--gray-300);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}
.receipt-totals p { display: flex; justify-content: space-between; margin-bottom: 0.25rem; }

/* ============================================
   POS Terminal Styles
   ============================================ */
.pos-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 0;
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
}

.pos-products {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.pos-search {
    padding: 0.85rem 1rem;
    background: #fff;
    border-bottom: 1px solid rgba(34, 197, 94, 0.08);
}
.search-input-wrapper {
    position: relative;
}
.search-input-wrapper i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}
.search-input-wrapper input {
    padding-left: 2.25rem;
}

.pos-categories {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #fff;
    border-bottom: 1px solid rgba(34, 197, 94, 0.08);
    overflow-x: auto;
    flex-shrink: 0;
}
.cat-btn {
    padding: 0.4rem 0.95rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 50px;
    background: #fff;
    color: var(--gray-600);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}
.cat-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.cat-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-green);
}

.pos-product-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    overflow-y: auto;
    align-content: start;
}
.product-tile {
    background: #fff;
    border: 1.5px solid rgba(34, 197, 94, 0.08);
    border-radius: var(--radius);
    padding: 0.85rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}
.product-tile:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-green);
    transform: translateY(-4px);
}
.product-tile:active { transform: scale(0.97); }
.product-tile-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
    background: var(--primary-light);
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-tile-name { font-size: 0.8rem; font-weight: 700; color: var(--gray-800); line-height: 1.3; }
.product-tile-price { font-size: 0.9rem; font-weight: 800; color: var(--primary-dark); }
.product-tile-stock { font-size: 0.65rem; color: var(--gray-400); font-weight: 500; }
.product-tile-stock.out-of-stock { color: var(--danger); font-weight: 700; }

/* --- Cart --- */
.pos-cart {
    background: #fff;
    border-left: 1px solid rgba(34, 197, 94, 0.08);
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
}
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(34, 197, 94, 0.08);
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%);
}
.cart-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-dark);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}
.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-400);
}
.cart-empty i { font-size: 3rem; margin-bottom: 0.5rem; display: block; }
.cart-empty p { font-size: 0.9rem; }

.cart-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid rgba(34, 197, 94, 0.05);
    font-size: 0.85rem;
    animation: slideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-xs);
    transition: background var(--transition-fast);
}
.cart-item:hover { background: var(--primary-light); }
@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.82rem; }
.cart-item-price { color: var(--gray-500); font-size: 0.75rem; }
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.cart-item-qty button {
    width: 26px;
    height: 26px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    color: var(--gray-600);
}
.cart-item-qty button:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.cart-item-qty span { min-width: 26px; text-align: center; font-weight: 800; }
.cart-item-total { font-weight: 800; min-width: 60px; text-align: right; color: var(--primary-dark); }
.cart-item-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.25rem;
}
.cart-item-remove:hover { color: var(--danger); }

/* --- Cart Totals --- */
.cart-totals {
    padding: 0.85rem 1rem;
    border-top: 2px solid var(--primary-lighter);
    background: linear-gradient(135deg, var(--primary-light) 0%, #fff 100%);
}
.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}
.total-grand {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-dark);
    padding-top: 0.5rem;
    border-top: 1px solid var(--primary-lighter);
    margin-top: 0.25rem;
}
#discountInput { width: 80px; text-align: right; }

/* --- Payment --- */
.cart-payment { padding: 0.85rem 1rem; border-top: 1px solid rgba(34, 197, 94, 0.08); }
.payment-methods { display: flex; gap: 0.4rem; margin-bottom: 0.75rem; }
.payment-method {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.55rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    background: #fff;
}
.payment-method:hover { border-color: var(--primary); background: var(--primary-light); }
.payment-method.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%);
    color: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.12);
}
.payment-method input { display: none; }

.cash-input { margin-bottom: 0.75rem; }
.cash-input label { font-size: 0.8rem; font-weight: 600; color: var(--gray-600); margin-bottom: 0.25rem; display: block; }
.change-display {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}
.change-display strong { color: var(--primary-dark); font-size: 1rem; font-weight: 800; }

.btn-checkout {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* --- Receipt (Print) --- */
.receipt {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    padding: 1.25rem;
    background: var(--primary-light);
    border-radius: var(--radius);
    border: 1px solid rgba(34, 197, 94, 0.08);
}
.receipt .receipt-header { text-align: center; margin-bottom: 1rem; }
.receipt .receipt-header h2 { font-size: 1.1rem; }
.receipt .receipt-line { border-bottom: 1px dashed var(--gray-400); margin: 0.5rem 0; }
.receipt .receipt-item { display: flex; justify-content: space-between; margin-bottom: 0.2rem; }
.receipt .receipt-total { font-weight: 700; font-size: 1rem; }
.receipt .receipt-footer { text-align: center; margin-top: 1rem; color: var(--gray-500); font-size: 0.75rem; }

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-xl);
    animation: toastIn 0.35s cubic-bezier(0.4, 0, 0.2, 1), toastOut 0.35s cubic-bezier(0.4, 0, 0.2, 1) 2.65s forwards;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 380px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.toast-success { background: linear-gradient(135deg, var(--success) 0%, #059669 100%); }
.toast-error { background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%); }
.toast-warning { background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%); }
@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(100%); } }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .pos-container { grid-template-columns: 1fr 320px; }
    .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .page-content { padding: 1rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-actions { justify-content: flex-start; width: 100%; }

    .pos-container {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    .pos-products { min-height: 50vh; }
    .pos-cart { height: auto; border-left: none; border-top: 2px solid var(--primary-lighter); }
    .cart-items { max-height: 200px; }

    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .table-filters { flex-direction: column; }
    
    .card { margin-bottom: 1rem; }
    .settings-grid { gap: 1rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .pos-product-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
    .payment-methods { flex-direction: column; }
    .page-content { padding: 0.75rem; }
    .page-title { font-size: 1.4rem; }
    .page-header { min-height: auto; }
    .table-filters { gap: 0.5rem; }
    .data-table { font-size: 0.8rem; }
    .data-table th, .data-table td { padding: 0.5rem 0.5rem; }
}

/* --- Print Styles (handled by print-preview-overlay) --- */

/* --- New Stat Colors --- */
.stat-red { border-left: 4px solid var(--danger); }
.stat-red::after { background: var(--danger); }
.stat-red .stat-icon { background: var(--danger-light); color: var(--danger); }
.stat-teal { border-left: 4px solid #14b8a6; }
.stat-teal::after { background: #14b8a6; }
.stat-teal .stat-icon { background: #ccfbf1; color: #14b8a6; }

/* --- Monthly Overview Widget --- */
.monthly-overview { display: flex; flex-direction: column; gap: 0.75rem; }
.overview-item { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; }
.overview-divider { border-top: 2px solid var(--gray-200); padding-top: 0.75rem; margin-top: 0.25rem; }
.overview-label { font-size: 0.9rem; color: var(--gray-600); }
.overview-value { font-size: 1rem; font-weight: 700; }

/* --- Utility Text Colors --- */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--gray-400) !important; }
.text-center { text-align: center; }

/* --- Page Header Actions --- */
.page-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

/* --- CSV Upload Modal --- */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--gray-50);
    margin-bottom: 1rem;
}
.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--primary);
    background: var(--primary-lighter);
}
.upload-zone i { font-size: 2rem; color: var(--gray-400); margin-bottom: 0.5rem; }
.upload-zone p { color: var(--gray-500); margin: 0.5rem 0 0; font-size: 0.85rem; }
.upload-info {
    background: var(--primary-lighter);
    border: 1px solid var(--primary-light);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.5;
}
.upload-info strong { color: var(--gray-800); }

/* Progress Bar */
.progress-bar-container {
    background: var(--gray-200);
    border-radius: 100px;
    height: 8px;
    overflow: hidden;
    margin: 1rem 0;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 100px;
    transition: width 0.3s ease;
    width: 0%;
}
.upload-status { font-size: 0.85rem; color: var(--gray-500); margin-top: 0.5rem; }

/* CSV Preview Table */
.csv-preview {
    max-height: 250px;
    overflow-y: auto;
    margin: 1rem 0;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}
.csv-preview table { margin-bottom: 0; font-size: 0.8rem; }
.csv-preview th { position: sticky; top: 0; background: var(--primary-lighter); z-index: 1; }

/* --- Modal Sizes --- */
.modal-lg .modal-content { max-width: 700px; }
.modal-xl .modal-content { max-width: 900px; }

/* --- Modal Action Buttons --- */
.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    margin-top: 1rem;
}

/* --- Refund Badge --- */
.badge-refunded { background: #fef3c7; color: #d97706; }
.badge-voided { background: var(--danger-light); color: var(--danger); }

/* --- Header Stat --- */
.header-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--gray-200);
}
.header-stat .stat-number { font-size: 1.1rem; font-weight: 800; }

/* --- Supplier Transaction List --- */
.transaction-list { list-style: none; padding: 0; margin: 0; }
.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}
.transaction-item:last-child { border-bottom: none; }
.txn-info { display: flex; flex-direction: column; gap: 0.15rem; }
.txn-type { font-size: 0.75rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }
.txn-type.purchase { color: var(--danger); }
.txn-type.payment { color: var(--success); }
.txn-date { font-size: 0.8rem; color: var(--gray-400); }
.txn-amount { font-weight: 700; font-size: 0.95rem; }
.txn-notes { font-size: 0.8rem; color: var(--gray-500); max-width: 200px; }

/* --- Expense Category Datalist --- */
.expense-summary {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.expense-summary-card {
    flex: 1;
    min-width: 150px;
    background: linear-gradient(135deg, var(--primary-lighter), #fff);
    border: 1px solid var(--primary-light);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}
.expense-summary-card .label { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 0.25rem; }
.expense-summary-card .value { font-size: 1.3rem; font-weight: 800; color: var(--gray-800); }

/* --- Print Report Styles (handled by print-preview-overlay) --- */

/* ==============================================
   DASHBOARD V2 - Professional Board-Level Design
   ============================================== */

.dashboard-v2 { display: flex; flex-direction: column; gap: 1.5rem; }

/* --- Top Row: Welcome + Stats --- */
.dash-top-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #22c55e 0%, #10b981 50%, #059669 100%);
    border-radius: 1.25rem;
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
    box-shadow: 0 20px 40px rgba(34, 197, 94, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 340px;
    position: relative;
    overflow: hidden;
}
.welcome-bg-effect {
    position: absolute;
    top: -50%; right: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: welcome-float 6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes welcome-float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -20px); }
}
.welcome-content { position: relative; z-index: 1; }
.welcome-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.95; }
.welcome-icon i { filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2)); }
.welcome-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: 0.3px; }
.welcome-name { font-size: 1.2rem; font-weight: 600; margin-bottom: 1.25rem; opacity: 0.95; }
.welcome-role-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(255,255,255,0.2); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 1.25rem; border-radius: 2rem;
    font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease; margin-bottom: 1.5rem;
}
.welcome-role-badge:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }
.welcome-balance { margin-bottom: 1.5rem; }
.welcome-balance-label { font-size: 0.9375rem; opacity: 0.9; font-weight: 500; display: block; margin-bottom: 0.5rem; }
.welcome-balance-amount { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.5px; text-shadow: 0 2px 8px rgba(0,0,0,0.2); display: block; }
.welcome-action-btn {
    background: rgba(255,255,255,0.95); color: #059669;
    border: none; padding: 0.875rem 2rem; border-radius: 3rem;
    font-weight: 700; font-size: 1rem; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.welcome-action-btn:hover { background: white; color: #047857; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.2); }

/* Stat Cards Grid */
.dash-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.dash-stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    min-height: 145px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    border: 1px solid rgba(0,0,0,0.05);
}
.dash-stat-card:hover { transform: translateY(-6px); box-shadow: 0 12px 28px rgba(0,0,0,0.12); }
.dash-stat-green { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); border-color: #a7f3d0; }
.dash-stat-blue { background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%); border-color: #bfdbfe; }
.dash-stat-purple { background: linear-gradient(135deg, #f3f0ff 0%, #ede9fe 100%); border-color: #e9d5ff; }
.dash-stat-pink { background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%); border-color: #fbcfe8; }

.dash-stat-icon-wrap {
    width: 56px; height: 56px; border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem; font-size: 1.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.dash-stat-green .dash-stat-icon-wrap { background: linear-gradient(135deg, #34d399, #10b981); color: white; }
.dash-stat-blue .dash-stat-icon-wrap { background: linear-gradient(135deg, #60a5fa, #3b82f6); color: white; }
.dash-stat-purple .dash-stat-icon-wrap { background: linear-gradient(135deg, #a78bfa, #8b5cf6); color: white; }
.dash-stat-pink .dash-stat-icon-wrap { background: linear-gradient(135deg, #f472b6, #ec4899); color: white; }

.dash-stat-info { width: 100%; }
.dash-stat-label {
    font-size: 0.8125rem; color: #6b7280; margin-bottom: 0.5rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
}
.dash-stat-value {
    font-size: 1.6rem; font-weight: 800; color: #1f2937;
    margin: 0; letter-spacing: -0.5px;
}
.dash-stat-note { display: block; font-size: 0.75rem; color: #6b7280; margin-top: 0.375rem; font-weight: 500; }
.fw-700 { font-weight: 700; }

/* Quick Actions Bar */
.quick-actions-bar {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
    justify-content: center; padding: 1.25rem;
    background: white; border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); border: 1px solid rgba(0,0,0,0.05);
}
.quick-chip {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem; border-radius: 2rem;
    text-decoration: none; font-size: 0.9375rem; font-weight: 600;
    transition: all 0.3s ease; border: 2px solid;
}
.quick-chip i { font-size: 1.125rem; }
.quick-chip:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
.quick-chip-emerald { background: linear-gradient(135deg,#ecfdf5,#d1fae5); border-color: #10b981; color: #059669; }
.quick-chip-emerald:hover { background: linear-gradient(135deg,#d1fae5,#a7f3d0); color: #047857; }
.quick-chip-blue { background: linear-gradient(135deg,#eff6ff,#dbeafe); border-color: #3b82f6; color: #2563eb; }
.quick-chip-blue:hover { background: linear-gradient(135deg,#dbeafe,#bfdbfe); color: #1d4ed8; }
.quick-chip-violet { background: linear-gradient(135deg,#f3f0ff,#ede9fe); border-color: #8b5cf6; color: #7c3aed; }
.quick-chip-violet:hover { background: linear-gradient(135deg,#ede9fe,#ddd6fe); color: #6d28d9; }
.quick-chip-amber { background: linear-gradient(135deg,#fffbeb,#fef3c7); border-color: #f59e0b; color: #d97706; }
.quick-chip-amber:hover { background: linear-gradient(135deg,#fef3c7,#fde68a); color: #b45309; }
.quick-chip-rose { background: linear-gradient(135deg,#fdf2f8,#fce7f3); border-color: #ec4899; color: #db2777; }
.quick-chip-rose:hover { background: linear-gradient(135deg,#fce7f3,#fbcfe8); color: #be185d; }
.quick-chip-teal { background: linear-gradient(135deg,#f0fdfa,#ccfbf1); border-color: #14b8a6; color: #0d9488; }
.quick-chip-teal:hover { background: linear-gradient(135deg,#ccfbf1,#99f6e4); color: #0f766e; }

/* Chart Card */
.dash-chart-card {
    background: white; border-radius: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}
.dash-chart-header {
    padding: 1.75rem 1.75rem 1.25rem;
    border-bottom: 2px solid #f3f4f6;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
}
.dash-chart-title { font-size: 1.3rem; font-weight: 700; color: #1e293b; margin: 0; }
.dash-chart-subtitle { font-size: 0.9375rem; color: #6b7280; font-weight: 500; margin: 0.25rem 0 0; }
.dash-chart-legend { font-size: 0.875rem; color: #6b7280; display: flex; align-items: center; gap: 0.375rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend-revenue { background: #22c55e; }
.legend-orders { background: #8b5cf6; }
.dash-chart-body { padding: 2rem 1.75rem; background: #fafafa; }
#dashSalesChart { max-height: 380px; }

/* Bottom Grid */
.dash-bottom-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 1.5rem;
}

/* Dashboard Cards */
.dash-card {
    background: white; border-radius: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05); overflow: hidden;
}
.dash-card-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 1.5rem; border-bottom: 2px solid #f3f4f6;
}
.dash-card-header h5 {
    font-size: 1.0625rem; font-weight: 700; color: #1e293b; margin: 0;
    display: flex; align-items: center; gap: 0.5rem;
}
.dash-card-link {
    font-size: 0.875rem; font-weight: 600; color: var(--primary);
    text-decoration: none; display: flex; align-items: center; gap: 0.375rem;
    transition: all 0.2s ease;
}
.dash-card-link:hover { color: var(--primary-dark); transform: translateX(3px); }
.dash-card-body { padding: 1.25rem 1.5rem; }
.dash-card-scroll { max-height: 220px; overflow-y: auto; }

/* Dashboard Table */
.dash-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.dash-table th {
    text-align: left; padding: 0.75rem 0.75rem; font-weight: 600;
    color: #64748b; font-size: 0.8125rem; text-transform: uppercase;
    letter-spacing: 0.5px; border-bottom: 2px solid #f1f5f9;
    white-space: nowrap;
}
.dash-table td {
    padding: 0.75rem 0.75rem; border-bottom: 1px solid #f8fafc;
    color: #334155; white-space: nowrap;
}
.dash-table tbody tr:hover { background: #f8fafc; }

/* Dashboard Badges */
.dash-badge {
    padding: 0.25rem 0.75rem; border-radius: 2rem;
    font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.3px; display: inline-block;
}
.dash-badge-completed { background: #dcfce7; color: #16a34a; }
.dash-badge-voided { background: #fef2f2; color: #ef4444; }
.dash-badge-refunded { background: #fef3c7; color: #d97706; }
.dash-badge-pending { background: #e0e7ff; color: #4f46e5; }

/* Alert List */
.dash-alert-list { list-style: none; padding: 0; margin: 0; }
.dash-alert-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.625rem 0.75rem; margin-bottom: 0.375rem;
    border-radius: 0.5rem; transition: all 0.2s ease; font-size: 0.9375rem;
}
.dash-alert-item.warning { background: #fffbeb; border-left: 3px solid #f59e0b; }
.dash-alert-item.critical { background: #fef2f2; border-left: 3px solid #ef4444; }
.dash-alert-name { font-weight: 600; color: #334155; }
.dash-alert-value { font-weight: 700; font-size: 0.875rem; color: #64748b; white-space: nowrap; }
.dash-section-label {
    font-size: 0.8125rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; margin: 0.75rem 0 0.5rem; padding-left: 0.25rem;
}
.text-warning { color: var(--warning) !important; }
.dash-empty {
    text-align: center; padding: 2rem 1rem; color: #94a3b8;
}
.dash-empty i { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; opacity: 0.5; }
.dash-empty p { font-size: 0.9375rem; margin: 0; }

/* Finance Rows */
.dash-finance-rows { display: flex; flex-direction: column; gap: 0; }
.dash-finance-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.875rem 0; border-bottom: 1px solid #f1f5f9;
}
.dash-finance-row:last-child { border-bottom: none; }
.dash-finance-total { border-top: 2px solid #e2e8f0; margin-top: 0.5rem; padding-top: 1rem; }
.dash-finance-label { font-size: 0.9375rem; color: #475569; display: flex; align-items: center; gap: 0.5rem; }
.dash-finance-val { font-size: 1.0625rem; font-weight: 700; }
.dash-divider { height: 1px; background: #e2e8f0; margin: 1.25rem 0; }
.dash-sub-title {
    font-size: 0.9375rem; font-weight: 700; color: #1e293b;
    margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem;
}

/* Top Products */
.dash-top-products { list-style: none; padding: 0; margin: 0; }
.dash-top-product {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.625rem 0; border-bottom: 1px solid #f8fafc;
}
.dash-top-product:last-child { border-bottom: none; }
.dash-top-rank {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #f0fdf4, #d1fae5);
    color: #059669; font-weight: 800; font-size: 0.8125rem;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.dash-top-product-info { flex: 1; min-width: 0; }
.dash-top-product-name { font-weight: 600; color: #1e293b; font-size: 0.9375rem; display: block; }
.dash-top-product-meta { font-size: 0.8125rem; color: #94a3b8; }

/* Alerts Column - stacks two cards */
.dash-alerts-column { display: flex; flex-direction: column; gap: 1.5rem; }

/* -- Dashboard V2 Responsive -- */
@media (max-width: 1100px) {
    .dash-top-row { grid-template-columns: 1fr; }
    .welcome-card { min-height: 260px; }
    .dash-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .dash-stats-grid { grid-template-columns: 1fr 1fr; }
    .quick-actions-bar { gap: 0.5rem; padding: 1rem; }
    .quick-chip { padding: 0.5rem 1rem; font-size: 0.8125rem; }
    .dash-chart-header { padding: 1.25rem; }
    .dash-chart-body { padding: 1.25rem; }
    .welcome-balance-amount { font-size: 1.75rem; }
}
@media (max-width: 480px) {
    .dash-stats-grid { grid-template-columns: 1fr; }
    .welcome-card { padding: 2rem 1.25rem; min-height: 240px; }
    .welcome-icon { font-size: 3rem; }
    .welcome-title { font-size: 1.25rem; }
    .welcome-balance-amount { font-size: 1.5rem; }
    .dash-stat-card { min-height: 120px; padding: 1.25rem 1rem; }
    .dash-stat-value { font-size: 1.375rem; }
    .quick-chip span { display: none; }
}

/* ==============================================
   CLOCK-IN GATE & STATUS BAR
   ============================================== */

.clockin-gate {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}
.clockin-gate.clocked-in {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
}
.clockin-card {
    background: white;
    border-radius: 1.5rem;
    padding: 3rem 2.5rem;
    text-align: center;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: clockin-slide-up 0.5s ease;
}
@keyframes clockin-slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.clockin-icon {
    width: 100px; height: 100px;
    background: linear-gradient(135deg, #22c55e 0%, #059669 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 12px 30px rgba(34, 197, 94, 0.35);
}
.clockin-icon i { font-size: 2.5rem; color: white; }
.clockin-title {
    font-size: 1.75rem; font-weight: 800;
    color: #1f2937; margin-bottom: 0.75rem;
}
.clockin-subtitle {
    font-size: 1rem; color: #6b7280;
    line-height: 1.6; margin-bottom: 1.5rem;
}
.clockin-time {
    font-size: 2.5rem; font-weight: 800;
    color: #22c55e; margin-bottom: 2rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}
.clockin-btn {
    width: 100%;
    padding: 1rem !important;
    font-size: 1.125rem !important;
    border-radius: 0.875rem !important;
    font-weight: 700 !important;
    gap: 0.5rem;
}
.clockin-btn i { font-size: 1.25rem; }

/* Clock Status Bar */
.clock-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #a7f3d0;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    gap: 1rem;
}
.clock-status-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.9375rem;
    color: #065f46;
    font-weight: 500;
}
.clock-elapsed {
    color: #059669;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.btn-outline-danger {
    background: transparent;
    border: 1.5px solid var(--danger);
    color: var(--danger);
    border-radius: 0.5rem;
    padding: 0.375rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}
.btn-outline-danger:hover {
    background: var(--danger);
    color: white;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ==============================================
   WHOLESALE PRICING
   ============================================== */

/* Toggle Switch */
.wholesale-toggle {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}
.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}
.toggle-label input[type="checkbox"] {
    display: none;
}
.toggle-switch {
    width: 44px; height: 24px;
    background: #d1d5db;
    border-radius: 12px;
    position: relative;
    transition: background 0.3s ease;
    flex-shrink: 0;
}
.toggle-switch::after {
    content: '';
    width: 18px; height: 18px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 3px; left: 3px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-label input:checked + .toggle-switch {
    background: #22c55e;
}
.toggle-label input:checked + .toggle-switch::after {
    transform: translateX(20px);
}
.toggle-text {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.toggle-text i { color: #f59e0b; }

/* Product Tile Wholesale Price */
.product-tile-wholesale {
    font-size: 0.7rem;
    color: #d97706;
    font-weight: 600;
    margin-top: 0.25rem;
    background: #fffbeb;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    display: inline-block;
}
.product-tile-wholesale i { font-size: 0.65rem; margin-right: 0.15rem; }

/* Cart Item Wholesale Indicator */
.cart-item-wholesale {
    border-left: 3px solid #f59e0b !important;
    background: #fffdf7 !important;
}
.wholesale-badge {
    display: inline-block;
    font-size: 0.6rem;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 0.25rem;
}

/* Wholesale hint in cart */
.cart-item-ws-hint {
    font-size: 0.7rem;
    color: #d97706;
    font-weight: 600;
    margin-top: 0.2rem;
    background: #fffbeb;
    padding: 0.15rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
}
.cart-item-ws-hint i { margin-right: 0.2rem; font-size: 0.65rem; }

/* ==============================================
   SETTINGS PAGE
   ============================================== */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media (max-width: 900px) {
    .settings-grid { grid-template-columns: 1fr; }
}

.upload-section { margin-bottom: 0.5rem; }
.upload-label { font-weight: 700; font-size: 0.95rem; color: var(--gray-800); display: block; margin-bottom: 0.25rem; }
.upload-hint { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 0.75rem; }

.upload-preview-box {
    width: 100%;
    min-height: 140px;
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
    background: var(--gray-50);
}
.upload-preview-box:hover, .upload-preview-box.drag-over {
    border-color: var(--primary);
    background: rgba(34, 197, 94, 0.04);
}
.upload-preview-box img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
    padding: 1rem;
}
.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-400);
    font-size: 0.85rem;
    padding: 1rem;
}
.upload-placeholder i { font-size: 2rem; color: var(--gray-300); }

.upload-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.upload-btn-label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* ==============================================
   DIRECT PRINT STYLES
   ============================================== */

/* Hidden print container â invisible on screen */
#printArea {
    display: none;
}

@media print {
    /* Hide everything on screen */
    body > *:not(#printArea) {
        display: none !important;
    }
    /* Show only the print area */
    #printArea {
        display: block !important;
        position: static;
        width: 100%;
    }
    @page { margin: 15mm 14mm; }
}

/* Print-area inner styles (apply on screen in #printArea and in print) */
#printArea .print-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #1e293b; font-size: 11pt; line-height: 1.6;
}
#printArea .print-header {
    text-align: center; margin-bottom: 30px; padding-bottom: 20px;
    border-bottom: 3px solid #22c55e; position: relative;
}
#printArea .print-header::after {
    content: ''; position: absolute; bottom: -3px; left: 50%;
    transform: translateX(-50%); width: 60px; height: 3px; background: #059669;
}
#printArea .print-header .shop-name {
    font-size: 20pt; font-weight: 800; color: #1e293b; margin-bottom: 4px;
}
#printArea .print-header h1 {
    font-size: 14pt; color: #22c55e; margin: 0 0 6px; font-weight: 700;
}
#printArea .print-header .date-info { font-size: 10pt; color: #475569; }
#printArea .print-header .generated { font-size: 8pt; color: #94a3b8; margin-top: 6px; }
#printArea .print-header .report-id { font-size: 7.5pt; color: #94a3b8; margin-top: 3px; font-family: 'Courier New', monospace; }

#printArea .stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px; margin: 16px 0 24px;
}
#printArea .stat-card {
    border: 1.5px solid #e2e8f0; border-radius: 8px;
    padding: 12px 10px; text-align: center; background: #fafafa;
}
#printArea .stat-value { font-size: 16pt; font-weight: 800; color: #1e293b; display: block; }
#printArea .stat-label { font-size: 7.5pt; color: #64748b; text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; margin-top: 3px; }

#printArea h3 { font-size: 12pt; margin: 22px 0 10px; font-weight: 700; border-bottom: 2px solid #f1f5f9; padding-bottom: 6px; }
#printArea h4 { font-size: 10pt; color: #475569; margin: 14px 0 6px; font-weight: 600; }
#printArea table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; font-size: 9pt; }
#printArea th { background: #f8fafc; font-weight: 700; color: #334155; padding: 8px 10px; text-align: left; border-bottom: 2px solid #e2e8f0; font-size: 8pt; text-transform: uppercase; letter-spacing: 0.4px; }
#printArea td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; color: #334155; }
#printArea tr:nth-child(even) td { background: #fafafa; }
#printArea .row-warning td { background: #fffbeb !important; border-left: 3px solid #f59e0b; }

#printArea .pnl-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 10pt; }
#printArea .pnl-row.total { border-top: 2px solid #1e293b; border-bottom: none; font-weight: 800; font-size: 12pt; padding-top: 10px; margin-top: 5px; }

#printArea .text-success { color: #10b981; }
#printArea .text-danger { color: #ef4444; }
#printArea .text-center { text-align: center; }

#printArea .print-footer {
    margin-top: 40px; padding-top: 16px;
    border-top: 1px solid #e2e8f0; text-align: center;
    font-size: 8pt; color: #94a3b8;
}
#printArea .print-footer .confidential { font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #64748b; margin-bottom: 3px; }

/* Receipt print (narrow) */
#printArea.receipt-mode .print-page {
    max-width: 300px; margin: 0 auto; font-family: 'Courier New', monospace; font-size: 11px;
}
#printArea.receipt-mode table { margin: 6px 0; }
#printArea.receipt-mode th, #printArea.receipt-mode td { padding: 2px 4px; font-size: 10px; }
#printArea.receipt-mode th { border-bottom: 1px dashed #000; background: none; text-transform: none; }
#printArea.receipt-mode .receipt-totals p { margin: 2px 0; }
