/* ======================================
   SALDOS ROCKYPOINT — LIGHT THEME POS
   ====================================== */

/* --- Design Tokens --- */
:root {
    --bg: #f1f5f9;
    --card: #ffffff;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;

    --primary: #0369a1;
    --primary-bg: #e0f2fe;
    --success: #059669;
    --success-bg: #ecfdf5;
    --purple: #7c3aed;
    --purple-bg: #ede9fe;
    --amber: #d97706;
    --amber-bg: #fef3c7;
    --danger: #dc2626;
    --danger-bg: #fef2f2;

    --text: #0f172a;
    --text-2: #334155;
    --text-3: #64748b;
    --text-4: #94a3b8;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.03);

    --sidebar-w: 80px;
}

/* --- Reset --- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:#cbd5e1; border-radius:4px; }

/* ========== APP SHELL ========== */
.app { display:flex; height:100vh; }

/* --- Sidebar --- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    flex-shrink: 0;
    z-index: 50;
}

.sidebar-logo {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-weight: 900; font-size: 14px;
    letter-spacing: -0.5px;
    margin-bottom: 32px;
    box-shadow: 0 4px 12px rgba(3,105,161,0.25);
}

.sidebar-nav {
    list-style: none;
    display: flex; flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 0 10px;
}

.nav-item {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 4px;
    padding: 12px 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-3);
    transition: all 0.15s ease;
    font-size: 10px;
    font-weight: 600;
}

.nav-item i { font-size: 18px; }

.nav-item:hover {
    background: var(--bg);
    color: var(--text-2);
}

.nav-item.active {
    background: var(--primary-bg);
    color: var(--primary);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 20px;
}

.sidebar-user {
    display: flex; flex-direction: column;
    align-items: center; gap: 4px;
    font-size: 10px; font-weight: 600;
    color: var(--text-4);
}

.sidebar-user i { font-size: 22px; color: var(--text-3); }

/* --- Main Content Area --- */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

/* --- Top Bar --- */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.topbar-title {
    font-size: 18px; font-weight: 800;
    color: var(--text);
}

.topbar-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: var(--text-3); font-weight: 500;
    margin-top: 2px;
}

.separator { color: var(--text-4); }

.topbar-right {
    display: flex; align-items: center; gap: 24px;
}

.topbar-control {
    display: flex; flex-direction: column; gap: 2px;
}

.topbar-control label {
    font-size: 10px; font-weight: 700;
    color: var(--text-4); text-transform: uppercase; letter-spacing: 0.5px;
}

.topbar-control select {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 12px; font-weight: 600;
    cursor: pointer; outline: none;
}

.topbar-control select:focus { border-color: var(--primary); }

.topbar-clock {
    font-size: 24px; font-weight: 800;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

/* ========== SCREENS ========== */
.screen {
    display: none;
    flex-grow: 1;
    padding: 24px 32px;
    overflow-y: auto;
}

.screen.active { display: flex; flex-direction: column; gap: 20px; }

/* ========== CARDS ========== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-head h3 {
    font-size: 14px; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 8px;
}

/* ========== POS SCREEN ========== */

/* Scanner */
.pos-scanner {
    display: flex; gap: 12px; flex-shrink: 0;
}

.scanner-input-group {
    flex-grow: 1;
    position: relative;
}

.scanner-input-group i {
    position: absolute; left: 16px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-4); font-size: 16px;
}

.scanner-input-group input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14px;
    background: var(--card);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
}

.scanner-input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(3,105,161,0.08);
}

/* POS Grid */
.pos-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    flex-grow: 1;
    min-height: 0;
}

.pos-cart-col { display:flex; flex-direction:column; min-height:0; }

.cart-card {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.cart-table-wrap {
    flex-grow: 1;
    overflow-y: auto;
}

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

.cart-table th {
    background: var(--bg);
    padding: 10px 16px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-3);
    text-align: left;
    position: sticky; top: 0; z-index: 5;
    border-bottom: 1px solid var(--border);
}

.th-num { width: 40px; text-align: center; }
.th-price { width: 130px; }
.th-condition { width: 160px; }
.th-actions { width: 48px; }

.cart-table td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-2);
}

.cart-table td:first-child { text-align: center; color: var(--text-4); font-weight: 600; }

.item-name { font-weight: 700; color: var(--text); }
.item-source { font-size: 11px; color: var(--text-4); margin-top: 2px; }

.condition-sel {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px; font-family: inherit;
    font-weight: 600; color: var(--text-2);
    cursor: pointer; outline: none;
}

