/* assets/css/styles.css - Premium Bright Cosmetics Cashier Styling */


:root {
    color-scheme: light;
    /* Color Palette: Clean Professional SaaS */
    --bg-dark: #f8fafc;
    --panel-dark: #ffffff;
    --panel-light: #ffffff;
    --primary: #4f46e5;
    --primary-light: #e0e7ff;
    --primary-hover: #4338ca;
    --accent: #ec4899;
    --burgundy: #0f172a;
    --burgundy-light: #475569;
    --text-white: #1e293b;
    --text-muted: #64748b;
    --border-glow: rgba(79, 70, 229, 0.2);
    --border-glow-hover: rgba(79, 70, 229, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.05);
    
    /* Semantic Colors */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Shadows & Transitions */
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --transition: all 0.2s ease-in-out;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg-dark: #1e1e2d; /* Softer charcoal navy */
    --panel-dark: #27293d; /* Lighter panel */
    --panel-light: #27293d; 
    --text-white: #e2e8f0; /* Softer white for less eye strain */
    --text-muted: #94a3b8;
    --primary-light: #312e81; 
    --burgundy: #e2e8f0; 
    --glass-bg: rgba(39, 41, 61, 0.95);
    --glass-border: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] body {
    background-image: none;
}
[data-theme="dark"] .form-control,
[data-theme="dark"] .qty-btn,
[data-theme="dark"] .table th,
[data-theme="dark"] .menu-item a:hover,
[data-theme="dark"] .filter-btn,
[data-theme="dark"] .product-card-img {
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Base resets & typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(79, 70, 229, 0.08) 0%, transparent 35%),
        radial-gradient(circle at 100% 0%, rgba(236, 72, 153, 0.08) 0%, transparent 35%),
        radial-gradient(circle at 50% 100%, rgba(79, 70, 229, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(236, 72, 153, 0.03) 0%, transparent 30%);
    color: var(--text-white);
    min-height: 100vh;
    overflow-x: hidden;
    background-attachment: fixed;
    position: relative;
    z-index: 0;
}

body::before, body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    animation: floatBlob 20s infinite alternate ease-in-out;
    pointer-events: none;
}

body::before {
    width: 500px;
    height: 500px;
    background: rgba(79, 70, 229, 0.12);
    top: -100px;
    left: -100px;
}

body::after {
    width: 600px;
    height: 600px;
    background: rgba(236, 72, 153, 0.12);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

[data-theme="dark"] body::before {
    background: rgba(79, 70, 229, 0.2);
}

[data-theme="dark"] body::after {
    background: rgba(236, 72, 153, 0.2);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #dfe6e9;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* App Shell Layout */
#app {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Auth View (Centered) */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
    background-color: transparent;
    position: relative;
    overflow: hidden;
}

/* Glowing Background Blobs */
.auth-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    z-index: 1;
    animation: floatBlob 20s infinite alternate ease-in-out;
}
.auth-bg-blob-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -50px;
    left: -50px;
}
.auth-bg-blob-2 {
    width: 350px;
    height: 350px;
    background: var(--accent);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
    animation-duration: 25s;
}
.auth-bg-blob-3 {
    width: 250px;
    height: 250px;
    background: #6366f1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.12;
    animation: pulseBlob 10s infinite alternate ease-in-out;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.2); }
}
@keyframes pulseBlob {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.08; }
    100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.16; }
}

.auth-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08);
    animation: authCardEntrance 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
    z-index: 10;
}

@keyframes authCardEntrance {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-header {
    text-align: center;
    margin-bottom: 36px;
}

.auth-logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 28px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    animation: spinSlow 20s linear infinite;
}

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-family: 'Outfit', 'Inter', sans-serif;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: #64748b;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.5;
}

/* Premium Form Styles */
.auth-input-group {
    position: relative;
    margin-bottom: 20px;
}

.auth-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 16px;
    transition: var(--transition);
}

