/* ============================================
   ETIQUETA STOCK — SHOWROOM POS DESIGN SYSTEM
   Premium Dark/Light Theme · Inter Typeface
   ============================================ */

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

/* ============================================
   THEME VARIABLES — Foundation Tokens
   ============================================ */
:root {
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Radii */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows — overridden per theme */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.10);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.14);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.18);

    /* Transitions */
    --transition: 0.2s ease;
    --transition-slow: 0.35s cubic-bezier(0.16, 1, 0.3, 1);

    /* Layout */
    --sidebar-width: 240px;
    --sidebar-collapsed: 64px;
    --cart-width: 380px;
    --header-height: 56px;
}

/* ============================================
   DARK THEME (Default)
   ============================================ */
[data-theme="dark"] {
    --bg-primary:    #0d1117;
    --bg-secondary:  #161b22;
    --bg-card:       #1c2128;
    --bg-card-hover: #22272e;
    --bg-input:      #21262d;
    --bg-sidebar:    #0d1117;
    --bg-elevated:   #2d333b;

    --border-color:  #30363d;
    --border-subtle: #21262d;

    --text-primary:   #e6edf3;
    --text-secondary: #8b949e;
    --text-muted:     #6e7681;

    /* Accent — Purple */
    --accent:       #8b5cf6;
    --accent-light: #a78bfa;
    --accent-bg:    rgba(139, 92, 246, 0.12);

    /* Semantic */
    --success:    #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --warning:    #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger:     #ef4444;
    --danger-bg:  rgba(239, 68, 68, 0.12);
    --info:       #38bdf8;
    --info-bg:    rgba(56, 189, 248, 0.12);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-danger:  linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    --gradient-info:    linear-gradient(135deg, #38bdf8 0%, #7dd3fc 100%);

    /* Glass */
    --glass:        rgba(13, 17, 23, 0.85);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-blur:   12px;

    /* Shadows (dark-specific) */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.30);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.40);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.50);
    --shadow-accent: 0 0 30px rgba(139, 92, 246, 0.15);
}

/* ============================================
   LIGHT THEME
   ============================================ */
[data-theme="light"] {
    --bg-primary:    #f6f8fa;
    --bg-secondary:  #ffffff;
    --bg-card:       #ffffff;
    --bg-card-hover: #f3f4f6;
    --bg-input:      #f0f1f4;
    --bg-sidebar:    #ffffff;
    --bg-elevated:   #e5e7eb;

    --border-color:  #d0d7de;
    --border-subtle: #e5e7eb;

    --text-primary:   #1f2328;
    --text-secondary: #656d76;
    --text-muted:     #8b949e;

    /* Accent — Purple (slightly deeper for contrast) */
    --accent:       #7c3aed;
    --accent-light: #7c3aed;
    --accent-bg:    rgba(124, 58, 237, 0.08);

    /* Semantic */
    --success:    #059669;
    --success-bg: rgba(5, 150, 105, 0.08);
    --warning:    #d97706;
    --warning-bg: rgba(217, 119, 6, 0.08);
    --danger:     #dc2626;
    --danger-bg:  rgba(220, 38, 38, 0.08);
    --info:       #0284c7;
    --info-bg:    rgba(2, 132, 199, 0.08);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #34d399 100%);
    --gradient-danger:  linear-gradient(135deg, #dc2626 0%, #f87171 100%);
    --gradient-warning: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
    --gradient-info:    linear-gradient(135deg, #0284c7 0%, #7dd3fc 100%);

    /* Glass */
    --glass:        rgba(255, 255, 255, 0.92);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-blur:   12px;

    /* Shadows (light-specific) */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.10);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
    --shadow-accent: 0 0 30px rgba(124, 58, 237, 0.08);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ============================================
   SCROLLBAR — Thin & Elegant
   ============================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* ============================================
   ANIMATIONS — Keyframes
   ============================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

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

@keyframes pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

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

@keyframes popIn {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

@keyframes cartPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.cart-pop { animation: cartPop 0.3s ease; }

/* ============================================
   LOGIN WALL
   ============================================ */
.login-wall {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-primary);
    padding: 1rem;
    position: relative;
    overflow: hidden;
}

/* Subtle background glow */
.login-wall::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-bg) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(var(--glass-blur));
    animation: popIn 0.4s var(--transition-slow);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 8px 28px rgba(139, 92, 246, 0.35);
    transition: transform 0.3s ease;
}

.login-icon-circle:hover {
    transform: scale(1.05) rotate(5deg);
}

.login-logo h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.login-logo h1 .accent { color: var(--accent); }

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.input-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
    outline: none;
}

