* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated coffee background */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('kopi.png') top no-repeat;
    background-size: 2000px;
    z-index: -1;
}

@keyframes coffeeFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

/* Container */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Logo */
.logo {
    text-align: center;
    margin-bottom: 40px;
}

.logo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(90,59,30,0.3);
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05) rotate(5deg);
}

.logo h2 {
    margin: 15px 0 0 0;
    font-size: 2.2em;
    font-weight: 700;
    background: linear-gradient(45deg, #5a3b1e, #8b4513);
    -webkit-text-fill-color: transparent;
    font-style: italic;
    letter-spacing: 2px;
}

/* Form */
.form-box {
    background: rgba(255, 255, 255, 0.808);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid rgba(0, 0, 0, 0.137);
    width: 100%;
    max-width: 400px;
    transition: transform 0.3s ease;
}

.form-box:hover {
    transform: translateY(-5px);
}

/* Input fields */
input {
    width: 100%;
    padding: 18px 20px;
    margin: 15px 0;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    text-align: center;
    background: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    font-weight: 500;
}

input:focus {
    outline: #5a3b1e;
    border-color: #5a3b1e;
    box-shadow: 0 0 20px rgba(90,59,30,0.2);
    transform: scale(1.02);
}

input::placeholder {
    color: #999;
    font-weight: 400;
}

/* Buttons */
.login-btn, .register-btn {
    width: 100%;
    padding: 18px;
    margin: 10px 0;
    border-radius: 50px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn {
    background: linear-gradient(45deg, #5a3b1e, #8b4513);
    color: white;
    font-size: 18px;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(90,59,30,0.4);
}

.register-btn {
    background: #e9ecef;
    color: #5a3b1e;
    border: 2px solid #5a3b1e;
}

.register-btn:hover {
    background: linear-gradient(45deg, #5a3b1e, #8b4513);
    color: white;
    transform: translateY(-2px);
}

/* Loading animation */
.loading {
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



/* Responsive */
@media (max-width: 480px) {
    .form-box {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .logo img {
        width: 100px;
        height: 100px;
    }
}

/* Success message */
.success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transform: translateX(650px);
    transition: transform 0.3s ease;
    z-index: 1000;
    font-weight: 500;
}

.success.show {
    transform: translateX(0);
}
/* Register Page Specific Styles */
.header-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 400px;
}

.back-btn {
    background: rgba(90,59,30,0.1);
    color: #5a3b1e;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(90,59,30,0.2);
}

.back-btn:hover {
    background: #5a3b1e;
    color: white;
    transform: translateX(-5px);
}

.form-title {
    margin: 0 0 10px 0;
    color: #5a3b1e;
    font-size: 1.5em;
    font-weight: 700;
    text-align: center;
}

.form-subtitle {
    margin: 0 0 30px 0;
    color: #666;
    font-size: 0.95em;
    text-align: center;
}

.register-submit-btn {
    background: #5a3b1e !important;
}

.register-submit-btn:hover:not(:disabled) {
    box-shadow: 0 10px 25px rgba(76,175,80,0.4) !important;
}

.login-link {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

.login-link a {
    color: #5a3b1e;
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Error message */
.error {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #f44336;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transform: translateX(-600px);
    transition: transform 0.3s ease;
    z-index: 1000;
    font-weight: 500;
}

.error.show {
    transform: translateX(0);
}

/* Strength indicator (optional) */
.strength-indicator {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: center;
}
/* ========================================
   DASHBOARD SPECIFIC STYLES
   ======================================= */

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-small {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(90,59,30,0.3);
}

.header-left h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #5a3b1e 0%, #8b4513 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.header-right {
    display: flex;
    gap: 0.75rem;
}

.header-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.profile-btn {
    background: rgba(90,59,30,0.1);
    color: #5a3b1e;
    border: 1px solid rgba(90,59,30,0.2);
}

.profile-btn:hover {
    background: #5a3b1e;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(90,59,30,0.3);
}

.logout-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    font-weight: 700;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(244,67,54,0.4);
}

/* Main Dashboard */
.dashboard {
    margin-top: 5.5rem;
    padding: 2rem;
    min-height: calc(100vh - 12rem);
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 1rem;
    background: rgba(255,255,255,0.7);
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.welcome-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin: 0 0 0.5rem 0;
    color: #5a3b1e;
}

#welcomeUser {
    background: linear-gradient(135deg, #8b4513, #a0522d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

.welcome-section p {
    margin: 0;
    font-size: 1.2rem;
    color: #666;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 8rem;
}

.menu-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    position: relative;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #5a3b1e, #8b4513);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.menu-card:hover::before {
    transform: scaleX(1);
}

.menu-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 24px 64px rgba(90,59,30,0.25);
}

.menu-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.menu-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.menu-card:hover .menu-image img {
    transform: scale(1.15);
}

.menu-info {
    padding: 1.5rem;
    text-align: center;
}

.menu-info h4 {
    margin: 0 0 0.75rem 0;
    color: #2c1810;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.menu-info .price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #8b4513;
    margin: 0;
    text-shadow: 0 2px 4px rgba(139,69,19,0.3);
}

/* Cart Summary Footer */
.cart-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    border-top: 1px solid rgba(255,255,255,0.4);
    z-index: 999;
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: #5a3b1e;
    font-size: 1.1rem;
}

.cart-badge {
    background: #ff6b35;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1rem;
    min-width: 2.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255,107,53,0.4);
}

.confirm-order-btn {
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(76,175,80,0.3);
}

.confirm-order-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(76,175,80,0.5);
}