.auth-input-field {
    width: 100%;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #1e293b;
    padding: 14px 16px 14px 48px;
    border-radius: 14px;
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.auth-input-field::placeholder {
    color: #94a3b8;
}

.auth-input-field:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.auth-input-field:focus + .auth-input-icon {
    color: var(--primary);
}

.auth-toggle-pass {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-toggle-pass:hover {
    color: #ffffff;
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
}

.auth-btn:active {
    transform: translateY(1px);
}

/* Form inputs & labels */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.2px;
}

.form-control {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #dfe6e9;
    color: var(--text-white);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: #f1f2f6;
    color: var(--text-white);
    border: 1px solid #dfe6e9;
}

.btn-secondary:hover {
    background: #dfe6e9;
}

.btn-danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--error);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.btn-danger:hover {
    background: var(--error);
    color: #fff;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.25);
}

.btn-success {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success);
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.btn-success:hover {
    background: var(--success);
    color: #fff;
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.25);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
}

/* Dashboard Sidebar */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition);
    z-index: 100;
}

[data-theme="dark"] .sidebar {
    background: rgba(39, 41, 61, 0.6);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.2);
}

.sidebar-brand {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.sidebar-brand h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.sidebar-user {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-user .user-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--burgundy);
}

.sidebar-user .user-role {
    font-size: 12px;
    color: var(--primary-hover);
    text-transform: capitalize;
    font-weight: 600;
}

.sidebar-user .shift-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    border-radius: 12px;
    width: fit-content;
    margin-top: 8px;
    font-weight: 600;
    box-shadow: none;
}

.sidebar-menu {
    list-style: none;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.menu-item a:hover {
    color: var(--text-white);
    background: #f1f5f9;
    transform: translateX(4px);
}

.menu-item.active a {
    color: var(--primary);
    background: var(--primary-light);
    border-right: 3px solid var(--primary);
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--error);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
    background: rgba(231, 76, 60, 0.1);
    border: none;
    cursor: pointer;
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
}

.logout-btn:hover {
    background: var(--error);
    color: #fff;
}

/* Main Dashboard Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    background: transparent;
}

.topbar {
    height: 72px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    z-index: 90;
}

[data-theme="dark"] .topbar {
    background: rgba(39, 41, 61, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-body {
    padding: 30px;
    flex-grow: 1;
}

/* Financial overview stats card grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
}

[data-theme="dark"] .stat-card {
    background: rgba(39, 41, 61, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-info .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-info .stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.icon-revenue { background: rgba(46, 204, 113, 0.1); color: var(--success); }
.icon-profit { background: var(--primary-light); color: var(--primary); }
.icon-cogs { background: rgba(255, 138, 101, 0.15); color: var(--accent); }
.icon-txs { background: rgba(52, 152, 219, 0.1); color: var(--info); }

/* Card design */
.card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    margin-bottom: 30px;
    overflow: hidden;
}

[data-theme="dark"] .card {
    background: rgba(39, 41, 61, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .card-header {
    background: rgba(0, 0, 0, 0.2) !important;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
    font-family: 'Inter', sans-serif;
}

.card-body {
    padding: 24px;
}

/* Tables styling */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

/* Sticky table header when table-responsive is scrollable */
.table-responsive thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}

[data-theme="dark"] .table-responsive thead th {
    background: #27293d !important;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    padding: 16px 20px;
    background: #f8f9fa;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    color: var(--text-white);
    font-size: 14px;
    font-weight: 500;
}

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

.table tr:hover td {
    background: rgba(240, 98, 146, 0.02);
}

/* User Badges */
.badge {
    display: inline-block;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    text-transform: capitalize;
}

.badge-admin { background: var(--primary-light); color: var(--primary-hover); }
.badge-kasir { background: rgba(52, 152, 219, 0.1); color: var(--info); }
.badge-stock { background: rgba(241, 196, 15, 0.15); color: #d35400; }

.badge-success { background: rgba(46, 204, 113, 0.1); color: var(--success); }
.badge-error { background: rgba(231, 76, 60, 0.1); color: var(--error); }

/* Cashier POS Layout */
.view-body:has(.pos-layout) {
    padding: 16px;
}
.pos-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(450px, 38%, 620px); /* minmax(0,1fr) prevents catalog from overflowing into cart */
    gap: 16px;
    height: calc(100vh - 104px); /* 72px topbar + 32px padding (16px * 2) */
}

/* Products Catalogs on Cashier */
.catalog-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 0;
    min-width: 0;  /* prevents flex/grid blowout from long category names */
    overflow: hidden;
}

