/* ============================================
   QResto - Complete Design System
   Glazey-Inspired Backend | Yumzi-Inspired Frontend
   ============================================ */

/* ============================================
   1. GLAZEY DESIGN TOKENS (Backend)
   ============================================ */
:root {
    /* Glazey Primary Colors - Orange & White */
    --glazey-orange: #FF6B35;
    --glazey-orange-light: #FF8C61;
    --glazey-orange-dark: #E65525;
    --glazey-orange-bg: #FFF4F0;
    
    /* Glazey Neutrals */
    --glazey-white: #FFFFFF;
    --glazey-bg: #F8F9FA;
    --glazey-gray-50: #FAFBFC;
    --glazey-gray-100: #F5F6F7;
    --glazey-gray-200: #E9ECEF;
    --glazey-gray-300: #DEE2E6;
    --glazey-gray-400: #CED4DA;
    --glazey-gray-500: #ADB5BD;
    --glazey-gray-600: #6C757D;
    --glazey-gray-700: #495057;
    --glazey-gray-800: #343A40;
    --glazey-gray-900: #212529;
    
    /* Glazey Accent Colors */
    --glazey-blue: #4A90E2;
    --glazey-green: #27AE60;
    --glazey-yellow: #F39C12;
    --glazey-red: #E74C3C;
    --glazey-purple: #9B59B6;
    
    /* Text Colors */
    --text-primary: #212529;
    --text-secondary: #6C757D;
    --text-muted: #ADB5BD;
    --text-white: #FFFFFF;
    
    /* Status Colors */
    --success: #27AE60;
    --success-light: #D4EDDA;
    --danger: #E74C3C;
    --danger-light: #F8D7DA;
    --warning: #F39C12;
    --warning-light: #FFF3CD;
    --info: #4A90E2;
    --info-light: #D1ECF1;
    
    /* Shadows - Glazey Style (subtle) */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.15);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 999px;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Transitions */
    --transition: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ============================================
   2. RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
    color: var(--text-primary);
    background: var(--glazey-bg);
    line-height: 1.6;
    font-size: 15px;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--glazey-orange);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--glazey-orange-dark);
}

/* ============================================
   4. GLAZEY DASHBOARD LAYOUT
   ============================================ */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--glazey-bg);
}

/* Glazey Sidebar */
.sidebar {
    width: 260px;
    background: var(--glazey-white);
    border-right: 1px solid var(--glazey-gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--glazey-gray-200);
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--glazey-orange);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md);
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.nav-item:hover {
    background: var(--glazey-gray-100);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--glazey-orange-bg);
    color: var(--glazey-orange);
}

.nav-item i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    background: var(--glazey-bg);
}

/* Glazey Header */
.dashboard-header {
    background: var(--glazey-white);
    border-bottom: 1px solid var(--glazey-gray-200);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-title h1 {
    font-size: 1.5rem;
    margin: 0;
}

.header-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Dashboard Content */
.dashboard-content {
    padding: 2rem;
}

/* ============================================
   5. GLAZEY CARDS
   ============================================ */
.card {
    background: var(--glazey-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--glazey-gray-200);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glazey-gray-200);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-body {
    color: var(--text-secondary);
}

/* Stat Cards - Glazey Style */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--glazey-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--glazey-gray-200);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

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

.stat-icon.orange { background: var(--glazey-orange-bg); color: var(--glazey-orange); }
.stat-icon.blue { background: #E3F2FD; color: var(--glazey-blue); }
.stat-icon.green { background: #E8F5E9; color: var(--glazey-green); }
.stat-icon.purple { background: #F3E5F5; color: var(--glazey-purple); }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
}

.stat-change.positive {
    background: var(--success-light);
    color: var(--success);
}

.stat-change.negative {
    background: var(--danger-light);
    color: var(--danger);
}

/* ============================================
   6. GLAZEY BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--glazey-orange);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--glazey-orange-dark);
}

.btn-secondary {
    background: var(--glazey-gray-200);
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--glazey-gray-300);
}

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

.btn-success:hover:not(:disabled) {
    background: #229954;
}

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

.btn-danger:hover:not(:disabled) {
    background: #C0392B;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glazey-orange);
    color: var(--glazey-orange);
}

.btn-outline:hover:not(:disabled) {
    background: var(--glazey-orange-bg);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* ============================================
   7. GLAZEY FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid var(--glazey-gray-300);
    border-radius: var(--radius-md);
    background: var(--glazey-white);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--glazey-orange);
    box-shadow: 0 0 0 3px var(--glazey-orange-bg);
}

.form-control:disabled {
    background: var(--glazey-gray-100);
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    cursor: pointer;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ============================================
   8. GLAZEY TABLES
   ============================================ */
.table-container {
    background: var(--glazey-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--glazey-gray-200);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: var(--glazey-gray-50);
}

.table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--glazey-gray-200);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--glazey-gray-100);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background: var(--glazey-gray-50);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   9. BADGES & LABELS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    line-height: 1;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-primary {
    background: var(--glazey-orange-bg);
    color: var(--glazey-orange);
}

/* ============================================
   10. MODALS - Glazey Style
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--glazey-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glazey-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--glazey-gray-100);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--glazey-gray-200);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* ============================================
   11. ALERTS & TOASTS
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: var(--danger-light);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: var(--info-light);
    color: var(--info);
    border-left: 4px solid var(--info);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--glazey-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.25rem;
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--glazey-orange);
}

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

/* ============================================
   12. YUMZI FRONTEND STYLES
   ============================================ */

/* Landing Page - Yumzi Style */
.landing-page {
    background: var(--glazey-white);
}

.landing-header {
    background: var(--glazey-white);
    border-bottom: 1px solid var(--glazey-gray-200);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.landing-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--glazey-orange);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--glazey-orange);
}

/* Hero Section - Yumzi Style */
.hero {
    padding: 5rem 2rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features Section */
.features {
    padding: 4rem 2rem;
    background: var(--glazey-gray-50);
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--glazey-white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--glazey-orange-bg);
    color: var(--glazey-orange);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Public Menu - Yumzi Style */
.menu-page {
    min-height: 100vh;
    background: var(--glazey-bg);
}

.menu-header {
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
}

.menu-header h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.menu-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
}

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.menu-filters {
    background: var(--glazey-white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 1rem;
    z-index: 50;
}

.search-box {
    margin-bottom: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--glazey-gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.filter-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--glazey-gray-300);
    background: var(--glazey-white);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--glazey-orange);
    color: var(--glazey-orange);
}

.filter-btn.active {
    background: var(--glazey-orange);
    color: white;
    border-color: var(--glazey-orange);
}

.category-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
}

.category-tab {
    padding: 0.75rem 1.5rem;
    background: var(--glazey-white);
    border-radius: var(--radius-full);
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.category-tab:hover {
    background: var(--glazey-orange-bg);
}

.category-tab.active {
    background: var(--glazey-orange);
    color: white;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.menu-item-card {
    background: var(--glazey-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.menu-item-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.menu-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--glazey-gray-100);
}

.menu-item-content {
    padding: 1.25rem;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.75rem;
}

.menu-item-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.menu-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--glazey-orange);
    white-space: nowrap;
}

.menu-item-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.menu-item-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ============================================
   13. UTILITIES
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.w-100 { width: 100%; }

/* ============================================
   14. RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .dashboard-content {
        padding: 1rem;
    }
    
    .stat-cards {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .menu-items {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   15. LOADING & EMPTY STATES
   ============================================ */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
}
