/* ============================================
   2CUP KIOSK - COMPLETE STYLESHEET
   ============================================ */

/* ============================================
   CSS VARIABLES & ROOT CONFIGURATION
   ============================================ */
:root {
    /* Brand Colors */
    --navy-blue: #1C3553;
    --navy-dark: #142640;
    --navy-light: #2a4a6d;
    --beige: #F1EACB;
    --beige-light: #FFF8DC;
    --beige-dark: #e5ddb8;
    
    /* Semantic Colors */
    --primary: var(--navy-blue);
    --secondary: var(--beige);
    --background: var(--beige-light);
    --surface: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;
    --text-on-primary: #ffffff;
    
    /* Status Colors */
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Poppins', -apple-system, sans-serif;
    --font-arabic: 'Noto Kufi Arabic', sans-serif;
    
    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 1000;
    --z-toast: 1100;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.mt-2 { margin-top: var(--space-md); }
.mb-2 { margin-bottom: var(--space-md); }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* ============================================
   SEASONAL PATTERN OVERLAYS
   ============================================ */
/* .seasonal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-slow);
} */

/* Ramadan Pattern
.pattern-ramadan .seasonal-overlay {
    opacity: 1;
    background: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 5C25 5 20 15 20 25C20 35 30 45 30 45C30 45 40 35 40 25C40 15 35 5 30 5Z' fill='%231C3553' fill-opacity='0.03'/%3E%3Ccircle cx='30' cy='55' r='3' fill='%231C3553' fill-opacity='0.05'/%3E%3C/svg%3E"),
        linear-gradient(135deg, rgba(255, 215, 0, 0.02) 0%, transparent 50%);
    background-size: 60px 60px, 100% 100%;
}

.pattern-ramadan::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        var(--navy-blue) 0%, 
        #C9A227 25%, 
        var(--navy-blue) 50%, 
        #C9A227 75%, 
        var(--navy-blue) 100%);
    z-index: 9999;
} */

/* National Day Pattern */
/* .pattern-national .seasonal-overlay {
    opacity: 1;
    background: 
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 10L45 25H60L48 35L53 50L40 40L27 50L32 35L20 25H35L40 10Z' fill='%23006C35' fill-opacity='0.04'/%3E%3C/svg%3E"),
        linear-gradient(45deg, rgba(0, 108, 53, 0.02) 0%, transparent 100%);
    background-size: 80px 80px, 100% 100%;
} */

/* .pattern-national::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #006C35 0%, #006C35 100%);
    z-index: 9999;
}

.pattern-national::after {
    content: '🇸🇦';
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    z-index: 9999;
    animation: pulse 2s ease-in-out infinite;
}

/* Eid Pattern */
/* .pattern-eid .seasonal-overlay {
    opacity: 1;
    background: 
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='2' fill='%23FFD700' fill-opacity='0.1'/%3E%3Ccircle cx='25' cy='25' r='1.5' fill='%231C3553' fill-opacity='0.05'/%3E%3Ccircle cx='75' cy='75' r='1.5' fill='%231C3553' fill-opacity='0.05'/%3E%3C/svg%3E"),
        linear-gradient(180deg, rgba(255, 215, 0, 0.03) 0%, transparent 30%);
    background-size: 100px 100px, 100% 100%;
}

.pattern-eid::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #FFD700 0%, 
        var(--navy-blue) 50%, 
        #FFD700 100%);
    z-index: 9999;
}  */

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ============================================
   CUSTOMER MENU - KIOSK CONTAINER
   ============================================ */
.kiosk-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ============================================
   CUSTOMER MENU - HEADER
   ============================================ */
.kiosk-header {
    background: linear-gradient(135deg, var(--navy-blue) 0%, var(--navy-dark) 100%);
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-lg);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-text h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--beige);
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 0.85rem;
    color: var(--beige);
    opacity: 0.8;
    letter-spacing: 1px;
}

.header-decoration {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.current-time {
    font-size: 1.25rem;
    color: var(--beige);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
}

/* ============================================
   CUSTOMER MENU - CATEGORY NAVIGATION
   ============================================ */
.category-nav {
    background: var(--surface);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    z-index: var(--z-sticky);
    box-shadow: var(--shadow-sm);
}

.category-tabs {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--beige);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.category-tab:hover {
    background: var(--beige-dark);
    transform: translateY(-2px);
}

.category-tab.active {
    background: var(--navy-blue);
    color: var(--text-on-primary);
    border-color: var(--navy-dark);
    box-shadow: var(--shadow-md);
}

.category-tab .tab-icon {
    font-size: 1.2rem;
}

.loading-placeholder {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    color: var(--text-secondary);
}

/* ============================================
   CUSTOMER MENU - MENU CONTENT
   ============================================ */
.menu-content {
    flex: 1;
    padding: var(--space-xl);
    background: var(--background);
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

/* Menu Item Card */
.menu-item {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.menu-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.menu-item.unavailable {
    opacity: 0.6;
    filter: grayscale(50%);
}

.item-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--beige) 0%, var(--beige-dark) 100%);
}