.catalog-filters {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
    min-width: 0;       /* allow shrinking inside flex parent */
    flex-shrink: 0;     /* don't collapse height */
}
.catalog-filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 10px 20px;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid #dfe6e9;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(240, 98, 146, 0.3);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    overflow-y: auto;
    padding-right: 8px;
    flex-grow: 1;
    align-content: start;
}

/* Custom Highly Visible Scrollbar for Product Grid */
.products-grid::-webkit-scrollbar {
    width: 6px;
}
.products-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}
[data-theme="dark"] .products-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}
.products-grid::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 10px;
}
.products-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* POS List View Mode styling */
.products-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .product-card {
    background: rgba(39, 41, 61, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.1);
}

[data-theme="dark"] .product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.25);
}

.product-card-img {
    height: 90px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary-light);
    position: relative;
}

.product-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-stock {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffffff;
    color: var(--text-white);
    padding: 3px 6px;
    font-size: 10px;
    border-radius: 4px;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.product-card-stock.empty {
    background: var(--error);
    color: #ffffff;
}

.product-card-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
}

.product-card-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-white);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 32px;
    line-height: 1.3;
}

.product-card-price {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Inter', sans-serif;
    margin-top: auto;
}

/* POS List Row View Classes */
.product-list-row {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    gap: 12px;
}

