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

:root {
    --primary: #e74c3c;
    --primary-dark: #c0392b;
    --secondary: #2c3e50;
    --accent: #f39c12;
    --success: #27ae60;
    --info: #3498db;
    --warning: #f1c40f;
    --danger: #e74c3c;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --body-bg: #f0f2f5;
    --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
    --card-radius: 16px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--body-bg);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 260px;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    z-index: 1040;
    transition: var(--transition);
    overflow-y: auto;
    padding-top: 70px;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
    border-radius: 10px;
    margin: 2px 10px;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background: rgba(231, 76, 60, 0.2);
}

.sidebar .nav-link i { width: 22px; margin-right: 10px; }

.sidebar .nav-section {
    color: rgba(255,255,255,0.35);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 20px 20px 8px;
    font-weight: 600;
}

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: var(--transition);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 12px 24px;
}

.topbar .brand { font-weight: 700; font-size: 20px; color: var(--primary); text-decoration: none; }

.page-content { padding: 24px; }

.card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.12); }

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 16px 20px;
    font-weight: 600;
}

.stat-card {
    border-radius: var(--card-radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.stat-card .stat-value { font-size: 28px; font-weight: 800; line-height: 1.2; }

.stat-card .stat-label { font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 500; }

.btn { border-radius: 10px; padding: 10px 20px; font-weight: 600; font-size: 14px; transition: var(--transition); }

.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(231,76,60,0.3); }

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

.btn-sm { padding: 6px 14px; font-size: 13px; }

.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid #e0e0e0;
    padding: 10px 16px;
    font-size: 14px;
    transition: var(--transition);
}

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

.form-label { font-weight: 500; font-size: 13px; color: #555; margin-bottom: 6px; }

.table { font-size: 14px; }
.table th { font-weight: 600; color: #555; border-top: none; }
.table td { vertical-align: middle; }

.badge { font-weight: 500; padding: 6px 12px; border-radius: 8px; font-size: 12px; }

.alert { border-radius: 12px; border: none; }

.modal-content { border: none; border-radius: 16px; }
.modal-header { border-bottom: 1px solid rgba(0,0,0,0.05); }
.modal-footer { border-top: 1px solid rgba(0,0,0,0.05); }

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    background: #fff;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-card .auth-logo { text-align: center; margin-bottom: 32px; }
.auth-card .auth-logo h1 { font-size: 28px; font-weight: 800; color: var(--primary); }
.auth-card .auth-logo p { color: #888; font-size: 14px; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }

.page-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.page-subtitle { font-size: 14px; color: #888; }

/* Customer Menu Styles */
.customer-menu-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 60px 20px 40px;
    text-align: center;
}

.customer-menu-header h1 { font-size: 32px; font-weight: 800; }
.customer-menu-header .restaurant-name { font-size: 18px; opacity: 0.8; }

.menu-item-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

.menu-item-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

.menu-item-card .item-image {
    height: 160px;
    object-fit: cover;
    width: 100%;
}

.menu-item-card .item-price { font-size: 18px; font-weight: 700; color: var(--primary); }
.menu-item-card .item-name { font-weight: 600; font-size: 15px; }
.menu-item-card .item-desc { font-size: 13px; color: #888; }

.veg-badge {
    background: #27ae60;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.nonveg-badge {
    background: #e74c3c;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.category-pill {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 24px;
    background: #f0f0f0;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    margin: 4px;
}

.category-pill.active, .category-pill:hover {
    background: var(--primary);
    color: #fff;
}

.cart-floating {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    background: var(--primary);
    color: #fff;
    border-radius: 50px;
    padding: 14px 28px;
    box-shadow: 0 4px 20px rgba(231,76,60,0.4);
    display: none;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 15px;
}

.cart-floating.show { display: flex; }
.cart-floating .cart-count {
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.kitchen-order-card {
    border: none;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.kitchen-order-card.pending { border-left-color: var(--warning); }
.kitchen-order-card.accepted { border-left-color: var(--info); }
.kitchen-order-card.preparing { border-left-color: var(--primary); }

.kitchen-order-card .order-timer {
    font-size: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.kitchen-order-card .table-badge {
    background: var(--secondary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
}

.kitchen-order-card .item-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}

/* Mobile touch targets */
.btn, .nav-link, .category-pill, .sidebar .nav-link {
    min-height: 44px;
}
.btn-sm { min-height: 36px; }

/* Responsive typography */
@media (max-width: 576px) {
    .page-title { font-size: 20px; }
    .page-subtitle { font-size: 13px; }
    .card-header { padding: 12px 16px; }
    .table { font-size: 13px; }
    .btn { font-size: 13px; padding: 8px 16px; }
    .form-control, .form-select { font-size: 16px; } /* prevent iOS zoom */
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .sidebar.show { transform: translateX(0); }

    .main-content { margin-left: 0; }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1035;
        display: none;
    }
    .sidebar-overlay.show { display: block; }

    .topbar { padding: 10px 16px; }
    .page-content { padding: 16px; }
    .auth-card { padding: 24px; margin: 10px; }
    .stat-card .stat-value { font-size: 22px; }
    .customer-menu-header { padding: 40px 16px 30px; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up { animation: slideUp 0.4s ease; }

/* Kitchen alert sound animation */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.new-order-pulse { animation: pulse 1s ease infinite; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #999; }

@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-content { margin-left: 0; }
}