.item-image-placeholder {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--beige) 0%, var(--beige-dark) 100%);
    font-size: 4rem;
    color: var(--navy-blue);
    opacity: 0.5;
}

.item-content {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.item-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy-blue);
    line-height: 1.3;
}

.item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy-blue);
    background: var(--beige);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.item-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}

.item-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    margin-top: var(--space-sm);
}

/* Loading State */
.menu-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    gap: var(--space-lg);
}

/* Coffee cup loader */
.coffee-loader {
    position: relative;
    width: 60px;
    height: 60px;
}

.cup {
    width: 50px;
    height: 40px;
    background: var(--navy-blue);
    border-radius: 0 0 25px 25px;
    position: relative;
    margin: 20px auto 0;
}

.cup::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 5px;
    width: 15px;
    height: 25px;
    border: 4px solid var(--navy-blue);
    border-left: none;
    border-radius: 0 10px 10px 0;
}

.steam {
    position: absolute;
    top: -20px;
    left: 50%;
    width: 8px;
    height: 20px;
    background: var(--beige-dark);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: steam 1.5s ease-in-out infinite;
    opacity: 0;
}

.steam-2 {
    left: 35%;
    animation-delay: 0.3s;
}

.steam-3 {
    left: 65%;
    animation-delay: 0.6s;
}

@keyframes steam {
    0% {
        transform: translateX(-50%) translateY(0) scale(1);
        opacity: 0;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translateX(-50%) translateY(-15px) scale(1.5);
        opacity: 0;
    }
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

/* ============================================
   CUSTOMER MENU - FOOTER
   ============================================ */
.kiosk-footer {
    background: var(--navy-blue);
    padding: var(--space-lg) var(--space-xl);
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.wifi-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--beige);
    font-size: 0.95rem;
}

.wifi-icon {
    font-size: 1.2rem;
}

.footer-tagline {
    color: var(--beige);
    opacity: 0.8;
    font-size: 0.9rem;
}

/* ============================================
   LOADER ANIMATIONS
   ============================================ */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid var(--beige-dark);
    border-top-color: var(--navy-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   ADMIN PANEL - AUTHENTICATION
   ============================================ */
.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy-blue) 0%, var(--navy-dark) 100%);
    padding: var(--space-lg);
}

.auth-container {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-header .logo {
    justify-content: center;
    margin-bottom: var(--space-md);
}

.auth-header .logo h1 {
    color: var(--navy-blue);
}

.auth-title {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.phone-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--background);
    border: 2px solid var(--beige-dark);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.phone-input-wrapper:focus-within {
    border-color: var(--navy-blue);
}

.country-code {
    padding: var(--space-md);
    background: var(--beige);
    font-weight: 600;
    color: var(--navy-blue);
}

.phone-input-wrapper input {
    flex: 1;
    padding: var(--space-md);
    border: none;
    background: transparent;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.phone-input-wrapper input:focus {
    outline: none;
}

.otp-input {
    width: 100%;
    padding: var(--space-lg);
    font-size: 1.5rem;
    letter-spacing: 8px;
    text-align: center;
    border: 2px solid var(--beige-dark);
    border-radius: var(--radius-md);
    background: var(--background);
    transition: border-color var(--transition-fast);
}

.otp-input:focus {
    outline: none;
    border-color: var(--navy-blue);
}

.input-hint {
    display: block;
    margin-top: var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-light);
}

#recaptcha-container {
    margin: var(--space-lg) 0;
    display: flex;
    justify-content: center;
}

.auth-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-top: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.error-text {
    color: var(--danger);
    font-size: 0.9rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--navy-blue);
    color: var(--text-on-primary);
}

.btn-primary:hover {
    background: var(--navy-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--beige);
    color: var(--navy-blue);
}

.btn-secondary:hover {
    background: var(--beige-dark);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
    background: var(--beige);
    color: var(--navy-blue);
    font-size: 1.1rem;
}

.btn-icon:hover {
    background: var(--beige-dark);
}

.btn-full {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.85rem;
}

.btn-loader {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ============================================
   ADMIN PANEL - DASHBOARD LAYOUT
   ============================================ */
.admin-dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background);
}

.admin-header {
    background: var(--navy-blue);
    padding: var(--space-md) var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--beige);
}

.admin-logo h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
}

.admin-actions {
    display: flex;
    gap: var(--space-sm);
}

.admin-actions .btn-icon {
    background: rgba(255, 255, 255, 0.1);
    color: var(--beige);
}

.admin-actions .btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.admin-actions .btn-danger {
    background: rgba(220, 53, 69, 0.8);
}

.dashboard-content {
    display: flex;
    flex: 1;
}

/* ============================================
   ADMIN PANEL - SIDEBAR
   ============================================ */
