/* ========================================
   धनंजय मिल्क सेंटर - Admin Panel Styles
   Professional Admin Dashboard
   ======================================== */

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

/* ========================================
   CSS Variables
   ======================================== */
:root {
    /* Primary Colors */
    --primary: #FF6B35;
    --primary-light: #FF8C5A;
    --primary-dark: #E55A2B;
    
    /* Background Colors (Light Theme) */
    --bg-dark: #F3F4F6;       /* Main Background - Light Gray */
    --bg-darker: #FFFFFF;     /* Header/Sidebar - White */
    --bg-card: #FFFFFF;       /* Cards - White */
    --bg-card-hover: #F9FAFB; /* Card Hover - Very Light Gray */
    
    /* Sidebar */
    --sidebar-bg: #FFFFFF;
    --sidebar-hover: rgba(255, 107, 53, 0.1);
    --sidebar-active: rgba(255, 107, 53, 0.2);
    
    /* Status Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    --purple: #8B5CF6;
    
    /* Text Colors */
    --text-primary: #1F2937;   /* Dark Gray for main text */
    --text-secondary: #4B5563; /* Medium Gray for secondary text */
    --text-muted: #9CA3AF;     /* Light Gray for muted text */
    
    /* Border & Shadow */
    --border-color: #E5E7EB;   /* Light Border */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Noto Sans Devanagari', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    outline: none;
}

/* ========================================
   Login Page
   ======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    padding: 20px;
}

.login-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 4px solid var(--primary);
    padding: 4px;
    background: var(--bg-dark);
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.login-form label i {
    color: var(--primary);
}

.login-form input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition);
}

.login-form input:focus {
    border-color: var(--primary);
    background: var(--bg-dark);
}

.login-form input::placeholder {
    color: var(--text-muted);
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(255, 107, 53, 0.4);
}

.login-hint {
    text-align: center;
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-muted);
}

/* ========================================
   Admin Wrapper
   ======================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    transition: var(--transition);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    flex-shrink: 0;
}

.sidebar-brand h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.sidebar-brand span {
    font-size: 11px;
    color: var(--primary);
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 6px;
    position: relative;
}

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

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--primary);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--primary);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--error);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer .nav-item {
    margin-bottom: 4px;
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    flex: 1;
    margin-left: 280px;
    background: var(--bg-dark);
    min-height: 100vh;
    transition: var(--transition);
}

/* ========================================
   Top Header
   ======================================== */
.top-header {
    background: var(--bg-darker);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    display: none;
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 18px;
}

.search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

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

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 46px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.header-btn {
    position: relative;
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 18px;
    transition: var(--transition);
}

.header-btn:hover {
    background: var(--bg-card-hover);
    color: var(--primary);
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

.admin-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* ========================================
   Pages
   ======================================== */
.page {
    display: none;
    padding: 32px;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

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

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header h1 i {
    color: var(--primary);
}

.page-header p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

.add-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.3);
}

/* ========================================
   Stats Cards
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

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

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

.stat-card.green .stat-icon {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.stat-card.blue .stat-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.stat-card.purple .stat-icon {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ========================================
   Quick Actions
   ======================================== */
.quick-actions {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
}