.btn-login {
    width: 100%;
    padding: 0.85rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform var(--transition), box-shadow var(--transition);
    letter-spacing: 0.01em;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-login:active { transform: translateY(0); }

.login-error {
    color: var(--danger);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 1rem;
    padding: 0.6rem 0.75rem;
    background: var(--danger-bg);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: popIn 0.3s ease;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ============================================
   POS SYSTEM LAYOUT
   ============================================ */
.pos-system {
    display: flex;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: width var(--transition), transform var(--transition);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .sync-status span,
.sidebar.collapsed .user-info span,
.sidebar.collapsed .copyright-full {
    display: none !important;
}

.sidebar-header {
    padding: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.sidebar-brand i {
    color: var(--accent);
    font-size: 1.2rem;
}

.sidebar-toggle {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: color var(--transition), background var(--transition);
}

.sidebar-toggle:hover {
    color: var(--accent);
    background: var(--accent-bg);
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition);
    position: relative;
}

.nav-item:hover {
    background: var(--accent-bg);
    color: var(--accent-light);
}

.nav-item.active {
    background: var(--accent-bg);
    color: var(--accent-light);
    font-weight: 600;
}

/* Active indicator bar */
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent);
    border-radius: var(--radius-full);
}

.nav-item i { width: 20px; text-align: center; font-size: 1rem; }

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--success);
    background: var(--success-bg);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    transition: all var(--transition);
    font-weight: 500;
}

.sync-status.offline {
    color: var(--danger);
    background: var(--danger-bg);
}

.sync-status.warning {
    color: var(--warning);
    background: var(--warning-bg);
}

.sidebar-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sidebar-copyright {
    text-align: center;
    padding: 0.75rem 0.25rem;
    font-size: 0.75rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
    margin-top: 0.25rem;
    transition: all var(--transition);
}

.sidebar-copyright .copyright-full {
    display: block;
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-copyright .copyright-full a {
    color: var(--accent-light);
    font-weight: 700;
    text-decoration: none;
    transition: color var(--transition);
}

.sidebar-copyright .copyright-full a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.sidebar-copyright .copyright-mini {
    display: none;
}

.sidebar.collapsed .sidebar-copyright {
    padding: 0.6rem 0.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar.collapsed .sidebar-copyright .copyright-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--accent-bg);
    color: var(--accent-light);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all var(--transition);
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.sidebar.collapsed .sidebar-copyright .copyright-mini:hover {
    background: var(--accent);
    color: #ffffff;
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

/* Mobile hamburger */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 200;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
    min-height: 100vh;
    transition: margin-left var(--transition);
    max-width: 100%;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
    flex-shrink: 0;
}

.btn-icon:hover {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent);
}

.btn-danger-icon:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger);
}

.btn {
    padding: 0.65rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition);
    border: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35);
}

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

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent-bg);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ============================================
   CARDS — Base
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--glass-border);
}

/* ============================================
   STAT CARDS
   ============================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition);
}

.stat-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-icon.purple { background: var(--accent-bg); color: var(--accent); }
.stat-icon.green  { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon.blue   { background: var(--info-bg);    color: var(--info); }
.stat-icon.red    { background: var(--danger-bg);  color: var(--danger); }

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.stat-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   FORMS
   ============================================ */
.form-input, .form-select {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 1rem;
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

th {
    background: var(--bg-input);
    color: var(--text-secondary);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

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

tr:hover td {
    background: var(--bg-card-hover);
}

/* ============================================
   POS VIEW — Split Layout
   ============================================ */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr var(--cart-width);
    gap: 1rem;
    height: calc(100vh - 3rem);
}

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

.pos-search {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pos-search .form-input {
    flex: 1;
    font-size: 1.05rem;
    padding: 0.85rem 1rem;
}

/* Category filter pills — horizontal scroll */
.category-filters {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    position: relative;
    z-index: 10;
    -webkit-overflow-scrolling: touch;
}

.category-filters::-webkit-scrollbar {
    height: 3px;
}

.category-chip {
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.category-chip:hover {
    background: var(--accent-bg);
    color: var(--accent-light);
    border-color: var(--accent);
}

.category-chip.active {
    background: var(--accent-bg);
    color: var(--accent-light);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-bg);
}

/* ============================================
   PRODUCT GRID & TILES
   ============================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    grid-auto-rows: max-content;
    gap: 0.75rem;
    overflow-y: auto;
    padding: 0.25rem;
    flex: 1;
    align-items: start;
}

.product-tile {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.15rem 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 140px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: visible;
}

.product-tile:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md), 0 0 20px var(--accent-bg);
}

.product-tile:active {
    transform: translateY(-1px);
}

.product-tile .product-category {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-full);
    background: var(--accent-bg);
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.product-tile .product-name {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-primary);
}

.product-tile .product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.01em;
}

.product-tile .product-stock {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    padding: 0.1rem 0.5rem;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    font-weight: 500;
}

.product-tile .night-badge {
    display: inline-block;
    background: var(--warning-bg);
    color: var(--warning);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    margin-top: 0.3rem;
}

/* ============================================
   PROMO BADGE — Product tile
   ============================================ */
.promo-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
    font-size: 0.65rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
    z-index: 2;
    animation: pulse 2s infinite;
    letter-spacing: 0.02em;
}

/* Precio tachado */
.precio-tachado {
    text-decoration: line-through;
    opacity: 0.5;
    font-size: 0.85em;
    margin-right: 6px;
    color: var(--text-muted);
}

/* ============================================
   CART
   ============================================ */
.pos-cart {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cart-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    transition: background var(--transition);
    gap: 0.5rem;
}

.cart-item:hover { background: var(--bg-card-hover); }

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-detail {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cart-item-qty button {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: 0.75rem;
    transition: all var(--transition);
}

.cart-item-qty button:hover {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent);
}

.cart-item-qty span {
    font-weight: 700;
    font-size: 0.85rem;
    min-width: 20px;
    text-align: center;
}

.cart-item-price {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent);
    white-space: nowrap;
    margin-right: 0.5rem;
}

