:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --primary-50: #ecfdf5;
    --brand: #1e3a5f;
    --brand-dark: #152a45;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-light: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --sidebar-width: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; }
body { background: var(--bg); color: var(--text); height: 100vh; overflow: hidden; }

/* ========== LOGIN PAGE (FANCELL STYLE) ========== */
.login-page { position: fixed; inset: 0; display: flex; z-index: 9999; }

.login-left {
    flex: 1;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 50%, #1e3a5f 100%);
    color: white;
    padding: 60px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

.login-left-content { position: relative; z-index: 1; max-width: 500px; }

.login-logo-box {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.login-logo-box i { font-size: 40px; color: #1e3a5f; }

.login-brand {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.login-tagline {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-desc {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 40px;
    line-height: 1.6;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
    font-weight: 500;
}

.feature-item i {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.login-footer-left {
    font-size: 13px;
    opacity: 0.6;
    margin-top: auto;
}

.login-right {
    width: 500px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.login-form-header { margin-bottom: 32px; }
.login-form-header h2 { font-size: 32px; font-weight: 800; color: #0f172a; margin-bottom: 8px; }
.login-form-header p { color: #64748b; font-size: 14px; }

.login-form { display: flex; flex-direction: column; gap: 20px; margin-bottom: 24px; }

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-wrapper > i:first-child {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 14px;
    z-index: 1;
}

.select-wrapper select {
    width: 100%;
    padding: 14px 40px 14px 42px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    background: white;
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: 0.2s;
}

.select-wrapper select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,58,95,0.1); }

.select-arrow {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    font-size: 12px;
    pointer-events: none;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    width: 100%;
    padding: 14px 46px 14px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: 0.2s;
    background: white;
}

.password-wrapper input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,58,95,0.1); }

.password-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
}

.password-toggle:hover { color: var(--brand); }

.login-submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--brand);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.2s;
    margin-top: 8px;
}

.login-submit-btn:hover { background: var(--brand-dark); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(30,58,95,0.2); }
.login-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.login-hint-box {
    background: white;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

.login-hint-box p { font-size: 13px; color: #64748b; margin-bottom: 10px; }

.demo-accounts { display: flex; flex-direction: column; gap: 6px; }
.demo-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.demo-label { font-weight: 600; color: #334155; min-width: 50px; }
.demo-row code {
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    color: var(--brand);
}

.login-footer-right {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
}

@media (max-width: 1024px) {
    .login-page { flex-direction: column; }
    .login-left { padding: 40px 30px; min-height: 40vh; }
    .login-right { width: 100%; padding: 30px; }
    .login-brand { font-size: 36px; }
    .login-features { display: none; }
}

@media (max-width: 640px) {
    .login-left { padding: 30px 20px; min-height: 35vh; }
    .login-right { padding: 20px; }
    .login-brand { font-size: 28px; }
    .login-form-header h2 { font-size: 24px; }
}

/* ========== MAIN APP ========== */
.main-app { display: flex; height: 100vh; }
.sidebar { width: var(--sidebar-width); background: white; border-right: 1px solid var(--border); display: flex; flex-direction: column; transition: transform 0.3s ease; z-index: 100; }
.sidebar.collapsed { transform: translateX(-100%); position: absolute; height: 100%; }
.sidebar-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; color: var(--brand); }
.sidebar-header .logo-text { flex: 1; }
.sidebar-toggle { width: 28px; height: 28px; border-radius: 6px; border: none; background: var(--bg); cursor: pointer; color: var(--text-light); display: flex; align-items: center; justify-content: center; }
.sidebar-toggle:hover { background: var(--primary-light); color: var(--primary); }
.sidebar-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-item { width: 100%; padding: 12px 20px; border: none; background: transparent; display: flex; align-items: center; gap: 12px; cursor: pointer; color: var(--text-light); font-size: 14px; font-weight: 500; transition: 0.2s; text-align: left; }
.nav-item i { width: 20px; text-align: center; font-size: 16px; }
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary-dark); border-right: 3px solid var(--primary); font-weight: 600; }
.sidebar-footer { padding: 12px 0; border-top: 1px solid var(--border); }
.sidebar-footer .nav-item { color: #ef4444; }
.sidebar-footer .nav-item:hover { background: #fee2e2; }

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.app-header { background: white; padding: 16px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.header-left { display: flex; align-items: center; gap: 16px; }
.menu-toggle { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: white; cursor: pointer; color: var(--text); display: none; align-items: center; justify-content: center; }
.header-left h2 { font-size: 20px; font-weight: 700; }
.header-date { font-size: 13px; color: var(--text-light); margin-left: 12px; }
.header-right { display: flex; align-items: center; gap: 16px; }
.live-clock { font-size: 13px; color: var(--text-light); font-weight: 600; background: var(--bg); padding: 8px 12px; border-radius: 8px; }
.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar { width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; }
.user-name { font-size: 14px; font-weight: 600; }
.user-role { font-size: 12px; color: var(--text-light); }

.pages-container { flex: 1; overflow-y: auto; padding: 24px; }
.page { display: none; animation: fadeIn 0.3s; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ========== DASHBOARD ========== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); display: flex; align-items: center; gap: 16px; transition: 0.2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-icon { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.stat-info { flex: 1; min-width: 0; }
.stat-label { font-size: 12px; color: var(--text-light); margin-bottom: 4px; font-weight: 500; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--text); }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-card { background: white; padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); }
.dash-card h3 { font-size: 15px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; color: var(--text); }
.dash-card h3 i { color: var(--primary); }

/* ========== KASIR ========== */
.kasir-layout { display: grid; grid-template-columns: 1fr 380px; gap: 16px; height: calc(100vh - 140px); }
.kasir-left { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.search-bar { display: flex; background: white; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border); align-items: center; gap: 10px; }
.search-bar input { border: none; outline: none; flex: 1; font-size: 14px; background: transparent; }
.search-bar i { color: var(--text-light); }
.categories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.category-card { background: white; padding: 14px; border-radius: var(--radius); border: 2px solid var(--border); cursor: pointer; text-align: center; transition: 0.2s; }
.category-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.category-card.active { background: var(--primary); color: white; border-color: var(--primary); }
.category-card h4 { font-size: 13px; font-weight: 700; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; }
.product-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; cursor: pointer; transition: 0.2s; position: relative; }
.product-card:hover { transform: translateY(-3px); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.product-img { height: 80px; background: linear-gradient(135deg, var(--primary-light), var(--bg)); border-radius: 8px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.product-name { font-size: 13px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.product-price { font-size: 13px; color: var(--primary-dark); font-weight: 800; }
.add-btn { position: absolute; bottom: 10px; right: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; transition: 0.2s; }
.add-btn:hover { background: var(--primary-dark); transform: scale(1.1); }

.kasir-right { background: white; border-radius: var(--radius); border: 1px solid var(--border); padding: 16px; display: flex; flex-direction: column; overflow-y: auto; }
.order-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.order-header h3 { font-size: 16px; font-weight: 700; }
.order-header p { font-size: 12px; color: var(--text-light); font-weight: 500; }
.btn-hold { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: white; cursor: pointer; color: var(--text-light); transition: 0.2s; }
.btn-hold:hover { background: var(--primary); color: white; border-color: var(--primary); }
.order-type-toggle { display: flex; background: var(--bg); padding: 4px; border-radius: 8px; margin-bottom: 12px; }
.type-btn { flex: 1; border: none; background: transparent; padding: 8px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 12px; color: var(--text-light); transition: 0.2s; }
.type-btn.active { background: white; color: var(--primary); box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.customer-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.input-group { margin-bottom: 10px; }
.input-group label { display: block; font-size: 11px; font-weight: 700; color: var(--text-light); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.input-group input, .input-group select, .input-group textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; outline: none; background: var(--bg); transition: 0.2s; }
.input-group input:focus, .input-group select:focus, .input-group textarea:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px var(--primary-light); }
.order-list-header { font-size: 12px; font-weight: 700; color: var(--text-light); text-transform: uppercase; margin-bottom: 8px; }
.order-list { flex: 1; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 12px; background: var(--bg); min-height: 150px; max-height: 300px; }
.empty-order { text-align: center; padding: 40px 0; color: var(--text-light); }
.empty-order i { font-size: 32px; margin-bottom: 8px; opacity: 0.3; }
.order-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.order-item:last-child { border-bottom: none; }
.item-qty { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.qty-btn { width: 22px; height: 22px; border-radius: 4px; border: 1px solid var(--border); background: white; cursor: pointer; font-size: 11px; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.qty-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.discount-section { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 8px; background: var(--bg); border-radius: 8px; }
.discount-btn { padding: 6px 12px; background: var(--primary-light); color: var(--primary-dark); border: none; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.discount-btn:hover { background: var(--primary); color: white; }
.discount-display { font-size: 12px; color: var(--text-light); flex: 1; }
.payment-details { background: var(--bg); padding: 12px; border-radius: 8px; margin-bottom: 12px; }
.payment-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.payment-row.discount-row { color: var(--primary-dark); }
.payment-row.total { font-size: 18px; font-weight: 800; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; }
.place-order-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border: none; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: 0.2s; }
.place-order-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.place-order-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3); }
.daily-report-btn { width: 100%; padding: 10px; background: white; color: var(--primary-dark); border: 1px solid var(--primary); border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 6px; transition: 0.2s; }
.daily-report-btn:hover { background: var(--primary); color: white; }

/* ========== TABLES & PAGES ========== */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.page-header h2 { font-size: 22px; font-weight: 800; }
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-primary, .btn-secondary { padding: 10px 16px; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; transition: 0.2s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: white; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.tab { padding: 10px 16px; border: none; background: transparent; cursor: pointer; font-weight: 600; color: var(--text-light); border-bottom: 2px solid transparent; transition: 0.2s; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.table-container { background: white; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); font-size: 13px; }
.data-table th { background: var(--bg); font-weight: 700; color: var(--text-light); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table tr:hover { background: var(--primary-50); }
.badge { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; display: inline-block; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* ========== CASH ========== */
.cash-sources-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.cash-card { background: white; padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); border-left: 4px solid var(--primary); transition: 0.2s; }
.cash-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cash-card h4 { font-size: 13px; color: var(--text-light); margin-bottom: 8px; font-weight: 600; }
.cash-card .balance { font-size: 22px; font-weight: 800; color: var(--text); }
.page-section { margin-top: 24px; }
.page-section h3 { font-size: 16px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

/* ========== INVESTOR ========== */
.investor-info-card { background: linear-gradient(135deg, var(--primary-light), white); padding: 20px; border-radius: var(--radius); border: 1px solid var(--primary); margin-bottom: 20px; }
.investor-info-card h3 { font-size: 15px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.investor-info-card p { font-size: 13px; color: var(--text); margin: 4px 0; }
.profit-calc-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.profit-result { background: white; padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); }
.profit-result h4 { margin-bottom: 12px; color: var(--primary-dark); }
.profit-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.profit-row.total { font-size: 16px; font-weight: 800; border-top: 2px solid var(--primary); margin-top: 8px; padding-top: 12px; }

/* ========== SETTINGS ========== */
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.settings-card { background: white; padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); }
.settings-card h3 { font-size: 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.settings-card h3 i { color: var(--primary); }

/* ========== MODALS ========== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 9999; opacity: 0; visibility: hidden; transition: 0.3s; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal { background: white; border-radius: 16px; padding: 24px; width: 90%; max-width: 450px; max-height: 90vh; overflow-y: auto; transform: scale(0.9); transition: 0.3s; }
.modal-overlay.active .modal { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 18px; font-weight: 700; }
.modal-close { width: 32px; height: 32px; border-radius: 8px; border: none; background: var(--bg); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.modal-close:hover { background: #ef4444; color: white; }
.variant-section { margin-bottom: 16px; }
.variant-section h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.variant-section h4 i { color: var(--primary); }
.variant-options { display: flex; gap: 8px; flex-wrap: wrap; }
.variant-option { padding: 10px 16px; border: 2px solid var(--border); border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; transition: 0.2s; }
.variant-option:hover { border-color: var(--primary); }
.variant-option.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.addon-item { display: flex; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; align-items: center; transition: 0.2s; }
.addon-item:hover { border-color: var(--primary); background: var(--primary-50); }
.addon-item label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.addon-item input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); }
.notes-input { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; resize: vertical; min-height: 60px; font-family: inherit; outline: none; }
.notes-input:focus { border-color: var(--primary); }
.qty-selector { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 16px 0; padding: 12px; background: var(--bg); border-radius: 10px; }
.qty-selector button { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--primary); background: white; color: var(--primary); cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.qty-selector button:hover { background: var(--primary); color: white; }
.qty-selector span { font-size: 20px; font-weight: 800; min-width: 30px; text-align: center; }
.add-to-cart-btn { width: 100%; padding: 14px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border: none; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.add-to-cart-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3); }

/* Payment Modal */
.payment-modal { max-width: 420px; }
.payment-amount { text-align: center; padding: 20px; background: linear-gradient(135deg, var(--primary-light), white); border-radius: 12px; margin-bottom: 20px; border: 1px solid var(--primary); }
.amount-label { font-size: 12px; color: var(--text-light); margin-bottom: 6px; text-transform: uppercase; font-weight: 600; }
.amount-value { font-size: 32px; font-weight: 800; color: var(--primary-dark); }
.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px; }
.method-btn { padding: 14px 8px; border: 2px solid var(--border); border-radius: 10px; background: white; cursor: pointer; font-weight: 600; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: 0.2s; }
.method-btn i { font-size: 20px; }
.method-btn:hover { border-color: var(--primary); }
.method-btn.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.cash-input-section { margin-bottom: 16px; }
.quick-cash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.quick-cash button { padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: white; cursor: pointer; font-weight: 700; font-size: 13px; transition: 0.2s; }
.quick-cash button:hover { background: var(--primary); color: white; border-color: var(--primary); }
.change-display { text-align: center; margin-top: 16px; padding: 14px; background: var(--primary-light); border-radius: 10px; border: 1px solid var(--primary); }
.change-label { font-size: 12px; color: var(--text-light); margin-bottom: 4px; text-transform: uppercase; font-weight: 600; }
.change-value { font-size: 24px; font-weight: 800; color: var(--primary-dark); }
.confirm-payment-btn { width: 100%; padding: 16px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border: none; border-radius: 10px; font-size: 16px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.confirm-payment-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3); }

/* Discount Modal */
.discount-type-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.disc-type-btn { flex: 1; padding: 10px; border: 2px solid var(--border); border-radius: 8px; background: white; cursor: pointer; font-weight: 600; font-size: 13px; transition: 0.2s; }
.disc-type-btn.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.discount-preview { background: var(--bg); padding: 14px; border-radius: 10px; margin: 16px 0; font-size: 13px; }
.discount-preview > div { display: flex; justify-content: space-between; padding: 4px 0; }
.total-preview { font-size: 16px; font-weight: 800; border-top: 1px solid var(--border); padding-top: 8px; margin-top: 8px; color: var(--primary-dark); }
.full-width { width: 100%; }

/* Receipt */
.receipt-modal { max-width: 380px; }
.receipt-content { background: white; padding: 20px; border: 1px dashed var(--border); border-radius: 8px; margin-bottom: 16px; font-family: 'Courier New', monospace; font-size: 12px; line-height: 1.6; }
.receipt-header { text-align: center; margin-bottom: 12px; border-bottom: 1px dashed #ccc; padding-bottom: 12px; }
.receipt-header h3 { font-size: 18px; margin-bottom: 4px; }
.receipt-item { display: flex; justify-content: space-between; margin-bottom: 4px; }
.receipt-total { border-top: 1px dashed #ccc; padding-top: 8px; font-weight: 700; }
.print-btn { width: 100%; padding: 12px; background: var(--text); color: white; border: none; border-radius: 8px; cursor: pointer; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Report Modal */
.report-modal { max-width: 500px; }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--primary-dark); color: white; padding: 14px 24px; border-radius: 10px; transform: translateY(100px); opacity: 0; transition: 0.3s; z-index: 10000; font-weight: 600; box-shadow: var(--shadow-lg); }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { background: #ef4444; }

/* Hold List */
.hold-list { max-height: 400px; overflow-y: auto; }
.hold-item { padding: 14px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: 0.2s; }
.hold-item:hover { border-color: var(--primary); background: var(--primary-50); }
.hold-item-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.hold-item-number { font-weight: 700; font-size: 14px; }
.hold-item-time { font-size: 11px; color: var(--text-light); }
.hold-item-total { font-size: 14px; font-weight: 700; color: var(--primary-dark); }
.empty-hold { text-align: center; padding: 40px 20px; color: var(--text-light); }

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .cash-sources-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .kasir-layout { grid-template-columns: 1fr; height: auto; }
    .kasir-right { height: auto; }
    .settings-grid { grid-template-columns: 1fr; }
    .menu-toggle { display: flex; }
    .sidebar { position: fixed; height: 100%; box-shadow: var(--shadow-lg); }
    .sidebar.collapsed { transform: translateX(-100%); }
}

@media (max-width: 640px) {
    .stats-grid { grid-template-columns: 1fr; }
    .cash-sources-grid { grid-template-columns: 1fr; }
    .categories { grid-template-columns: repeat(2, 1fr); }
    .products-grid { grid-template-columns: repeat(2, 1fr); }
    .payment-methods { grid-template-columns: 1fr; }
    .quick-cash { grid-template-columns: repeat(2, 1fr); }
    .profit-calc-form { grid-template-columns: 1fr; }
    .pages-container { padding: 16px; }
    .app-header { padding: 12px 16px; }
    .live-clock { display: none; }
}

/* Hide owner-only for kasir */
body.role-kasir .owner-only { display: none !important; }
