:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --dark-gradient: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 70px;
    --border-radius: 16px;
    --card-shadow: 0 10px 40px rgba(0,0,0,0.08);
    --hover-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}

.sidebar-brand {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.2);
    margin-bottom: 10px;
}

.sidebar-brand h4 {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.sidebar-brand p {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    margin: 0;
}

.sidebar-menu {
    padding: 15px 10px;
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.sidebar-menu li a i {
    width: 24px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
}

.menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 15px 20px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

.user-details h6 {
    color: #fff;
    margin: 0;
    font-size: 13px;
}

.user-details span {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* ===== TOPBAR ===== */
.topbar {
    height: var(--topbar-height);
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left h4 {
    margin: 0;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.topbar-date {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
}

.btn-logout {
    background: var(--danger-gradient);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(250, 112, 154, 0.4);
    color: #fff;
}

/* ===== CONTENT AREA ===== */
.content {
    padding: 30px;
}

/* ===== CARDS ===== */
.card-gradient {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.card-gradient:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.card-gradient .card-body {
    padding: 25px;
    position: relative;
    z-index: 2;
}

.card-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.card-primary::before { background: var(--primary-gradient); }
.card-success::before { background: var(--success-gradient); }
.card-warning::before { background: var(--warning-gradient); }
.card-danger::before { background: var(--danger-gradient); }
.card-info::before { background: var(--dark-gradient); }

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 15px;
}

.card-icon.primary { background: linear-gradient(135deg, #667eea20 0%, #764ba220 100%); color: #667eea; }
.card-icon.success { background: linear-gradient(135deg, #4facfe20 0%, #00f2fe20 100%); color: #4facfe; }
.card-icon.warning { background: linear-gradient(135deg, #43e97b20 0%, #38f9d720 100%); color: #43e97b; }
.card-icon.danger { background: linear-gradient(135deg, #fa709a20 0%, #fee14020 100%); color: #fa709a; }

.card-title {
    color: #6c757d;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.card-value {
    font-size: 28px;
    font-weight: 800;
    color: #2d3748;
    margin: 0;
}

/* ===== CHART CARD ===== */
.chart-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 25px;
    margin-bottom: 30px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

/* ===== BUTTONS ===== */
.btn-gradient-primary {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: #fff;
}

.btn-gradient-success {
    background: var(--success-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-gradient-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
    color: #fff;
}

.btn-gradient-danger {
    background: var(--danger-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-gradient-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(250, 112, 154, 0.4);
    color: #fff;
}

.btn-gradient-warning {
    background: var(--warning-gradient);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-gradient-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 233, 123, 0.4);
    color: #fff;
}

/* ===== TABLE ===== */
.table-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.table-card .table-header {
    background: var(--primary-gradient);
    color: #fff;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-card .table-header h5 {
    margin: 0;
    font-weight: 700;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    color: #6c757d;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    padding: 15px 20px;
}

.table tbody td {
    padding: 15px 20px;
    vertical-align: middle;
    color: #495057;
    font-size: 14px;
    border-bottom: 1px solid #f1f2f6;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* ===== BADGES ===== */
.badge-gradient {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-gradient-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #fff;
}

.badge-gradient-danger {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #fff;
}

.badge-gradient-warning {
    background: linear-gradient(135deg, #fee140 0%, #fa709a 100%);
    color: #fff;
}

.badge-gradient-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

/* ===== FORM ===== */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-label {
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    margin-bottom: 8px;
}

/* ===== MODAL ===== */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 25px 80px rgba(0,0,0,0.15);
}

.modal-header {
    background: var(--primary-gradient);
    color: #fff;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border: none;
    padding: 20px 25px;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border: none;
    padding: 20px 25px;
}

/* ===== KASIR PAGE ===== */
.kasir-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 25px;
}

.produk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.produk-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.produk-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.produk-card .produk-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.produk-card .produk-nama {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
    font-size: 14px;
}

.produk-card .produk-harga {
    font-weight: 800;
    color: #667eea;
    font-size: 18px;
}

.produk-card .produk-kategori {
    font-size: 11px;
    color: #6c757d;
    background: #f8f9fa;
    padding: 3px 10px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 5px;
}

.cart-panel {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 25px;
    position: sticky;
    top: 90px;
}

.cart-header {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f2f6;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f2f6;
}

.cart-item-info h6 {
    margin: 0;
    font-size: 14px;
    color: #2d3748;
}

.cart-item-info span {
    font-size: 12px;
    color: #6c757d;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-qty {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: #f1f2f6;
    color: #495057;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-qty:hover {
    background: #667eea;
    color: #fff;
}

.cart-summary {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f1f2f6;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-row.total {
    font-size: 20px;
    font-weight: 800;
    color: #667eea;
    padding-top: 10px;
    border-top: 2px solid #f1f2f6;
}

/* ===== QRIS MODAL ===== */
.qris-container {
    text-align: center;
    padding: 20px;
}

.qris-container img {
    max-width: 250px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 25px 80px rgba(0,0,0,0.2);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.login-logo h3 {
    font-weight: 800;
    color: #2d3748;
    margin: 0;
}

.login-logo p {
    color: #6c757d;
    font-size: 14px;
}

/* ===== ALERT ===== */
.alert-gradient {
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
}

.alert-gradient-success {
    background: linear-gradient(135deg, #43e97b20 0%, #38f9d720 100%);
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

.alert-gradient-danger {
    background: linear-gradient(135deg, #fa709a20 0%, #fee14020 100%);
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .kasir-container {
        grid-template-columns: 1fr;
    }
    
    .cart-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 15px;
    }
    
    .topbar {
        padding: 0 15px;
    }
    
    .produk-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ===== PRINT STRUK ===== */
@media print {
    .sidebar, .topbar, .btn-print, .btn-close {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .struk-container {
        box-shadow: none !important;
    }
}

.struk-container {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 30px;
    max-width: 400px;
    margin: 0 auto;
}

.struk-header {
    text-align: center;
    border-bottom: 2px dashed #ddd;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.struk-body {
    font-size: 14px;
}

.struk-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.struk-total {
    border-top: 2px solid #333;
    margin-top: 15px;
    padding-top: 15px;
    font-weight: 700;
    font-size: 16px;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f2f6;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast-custom {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.toast-success .toast-icon { background: #d4edda; color: #155724; }
.toast-error .toast-icon { background: #f8d7da; color: #721c24; }
