:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #22c55e;
    --success-dark: #16a34a;
    --danger: #ef4444;
    --warning: #f59e0b;
    --orange: #f97316;
    --teal: #14b8a6;
    --purple: #8b5cf6;
    --dark: #1e3a5f;
    --darker: #0f172a;
    --light: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.2);
}

* { margin: 0; padding: 0; box-sizing: border-box; text-transform: uppercase; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    min-height: 100vh;
    font-size: 14px;
    color: #f1f5f9;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.header {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.95), rgba(15, 23, 42, 0.98));
    backdrop-filter: blur(20px);
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left { display: flex; align-items: center; gap: 15px; }
.menu-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 10px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.menu-btn:hover { background: rgba(255,255,255,0.2); }

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { stroke: #60a5fa; }
.logo-text {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.logo-text small {
    font-size: 9px;
    font-weight: 500;
    opacity: 0.6;
    background: none;
    -webkit-text-fill-color: rgba(255,255,255,0.6);
}

.header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-new { background: linear-gradient(135deg, var(--success), var(--success-dark)); color: white; }
.btn-list, .btn-stats, .btn-products, .btn-home { background: rgba(255,255,255,0.1); color: white; border: 1px solid rgba(255,255,255,0.2) !important; }
.btn-home { background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important; border: none !important; }
.header-btn:hover { transform: translateY(-2px); }
.header-date { background: var(--success); padding: 8px 14px; border-radius: 10px; font-weight: 700; font-size: 11px; }

.main-container { display: flex; margin-top: 56px; min-height: calc(100vh - 56px); }

.sidebar {
    width: 220px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    transition: transform 0.3s;
    z-index: 999;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.sidebar.hidden { transform: translateX(-100%); }
.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

.debt-box {
    padding: 16px;
    background: linear-gradient(135deg, var(--danger), #b91c1c);
    margin: 12px;
    border-radius: 14px;
    animation: slideIn 0.5s;
}
.debt-box h4 { font-size: 10px; opacity: 0.9; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.debt-box .amount { font-size: 26px; font-weight: 800; }

.sidebar-title { padding: 12px 16px; font-size: 10px; opacity: 0.6; letter-spacing: 1px; }
.empty-sidebar { padding: 20px; text-align: center; opacity: 0.5; font-size: 11px; }

.customer-item {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}
.customer-item:hover { background: rgba(59,130,246,0.2); border-left-color: var(--primary); }
.customer-item .name { flex: 1; font-size: 12px; font-weight: 600; }
.customer-item .bal { color: #fbbf24; font-weight: 700; font-size: 12px; }

.sidebar-logout { margin-top: auto; padding: 16px 12px; border-top: 1px solid rgba(255,255,255,0.1); }

.content { flex: 1; margin-left: 220px; padding: 16px; transition: margin 0.3s; }
.sidebar.hidden + .content { margin-left: 0; }

.sale-view {
    display: grid;
    grid-template-columns: 280px 1fr 280px 90px;
    gap: 14px;
    height: calc(100vh - 88px);
    animation: fadeIn 0.5s;
}

.summary-panel {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.9));
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 12px;
    font-size: 12px;
}
.summary-header span { display: flex; align-items: center; gap: 6px; }
.summary-stats { display: flex; gap: 16px; }
.summary-stats .stat { text-align: center; }
.summary-stats .stat small { display: block; opacity: 0.6; font-size: 9px; }
.summary-stats .stat strong { font-size: 16px; color: var(--success); }

.day-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.day-btn {
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.day-btn.plus { background: linear-gradient(135deg, var(--success), var(--teal)); color: white; }
.day-btn.minus { background: linear-gradient(135deg, var(--danger), var(--orange)); color: white; }
.day-btn:hover { transform: scale(1.02); }
.day-btn:active { transform: scale(0.98); }

.persons-section { margin-bottom: 12px; }
.persons-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 11px; }
.persons-header span { display: flex; align-items: center; gap: 6px; }
.add-person-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.add-person-btn:hover { background: var(--primary-dark); }

.persons-list { display: flex; flex-direction: column; gap: 6px; max-height: 120px; overflow-y: auto; }
.person-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.person-item.active { border-color: var(--primary); background: rgba(59,130,246,0.2); }
.person-item:hover { background: rgba(255,255,255,0.1); }
.person-name { flex: 1; font-weight: 600; font-size: 11px; }
.person-stats { font-size: 9px; opacity: 0.6; margin-right: 8px; }
.person-remove {
    background: var(--danger);
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}
.empty-persons { text-align: center; padding: 16px; opacity: 0.5; font-size: 11px; }

.current-box {
    background: rgba(59,130,246,0.15);
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(59,130,246,0.3);
}
.current-box .label { font-size: 9px; opacity: 0.6; }
.current-box .name { font-size: 14px; font-weight: 700; color: #60a5fa; margin: 4px 0; }
.current-box .total { font-size: 28px; font-weight: 900; color: #4ade80; }
.current-box .discount-tag { color: var(--warning); font-size: 11px; font-weight: 700; margin-top: 4px; }
.current-box .info { font-size: 10px; opacity: 0.6; margin-top: 4px; }

.cart-list { flex: 1; overflow-y: auto; min-height: 0; }
.cart-list::-webkit-scrollbar { width: 4px; }
.cart-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
.empty-cart { text-align: center; padding: 30px; opacity: 0.5; font-size: 11px; }

.cart-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    margin-bottom: 6px;
    font-size: 11px;
    gap: 6px;
}
.cart-item:hover { background: rgba(59,130,246,0.15); }
.cart-item-top { display: flex; align-items: center; gap: 8px; }
.cart-item-top .num { opacity: 0.5; font-weight: 700; min-width: 16px; }
.cart-item-top .name { font-weight: 600; word-break: break-word; line-height: 1.3; }
.cart-item-bottom { display: flex; align-items: center; gap: 8px; padding-left: 24px; }
.cart-item .num { opacity: 0.5; font-weight: 700; }
.cart-item .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cart-item .days { text-align: center; opacity: 0.6; font-size: 9px; }
.cart-item .price { color: #4ade80; text-align: right; font-weight: 700; font-size: 10px; }
.cart-item .btns { display: flex; gap: 4px; }
.cart-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.cart-btn.minus { background: var(--danger); color: white; }
.cart-btn.plus { background: var(--success); color: white; }
.cart-btn:hover { transform: scale(1.1); }

.product-panel, .welcome-panel {
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    color: #1e293b;
    overflow: hidden;
}

.welcome-panel {
    align-items: center;
    justify-content: center;
    text-align: center;
}
.welcome-content { max-width: 300px; }
.welcome-content svg { stroke: var(--primary); margin-bottom: 20px; }
.welcome-content h2 { font-size: 20px; margin-bottom: 10px; color: var(--dark); }
.welcome-content p { font-size: 12px; opacity: 0.7; margin-bottom: 20px; }

.product-header { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.date-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f1f5f9;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
}
.date-box input { border: none; background: transparent; font-size: 12px; width: 110px; font-weight: 600; }
.date-box .price { background: var(--dark); color: #4ade80; padding: 8px 12px; border-radius: 8px; font-weight: 800; font-size: 13px; }

.product-tabs { display: flex; gap: 8px; }
.product-tab {
    padding: 10px 18px;
    border: none;
    background: #f1f5f9;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 11px;
    transition: all 0.2s;
    color: #64748b;
}
.product-tab:hover { background: #e2e8f0; }
.product-tab.active { background: linear-gradient(135deg, var(--primary), #6366f1); color: white; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    flex: 1;
    overflow-y: auto;
    align-content: start;
    padding: 2px;
}
.product-grid::-webkit-scrollbar { width: 5px; }
.product-grid::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

.product-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.product-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.product-card:active { transform: scale(0.97); }
.product-card .product-emoji { 
    font-size: 32px;
    margin: 0 auto 6px; 
    line-height: 1;
}
.product-card .name { font-weight: 700; font-size: 9px; margin-bottom: 4px; line-height: 1.2; color: var(--dark); min-height: 22px; display: flex; align-items: center; justify-content: center; text-align: center; }
.product-card .price { color: var(--success); font-size: 14px; font-weight: 900; }

.numpad-panel {
    background: rgba(255,255,255,0.95);
    border-radius: 16px;
    padding: 14px;
    color: #1e293b;
    overflow: hidden;
}
.numpad-display {
    background: #f1f5f9;
    padding: 14px;
    text-align: right;
    font-size: 24px;
    font-weight: 900;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 2px solid #e2e8f0;
}
.numpad-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.num-btn {
    padding: 14px 6px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.num-btn:hover { transform: translateY(-2px); }
.num-btn:active { transform: scale(0.95); }
.num-btn.number { background: #f1f5f9; color: var(--dark); border: 2px solid #e2e8f0; }
.num-btn.quick { background: linear-gradient(135deg, var(--success), var(--teal)); color: white; }
.num-btn.action { background: #64748b; color: white; }
.num-btn.discount { background: linear-gradient(135deg, var(--warning), var(--orange)); color: white; font-size: 10px; }

.action-panel { display: flex; flex-direction: column; gap: 6px; }
.action-btn {
    padding: 12px 6px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 800;
    font-size: 9px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}
.action-btn .icon { font-size: 16px; display: flex; }
.action-btn:hover { transform: translateY(-2px); }
.action-btn:active { transform: scale(0.95); }
.action-btn.orange { background: linear-gradient(135deg, var(--orange), #ea580c); color: white; }
.action-btn.green { background: linear-gradient(135deg, var(--success), var(--teal)); color: white; }
.action-btn.blue { background: linear-gradient(135deg, var(--primary), #6366f1); color: white; }
.action-btn.teal { background: linear-gradient(135deg, var(--teal), #0891b2); color: white; }
.action-btn.red { background: linear-gradient(135deg, var(--danger), #b91c1c); color: white; }
.action-btn.gray { background: #64748b; color: white; }

.list-view, .stats-view, .products-view, .detail-view { animation: fadeIn 0.4s; }

.list-header, .stats-header, .products-header { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filter-btn, .period-btn {
    padding: 10px 18px;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 11px;
    transition: all 0.2s;
    color: white;
}
.filter-btn:hover, .period-btn:hover { border-color: var(--primary); background: rgba(59,130,246,0.2); }
.filter-btn.active, .period-btn.active { background: linear-gradient(135deg, var(--primary), #6366f1); border-color: var(--primary); }
.filter-btn.debt.active { background: linear-gradient(135deg, var(--success), var(--teal)); border-color: var(--success); }
.filter-btn.returned.active { background: linear-gradient(135deg, var(--teal), #0891b2); border-color: var(--teal); }
.filter-btn.refund.active { background: linear-gradient(135deg, var(--danger), #b91c1c); border-color: var(--danger); }

.search-box { flex: 1; min-width: 180px; }
.search-box input {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    font-size: 12px;
    color: white;
}
.search-box input::placeholder { color: rgba(255,255,255,0.5); }
.search-box input:focus { outline: none; border-color: var(--primary); }

.icon-btn {
    width: 42px;
    height: 42px;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s;
}
.icon-btn:hover { border-color: var(--primary); background: rgba(59,130,246,0.2); }
.refresh-btn:hover { animation: spin 0.5s; }

.date-range { display: flex; align-items: center; gap: 8px; }
.date-range input {
    padding: 8px 12px;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    color: white;
    font-size: 11px;
}

.table-wrapper { overflow-x: auto; border-radius: 12px; box-shadow: var(--shadow-lg); }
.data-table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,0.95); font-size: 11px; color: #1e293b; }
.data-table th { background: linear-gradient(135deg, var(--dark), var(--darker)); color: white; padding: 12px 8px; text-align: left; font-size: 10px; white-space: nowrap; }
.data-table td { padding: 10px 8px; border-bottom: 1px solid #e2e8f0; }
.data-table tr { transition: all 0.2s; cursor: pointer; }
.data-table tbody tr:hover { background: rgba(59,130,246,0.1); }
.data-table tr.has-debt { background: #fef3c7; }
.data-table tr.is-returned { background: #d1fae5; }
.data-table tr.is-returned td { opacity: 0.7; }
.data-table tr.is-refunded { background: #fecaca; }
.data-table tr.is-refunded td { opacity: 0.6; text-decoration: line-through; }
.data-table tr.is-refunded .refund-badge { text-decoration: none; }
.empty-row { text-align: center; padding: 40px !important; opacity: 0.5; }
.bal-red { color: var(--danger); font-weight: 800; }
.bal-green { color: var(--success); font-weight: 800; }

.type-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 700;
}
.type-badge.hotel { background: var(--primary); color: white; }
.type-badge.daily { background: var(--orange); color: white; }

.edit-btn, .print-btn, .refund-btn {
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.edit-btn:hover, .print-btn:hover, .refund-btn:hover { transform: scale(1.1); }
.print-btn { background: linear-gradient(135deg, var(--teal), #0891b2); }
.refund-btn { background: linear-gradient(135deg, var(--orange), #ea580c); }

.refund-badge {
    background: linear-gradient(135deg, var(--danger), #b91c1c);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 8px;
    font-weight: 700;
}

.pay-btn {
    background: linear-gradient(135deg, var(--success), var(--teal));
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    margin-right: 6px;
}
.pay-btn:hover { transform: scale(1.1); }

tr.is-returned { background: rgba(34, 197, 94, 0.1) !important; }
tr.is-returned td { color: var(--success); }
tr.is-refunded { background: rgba(239, 68, 68, 0.1) !important; opacity: 0.7; }

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch.small { width: 36px; height: 20px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    transition: all 0.3s;
    border-radius: 24px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    transition: all 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.toggle-switch.small .toggle-slider:before { height: 14px; width: 14px; }
.toggle-switch input:checked + .toggle-slider { background: linear-gradient(135deg, var(--success), var(--teal)); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }
.toggle-switch.small input:checked + .toggle-slider:before { transform: translateX(16px); }

.stats-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
    background: rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(255,255,255,0.1);
}
.stat-card.blue { border-left: 4px solid var(--primary); }
.stat-card.green { border-left: 4px solid var(--success); }
.stat-card.teal { border-left: 4px solid var(--teal); }
.stat-card.purple { border-left: 4px solid var(--purple); }
.stat-card.orange { border-left: 4px solid var(--orange); }
.stat-card.red { border-left: 4px solid var(--danger); }
.stat-icon { display: flex; }
.stat-value { font-size: 22px; font-weight: 800; }
.stat-label { font-size: 10px; opacity: 0.7; }

.stats-details { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stats-section {
    background: rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.1);
}
.stats-section h3 { font-size: 12px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.top-item, .daily-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 11px;
}
.top-item .rank { background: var(--primary); color: white; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.top-item .name, .daily-item .date { flex: 1; }
.top-item .qty, .daily-item .cnt { opacity: 0.6; }
.top-item .rev, .daily-item .rev { color: var(--success); font-weight: 700; }
.empty { text-align: center; padding: 20px; opacity: 0.5; font-size: 11px; }

.products-header h2 { flex: 1; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.products-list { display: flex; flex-direction: column; gap: 8px; }
.product-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}
.product-item.inactive { opacity: 0.5; }
.product-info { flex: 1; }
.product-info strong { display: block; font-size: 12px; }
.product-info .category { font-size: 10px; opacity: 0.6; }
.product-prices { margin-right: 16px; text-align: right; }
.product-prices span { display: block; font-size: 12px; font-weight: 700; }
.product-prices .vip { font-size: 10px; color: var(--warning); }
.product-actions { display: flex; gap: 6px; }
.btn-sm { padding: 6px 10px; border: none; border-radius: 6px; cursor: pointer; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; }
.btn-edit { background: var(--primary); color: white; }
.btn-delete { background: var(--danger); color: white; }
.btn-remove-item { background: var(--orange); color: white; font-size: 9px; padding: 4px 8px; }

.detail-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.detail-header h2 { flex: 1; font-size: 16px; }
.back-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.detail-actions { display: flex; gap: 8px; }

.detail-content { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.detail-summary, .detail-persons, .detail-payments {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    max-height: 400px;
    overflow-y: auto;
}
.detail-summary { grid-column: 1; }
.detail-persons { grid-column: 2; }
.detail-payments { grid-column: 3; }

.summary-grid { display: flex; flex-direction: column; gap: 8px; }
.summary-item { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.summary-item:last-child { border-bottom: none; }
.summary-item label { font-size: 10px; opacity: 0.6; }
.summary-item span { font-size: 13px; font-weight: 700; }
.summary-item.highlight { background: rgba(255,255,255,0.05); padding: 10px; border-radius: 8px; margin-top: 8px; }
.summary-item.highlight span { font-size: 16px; }
.summary-item span.red { color: var(--danger); }
.summary-item span.green { color: var(--success); }

.detail-persons h3, .detail-payments h3 { font-size: 11px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.person-detail { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.1); }

@media (max-width: 1000px) {
    .detail-content { grid-template-columns: 1fr 1fr; }
    .detail-payments { grid-column: span 2; }
}
@media (max-width: 700px) {
    .detail-content { grid-template-columns: 1fr; }
    .detail-summary, .detail-persons, .detail-payments { grid-column: 1; }
}
.person-detail:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.person-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.person-header strong { font-size: 13px; }
.person-header span { opacity: 0.6; font-size: 11px; }
.person-items { display: flex; flex-direction: column; gap: 6px; }
.item-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: rgba(255,255,255,0.05); border-radius: 8px; font-size: 11px; }
.item-row.returned { opacity: 0.5; text-decoration: line-through; }
.item-row .item-name { flex: 1; }
.item-row .item-qty { opacity: 0.6; }
.item-row .item-price { font-weight: 700; color: var(--success); }

.payment-row-detail { display: flex; gap: 16px; padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 11px; cursor: pointer; border-radius: 8px; }
.payment-row-detail:hover { background: rgba(255,255,255,0.05); }
.payment-row-detail .pay-date { flex: 1; opacity: 0.6; }
.payment-row-detail .pay-type { text-transform: capitalize; }
.payment-row-detail .pay-amount { font-weight: 700; color: var(--success); }
.payment-row-detail .pay-edit { color: var(--primary); font-weight: 700; font-size: 10px; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    color: #1e293b;
    animation: fadeIn 0.3s;
}
.modal.modal-sm { max-width: 340px; }
.modal.modal-lg { max-width: 500px; }
.modal-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--dark), var(--darker));
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
}
.modal-header h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.modal-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
}
.modal-body { padding: 20px; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 11px; color: #475569; }
.form-group input, .form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 13px;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.customer-type-btns { display: flex; gap: 8px; }
.customer-type-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.customer-type-btn:hover { border-color: var(--primary); }
.customer-type-btn.active { border-color: var(--primary); background: linear-gradient(135deg, var(--primary), #6366f1); color: white; }

.payment-info { background: #f8fafc; padding: 14px; border-radius: 12px; margin-bottom: 16px; }
.payment-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #e2e8f0; font-size: 12px; }
.payment-row:last-child { border-bottom: none; font-weight: 800; font-size: 14px; padding-top: 12px; margin-top: 8px; border-top: 2px solid #cbd5e1; }
.payment-row.debt { color: var(--danger); }

.multi-payment { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.payment-input-row { display: flex; align-items: center; gap: 12px; }
.payment-type-icon {
    width: 120px;
    padding: 10px;
    background: #f1f5f9;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
}
.payment-type-icon.nakit { background: linear-gradient(135deg, var(--success), var(--teal)); color: white; }
.payment-type-icon.kredi { background: linear-gradient(135deg, var(--primary), #6366f1); color: white; }
.payment-type-icon.havale { background: linear-gradient(135deg, var(--orange), #ea580c); color: white; }
.payment-input-row input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
}
.payment-input-row input:focus { outline: none; border-color: var(--primary); }

.payment-types { display: flex; gap: 8px; margin-bottom: 14px; }
.payment-type-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
}
.payment-type-btn:hover { border-color: var(--primary); }
.payment-type-btn.active { border-color: var(--primary); background: linear-gradient(135deg, var(--primary), #6366f1); color: white; }

.confirm-btns { display: flex; gap: 10px; margin-top: 16px; }
.confirm-btns .btn { flex: 1; }

.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

.warning-text { color: var(--danger); font-size: 11px; font-weight: 700; margin-top: 8px; }

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-success { background: linear-gradient(135deg, var(--success), var(--teal)); color: white; }
.btn-teal { background: linear-gradient(135deg, var(--teal), #0891b2); color: white; }
.btn-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.btn-orange { background: linear-gradient(135deg, var(--orange), #ea580c); color: white; }
.btn-red { background: linear-gradient(135deg, var(--danger), #b91c1c); color: white; }
.btn-gray { background: #64748b; color: white; }
.btn:hover { transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 24px; font-size: 14px; }
.btn-day-extend { padding: 2px 8px; font-size: 10px; background: var(--primary); color: white; border: none; border-radius: 4px; cursor: pointer; margin-left: 8px; }
.btn-day-extend:hover { background: #2563eb; }
.btn-sm { padding: 4px 8px; font-size: 10px; border: none; border-radius: 4px; cursor: pointer; margin-left: 4px; }
.btn-remove-item { background: var(--danger); color: white; }
.btn-return { background: var(--success); color: white; }
.btn-undo { background: var(--warning); color: white; }
.highlight-date { color: #fbbf24; font-weight: 700; }

.old-price { text-decoration: line-through; opacity: 0.5; font-size: 0.7em; display: block; }

.extend-persons-list { display: flex; flex-direction: column; gap: 8px; }
.extend-person-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    cursor: pointer;
}
.extend-person-item:hover { background: rgba(255,255,255,0.1); }
.extend-person-item input { width: 18px; height: 18px; accent-color: var(--primary); }
.extend-person-item span { font-weight: 600; }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 3000; }
.toast {
    background: linear-gradient(135deg, var(--dark), var(--darker));
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    animation: slideIn 0.3s;
}
.toast.success { background: linear-gradient(135deg, var(--success), var(--teal)); }
.toast.error { background: linear-gradient(135deg, var(--danger), #b91c1c); }

@media print {
    body * { visibility: hidden; }
    .print-area, .print-area * { visibility: visible; }
}

@media (max-width: 1100px) {
    .sale-view { grid-template-columns: 260px 1fr 260px 85px; }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.visible { transform: translateX(0); }
    .content { margin-left: 0; }
    .sale-view { grid-template-columns: 1fr; height: auto; gap: 12px; }
    .summary-panel { order: 1; }
    .product-panel, .welcome-panel { order: 0; min-height: 350px; }
    .numpad-panel { display: none; }
    .action-panel { order: 2; flex-direction: row; flex-wrap: wrap; }
    .action-btn { flex: 1; min-width: 70px; }
    .stats-details { grid-template-columns: 1fr; }
}