.price-original {
    text-decoration: line-through;
    color: var(--text-4);
    font-size: 12px;
}

.price-outlet {
    font-weight: 700;
    color: var(--success);
}

.btn-remove {
    background: none; border: none;
    color: var(--text-4); cursor: pointer;
    font-size: 14px; padding: 4px;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
}

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

.empty-row td { padding: 0; }

.empty-state {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px; padding: 60px 20px;
    color: var(--text-4);
}

.empty-state i { font-size: 36px; color: var(--border); }
.empty-state p { font-size: 13px; max-width: 300px; text-align: center; }

/* BIN Quick Buttons Strip */
.bin-buttons-strip {
    display: flex; align-items: center; gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
}

.bin-strip-label {
    font-size: 11px; font-weight: 700;
    color: var(--text-3); white-space: nowrap;
}

.bin-btn {
    padding: 8px 16px;
    border: 2px solid var(--c);
    background: #fff;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px; font-weight: 800;
    color: var(--c);
    cursor: pointer;
    transition: all 0.15s ease;
}

.bin-btn:hover {
    background: var(--c);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.bin-today { flex-grow: 1; text-align: center; }

/* Summary Column */
.pos-summary-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Savings Display */
.savings-card {
    background: var(--success-bg);
    border-color: #a7f3d0;
    text-align: center;
    padding: 20px;
}

.savings-label {
    font-size: 11px; font-weight: 700;
    color: var(--success); text-transform: uppercase;
    letter-spacing: 0.5px;
}

.savings-value {
    font-size: 32px; font-weight: 900;
    color: var(--success);
    margin: 4px 0 12px;
    font-variant-numeric: tabular-nums;
}

.savings-bar {
    height: 4px;
    background: #a7f3d0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.savings-fill {
    height: 100%;
    background: var(--success);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

.savings-row {
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--text-3);
}

/* Totals Card */
.totals-card { padding: 20px; }

.totals-line {
    display: flex; justify-content: space-between;
    font-size: 13px; color: var(--text-2);
    padding: 6px 0;
}

.totals-line.discount span:last-child { color: var(--success); font-weight: 700; }
.totals-line.roulette-line span:last-child { color: var(--purple); font-weight: 700; }

.totals-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.totals-line.grand {
    font-size: 20px; font-weight: 900;
    color: var(--text);
    padding: 8px 0 4px;
}

.items-count {
    font-size: 12px; color: var(--text-4);
    text-align: right;
}

/* Payment Methods */
.payment-card { padding: 16px 20px; }

.payment-label {
    font-size: 11px; font-weight: 700;
    color: var(--text-3); text-transform: uppercase;
    margin-bottom: 10px;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.pay-method {
    padding: 10px 8px;
    border: 1px solid var(--border);
    background: var(--card);
    border-radius: 8px;
    font-family: inherit;
    font-size: 11px; font-weight: 700;
    color: var(--text-3);
    cursor: pointer;
    display: flex; flex-direction: column;
    align-items: center; gap: 4px;
    transition: all 0.15s;
}

.pay-method i { font-size: 16px; }

.pay-method:hover { border-color: var(--primary); color: var(--primary); }

.pay-method.active {
    border-color: var(--primary);
    background: var(--primary-bg);
    color: var(--primary);
}

/* Cobrar Button */
.btn-cobrar {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    background: var(--success);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(5,150,105,0.25);
}

.btn-cobrar:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5,150,105,0.3);
}

.btn-clear {
    width: 100%;
    padding: 10px;
    font-size: 12px;
}