.admin-sidebar {
    width: 260px;
    background: var(--surface);
    border-right: 1px solid var(--beige-dark);
    padding: var(--space-lg);
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: transparent;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-align: left;
    width: 100%;
}

.nav-item:hover {
    background: var(--beige);
    color: var(--navy-blue);
}

.nav-item.active {
    background: var(--navy-blue);
    color: var(--text-on-primary);
}

.nav-icon {
    font-size: 1.2rem;
}

/* ============================================
   ADMIN PANEL - MAIN CONTENT
   ============================================ */
.admin-main {
    flex: 1;
    padding: var(--space-xl);
    overflow-y: auto;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--navy-blue);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input {
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--beige-dark);
    border-radius: var(--radius-md);
    background: var(--surface);
    min-width: 200px;
}

.filter-bar select:focus,
.filter-bar input:focus {
    outline: none;
    border-color: var(--navy-blue);
}

/* ============================================
   ADMIN PANEL - TABLES
   ============================================ */
.table-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--beige-dark);
}

.admin-table th {
    background: var(--beige);
    font-weight: 600;
    color: var(--navy-blue);
    font-size: 0.9rem;
}

.admin-table tbody tr:hover {
    background: var(--beige-light);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.table-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-md);
    background: var(--beige);
}

.table-image-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--beige);
    border-radius: var(--radius-md);
    font-size: 1.5rem;
}

.status-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
}

.status-available {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.status-unavailable {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.table-actions {
    display: flex;
    gap: var(--space-sm);
}

/* ============================================
   ADMIN PANEL - CATEGORIES GRID
   ============================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.category-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all var(--transition-normal);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.category-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--navy-blue);
    margin-bottom: var(--space-xs);
}

.category-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.category-actions {
    display: flex;
    gap: var(--space-sm);
}

/* ============================================
   ADMIN PANEL - SETTINGS
   ============================================ */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-xl);
}

.settings-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.settings-card h3 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.2rem;
    color: var(--navy-blue);
    margin-bottom: var(--space-md);
}

.settings-icon {
    font-size: 1.4rem;
}

.settings-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
    line-height: 1.6;
}

/* Theme Options */
.theme-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
}

.theme-option {
    cursor: pointer;
}

.theme-option input {
    display: none;
}

.theme-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    border-radius: var(--radius-md);
    border: 3px solid transparent;
    transition: all var(--transition-fast);
}

.theme-option input:checked + .theme-preview {
    border-color: var(--navy-blue);
    box-shadow: var(--shadow-md);
}

.theme-name {
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
}

.theme-none {
    background: var(--beige);
    color: var(--navy-blue);
}

.theme-ramadan-preview {
    background: linear-gradient(135deg, #1C3553 0%, #2a4a6d 50%, #C9A227 100%);
    color: white;
}

.theme-national-preview {
    background: linear-gradient(135deg, #006C35 0%, #006C35 100%);
    color: white;
}

.theme-eid-preview {
    background: linear-gradient(135deg, #FFD700 0%, var(--navy-blue) 100%);
    color: white;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--beige-dark);
    border-radius: var(--radius-md);
    background: var(--background);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--navy-blue);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.image-preview {
    margin-top: var(--space-sm);
    width: 100%; /* غيرنا العرض ليأخذ مساحة أكبر */
    max-width: 400px;
    height: 300px; /* عطيناه ارتفاع ثابت عشان أداة القص تشتغل فيه */
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #f8f9fa;
    border: 2px dashed var(--beige-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    display: block; /* ضروري لأداة Cropper */
}

/* تنسيقات إضافية عشان شكل أداة القص تطلع فخمة */
.cropper-view-box,
.cropper-face {
    border-radius: 8px; /* يخلي مربع القص حوافه ناعمة */
}

/* Icon Picker */
.icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--background);
    border-radius: var(--radius-md);
    border: 2px solid var(--beige-dark);
}

.icon-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--surface);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--beige);
}

.icon-btn.selected {
    border-color: var(--navy-blue);
    background: var(--beige);
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-modal);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

.modal-sm {
    max-width: 420px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--beige-dark);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--navy-blue);
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--beige);
    color: var(--text-primary);
}

.modal-content form {
    padding: var(--space-lg);
}