.quick-actions h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-actions h2 i {
    color: var(--warning);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.action-btn {
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

.action-btn i {
    font-size: 28px;
}

.action-btn span {
    font-size: 13px;
    font-weight: 500;
}

/* ========================================
   Dashboard Grid
   ======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: var(--primary);
}

.card-header a {
    color: var(--primary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.card-header a:hover {
    text-decoration: underline;
}

.card-body {
    padding: 20px 24px;
}

/* Recent Order Item */
.recent-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.recent-order-item:last-child {
    border-bottom: none;
}

.order-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.order-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.order-amount {
    font-weight: 700;
    color: var(--primary);
}

/* Top Product Item */
.top-product-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.top-product-item:last-child {
    border-bottom: none;
}

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

.top-product-item h4 {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.top-product-item span {
    color: var(--text-muted);
    font-size: 13px;
}

/* Status Chart */
.status-chart {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-darker);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    flex: 1;
    min-width: 150px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.status-dot.confirmed { background: var(--info); }
.status-dot.preparing { background: var(--warning); }
.status-dot.ready { background: var(--primary); }
.status-dot.delivered { background: var(--success); }
.status-dot.cancelled { background: var(--error); }

.status-text h4 {
    font-size: 20px;
    font-weight: 700;
}

.status-text p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ========================================
   Visual Charts
   ======================================== */
.status-chart-visual {
    margin-bottom: 20px;
}

.chart-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 180px;
    padding: 20px 0;
    border-bottom: 2px solid var(--border-color);
}

.chart-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.chart-bar {
    width: 40px;
    min-height: 10px;
    border-radius: 6px 6px 0 0;
    transition: all 0.5s ease;
}

.chart-bar.confirmed { background: linear-gradient(180deg, var(--info), #2563EB); }
.chart-bar.preparing { background: linear-gradient(180deg, var(--warning), #D97706); }
.chart-bar.ready { background: linear-gradient(180deg, var(--primary), #E55A2B); }
.chart-bar.delivered { background: linear-gradient(180deg, var(--success), #16A34A); }
.chart-bar.cancelled { background: linear-gradient(180deg, var(--error), #DC2626); }

.chart-bar-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-bar-label {
    font-size: 11px;
    color: var(--text-muted);
}

.status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* Sales Chart */
.sales-chart-container {
    padding: 10px 0;
}

.sales-chart-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 160px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.sales-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.sales-bar-wrapper {
    height: 120px;
    display: flex;
    align-items: flex-end;
}

.sales-bar {
    width: 30px;
    min-height: 5px;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 4px 4px 0 0;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sales-bar:hover {
    transform: scaleY(1.05);
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.4);
}

.sales-bar-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-darker);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sales-bar:hover .sales-bar-tooltip {
    opacity: 1;
}

.sales-bar-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 10px;
}

.sales-bar-date {
    font-size: 10px;
    color: var(--text-muted);
}

/* Low Stock Alert */
.low-stock-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.low-stock-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-darker);
    padding: 12px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--warning);
}

.low-stock-item.critical {
    border-left-color: var(--error);
}

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

.low-stock-info h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.low-stock-info p {
    font-size: 12px;
    color: var(--warning);
    font-weight: 600;
}

.low-stock-item.critical .low-stock-info p {
    color: var(--error);
}

.no-alerts {
    text-align: center;
    padding: 30px;
    color: var(--success);
}

.no-alerts i {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

/* Stock Badge on Product Card */
.stock-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.stock-badge.low-stock {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.stock-badge.out-of-stock {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* ========================================
   Filters Bar
   ======================================== */
.filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

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

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

.filter-actions {
    display: flex;
    gap: 12px;
}

.date-filter, .search-input {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
}

.refresh-btn {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: var(--transition);
}

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

/* ========================================
   Data Table
   ======================================== */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

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

.data-table th,
.data-table td {
    padding: 16px 20px;
    text-align: left;
    font-size: 14px;
}

.data-table th {
    background: var(--bg-darker);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

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

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.confirmed {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.status-badge.preparing {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.status-badge.ready {
    background: rgba(255, 107, 53, 0.15);
    color: var(--primary);
}

.status-badge.delivered {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.status-badge.cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

/* Order Type Badge */
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    background: var(--bg-darker);
    color: var(--text-secondary);
}

.type-badge i {
    font-size: 12px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
}

.action-icon.view {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.action-icon.edit {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.action-icon.delete {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.action-icon.print {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
}

.action-icon:hover {
    transform: scale(1.1);
}

/* ========================================
   Products Admin Grid
   ======================================== */
.products-admin-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-admin-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

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

.product-admin-image {
    height: 160px;
    overflow: hidden;
    position: relative;
}

.product-admin-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-admin-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 6px;
}

.product-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.product-badge.bestseller {
    background: var(--error);
    color: white;
}

.product-badge.new {
    background: var(--info);
    color: white;
}

.product-admin-content {
    padding: 16px;
}

.product-admin-content h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-admin-content p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.product-admin-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.product-actions {
    display: flex;
    gap: 6px;
}

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

.empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

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

/* ========================================
   Reports
   ======================================== */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.report-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.report-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.report-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.report-header h3 i {
    color: var(--primary);
}

.report-body {
    padding: 20px 24px;
}

.report-stat {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.report-stat:last-child {
    border-bottom: none;
}

.report-stat .label {
    color: var(--text-secondary);
    font-size: 14px;
}

.report-stat .value {
    font-weight: 700;
    font-size: 16px;
}

.top-products-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.top-product-card {
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.top-product-card img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    margin-bottom: 12px;
}

.top-product-card h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.top-product-card p {
    font-size: 11px;
    color: var(--text-muted);
}

/* ========================================
   Settings
   ======================================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.settings-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.settings-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.settings-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-header h3 i {
    color: var(--primary);
}

.settings-body {
    padding: 24px;
}

.settings-body .form-group {
    margin-bottom: 20px;
}

.settings-body label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.settings-body input,
.settings-body textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.settings-body input:focus,
.settings-body textarea:focus {
    border-color: var(--primary);
}

.settings-body textarea {
    resize: none;
    height: 100px;
}

.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-darker);
    border-radius: 26px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.save-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.3);
}

.data-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.data-btn {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.data-btn.export {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.data-btn.import {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.data-btn.danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.data-btn:hover {
    transform: translateX(4px);
}

.warning-text {
    margin-top: 16px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--error);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
}

.modal-overlay.active {
    display: block;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: var(--primary);
}

.modal-close {
    background: var(--bg-darker);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--error);
    color: white;
}

.modal-body {
    padding: 24px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
    border-color: var(--primary);
}

.modal-body select option {
    background: var(--bg-darker);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkbox-row {
    display: flex;
    gap: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel {
    padding: 12px 24px;
    background: var(--bg-darker);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: var(--bg-card-hover);
}

.btn-save {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-save:hover {
    transform: translateY(-2px);
}

/* Order Modal Content */
.order-detail-section {
    margin-bottom: 24px;
}

.order-detail-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-detail-section h4 i {
    color: var(--primary);
}

.order-items-list {
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    padding: 16px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.order-item-info h5 {
    font-size: 14px;
    font-weight: 500;
}

.order-item-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.order-item-price {
    font-weight: 700;
    color: var(--primary);
}

.customer-info {
    background: var(--bg-darker);
    border-radius: var(--radius-md);
    padding: 16px;
}

.customer-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
}

.customer-info p i {
    color: var(--primary);
    width: 20px;
}

.order-total-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
}

.order-total-box h3 {
    font-size: 32px;
    font-weight: 800;
}

.order-total-box p {
    font-size: 14px;
    opacity: 0.9;
}

/* Status Action Buttons */
.status-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.status-btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.status-btn.preparing {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.status-btn.ready {
    background: rgba(255, 107, 53, 0.2);
    color: var(--primary);
}

.status-btn.delivered {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.status-btn.cancelled {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.status-btn:hover {
    transform: translateY(-2px);
}

/* ========================================
   Toast
   ======================================== */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--success);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    z-index: 5000;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
}

.toast.active {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    background: var(--error);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-admin-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .top-products-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reports-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .products-admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .top-products-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .page {
        padding: 20px;
    }
    
    .top-header {
        padding: 16px 20px;
    }
    
    .search-box {
        display: none;
    }
    
    .admin-profile .profile-info {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px 10px;
    }
    
    .products-admin-grid {
        grid-template-columns: 1fr;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .top-products-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .checkbox-row {
        flex-wrap: wrap;
    }
    
    .modal {
        width: 95%;
        max-height: 85vh;
    }
}

@media (max-width: 480px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .page-header h1 {
        font-size: 22px;
    }
    
    .status-chart {
        flex-direction: column;
    }
    
    .top-products-list {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
    }
    
    .status-actions {
        flex-direction: column;
    }
    
    .status-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   Festival & FAQ Styles
   ======================================== */
/* ========================================
   Visual Charts
   ======================================== */
.status-chart-visual {
    margin-bottom: 20px;
}

.chart-bars {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 180px;
    padding: 20px 0;
    border-bottom: 2px solid var(--border-color);
}

.chart-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.chart-bar {
    width: 40px;
    min-height: 10px;
    border-radius: 6px 6px 0 0;
    transition: all 0.5s ease;
}

.chart-bar.confirmed { background: linear-gradient(180deg, var(--info), #2563EB); }
.chart-bar.preparing { background: linear-gradient(180deg, var(--warning), #D97706); }
.chart-bar.ready { background: linear-gradient(180deg, var(--primary), #E55A2B); }
.chart-bar.delivered { background: linear-gradient(180deg, var(--success), #16A34A); }
.chart-bar.cancelled { background: linear-gradient(180deg, var(--error), #DC2626); }

.chart-bar-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-bar-label {
    font-size: 11px;
    color: var(--text-muted);
}

.status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* Sales Chart */
.sales-chart-container {
    padding: 10px 0;
}

.sales-chart-bars {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 160px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.sales-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.sales-bar-wrapper {
    height: 120px;
    display: flex;
    align-items: flex-end;
}

.sales-bar {
    width: 30px;
    min-height: 5px;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 4px 4px 0 0;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sales-bar:hover {
    transform: scaleY(1.05);
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.4);
}

.sales-bar-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-darker);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sales-bar:hover .sales-bar-tooltip {
    opacity: 1;
}

.sales-bar-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 10px;
}

.sales-bar-date {
    font-size: 10px;
    color: var(--text-muted);
}

/* Low Stock Alert */
.low-stock-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.low-stock-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-darker);
    padding: 12px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--warning);
}

.low-stock-item.critical {
    border-left-color: var(--error);
}

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

.low-stock-info h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.low-stock-info p {
    font-size: 12px;
    color: var(--warning);
    font-weight: 600;
}

.low-stock-item.critical .low-stock-info p {
    color: var(--error);
}

.no-alerts {
    text-align: center;
    padding: 30px;
    color: var(--success);
}

.no-alerts i {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

/* Stock Badge on Product Card */
.stock-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.stock-badge.low-stock {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.stock-badge.out-of-stock {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* ========================================
   Festival & FAQ Styles
   ======================================== */
.festival-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.festival-menu-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.festival-menu-card .menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.festival-menu-card h3 {
    font-size: 18px;
    color: var(--primary);
}

.festival-menu-card .menu-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--success);
    margin-top: 16px;
}

.faq-list-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.faq-answer {
    color: var(--text-secondary);
    font-size: 14px;
    padding-left: 20px;
}

/* ========================================
   Toast Notification
   ======================================== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid var(--success);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9999;
    font-weight: 500;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--success);
    font-size: 20px;
}

.toast.error {
    border-left-color: var(--error);
}

.toast.error i {
    color: var(--error);
}