/* Premium Items Strip */
.premium-strip {
    display: flex; align-items: center; gap: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 16px;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.strip-label {
    font-size: 11px; font-weight: 700;
    color: var(--text-3); white-space: nowrap;
}

.premium-items {
    display: flex; gap: 8px;
    overflow-x: auto;
    flex-grow: 1;
    padding: 2px;
}

.premium-chip {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px; font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.premium-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

/* ========== BUTTONS ========== */
.btn {
    font-family: inherit;
    font-weight: 700; font-size: 13px;
    border: none; border-radius: var(--radius-sm);
    padding: 10px 20px;
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.15s ease;
}

.btn-primary { background:var(--primary); color:#fff; }
.btn-primary:hover { background:#075985; transform:translateY(-1px); }

.btn-purple { background:var(--purple); color:#fff; }
.btn-purple:hover { background:#6d28d9; transform:translateY(-1px); }

.btn-outline {
    background:transparent; color:var(--text-3);
    border: 1px solid var(--border);
}
.btn-outline:hover { background:var(--bg); color:var(--text-2); }

.btn-sm { padding: 6px 14px; font-size: 12px; }

/* ========== DATA TABLES ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: var(--bg);
    padding: 10px 16px;
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-3); text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    color: var(--text-2);
}

.data-table.compact td { padding: 10px 16px; font-size: 12.5px; }

.text-green { color: var(--success); font-weight: 700; }

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px; font-weight: 700;
}
.badge-green { background: var(--success-bg); color: var(--success); }
.badge-yellow { background: var(--amber-bg); color: var(--amber); }
.badge-gray { background: #f1f5f9; color: var(--text-4); }

/* ========== KPI ROW ========== */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.kpi-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex; align-items: center; gap: 16px;
    box-shadow: var(--shadow);
}

.kpi-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.kpi-data { display: flex; flex-direction: column; }
.kpi-value { font-size: 22px; font-weight: 800; color: var(--text); }
.kpi-label { font-size: 12px; color: var(--text-3); font-weight: 500; }

/* ========== REPORTS ========== */
.reports-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    height: 200px;
    padding-top: 20px;
}

.bar-item {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; gap: 8px;
    height: 100%;
    justify-content: flex-end;
}

.bar-fill {
    width: 100%;
    background: linear-gradient(to top, var(--primary), #38bdf8);
    border-radius: 6px 6px 0 0;
    min-height: 8px;
    transition: height 0.5s ease;
}

.bar-item span {
    font-size: 11px; font-weight: 700;
    color: var(--text-3);
}

/* ========== CLIENTS ========== */
.clients-layout { display: flex; flex-direction: column; gap: 20px; }

.client-search-row {
    display: flex; gap: 12px;
}

.input-field {
    flex-grow: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit; font-size: 13px;
    background: var(--card); color: var(--text);
    outline: none;
}
.input-field:focus { border-color: var(--primary); }
.input-sm { max-width: 100px; text-align: center; }

/* Profile Card */
.profile-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 56px; height: 56px;
    background: var(--bg); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: var(--text-4);
}

.profile-info { flex-grow: 1; }
.profile-info h3 { font-size: 16px; font-weight: 700; }
.profile-info p { font-size: 12px; color: var(--text-3); }

.profile-tier { text-align: center; }

.tier-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 20px;
    font-size: 12px; font-weight: 800;
}
.tier-gold { background: #fef3c7; color: #92400e; }
.tier-subtitle { display: block; font-size: 10px; color: var(--text-4); margin-top: 2px; }

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat {
    text-align: center;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.stat-val { display: block; font-size: 18px; font-weight: 800; color: var(--text); }
.stat-label { display: block; font-size: 10px; color: var(--text-3); font-weight: 600; text-transform: uppercase; margin-top: 2px; }

/* Tiers Row */
.tiers-row {
    display: flex; align-items: center; justify-content: center;
    gap: 16px;
    padding: 12px 0;
}

.tier-item {
    display: flex; flex-direction: column;
    align-items: center; gap: 6px;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-sm);
}

.tier-item.active-tier { background: var(--amber-bg); }

.tier-circle {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}

.tier-circle.bronze { background: #fde68a; color: #92400e; }
.tier-circle.silver { background: #e2e8f0; color: #475569; }
.tier-circle.gold { background: #fbbf24; color: #78350f; }
.tier-circle.vip { background: var(--purple-bg); color: var(--purple); }

.tier-item strong { font-size: 12px; }
.tier-item small { font-size: 10px; color: var(--text-4); }
.tier-perk { color: var(--success) !important; font-weight: 600 !important; }
.tier-arrow { color: var(--text-4); font-size: 12px; }

/* Roulette Access Card */
.roulette-access-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--purple-bg);
    border-color: #c4b5fd;
}

.roulette-access-body {
    display: flex; align-items: center; gap: 16px;
}

.roulette-icon-wrap {
    font-size: 28px; color: var(--purple);
}

.roulette-access-card h4 { font-size: 14px; color: var(--text); }
.roulette-access-card p { font-size: 12px; color: var(--text-3); max-width: 360px; }

/* ========== SETTINGS ========== */
.settings-layout-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: start;
}

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

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-3);
    margin-bottom: 4px;
    text-transform: uppercase;
}

/* ========== SETTINGS SUB-TABS ========== */
.settings-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.settings-nav-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

.settings-nav-btn:hover {
    background: var(--bg);
    color: var(--text-2);
}

.settings-nav-btn.active {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: var(--primary);
}

.settings-tab-content.hidden {
    display: none !important;
}

.settings-two-col {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: start;
}

/* ========== BINS CALENDAR TAB ========== */
.bins-layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.bin-day-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    transition: transform 0.15s, border-color 0.15s;
}

.bin-day-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.b-day-name {
    font-weight: 800;
    font-size: 14px;
    color: var(--text);
}

.b-day-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
}