[data-theme="dark"] .product-list-row {
    background: rgba(39, 41, 61, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.product-list-row:hover {
    transform: translateX(4px);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
}

[data-theme="dark"] .product-list-row:hover {
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.product-list-row.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.product-list-row.disabled:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: none;
}

.product-list-img {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

[data-theme="dark"] .product-list-img {
    background: rgba(0, 0, 0, 0.2);
}

.product-list-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-list-detail {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-list-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-list-barcode {
    font-size: 10.5px;
    color: var(--text-muted);
    font-family: monospace;
}

.product-list-stock {
    font-size: 11px;
    font-weight: 700;
    color: var(--success);
    padding: 3px 8px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.product-list-stock.empty {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.product-list-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
    min-width: 90px;
    text-align: right;
}

/* POS Cart Panel */
.cart-panel {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;      /* prevent content from stretching the panel */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .cart-panel {
    background: rgba(39, 41, 61, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cart-header {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

[data-theme="dark"] .cart-header {
    background: rgba(0, 0, 0, 0.2) !important;
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: transparent;
}

.cart-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

[data-theme="dark"] .cart-item {
    background: rgba(39, 41, 61, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.cart-item:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .cart-item:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.cart-item-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-white);
    line-height: 1.45;
    word-break: break-word;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cart-item-price {
    font-size: 12.5px;
    color: var(--text-muted);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 2px 4px;
    border: 1px solid var(--glass-border);
}

.qty-btn {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--primary-light);
    color: var(--primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

[data-theme="dark"] .qty-btn {
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-white) !important;
    border: none !important;
}
[data-theme="dark"] .qty-btn:hover {
    background: var(--primary) !important;
    color: #ffffff !important;
}

.qty-val {
    font-size: 13px;
    font-weight: 600;
    width: 20px;
    text-align: center;
    color: var(--text-white);
}

.cart-item-subtotal {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
    font-family: 'Inter', sans-serif;
}

.cart-summary {
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

[data-theme="dark"] .cart-summary {
    background: rgba(0, 0, 0, 0.2) !important;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.summary-row.total {
    font-size: 20px;
    color: var(--text-white);
    font-weight: 800;
    border-top: 2px dashed rgba(0, 0, 0, 0.1);
    padding-top: 12px;
    margin-top: 2px;
    font-family: 'Outfit', sans-serif;
}

.summary-row.total span:last-child {
    color: var(--primary);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-dialog {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    transform: scale(0.95) translateY(10px);
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

[data-theme="dark"] .modal-dialog {
    background: rgba(39, 41, 61, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.modal.active .modal-dialog {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-white);
    font-family: 'Outfit', sans-serif;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.close-btn:hover {
    color: var(--error);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Print Receipt Template - Consolidated styles for thermal printer output */
@media print {
    @page {
        margin: 0;
        size: 80mm auto;
    }
    body {
        margin: 0;
        padding: 5px;
    }
    body * {
        visibility: hidden;
    }
    #app {
        display: none !important;
    }
    #receipt-print-area, #receipt-print-area * {
        visibility: visible;
    }
    #receipt-print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        display: block !important;
        color: #000;
        background: #fff;
        font-family: 'Courier New', monospace;
        font-size: 12px;
        padding: 5px;
    }
    .no-print {
        display: none !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hamburger & Mobile sidebar overlay */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-white);
    cursor: pointer;
    margin-right: 15px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s;
}

@media (min-width: 1440px) {
    .pos-layout {
        grid-template-columns: minmax(0, 1fr) 600px;
        gap: 20px;
    }
}

@media (max-width: 1200px) {
    .pos-layout {
        grid-template-columns: minmax(0, 1fr) 460px;
    }
}

@media (max-width: 1024px) {
    .pos-layout {
        grid-template-columns: minmax(0, 1fr) 380px;
    }
}

/* Mobile POS Tabs styling (Hidden by default on Desktop) */
.pos-mobile-tabs {
    display: none;
}

@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.35); }
}

.bounce-animation {
    animation: badgeBounce 0.3s ease-out;
}

@media (max-width: 900px) {
    .pos-mobile-tabs {
        display: flex;
        gap: 8px;
        margin-bottom: 12px;
        background: rgba(255, 255, 255, 0.4);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 5px;
        border-radius: var(--radius-lg);
        border: 1px solid var(--glass-border);
    }
    
    [data-theme="dark"] .pos-mobile-tabs {
        background: rgba(30, 32, 48, 0.5);
    }

    .pos-tab-btn {
        flex: 1;
        padding: 10px 14px;
        border: none;
        background: transparent;
        color: var(--text-muted);
        font-weight: 600;
        font-size: 13px;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: all 0.2s ease;
    }

    .pos-tab-btn.active {
        background: var(--primary);
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(240, 98, 146, 0.25);
    }
    
    .cart-count-badge {
        background: var(--primary);
        color: #ffffff;
        font-size: 11px;
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 10px;
        margin-left: 4px;
        display: inline-block;
        line-height: 1;
        transition: all 0.2s ease;
    }
    
    .pos-tab-btn.active .cart-count-badge {
        background: #ffffff;
        color: var(--primary);
    }

    .pos-layout {
        grid-template-columns: 1fr !important;
        height: calc(100vh - 165px) !important;
        gap: 0;
    }

    .pos-layout.tab-catalog .cart-panel {
        display: none !important;
    }

    .pos-layout.tab-cart .catalog-panel {
        display: none !important;
    }

    .catalog-panel, .cart-panel {
        height: 100% !important;
    }

    .cart-panel {
        height: 100% !important;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Charts */
    .chart-container-row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        box-shadow: var(--shadow-lg);
    }
    .sidebar.open {
        left: 0;
    }
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
    .mobile-toggle {
        display: block;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .topbar {
        padding: 0 15px;
    }
    .view-body {
        padding: 15px;
    }
}

/* Settings Page Grid Layout */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.settings-grid > .card {
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.settings-grid > .card > .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.settings-grid > .card > .card-body > form {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.settings-grid > .card > .card-body > form > *:last-child {
    margin-top: auto !important;
}

.settings-danger-card {
    grid-column: 1 / -1;
}

@media (max-width: 1024px) {
    .settings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .settings-grid > .card > .card-body > form > *:last-child {
        margin-top: 15px !important; /* Reset auto margin on mobile stack */
    }
}

