/* =============================================
   Restaurant Management System - Modern UI Styles
   ============================================= */

:root {
    --primary-color: #667eea;
    --primary-dark: #5a6fd8;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --top-navbar-height: 70px;
}

/* =============================================
   Base Styles
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* =============================================
   App Container
   ============================================= */

.app-container {
    display: flex;
    min-height: 100vh;
}

/* =============================================
   Sidebar Styles
   ============================================= */

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar-brand i {
    font-size: 2rem;
    margin-right: 10px;
}

.brand-text {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .brand-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* =============================================
   Sidebar Menu
   ============================================= */

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.menu-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.menu-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.menu-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: white;
}

.menu-link i {
    font-size: 1.2rem;
    width: 25px;
    text-align: center;
    margin-right: 15px;
}

.menu-text {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .menu-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.menu-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.menu-toggle[aria-expanded="true"] .menu-arrow {
    transform: rotate(180deg);
}

/* =============================================
   Submenu
   ============================================= */

.submenu {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.submenu-link {
    display: block;
    padding: 10px 25px 10px 60px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.submenu-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

/* =============================================
   Main Content
   ============================================= */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* =============================================
   Top Navigation Bar
   ============================================= */

.top-navbar {
    height: var(--top-navbar-height);
    background: white;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.page-title {
    margin: 0;
    color: #333;
    font-weight: 600;
    margin-left: 20px;
}

.navbar-right {
    display: flex;
    align-items: center;
}

.user-menu .dropdown-toggle {
    border: 1px solid #e1e5e9;
    padding: 8px 15px;
    border-radius: 25px;
    background: white;
    color: #333;
    font-size: 0.9rem;
}

.user-menu .dropdown-toggle:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
}

/* =============================================
   Page Content
   ============================================= */

.page-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* =============================================
   Dashboard Styles
   ============================================= */

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
}

/* =============================================
   Dashboard Cards
   ============================================= */

.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    height: 100%;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.5rem;
    color: white;
}

.orders-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tables-icon {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.kitchen-icon {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.revenue-icon {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}

.card-content {
    flex: 1;
}

.card-number {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1;
}

.card-label {
    font-size: 0.9rem;
    color: #666;
    margin: 5px 0 0 0;
}

/* =============================================
   Dashboard Sections
   ============================================= */

.dashboard-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    height: 100%;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* =============================================
   Quick Actions
   ============================================= */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 1px solid #e1e5e9;
}

.quick-action-btn:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.quick-action-btn i {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.quick-action-btn span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* =============================================
   Recent Orders
   ============================================= */

.recent-orders {
    max-height: 300px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item:last-child {
    border-bottom: none;
}

.order-info {
    display: flex;
    flex-direction: column;
}

.order-number {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.order-status {
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    margin-top: 5px;
    display: inline-block;
    width: fit-content;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-preparing {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-ready {
    background-color: #d4edda;
    color: #155724;
}

.status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
}

.order-details {
    text-align: right;
}

.order-amount {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.order-time {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

/* =============================================
   Responsive Design
   ============================================= */

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .page-content {
        padding: 20px;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .quick-actions {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 575.98px) {
    .top-navbar {
        padding: 0 15px;
    }
    
    .page-content {
        padding: 15px;
    }
    
    .dashboard-card {
        padding: 20px;
    }
    
    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-right: 15px;
    }
    
    .card-number {
        font-size: 1.5rem;
    }
}

/* =============================================
   Utility Classes
   ============================================= */

.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* =============================================
   Loading States
   ============================================= */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* =============================================
   Custom Scrollbar
   ============================================= */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