/* Modal Popup */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 28px;
    max-width: 500px;
    width: 92%;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(50px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 32px 80px rgba(0,0,0,0.35);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 1.75rem 2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    color: #5a3b1e;
    font-size: 1.4rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: 2px solid #ddd;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #666;
    border-color: #5a3b1e;
}

.modal-body {
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
}

.modal-image {
    width: 140px;
    height: 140px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.modal-details h4 {
    margin: 0 0 0.75rem 0;
    color: #2c1810;
    font-size: 1.4rem;
    font-weight: 700;
}

.price-tag {
    font-size: 1.4rem;
    font-weight: 800;
    color: #8b4513;
    padding: 0.5rem 1rem;
    background: rgba(139,69,19,0.1);
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: rgba(90,59,30,0.05);
    border-radius: 20px;
}

.qty-btn {
    width: 48px;
    height: 48px;
    border: 2px solid #5a3b1e;
    background: white;
    border-radius: 50%;
    font-size: 1.4rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #5a3b1e;
    color: white;
    transform: scale(1.1);
}

.qty-display {
    font-size: 1.6rem;
    font-weight: 900;
    color: #5a3b1e;
    min-width: 2.5rem;
    text-align: center;
}

.total-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(76,175,80,0.1), rgba(76,175,80,0.05));
    border-radius: 20px;
    margin-top: 1rem;
}

.total-display span {
    font-size: 1.2rem;
    color: #2c5530;
    font-weight: 600;
}

.total-display strong {
    font-size: 1.6rem;
    color: #2e7d32;
    font-weight: 900;
}

.modal-footer {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    border-top: 1px solid #f0f0f0;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 180px;
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    box-shadow: 0 6px 20px rgba(76,175,80,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(76,175,80,0.5);
}

.btn-secondary {
    background: transparent;
    color: #666;
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #5a3b1e;
    color: #5a3b1e;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        margin-top: 5rem;
        padding: 1rem;
    }
    
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.5rem;
    }
    
    .modal-body {
        flex-direction: column;
        text-align: center;
        padding: 1.5}
    }
    /* DASHBOARD COMPLETE STYLES */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