.modal-body {
    padding: var(--space-lg);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--beige-dark);
    margin-top: var(--space-md);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    padding: var(--space-md) var(--space-lg);
    background: var(--navy-blue);
    color: var(--text-on-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-toast);
    transform: translateY(100px);
    opacity: 0;
    transition: all var(--transition-normal);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets and smaller desktops */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 200px;
    }
    
    .nav-text {
        font-size: 0.85rem;
    }
    
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablets in portrait */
@media (max-width: 768px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }
    
    /* Customer Menu */
    .kiosk-header {
        padding: var(--space-md);
    }
    
    .logo-text h1 {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    
    
    .category-tabs {
        padding: var(--space-sm) var(--space-md);
    }
    
    .category-tab {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9rem;
    }
    
    .menu-content {
        padding: var(--space-md);
    }
    
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: var(--space-md);
    }
    
    .item-image,
    .item-image-placeholder {
        height: 150px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    /* Admin Panel */
    .dashboard-content {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--beige-dark);
        padding: var(--space-md);
    }
    
    .admin-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: var(--space-sm);
    }
    
    .nav-item {
        flex-direction: column;
        padding: var(--space-sm);
        min-width: 100px;
        text-align: center;
    }
    
    .nav-text {
        font-size: 0.75rem;
    }
    
    .admin-main {
        padding: var(--space-md);
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .filter-bar select,
    .filter-bar input {
        min-width: 100%;
    }
    
    .admin-table {
        font-size: 0.85rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: var(--space-sm);
    }
    
    .table-image,
    .table-image-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .theme-options {
        grid-template-columns: 1fr;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .kiosk-header {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .header-decoration {
        width: 100%;
        justify-content: center;
    }
    
    
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
    
    .item-content {
        padding: var(--space-md);
    }
    
    .item-name {
        font-size: 1.1rem;
    }
    
    /* Admin */
    .admin-header {
        padding: var(--space-md);
    }
    
    .admin-logo h1 {
        font-size: 1.2rem;
    }
    
    .auth-container {
        padding: var(--space-lg);
    }
    
    .modal-content {
        margin: var(--space-md);
        max-height: calc(100vh - 2rem);
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    /* Hide some table columns on mobile */
    .admin-table th:nth-child(3),
    .admin-table td:nth-child(3) {
        display: none;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .kiosk-container {
        max-width: 1600px;
    }
    
    .menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
    
    .item-image,
    .item-image-placeholder {
        height: 200px;
    }
}

/* Print styles */
@media print {
    .kiosk-header,
    .category-nav,
    .kiosk-footer,
    .admin-header,
    .admin-sidebar {
        display: none;
    }
    
    .menu-content,
    .admin-main {
        padding: 0;
    }
    
    .menu-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   SPLASH SCREEN & ANIMATIONS
   ============================================ */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--navy-blue) 0%, var(--navy-dark) 100%);
    z-index: 9999; /* عشان يغطي على كل شي */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

/* كلاس الاختفاء السلس */
.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    padding: var(--space-2xl);
    animation: slideUpFade 1s ease-out forwards;
}

.splash-logo {
    width: 160px;
    height: 160px;
    border-radius: 20px;
    margin: 0 auto var(--space-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    /* أنيميشن النبض الهادي */
    animation: pulseLogo 3s infinite ease-in-out;
}

.splash-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    color: var(--beige);
    margin-bottom: 5px;
    letter-spacing: 4px;
}

.splash-subtitle {
    color: var(--beige);
    opacity: 0.7;
    font-size: 1.2rem;
    margin-bottom: var(--space-2xl);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.splash-btn {
    background: var(--beige);
    color: var(--navy-blue);
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 600;
    padding: 16px 45px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(241, 234, 203, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto var(--space-2xl);
    /* أنيميشن الزر العائم */
    animation: floatBtn 3s infinite ease-in-out;
}

.splash-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(241, 234, 203, 0.4);
    background: #fff;
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.splash-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.splash-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.social-link {
    color: var(--beige);
    text-decoration: none;
    font-size: 1rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
}

.social-link:hover {
    opacity: 1;
    text-decoration: underline;
}

.dot-separator {
    color: var(--beige);
    opacity: 0.5;
}

/* Keyframes - الحركات */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseLogo {
    0% { transform: scale(1); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
    50% { transform: scale(1.03); box-shadow: 0 15px 40px rgba(0,0,0,0.5); }
    100% { transform: scale(1); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
}

@keyframes floatBtn {
    0% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}

/* ============================================
   APPLE-STYLE SETTINGS & LIVE PREVIEW
   ============================================ */
.apple-settings-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-xl);
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
}

.live-preview-box {
    background: linear-gradient(135deg, var(--navy-blue) 0%, var(--navy-dark) 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
    border: 4px solid var(--beige-dark);
}

.preview-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,255,255,0.2);
    color: var(--beige);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    backdrop-filter: blur(5px);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.preview-header img {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.preview-text h1 {
    font-family: var(--font-display);
    color: var(--beige);
    font-size: 1.8rem;
    line-height: 1;
}

.preview-text p {
    color: var(--beige);
    opacity: 0.8;
    font-size: 0.9rem;
}

.preview-footer {
    text-align: center;
    color: var(--beige);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-md);
    font-size: 0.85rem;
}

.upload-area input[type="file"] {
    padding: 10px;
    background: var(--background);
    border: 2px dashed var(--navy-blue);
    border-radius: var(--radius-md);
    width: 100%;
    cursor: pointer;
}

@media (max-width: 768px) {
    .apple-settings-container {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   NEW MENU GRID (2x2) & TALL CARDS
   ============================================ */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* عمودين في الجوال */
    gap: 12px;
    padding: 10px;
}

.menu-item {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
    cursor: pointer; /* يوضح للزبون إنه يقدر يضغط */
    height: 100%;
}

.menu-item:active {
    transform: scale(0.97); /* حركة ضغطة خفيفة */
}

.item-image {
    width: 100%;
    height: 180px; /* طول الصورة في الكرت المربع */
    object-fit: cover;
    object-position: center; /* تتوسط تلقائياً */
}

.item-content {
    padding: 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-name {
    font-size: 0.95rem;
    margin-bottom: 5px;
    line-height: 1.3;
    /* إخفاء النص الطويل في الكرت */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-price {
    font-size: 1rem;
    font-weight: 700;
}

.item-description {
    display: none; /* نخفي الوصف من الكرت الصغير عشان الزحمة، ونخليه في الـ Popup */
}

/* الشاشات الكبيرة (لابتوب/ايباد) */
@media (min-width: 768px) {
    .menu-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
    .item-image { height: 220px; }
}
@media (min-width: 1024px) {
    .menu-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================
   CUSTOMER ITEM DETAILS POPUP (MODAL) - PREMIUM UI
   ============================================ */
.customer-modal {
    align-items: flex-end; /* يخلي البطاقة تطلع من تحت في الشاشات الصغيرة */
    padding: 0;
}

@media (min-width: 768px) {
    .customer-modal {
        align-items: center; /* يتوسط في الشاشات الكبيرة */
        padding: var(--space-lg);
    }
}

.customer-modal .modal-content {
    border-radius: 28px 28px 0 0;
    padding: 0;
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    background: var(--surface);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
    .customer-modal .modal-content {
        border-radius: 24px;
        box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    }
}

.modal-img-wrapper {
    width: 100%;
    height: 320px;
    position: relative;
    background: linear-gradient(135deg, var(--beige) 0%, var(--beige-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.customer-modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* يغطي المساحة بشكل أنيق */
}

/* زر إغلاق دائري فوق الصورة */
.customer-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: var(--navy-blue);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform var(--transition-fast);
}

.customer-modal-close:active {
    transform: scale(0.9);
}

.customer-modal-body {
    padding: 24px 24px 32px 24px;
    text-align: center;
}

.customer-modal-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--navy-blue);
    margin-bottom: 8px;
    font-weight: 700;
}

.customer-modal-price {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--navy-blue);
    background: var(--beige);
    display: inline-block;
    padding: 6px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.customer-modal-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* زر "العودة للقائمة" أنيق أسفل البطاقة */
.back-to-menu-btn {
    width: 100%;
    padding: 14px;
    background: var(--navy-blue);
    color: white;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.back-to-menu-btn:hover {
    background: var(--navy-dark);
}

/* تنسيق عبارة الترحيب داخل شاشة المعاينة الحية */
.preview-greeting-box {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(241, 234, 203, 0.4);
    padding: 6px 15px;
    border-radius: 20px;
    margin: 30px auto 0;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    align-self: center;
}

#preview-greeting-text {
    color: var(--beige);
    font-size: 0.9rem;
    font-weight: 600;
}

/* ============================================
   SMART SEARCH BAR
   ============================================ */
.search-container {
    position: relative;
    width: 220px;
}
.search-container input {
    width: 100%;
    padding: 10px 15px 10px 35px;
    border-radius: 25px;
    border: 1px solid rgba(241, 234, 203, 0.4);
    background: rgba(255, 255, 255, 0.1);
    color: var(--beige);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}
.search-container input::placeholder {
    color: rgba(241, 234, 203, 0.6);
}
.search-container input:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--beige);
    box-shadow: 0 0 15px rgba(241, 234, 203, 0.2);
}
.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.8;
}

/* ============================================
   SPLASH GREETING BADGE (GLASSMORPHISM)
   ============================================ */
.splash-greeting-box {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(241, 234, 203, 0.3);
    padding: 8px 25px;
    border-radius: 30px;
    margin: 0 auto var(--space-lg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: floatGreeting 3s infinite ease-in-out;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
#splash-greeting-text {
    color: var(--beige);
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 1px;
}
@keyframes floatGreeting {
    0%, 100% { transform: translateY(0); box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
    50% { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(241,234,203,0.3); }
}

/* ============================================
   تعديلات حمدان (الأسعار + الأقسام + التنقل)
   ============================================ */

/* 1. تصغير السعر وإعطاء مساحة أكبر لاسم الطبق */
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.item-name {
    font-size: 0.9rem;
    line-height: 1.4;
    flex: 1; /* عشان الاسم ياخذ كل المساحة المتاحة */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* يسمح للاسم ينزل سطرين إذا كان طويل */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.item-price {
    font-size: 0.85rem !important; /* تصغير الخط */
    padding: 3px 8px !important; /* تصغير المربع اللي حول السعر */
    border-radius: 8px;
    white-space: nowrap; /* يمنع السعر ينقص أو ينزل سطر جديد */
    background: var(--beige);
    color: var(--navy-blue);
    font-weight: 700;
}

/* 2. تنسيق صور الأقسام (التابات) */
.category-tab {
    padding: 6px 16px 6px 6px !important; /* تقليل المساحة من جهة الصورة */
    gap: 10px;
}

.category-tab-img {
    width: 36px;
    height: 36px;
    border-radius: 50%; /* يخلي صورة القسم دائرية */
    object-fit: cover;
    background: var(--surface);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 3. حركة تنقل سريعة وناعمة لشبكة المنيو */
#menu-grid {
    transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
}

/* ============================================
   أنيميشن وإخفاء المنتجات (التنقل السريع)
   ============================================ */
.menu-item {
    /* أنيميشن دخول فخم وناعم للمنتجات */
    animation: fadeInScale 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.1) forwards;
}

/* هذا الكلاس اللي بيخفي المنتجات بدل مسحها من الكود */
.menu-item.hidden-item {
    display: none !important;
}

@keyframes fadeInScale {
    0% { 
        opacity: 0; 
        transform: scale(0.9) translateY(15px); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

/* ============================================
   نظام التمرير (Scroll Spy) وتنسيق الأقسام
   ============================================ */

/* تفعيل التمرير الناعم في كامل الصفحة */
html {
    scroll-behavior: smooth;
}

/* إلغاء الجريد القديم عن الحاوية الرئيسية عشان نرتب الأقسام تحت بعض */
#menu-grid {
    display: block !important; 
}

/* تصميم قسم كل فئة (مشروبات، حلا، الخ) */
.category-section {
    margin-bottom: var(--space-2xl);
    /* السطر السحري: عشان لما تضغط عالقسم ما يتغطى العنوان بالهيدر اللي فوق */
    scroll-margin-top: 150px; 
}

/* عنوان القسم داخل المنيو */
.category-section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--navy-blue);
    margin: 0 0 var(--space-md) 0;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(28, 53, 83, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-title-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* شبكة المنتجات الجديدة (داخل كل قسم) */
.category-items-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* عمودين للجوال */
    gap: 12px;
}

@media (min-width: 768px) {
    .category-items-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
@media (min-width: 1024px) {
    .category-items-grid { grid-template-columns: repeat(4, 1fr); }
}

/* Out of Stock Styling */
.menu-item.unavailable {
    position: relative;
    pointer-events: none; /* يمنع الضغط على الكرت */
    opacity: 0.8;
}

.menu-item.unavailable::after {
    content: 'Out of Stock | نفدت الكمية';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(28, 53, 83, 0.7); /* لون كحلي شفاف يعطي طابع فاخر */
    color: var(--beige);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: var(--font-display);
    z-index: 10;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(2px);
}

/* Skeleton Shimmer Loading */
.skeleton-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    height: 300px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.skeleton-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% { left: 200%; }
}

.skeleton-img { height: 180px; background: #e0e0e0; }
.skeleton-text { height: 20px; background: #e0e0e0; margin: 15px; border-radius: 4px; width: 70%; }
.skeleton-price { height: 20px; background: #e0e0e0; margin: 0 15px; border-radius: 4px; width: 40%; }

.old-price { text-decoration: line-through; font-size: 0.75rem; color: #999; margin-right: 5px; }
.discount-badge { background: #e74c3c; color: white; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; font-weight: bold; margin-left: 5px; }
.price-wrapper { display: flex; align-items: center; gap: 4px; }

/* ============================================
   الوضع الليلي (Dark Theme Variables)
   ============================================ */
body.dark-theme {
    --background: #0f172a;
    --surface: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --beige: #334155;
    --beige-dark: #475569;
    --navy-blue: #38bdf8; /* أزرق فاتح مريح للعين */
    --navy-dark: #0284c7;
}

body.dark-theme .stat-card {
    background: var(--surface);
    border-bottom: 3px solid var(--navy-blue);
}

body.dark-theme .stat-card h3 {
    color: var(--navy-blue);
}
/* تأكد أن هذا الكود موجود في نهاية الملف */
body.dark-theme.admin-view {
    --background: #0f172a;
    --surface: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --navy-blue: #38bdf8;
    --beige: #334155;
    --beige-dark: #475569;
}

body.dark-theme .admin-sidebar, 
body.dark-theme .admin-header,
body.dark-theme .admin-table th {
    background-color: #1e293b;
    border-color: #334155;
}

body.dark-theme .admin-table td {
    color: #f8fafc;
    border-bottom: 1px solid #334155;
}

/* شكل الأقسام الجديد (مستطيل وفوقه صورة وتحته نص) */
.category-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0 !important;
    background: transparent !important; /* إزالة لون الخلفية */
    border: none !important;
    min-width: 90px;
}

.category-tab-img {
    width: 85px;
    height: 65px; /* شكل مستطيل متناسق زي طلب العميل */
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tab .tab-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: normal; /* Ensures text wraps to a new line */
    text-align: center;
    line-height: 1.3;
    word-break: break-word; /* 🟢 ADD THIS: Prevents long words from turning into dots */
    max-width: 85px; /* Keeps the text perfectly centered under the icon */
}

/* حالة التحديد: إزالة اللون الكحلي المزعج والاكتفاء ببرواز وتكبير بسيط */
.category-tab.active {
    background: transparent !important;
    box-shadow: none !important;
}

.category-tab.active .category-tab-img {
    border: 2px solid var(--navy-blue);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transform: scale(1.05);
}

.category-tab.active .tab-name {
    color: var(--navy-blue);
    font-weight: 700;
}

/* إزالة حركة الهوفر القديمة */
.category-tab:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================
   HEADER SCROLL ANIMATION (COMPACT MODE)
   ============================================ */

/* 1. إعطاء انتقال ناعم لكل عناصر الهيدر الأساسية */
.kiosk-header {
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 210 !important; /* ضمان بقاء الهيدر فوق الأقسام دائماً */
}

#main-logo-img {
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: left center;
}

.logo-text h1 {
    transition: all 0.35s ease;
}

.tagline {
    transition: all 0.3s ease;
    display: block; 
    max-height: 20px;
    opacity: 1;
}

.category-nav {
    transition: top 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); /* عشان التاب ينزل ويطلع بنعومة مع الهيدر */
    z-index: 200 !important;
}

/* 2. حالة الهيدر وهو مصغر (لما ينزل المستخدم تحت) */
body.compact-mode .kiosk-header {
    padding: 8px 20px; /* تقليل الهوامش العلوية والسفلية */
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

body.compact-mode #main-logo-img {
    width: 45px !important;
    height: 45px !important;
    border-radius: 8px !important;
}

body.compact-mode .logo-text h1 {
    font-size: 1.3rem; /* تصغير اسم الكوفي */
    margin-bottom: 0;
}

body.compact-mode .tagline {
    max-height: 0;
    opacity: 0;
    margin: 0;
    overflow: hidden; /* إخفاء جملة Coffee & More عشان يوفر مساحة وتصير على نفس المستوى */
}



::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: var(--navy-blue); border-radius: 10px; }
::-webkit-scrollbar-track { background: var(--beige); }

/* ============================================
   🚨 إصلاح تداخل الهيدر (COMPACT MODE FIX) 🚨
   ============================================ */

/* 1. إجبار الهيدر يكون صف واحد (جنب بعض) حتى في الجوال وقت السكرول */
body.compact-mode .kiosk-header {
    flex-direction: row !important;
    padding: 8px 15px !important;
    gap: 10px !important;
}

/* 2. تعديل حاوية البحث وزر الثيم عشان يروحون يمين */
body.compact-mode .header-decoration {
    width: auto !important;
    flex: 1;
    justify-content: flex-end !important;
    gap: 8px !important;
}

/* 3. تصغير خانة البحث بذكاء عشان تناسب الشاشات الصغيرة مع اللوقو */
body.compact-mode .search-container {
    width: 100%;
    max-width: 150px; /* صغرنا العرض عشان ما يدف اللوقو */
}

body.compact-mode .search-container input {
    padding: 6px 10px 6px 28px;
    font-size: 0.8rem;
}

/* 4. تصغير زر القمر/الشمس وقت السكرول عشان يوفر مساحة */
body.compact-mode #theme-toggle-btn {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
    margin-right: 0 !important;
}



/* ============================================
   إصلاح الـ Sticky Nav وتقطيع الـ Scroll
   ============================================ */
:root {
    --header-normal-height: 128px; /* الارتفاع التقريبي في الحالة العادية */
    --header-compact-height: 70px; /* الارتفاع التقريبي بعد التصغير */
}

@media (max-width: 768px) {
    :root {
        --header-normal-height: 100px;
        --header-compact-height: 65px;
    }
}

.category-nav {
    position: sticky;
    top: var(--header-normal-height);
    z-index: 200;
    transition: top 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body.compact-mode .category-nav {
    top: var(--header-compact-height);
}

/* ============================================
   إصلاح تداخل الهيدر والبحث (COMPACT MODE FIX)
   ============================================ */
.kiosk-header {
    position: sticky;
    top: 0;
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 210 !important; /* الهيدر دائماً فوق الأقسام */
}

.header-decoration {
    transition: all 0.35s ease;
}

body.compact-mode .kiosk-header {
    flex-direction: row !important;
    padding: 8px 15px !important;
    align-items: center;
}

body.compact-mode .header-decoration {
    width: auto !important;
    flex: 1;
    justify-content: flex-end !important;
    gap: 8px !important;
}

/* تصغير خانة البحث بذكاء وقت الـ Scroll لمنع دفع الـ Logo */
body.compact-mode .search-container {
    width: 100%;
    max-width: 140px; 
}

body.compact-mode .search-container input {
    padding: 6px 10px 6px 28px;
    font-size: 0.8rem;
}

/* تصغير زر الثيم لتوفير المساحة */
body.compact-mode #theme-toggle-btn {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
}

/* ============================================
   تنسيقات العروض والخصومات الاحترافية
   ============================================ */
.price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.price-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.discount-badge-custom {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(231, 76, 60, 0.3);
}

.modal-price-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.modal-old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1.1rem;
}

.modal-new-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy-blue);
}

.discount-modal-name {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 6px 20px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

/* Switch Toggle Style */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 4px; bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider { background-color: var(--navy-blue); }
input:checked + .slider:before { transform: translateX(24px); }

/* تحسين شكل كرت العروض */
.settings-card select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid var(--beige-dark);
    background: #fdfdfd;
    font-weight: 500;
}

/* ============================================
   PREMIUM OFFERS UI - HAMDAN STYLE
   ============================================ */

/* كرت العروض الفاخر */
.premium-card {
    border: none;
    background: var(--surface);
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    border-radius: 24px;
    padding: 30px;
    transition: all 0.4s ease;
}

/* حالة التعطيل (Gray out & Lock) */
.discount-controls-wrapper {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.discount-controls-wrapper.is-disabled {
    opacity: 0.35;
    pointer-events: none; /* يمنع الضغط نهائياً */
    filter: grayscale(1); /* يخلي كل شي أبيض وأسود */
    transform: scale(0.98);
}

/* هيدر الحالة */
.offer-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--navy-blue);
    padding: 20px 25px;
    border-radius: 18px;
    margin-bottom: 25px;
    color: var(--beige);
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    box-shadow: 0 0 10px #4ade80;
    transition: 0.3s;
}

.is-off .status-dot {
    background: #f87171;
    box-shadow: 0 0 10px #f87171;
}

/* السويتش الفخم */
.premium-switch {
    width: 60px;
    height: 30px;
    position: relative;
}

.premium-switch input { opacity: 0; }

.premium-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.2);
    border-radius: 34px;
    transition: 0.4s;
}

