/* ========================================
   KANTIN ONLINE - Modern CSS
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #FF6B35;
    --primary-dark: #E55A2B;
    --secondary: #2EC4B6;
    --accent: #FFD93D;
    --dark: #1A1A2E;
    --light: #F8F9FA;
    --gray: #6C757D;
    --success: #28A745;
    --danger: #DC3545;
    --warning: #FFC107;
    --info: #17A2B8;
    --shadow: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    color: var(--dark);
}

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand i {
    font-size: 1.8rem;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 10px 20px !important;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-nav .nav-link:hover {
    background: rgba(255,255,255,0.15);
    color: white !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white !important;
}

.user-saldo {
    background: var(--accent);
    color: var(--dark);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 80px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-image {
    max-width: 100%;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.2));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

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

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

.card-header {
    background: white;
    border-bottom: 2px solid #f0f0f0;
    padding: 20px;
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

/* Menu Card */
.menu-card {
    position: relative;
    overflow: hidden;
}

.menu-card .card-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.menu-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.menu-card:hover img {
    transform: scale(1.1);
}

.menu-card .kategori-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.menu-card .harga {
    color: var(--primary);
    font-size: 1.3rem;
    font-weight: 700;
}

.menu-card .nama-menu {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--dark);
}

.menu-card .deskripsi {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    padding: 12px 25px;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255,107,53,0.4);
    color: white;
}

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

.btn-secondary:hover {
    background: #25A99C;
    color: white;
}

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

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

.btn-warning {
    background: var(--warning);
    color: var(--dark);
}

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

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

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* ========================================
   FORMS
   ======================================== */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 2px solid #e0e0e0;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.1);
}

.form-label {
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
}

.input-group-text {
    background: var(--light);
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    padding: 12px 15px;
}

/* ========================================
   LOGIN & REGISTER
   ======================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

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

.auth-logo i {
    font-size: 4rem;
    color: var(--primary);
}

.auth-logo h2 {
    font-weight: 700;
    color: var(--dark);
    margin-top: 15px;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
}

.auth-link a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* ========================================
   KATEGORI
   ======================================== */
.kategori-section {
    padding: 60px 0;
}

.kategori-card {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    color: var(--dark);
    display: block;
}

.kategori-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.kategori-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.kategori-card h5 {
    font-weight: 600;
    margin: 0;
}

.kategori-card.active {
    background: var(--primary);
    color: white;
}

.kategori-card.active i {
    color: white;
}

/* ========================================
   KERANJANG
   ======================================== */
.keranjang-item {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    gap: 20px;
}

.keranjang-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.keranjang-item .item-info {
    flex: 1;
}

.keranjang-item .item-nama {
    font-weight: 600;
    font-size: 1.1rem;
}

.keranjang-item .item-harga {
    color: var(--primary);
    font-weight: 600;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-control button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: var(--light);
    color: var(--dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qty-control button:hover {
    background: var(--primary);
    color: white;
}

.qty-control span {
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

/* ========================================
   RIWAYAT
   ======================================== */
.riwayat-item {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.riwayat-item.selesai {
    border-left-color: var(--success);
}

.riwayat-item.pending {
    border-left-color: var(--warning);
}

.riwayat-item.dibatalkan {
    border-left-color: var(--danger);
}

.status-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-badge.pending {
    background: #FFF3CD;
    color: #856404;
}

.status-badge.diproses {
    background: #CCE5FF;
    color: #004085;
}

.status-badge.selesai {
    background: #D4EDDA;
    color: #155724;
}

.status-badge.dibatalkan {
    background: #F8D7DA;
    color: #721C24;
}

/* ========================================
   ADMIN PANEL
   ======================================== */
.admin-sidebar {
    background: var(--dark);
    min-height: 100vh;
    padding: 20px 0;
    position: fixed;
    width: 260px;
}

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

.admin-sidebar .logo h4 {
    color: white;
    font-weight: 700;
    margin: 0;
}

.admin-sidebar .logo i {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 10px;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    text-decoration: none;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.05);
    border-left-color: var(--primary);
}

.admin-sidebar .nav-link i {
    width: 25px;
    text-align: center;
}

.admin-content {
    margin-left: 260px;
    padding: 30px;
    min-height: 100vh;
    background: #f5f7fa;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-card .icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.stat-card .icon.primary {
    background: rgba(255,107,53,0.1);
    color: var(--primary);
}

.stat-card .icon.success {
    background: rgba(40,167,69,0.1);
    color: var(--success);
}

.stat-card .icon.info {
    background: rgba(23,162,184,0.1);
    color: var(--info);
}

.stat-card .icon.warning {
    background: rgba(255,193,7,0.1);
    color: var(--warning);
}

.stat-card .info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--dark);
}

.stat-card .info p {
    color: var(--gray);
    margin: 0;
}

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

.table {
    margin: 0;
}

.table thead th {
    background: var(--light);
    border: none;
    font-weight: 600;
    color: var(--dark);
    padding: 15px;
}

.table tbody td {
    padding: 15px;
    vertical-align: middle;
    border-color: #f0f0f0;
}

.table tbody tr:hover {
    background: rgba(255,107,53,0.02);
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    padding: 15px 20px;
}

.alert-success {
    background: #D4EDDA;
    color: #155724;
}

.alert-danger {
    background: #F8D7DA;
    color: #721C24;
}

.alert-warning {
    background: #FFF3CD;
    color: #856404;
}

.alert-info {
    background: #CCE5FF;
    color: #004085;
}

/* ========================================
   MODAL
   ======================================== */
.modal-content {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 2px solid #f0f0f0;
    padding: 20px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 2px solid #f0f0f0;
    padding: 20px;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--dark);
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer h5 {
    font-weight: 600;
    margin-bottom: 20px;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    color: rgba(255,255,255,0.5);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 991px) {
    .admin-sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0;
        text-align: center;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .auth-card {
        padding: 25px;
    }
    
    .keranjang-item {
        flex-wrap: wrap;
    }
}

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

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

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Badge */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
}

/* Section title */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.section-title p {
    color: var(--gray);
}

/* Search box */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 45px;
    border-radius: 30px;
}

.search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 5rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: var(--gray);
    font-weight: 500;
}

/* Stok habis overlay */
.stok-habis {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Saldo card */
.saldo-card {
    background: linear-gradient(135deg, var(--success) 0%, #1E7E34 100%);
    color: white;
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
}

.saldo-card h6 {
    opacity: 0.8;
    margin-bottom: 10px;
}

.saldo-card h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

/* Quick menu */
.quick-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.quick-menu-item {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-menu-item:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.quick-menu-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
}