.cart-item-remove {
    background: none;
    color: var(--danger);
    font-size: 0.85rem;
    padding: 0.25rem;
    opacity: 0.5;
    transition: opacity var(--transition), transform var(--transition);
    flex-shrink: 0;
}

.cart-item-remove:hover {
    opacity: 1;
    transform: scale(1.15);
}

.cart-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.cart-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.3;
}

/* Cart Footer */
.cart-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    background: var(--bg-card);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.cart-total-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.cart-total-value {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: -0.02em;
}

.cart-actions {
    display: flex;
    gap: 0.5rem;
}

.cart-actions .btn { flex: 1; justify-content: center; }

/* ============================================
   PAYMENT SYSTEM
   ============================================ */

/* Legacy payment options (backwards compat) */
.payment-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.payment-option {
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.payment-option:hover,
.payment-option.active {
    background: var(--accent-bg);
    color: var(--accent-light);
    border-color: var(--accent);
}

/* New Payment Method Buttons */
.payment-methods {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.payment-method-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    font-weight: 600;
}

.payment-method-btn i {
    font-size: 1.2rem;
}

.payment-method-btn:hover {
    border-color: var(--accent);
    background: var(--accent-bg);
}

.payment-method-btn.active {
    border-color: var(--accent);
    background: var(--accent-bg);
    color: var(--accent-light);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Color variants for active payment methods */
.payment-method-btn.active.cash {
    border-color: var(--success);
    background: var(--success-bg);
    color: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.payment-method-btn.active.transfer {
    border-color: var(--info);
    background: var(--info-bg);
    color: var(--info);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.payment-method-btn.active.mp {
    border-color: #009ee3;
    background: rgba(0, 158, 227, 0.1);
    color: #009ee3;
    box-shadow: 0 0 0 3px rgba(0, 158, 227, 0.15);
}

.payment-method-btn.active.point {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.15);
}

/* Payment Selector Wrap (legacy) */
.payment-selector-wrap {
    margin-bottom: 1rem;
    position: relative;
}

.payment-dropdown {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all var(--transition);
}

.payment-dropdown:hover {
    border-color: var(--accent);
}

.payment-dropdown.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
}

.payment-method-icon {
    margin-right: 10px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* Legacy payment-btn */
.payment-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-primary);
    font-weight: 500;
}

.payment-btn i {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--text-muted);
}

.payment-btn:hover {
    border-color: var(--accent-light);
    background: var(--accent-bg);
}

.payment-btn.active {
    border-color: var(--accent);
    background: var(--accent-bg);
}

.payment-btn.active i {
    color: var(--accent);
}

/* ============================================
   DIVIDED PAYMENT
   ============================================ */
.divided-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition);
}

.divided-toggle:hover {
    color: var(--text-secondary);
}

.divided-toggle input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
}

.divided-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    animation: popIn 0.25s ease;
}

.divided-input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.divided-input-row label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    min-width: 120px;
    color: var(--text-secondary);
}

.divided-input-row input {
    flex: 1;
    text-align: right;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: border-color var(--transition);
}

.divided-input-row input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 2px var(--accent-bg);
}

.divided-remaining {
    text-align: right;
    font-size: 0.8rem;
    padding-top: 0.35rem;
    border-top: 1px dashed var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
}

/* Legacy divided payment row */
.divided-payment-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-md);
}

.divided-payment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.divided-payment-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.divided-payment-item input {
    width: 140px;
    text-align: right;
    font-weight: 700;
}

/* ============================================
   MODAL SYSTEM
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: var(--danger);
}

/* Wide modal variant */
.modal-content.modal-wide {
    max-width: 700px;
}