.b-day-tag.restock { background: var(--success-bg); color: var(--success); }
.b-day-tag.promo { background: var(--primary-bg); color: var(--primary); }
.b-day-tag.remate { background: var(--amber-bg); color: var(--amber); }
.b-day-tag.vaciado { background: var(--danger-bg); color: var(--danger); }

.b-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
}

.b-input-wrap span {
    font-weight: 700;
    color: var(--text-3);
}

.b-input-wrap input {
    text-align: center;
    font-weight: 800;
    color: var(--text);
    font-size: 14px;
}

.toggle-list {
    display: flex; flex-direction: column; gap: 12px;
}

.toggle-item {
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 600; color: var(--text-2);
    cursor: pointer;
}

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

/* ========== MODAL ========== */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
    transition: opacity 0.2s;
}

.modal-backdrop.is-hidden { opacity: 0; pointer-events: none; }

.modal {
    background: var(--card);
    border-radius: var(--radius);
    padding: 32px;
    width: 420px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transform: scale(1);
    transition: transform 0.2s;
}

.modal-backdrop.is-hidden .modal { transform: scale(0.95); }

.modal h2 {
    font-size: 18px; color: var(--purple);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-bottom: 4px;
}

.modal-sub { font-size: 13px; color: var(--text-3); margin-bottom: 24px; }