.header-left { display: flex; align-items: center; gap: 1rem; }
.logo-small { width: 45px; height: 45px; border-radius: 50%; }
.header-left h1 {
    margin: 0;
    background: linear-gradient(45deg, #5a3b1e, #8b4513);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.6rem;
    font-weight: 700;
}

.header-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-btn { 
    background: rgba(90,59,30,0.1); 
    color: #5a3b1e; 
    border: 1px solid rgba(90,59,30,0.2);
}
.profile-btn:hover { background: #5a3b1e; color: white; transform: translateY(-2px); }
.logout-btn { 
    background: linear-gradient(45deg, #f44336, #d32f2f); 
    color: white; 
}
.logout-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(244,67,54,0.4); }

.dashboard { margin-top: 5.5rem; padding: 2rem; max-width: 1400px; margin: 0 auto; }
.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.5rem 2rem;
    background: rgba(255,255,255,0.9);
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.welcome-section h2 { 
    font-size: 2.2rem; 
    color: #5a3b1e; 
    margin-bottom: 0.5rem;
}
#welcomeUser { color: #8b4513; font-weight: 800; }

.menu-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}
.tab-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}
.tab-btn.active,
.tab-btn:hover {
    background: linear-gradient(45deg, #5a3b1e, #8b4513);
    color: white;
    border-color: #5a3b1e;
    transform: translateY(-2px);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.menu-card {
    background: rgba(255,255,255,0.95);
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.menu-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(90,59,30,0.2);
}
.menu-image { height: 200px; overflow: hidden; }
.menu-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.menu-card:hover .menu-image img { transform: scale(1.1); }
.menu-info {
    padding: 1.5rem;
    text-align: center;
}
.menu-info h4 { 
    margin: 0 0 0.5rem 0; 
    color: #5a3b1e; 
    font-size: 1.2rem;
}
.menu-info .price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #8b4513;
    margin: 0;
}

.cart-summary {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
    z-index: 999;
}
.cart-badge {
    background: #ff6b35;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 800;
    min-width: 2.5rem;
    text-align: center;
}
.confirm-order-btn {
    padding: 1rem 2rem;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}
.confirm-order-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(76,175,80,0.4);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-overlay.active { display: flex; }
.modal {
    background: white;
    border-radius: 25px;
    max-width: 450px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}
.modal-header {
    padding: 1.5rem 2rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { margin: 0; color: #5a3b1e; }
.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.close-btn:hover { background: #f5f5f5; }
.modal-body { padding: 2rem; display: flex; gap: 1.5rem; }
.modal-img {
    width: 130px;
    height: 130px;
    border-radius: 18px;
    object-fit: cover;
}
.modal-info h4 { margin: 0 0 0.5rem 0; color: #5a3b1e; }
.modal-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #8b4513;
    margin: 0.5rem 0 1.5rem 0;
}
.qty-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}
.qty-control button {
    width: 45px;
    height: 45px;
    border: 2px solid #5a3b1e;
    background: white;
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
}
.qty-control button:hover { background: #5a3b1e; color: white; }
.modal-total {
    font-size: 1.5rem;
    font-weight: 800;
    color: #4CAF50;
    text-align: center;
    margin: 1rem 0 0 0;
}
.modal-actions {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    gap: 1rem;
}
.btn-primary, .btn-secondary {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-primary {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(76,175,80,0.4); }
.btn-secondary {
    background: transparent;
    color: #666;
    border: 2px solid #e0e0e0;
}
 /* ✅ CART DRAWER STYLES */
.cart-drawer {
    position: fixed;
    top: 0; right: -500px; width: 400px; height: 100vh;
    z-index: 1000; transition: right 0.3s ease;
    font-family: system-ui, -apple-system, sans-serif;
}

.cart-drawer.open { right: 0; }

.drawer-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(5px);
}

.drawer-content {
    position: absolute; top: 0; right: 0; width: 100%; height: 100%;
    background: white; border-radius: 20px 0 0 20px; overflow: hidden;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
}

.drawer-header {
    padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; display: flex; justify-content: space-between; align-items: center;
}

.drawer-header h3 { margin: 0; font-size: 1.3em; }

.drawer-body {
    flex: 1; padding: 20px; overflow-y: auto; max-height: calc(100vh - 200px);
}

.cart-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px; margin-bottom: 15px; background: #f8f9fa;
    border-radius: 12px; border: 1px solid #e9ecef;
}

.cart-item-info { display: flex; gap: 12px; flex: 1; }
.cart-item-img { 
    width: 50px; height: 50px; border-radius: 8px; object-fit: cover;
}
.cart-item h4 { margin: 0 0 5px 0; font-size: 1em; }
.cart-item p { margin: 0; color: #666; font-size: 0.9em; }

.cart-item-price { 
    display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
}
.remove-btn {
    background: #ff4757; color: white; border: none; 
    width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
    font-size: 0.9em;
}

.drawer-footer {
    padding: 20px; border-top: 1px solid #e9ecef; background: white;
}

.total-section { margin-bottom: 20px; }
.subtotal, .total-row {
    display: flex; justify-content: space-between; margin-bottom: 8px;
}
.total-row { font-size: 1.2em; font-weight: bold; color: #2d3436; }

.drawer-actions {
    display: flex; flex-direction: column; gap: 12px;
}

.btn-clear {
    background: #ff6b7a; color: white; border: none; 
    padding: 14px 20px; border-radius: 12px; font-size: 1em; cursor: pointer;
    transition: all 0.2s;
}
.btn-clear:hover { background: #ff5252; transform: translateY(-1px); }

.checkout-btn {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white; border: none; padding: 16px; 
    border-radius: 12px; font-size: 1.1em; font-weight: bold;
    transition: all 0.2s;
}
.checkout-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,184,148,0.3); }

.empty-cart {
    text-align: center; padding: 60px 20px; color: #888;
}
.empty-cart p { font-size: 1.2em; margin-bottom: 10px; }

/* Cart Toggle Button */
.cart-toggle-btn {
    background: #fdcb6e; color: #2d3436; border: none;
    padding: 12px 24px; border-radius: 25px; margin: 10px 0;
    font-weight: bold; cursor: pointer; transition: all 0.2s;
}
.cart-toggle-btn:hover { background: #f39c12; transform: translateY(-1px); }
/* Add to cart button */
.add-cart-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
    width: 100%;
}

.add-cart-btn:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 16px 24px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 1000;
    font-weight: 500;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* LOGIN EFFECTS */
.container {
    transition: all 0.3s ease;
}

.success {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 30px 50px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 20px 60px rgba(40,167,69,0.4);
    z-index: 1000;
    animation: successPop 0.6s ease-out;
    text-align: center;
    min-width: 300px;
}

@keyframes successPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.error {
    animation: shake 0.5s ease-in-out;
}

/* Input focus */
input:focus {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(91,44,27,0.3);
}
/* ==================== SIDEBAR & FOOTER MOBILE PERFECT ==================== */

/* 1. SIDEBAR DASHBOARD MOBILE FIX */
@media (max-width: 768px) {
    .sidebar {
        width: 85vw !important;
        max-width: 320px;
        right: -100% !important; /* Full hide */
    }
    
    .sidebar.active {
        right: 0 !important;
    }
    
    .menu-btn {
        z-index: 5000 !important;
        position: fixed !important;
        top: 15px !important;
        right: 15px !important;
    }
    
    /* Overlay backdrop */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 2000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .sidebar ul li {
        font-size: 16px;
        padding: 15px;
    }
    
    .logout {
        position: static !important;
        margin-top: 20px;
        width: 100%;
    }
}

/* 2. FOOTER GLOBAL MOBILE FIX (SEMUA PAGE!) */
@media (max-width: 1024px) {
    .footer {
        padding: 30px 25px 20px !important;
        margin-top: 40px !important;
    }
}

@media (max-width: 768px) {
    .footer {
        padding: 25px 15px 15px !important;
        margin-top: 30px !important;
    }
    
    .footer-container {
        flex-direction: column !important;
        gap: 25px !important;
        text-align: center !important;
    }
    
    /* FIX LOGO POSITION */
    .logo img {
        position: static !important;
        left: 0 !important;
        top: 0 !important;
        width: 70px !important;
        height: 70px !important;
        margin: 0 auto 10px !important;
        display: block;
    }
    
    .footer-left h2 {
        position: static !important;
        left: 0 !important;
        top: 0 !important;
        text-align: center !important;
        font-size: 22px !important;
    }
    
    .contact p {
        position: static !important;
        top: 0 !important;
    }
    
    .footer-links {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
        justify-items: center !important;
    }
    
    .footer-bottom {
        flex-direction: column !important;
        gap: 15px !important;
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr !important;
    }
    
    .footer-left h2 {
        font-size: 20px !important;
    }
}

/* 3. GLOBAL CONTAINER FIX (Semua page) */
@media (max-width: 768px) {
    .container, .main-container {
        width: 95% !important;
        max-width: 95% !important;
        padding: 20px 15px !important;
        margin: 10px auto !important;
    }
}

/* 4. HEADER GLOBAL MOBILE */
@media (max-width: 768px) {
    .header {
        padding: 12px 15px !important;
        position: relative !important;
    }
    
    .logo-1 h1 {
        font-size: 18px !important;
    }
}

/* 5. PREVENT OVERFLOW GLOBAL */
html, body {
    overflow-x: hidden !important;
}

@media (max-width: 768px) {
    * {
        max-width: 100% !important;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}
/* ========================================
   MOBILE-FIRST RESPONSIVE SYSTEM
   ======================================= */

/* BASE MOBILE STYLES (Prioritas Tertinggi) */
@media (max-width: 480px) {
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    html, body {
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
        height: 100%;
    }
    
    /* CONTAINER PERFECT MOBILE */
    .container, .main-container, .dashboard {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px 12px !important;
        margin: 0 !important;
        min-height: 100vh;
    }
    
    /* HEADER MOBILE PERFECT */
    .header {
        padding: 12px 15px !important;
        position: relative !important;
        z-index: 1000 !important;
    }
    
    .header-left {
        gap: 10px !important;
    }
    
    .logo-small {
        width: 35px !important;
        height: 35px !important;
    }
    
    .header-left h1 {
        font-size: 1.2rem !important;
        letter-spacing: 0 !important;
    }
    
    .header-right {
        gap: 8px !important;
    }
    
    .header-btn {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
        border-radius: 20px !important;
    }
    
    /* FORM MOBILE PERFECT */
    .form-box {
        padding: 25px 20px !important;
        margin: 10px 5px !important;
        border-radius: 20px !important;
    }
    
    input {
        padding: 15px 15px !important;
        font-size: 16px !important; /* Prevent zoom */
        margin: 12px 0 !important;
    }
    
    .login-btn, .register-btn {
        padding: 15px !important;
        font-size: 16px !important;
        border-radius: 40px !important;
    }
    
    /* LOGO MOBILE */
    .logo img {
        width: 80px !important;
        height: 80px !important;
    }
    
    .logo h2 {
        font-size: 1.8em !important;
        letter-spacing: 1px !important;
    }
    
    /* DASHBOARD MOBILE */
    .dashboard {
        margin-top: 70px !important;
        padding: 15px 12px !important;
    }
    
    .welcome-section {
        padding: 25px 20px !important;
        margin-bottom: 25px !important;
        border-radius: 20px !important;
    }
    
    .welcome-section h2 {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
    }
    
    /* MENU GRID MOBILE */
    .menu-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin-bottom: 120px !important;
    }
    
    .menu-card {
        border-radius: 20px !important;
        margin: 0 2px !important;
    }
    
    .menu-image {
        height: 180px !important;
    }
    
    .menu-info {
        padding: 20px 15px !important;
    }
    
    .menu-info h4 {
        font-size: 1.1rem !important;
    }
    
    /* CART SUMMARY MOBILE */
    .cart-summary {
        padding: 15px 12px !important;
        flex-direction: column !important;
        gap: 15px !important;
        text-align: center !important;
    }
    
    .cart-info {
        order: 2;
        font-size: 1rem !important;
    }
    
    .confirm-order-btn {
        order: 1;
        width: 100% !important;
        padding: 16px !important;
        font-size: 1rem !important;
    }
    
    /* MODAL MOBILE PERFECT */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 20px !important;
        border-radius: 20px !important;
    }
    
    .modal-body {
        flex-direction: column !important;
        text-align: center !important;
        padding: 20px 15px !important;
    }
    
    .modal-image {
        width: 120px !important;
        height: 120px !important;
        margin: 0 auto 20px !important;
    }
    
    .quantity-selector {
        gap: 15px !important;
        padding: 20px 15px !important;
    }
    
    .qty-btn {
        width: 45px !important;
        height: 45px !important;
    }
    
    /* NOTIFICATIONS MOBILE */
    .success, .error, .notification {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        padding: 15px !important;
        font-size: 16px !important;
        border-radius: 15px !important;
        transform: none !important;
    }
    
    .success.show, .error.show {
        transform: translateX(0) !important;
    }
    
    /* CART DRAWER MOBILE */
    .cart-drawer {
        width: 100vw !important;
        right: -100vw !important;
    }
    
    .cart-drawer.open {
        right: 0 !important;
    }
    
    .drawer-content {
        border-radius: 0 !important;
        width: 100vw !important;
    }
    
    /* FOOTER MOBILE */
    .footer {
        padding: 25px 15px 20px !important;
        margin-top: 30px !important;
    }
    
    .footer-container {
        flex-direction: column !important;
        gap: 25px !important;
        text-align: center !important;
    }
    
    .footer-links {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* TABLET MOBILE (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container, .dashboard {
        width: 95% !important;
        padding: 20px 15px !important;
    }
    
    .menu-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    
    .menu-card {
        margin: 0 !important;
    }
    
    .cart-summary {
        padding: 20px 15px !important;
        flex-direction: row !important;
    }
    
    .header {
        padding: 15px 20px !important;
    }
}

/* SAFE AREA IPHONE (Notch Support) */
@supports(padding: max(0px)) {
    @media (max-width: 480px) {
        .header {
            padding-top: max(20px, env(safe-area-inset-top)) !important;
            padding-bottom: max(15px, env(safe-area-inset-bottom)) !important;
        }
        
        .cart-summary {
            padding-bottom: max(25px, env(safe-area-inset-bottom)) !important;
        }
    }
}

/* PREVENT ZOOM ON INPUT FOCUS */
input, select, textarea {
    font-size: 16px !important;
}

/* TOUCH FRIENDLY BUTTONS */
@media (max-width: 768px) {
    button, .btn, .login-btn, .register-btn, .header-btn, .qty-btn {
        min-height: 48px !important;
        min-width: 48px !important;
        padding: 12px 20px !important;
        border-radius: 12px !important;
    }
    
    .menu-card {
        margin-bottom: 20px !important;
    }
}

/* HIDE SCROLLBARS MOBILE */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 0px !important;
        background: transparent !important;
    }
    
    .modal-content {
        max-height: 90vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* PERFECT TEXT SIZING MOBILE */
@media (max-width: 480px) {
    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.3rem !important; }
    h4 { font-size: 1.1rem !important; }
    
    p, .menu-info p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
}

/* FIX FOR DYNAMIC VIEWPORT */
@viewport {
    width: device-width;
    zoom: 1.0;
}

/* ANDROID WEBKIT FIX */
@supports (-webkit-appearance: none) {
    @media (max-width: 480px) {
        input {
            -webkit-appearance: none !important;
        }
    }
}

/* PERFECT MODAL MOBILE */
@media (max-width: 480px) {
    .modal-overlay.active {
        padding: 20px !important;
    }
    
    .modal-footer {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .btn {
        padding: 15px !important;
    }
}

/* EMERGENCY OVERFLOW FIX */
@media (max-width: 480px) {
    .menu-grid, .welcome-section, .form-box {
        overflow: hidden !important;
        word-break: break-word !important;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
}