.modal-content.modal-narrow {
    max-width: 400px;
}

/* ============================================
   VARIANT MODAL — Clothing Sizes/Colors
   ============================================ */
.variant-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.variant-color-group {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    border: 1px solid var(--border-subtle);
}

.variant-color-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: inline-block;
    flex-shrink: 0;
}

.size-buttons {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.size-btn {
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    text-align: center;
}

.size-btn:hover {
    border-color: var(--accent);
    background: var(--accent-bg);
}

.size-btn:active {
    transform: scale(0.97);
}

.size-btn.out-of-stock {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}

.size-btn .stock-indicator {
    font-size: 0.65rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.15rem;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    gap: 0.3rem;
    letter-spacing: 0.01em;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-accent  { background: var(--accent-bg);  color: var(--accent); }

/* ============================================
   TOAST — Notification
   ============================================ */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    max-width: 90vw;
}

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

.toast i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-danger  { border-left: 3px solid var(--danger); }
.toast.toast-warning { border-left: 3px solid var(--warning); }
.toast.toast-info    { border-left: 3px solid var(--info); }

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    gap: 1rem;
    color: white;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255,255,255,0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.loading-overlay .loading-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
}

/* ============================================
   QUICK ACTIONS — Dashboard Grid
   ============================================ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.quick-action-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-action-card i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--accent);
}

.quick-action-card span {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* ============================================
   CASH SUMMARY — Daily Sales
   ============================================ */
.cash-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.cash-summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    text-align: center;
    transition: all var(--transition);
}

.cash-summary-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.cash-summary-card .amount {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.cash-summary-card .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* ============================================
   TOP PRODUCTS — Reports
   ============================================ */
.top-product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    transition: background var(--transition);
}

.top-product-row:last-child {
    border-bottom: none;
}

.top-product-row:hover {
    background: var(--bg-card-hover);
    border-radius: var(--radius-sm);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.page-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.02em;
}

.page-header h2 i {
    color: var(--accent);
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden { display: none !important; }

/* Text colors */
.text-primary { color: var(--text-primary); }
.text-muted   { color: var(--text-muted); }
.text-accent  { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info    { color: var(--info); }

/* Text alignment */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }
.text-sm     { font-size: 0.85rem; }
.text-xs     { font-size: 0.75rem; }
.text-lg     { font-size: 1.15rem; }

/* Font weights */
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semi   { font-weight: 600; }
.fw-bold   { font-weight: 700; }
.fw-black  { font-weight: 900; }

/* Spacing */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* Flex */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-col     { display: flex; flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 0.75rem; }
.gap-3 { gap: 1rem; }

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }

/* Misc */
.w-full { width: 100%; }
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   RESPONSIVE — Desktop-first Breakpoints
   ============================================ */

/* Large tablets & small desktops */
@media (max-width: 1200px) {
    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .pos-cart {
        max-height: 55vh;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
        box-shadow: var(--shadow-xl);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
        padding: 1rem;
        padding-top: 3.5rem;
    }

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

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.5rem;
    }

    .product-tile {
        min-height: 120px;
        padding: 0.9rem 0.7rem;
    }

    .product-tile .product-name {
        font-size: 0.8rem;
    }

    .product-tile .product-price {
        font-size: 0.95rem;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 0.5rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .cash-summary {
        grid-template-columns: 1fr 1fr;
    }

    .payment-methods {
        flex-wrap: wrap;
    }

    .payment-method-btn {
        min-width: calc(50% - 0.5rem);
    }

    .divided-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .divided-input-row label {
        min-width: unset;
    }
}

/* Small phones */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

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

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

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

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

    .cart-total-value {
        font-size: 1.3rem;
    }

    .cash-summary {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sidebar,
    .mobile-menu-btn,
    .toast,
    .loading-overlay,
    .modal-overlay {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0;
    }

    body {
        background: white;
        color: black;
    }

    .card, .stat-card, .table-container {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}

/* ============================================
   CAJA / CASH REGISTER MANAGEMENT v2.0
   ============================================ */
.caja-cerrada-splash {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--header-height) - 100px);
    width: 100%;
    animation: fadeIn 0.3s ease;
    padding: 2rem 1rem;
}

.caja-cerrada-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.caja-cerrada-card .icon-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent-bg);
    color: var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.caja-cerrada-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.caja-cerrada-card p {
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.caja-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.caja-tabs .tab-btn {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.caja-tabs .tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.caja-tabs .tab-btn.active {
    color: var(--accent-light);
    background: var(--accent-bg);
}

.cash-summary-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.cash-summary-inline .cs-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    background: var(--bg-input);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.cash-summary-inline .cs-item .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.cash-summary-inline .cs-item .value {
    font-size: 1.1rem;
    font-weight: 700;
}

.variant-edit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-input);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}