.premium-slider:before {
    content: "";
    position: absolute;
    height: 22px; width: 22px;
    left: 4px; bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: 0.4s;
}

input:checked + .premium-slider { background-color: #4ade80; }
input:checked + .premium-slider:before { transform: translateX(30px); }

/* مدخلات البيانات */
.premium-input {
    background: #f8f9fa !important;
    border: 2px solid #edf2f7 !important;
    padding: 14px !important;
    border-radius: 14px !important;
    transition: all 0.3s ease;
}

.premium-input:focus {
    border-color: var(--navy-blue) !important;
    background: white !important;
    box-shadow: 0 0 0 4px rgba(28, 53, 83, 0.05);
}

/* زر الحفظ المشع */
.btn-premium-action {
    width: 100%;
    height: 60px;
    background: var(--navy-blue);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: 0.3s;
    margin-top: 20px;
}

.btn-premium-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(28, 53, 83, 0.3);
}

.btn-shine {
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-premium-action:hover .btn-shine { left: 100%; }

/* صناديق الاختيار */
.premium-selection-box {
    border: 2px solid #edf2f7;
    border-radius: 16px;
    padding: 15px;
    margin-top: 10px;
    animation: fadeInSlide 0.3s ease;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   إصلاحات لوحة التحكم للموبايل (الجداول والإحصائيات)
   ============================================ */

/* 1. إصلاح قسم الإحصائيات عشان ينزل تحت بعض في الشاشات الصغيرة */
.stats-container {
    display: flex;
    flex-wrap: wrap; /* يسمح للعناصر بالنزول لسطر جديد */
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    flex: 1;
    min-width: 140px; /* يجبر الكرت ينزل إذا الشاشة صغيرة جداً */
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border-bottom: 3px solid var(--navy-blue);
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--navy-blue);
    margin-bottom: 5px;
}

/* 2. إصلاح الجداول (إضافة سحب لليمين واليسار) */
.table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch; /* سحب ناعم جداً في الآيفون */
    width: 100%;
}

.admin-table {
    min-width: 800px; /* يجبر الجدول يحتفظ بحجمه الطبيعي ويسمح لك تسحب */
}

/* 3. تأثير عند المرور على الصف (لأننا خليناه ينضغط) */
.clickable-row:hover {
    background-color: rgba(28, 53, 83, 0.05) !important;
}

body.dark-theme .clickable-row:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* إظهار الأعمدة اللي كانت مخفية في الجوال سابقاً (الآن ما نحتاج نخفيها لأننا ضفنا خاصية السحب) */
@media (max-width: 480px) {
    .admin-table th:nth-child(3),
    .admin-table td:nth-child(3) {
        display: table-cell !important;
    }
}

/* ============================================
   LIVE REORDER (SORTABLE GHOST)
   ============================================ */
.sortable-ghost {
    opacity: 0.4;
    background-color: var(--beige-dark) !important;
    border: 2px dashed var(--navy-blue) !important;
    transform: scale(0.95);
}

.reorder-handle:active {
    cursor: grabbing !important;
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}