.modal-close {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none;
    font-size: 16px; color: var(--text-4);
    cursor: pointer; width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
/* Roulette Wheel */
.roulette-wrap {
    position: relative;
    width: 260px; height: 260px;
    margin: 0 auto 20px;
}

.roulette-pointer {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    font-size: 28px; color: #fbbf24;
    z-index: 10;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.wheel {
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 8px solid #334155;
    overflow: hidden;
    position: relative;
    transition: transform 4s cubic-bezier(0.15,0.85,0.15,1);
    box-shadow: var(--shadow-lg);
    background: conic-gradient(
        #f43f5e 0deg 45deg,
        #0ea5e9 45deg 90deg,
        #f97316 90deg 135deg,
        #22c55e 135deg 180deg,
        #ec4899 180deg 225deg,
        #eab308 225deg 270deg,
        #8b5cf6 270deg 315deg,
        #64748b 315deg 360deg
    );
}

.wheel-label {
    position: absolute;
    width: 50%;
    height: 20px;
    top: calc(50% - 10px);
    left: 50%;
    transform-origin: left center;
    transform: rotate(calc(45deg * var(--i) + 22.5deg));
    padding-left: 54px;
    box-sizing: border-box;
    font-size: 11px;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.btn-spin {
    width: 180px;
    padding: 14px;
    border-radius: 30px;
    font-size: 15px;
}

/* ========== TOAST ========== */
.toast {
    position: fixed;
    bottom: 24px; right: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    z-index: 300;
    font-weight: 600; font-size: 13px;
    color: var(--text);
    display: flex; align-items: center; gap: 10px;
    transition: all 0.3s cubic-bezier(0.175,0.885,0.32,1.275);
}

.toast.is-hidden { transform: translateY(80px); opacity: 0; pointer-events: none; }

/* ========== CONFETTI ========== */
#confetti-canvas {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 250;
}

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

/* ========== TICKET DESIGNER ========== */
.ticket-designer-card {
    /* Auto fits inside the right settings column */
}

.ticket-designer-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 16px;
}

.ticket-controls {
    flex: 1 1 280px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ticket-preview-wrap {
    flex: 0 0 320px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px dashed var(--border-hover);
}

.thermal-ticket-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.thermal-ticket {
    width: 280px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: var(--shadow-md);
    padding: 24px 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: #000000;
    line-height: 1.4;
    position: relative;
    user-select: none;
}

.t-logo {
    width: 40px;
    height: 40px;
    background: #000000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin: 0 auto 12px;
    border-radius: 4px;
}

.t-logo.is-hidden { display: none !important; }

.t-title {
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.t-subtitle {
    font-size: 11px;
    text-align: center;
    color: #333333;
}

.t-divider {
    text-align: center;
    margin: 10px 0;
    letter-spacing: -1px;
    font-weight: bold;
}

.t-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.t-item-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.t-item-name {
    flex-grow: 1;
    max-width: 190px;
    word-wrap: break-word;
}

.t-item-price {
    flex-shrink: 0;
    font-weight: bold;
}

.t-grand-total {
    font-size: 14px;
    font-weight: bold;
}

.t-savings-banner {
    border: 1px dashed #000000;
    padding: 8px;
    text-align: center;
    font-weight: bold;
}

.t-savings-banner.is-hidden { display: none !important; }
.t-savings-banner + .t-divider.is-hidden { display: none !important; }

.t-savings-val {
    font-size: 13px;
    margin-top: 4px;
}

.t-section-title {
    font-weight: bold;
    margin-bottom: 6px;
    text-decoration: underline;
}

.t-policy {
    font-size: 11px;
    margin-bottom: 4px;
}

.t-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.t-qr-container.is-hidden { display: none !important; }
.t-qr-container + .t-divider.is-hidden { display: none !important; }

.t-qr-box {
    width: 64px;
    height: 64px;
    border: 2px solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.t-qr-text {
    font-size: 9px;
    max-width: 180px;
}

.t-footer {
    text-align: center;
    font-weight: bold;
    margin-top: 8px;
}

/* ========== PRINT MEDIA STYLES ========== */
@media print {
    /* Hide everything on the page except the ticket */
    body * {
        visibility: hidden;
    }
    
    #thermal-ticket-preview, #thermal-ticket-preview * {
        visibility: visible;
    }
    
    #thermal-ticket-preview {
        position: absolute;
        left: 50%;
        top: 0;
        transform: translateX(-50%);
        width: 80mm;
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }
}

/* ========== INVENTORY LAYOUT ========== */
.inv-tab-content {
    margin-top: 16px;
}

.table-container-scroll {
    max-height: 520px;
    overflow-y: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

/* ========== SUCCESS / TRANSACTION STYLE ========== */
.success-icon-wrap {
    animation: bounceIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.1); opacity: 0.8; }
    80% { transform: scale(0.9); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

.ch-ticket-preview-box {
    animation: slideDown 0.3s ease-out;
}

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

/* ========== 5 NEW MOCKUP MODULES STYLES ========== */

/* Print overrides for Tag and Cash Count Report Z */
@media print {
    body.printing-tag * {
        visibility: hidden !important;
    }
    body.printing-tag #modal-tag-generator,
    body.printing-tag #modal-tag-generator * {
        visibility: visible !important;
    }
    body.printing-tag #modal-tag-generator {
        position: absolute;
        left: 50%; top: 0;
        transform: translateX(-50%);
        width: 80mm;
        border: none !important;
        box-shadow: none !important;
        padding: 0;
        margin: 0;
        background: white;
    }
    body.printing-tag .modal-close,
    body.printing-tag #btn-print-tag {
        display: none !important;
    }

    body.printing-corte-z * {
        visibility: hidden !important;
    }
    body.printing-corte-z #modal-cash-count,
    body.printing-corte-z #modal-cash-count * {
        visibility: visible !important;
    }
    body.printing-corte-z #modal-cash-count {
        position: absolute;
        left: 50%; top: 0;
        transform: translateX(-50%);
        width: 80mm;
        border: none !important;
        box-shadow: none !important;
        padding: 0;
        margin: 0;
        background: white;
    }
    body.printing-corte-z .modal-close,
    body.printing-corte-z #btn-print-corte-z {
        display: none !important;
    }
}

/* Animations for Camera Scanner and Views */
@keyframes scanLine {
    0% { top: 10%; }
    50% { top: 90%; }
    100% { top: 10%; }
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.15; }
    50% { transform: scale(1.05); opacity: 0.3; }
    100% { transform: scale(1); opacity: 0.15; }
}

.bg-success-light {
    background: #d1fae5 !important;
    color: #065f46 !important;
}

.bg-danger-light {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

.rep-tab-content {
    margin-top: 16px;
}

/* ========== BADGES Y BOTONES DE APARTADOS ========== */
.badge-yellow {
    background: var(--amber-bg);
    color: var(--amber);
    border: 1px solid rgba(217, 119, 6, 0.15);
}

.badge-gray {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.15);
}

.badge-disponible {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(5, 150, 105, 0.15);
}

.btn-success {
    background: var(--success);
    color: #fff;
    border: none;
}

.btn-success:hover {
    background: #047857;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.btn-outline.btn-res-cancel:hover {
    background: var(--danger-bg) !important;
    color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.fa-brands.fa-whatsapp {
    font-size: 14px;
}

