/* ============================================================
   ARAM MENU Dashboard - Complete Stylesheet
   ============================================================ */

/* ==================== CSS VARIABLES ==================== */
:root {
    --primary: #0D7377;
    --primary-dark: #095557;
    --primary-light: #14A3A8;
    --primary-bg: rgba(13, 115, 119, 0.08);
    --secondary: #D4A853;
    --secondary-dark: #B8923A;
    --accent: #E8886A;
    --bg: #FFFDF7;
    --bg-body: #F0F2F5;
    --bg-card: #FFFFFF;
    --text: #1C1C1C;
    --text-light: #6B7280;
    --text-lighter: #9CA3AF;
    --white: #FFFFFF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-md: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: 0.3s ease;
    --font-main: 'Tajawal', sans-serif;
    --sidebar-width: 240px;
    --header-height: 64px;
}

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

body {
    font-family: var(--font-main);
    color: var(--text);
    background: var(--bg-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition);
    border: 2px solid transparent;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13,115,119,0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-danger {
    background: #EF4444;
    color: var(--white);
    border-color: #EF4444;
}
.btn-danger:hover {
    background: #DC2626;
    border-color: #DC2626;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239,68,68,0.3);
}

.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-lg { padding: 12px 30px; font-size: 1rem; }

/* ==================== HEADER ==================== */
.dash-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}

.dash-header-inner {
    max-width: 100%;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dash-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
}
.dash-logo i { color: var(--primary); font-size: 1.4rem; }
.logo-highlight { color: var(--secondary); }

/* Hamburger (mobile) */
.dash-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    background: var(--border-light);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.dash-hamburger span {
    display: block;
    height: 2.5px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

.dash-hamburger:hover {
    background: var(--border);
}

.dash-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}

.dash-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.dash-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    min-width: 160px;
    flex: 1;
}
.quick-action-btn:hover {
    border-color: var(--primary);
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13,115,119,0.15);
}
.quick-action-btn i {
    font-size: 1.4rem;
    color: var(--primary-light);
    width: 32px;
    text-align: center;
}

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

.dash-user-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 6px 12px;
    background: var(--border-light);
    border-radius: 50px;
}
.dash-user-badge i { font-size: 0.9rem; }

.dash-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: transparent;
    color: var(--text-light);
}

.dash-btn-ghost:hover {
    background: #FEE2E2;
    color: #EF4444;
}

/* ==================== LAYOUT ==================== */
.dash-layout {
    display: flex;
    padding-top: var(--header-height);
    min-height: 100vh;
}

/* ==================== SIDEBAR OVERLAY ==================== */
.dash-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 49;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.dash-sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ==================== SIDEBAR ==================== */
.dash-sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    background: var(--white);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 50;
    overflow-y: auto;
    transition: transform var(--transition);
}

.dash-nav {
    padding: 12px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all var(--transition);
    text-align: right;
}

.dash-nav-item i {
    width: 22px;
    text-align: center;
    font-size: 1.05rem;
}

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

.dash-nav-item.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(13,115,119,0.25);
}

.dash-nav-item.dash-nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.8rem;
}
.dash-nav-item.dash-nav-link:hover {
    background: var(--hover-bg);
    color: var(--text);
}
.dash-nav-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 16px;
}

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

.dash-plan-badge {
    text-align: center;
    font-size: 0.8rem;
    padding: 6px 12px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 700;
}

/* ==================== MAIN CONTENT ==================== */
.dash-main {
    flex: 1;
    margin-right: var(--sidebar-width);
    padding: 30px;
    min-height: calc(100vh - var(--header-height));
}

/* ==================== NO ACCOUNT ==================== */
.no-account {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.no-account-card {
    text-align: center;
    background: var(--white);
    padding: 50px 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    max-width: 500px;
}

.no-account-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #FEF3C7;
    color: #D97706;
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.no-account-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.no-account-card p {
    color: var(--text-light);
    margin-bottom: 24px;
    line-height: 1.8;
}

/* ==================== TABS ==================== */
.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

.tab-header {
    margin-bottom: 24px;
}

.tab-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

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

.tab-header p {
    color: var(--text-light);
    font-size: 0.92rem;
}

/* ==================== OVERVIEW TAB ==================== */
.overview-welcome {
    display: flex;
    align-items: center;
    gap: 18px;
    background: var(--white);
    padding: 24px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.welcome-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.welcome-info {
    flex: 1;
}

.welcome-info h2 {
    font-size: 1.2rem;
    font-weight: 800;
}

.welcome-info p {
    color: var(--text-light);
    font-size: 0.88rem;
}

.welcome-date {
    background: var(--bg);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    color: var(--text-light);
    white-space: nowrap;
}

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

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border);
    transition: all var(--transition);
    border-right: 4px solid var(--stat-color);
}

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

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--stat-color) 10%, transparent);
    color: var(--stat-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--stat-color);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-light);
}

/* Dash Cards (info) */
.dash-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.dash-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
}

.dash-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.dash-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
}

.dash-card-header i {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.dash-card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

.dash-card-body {
    padding: 16px 20px;
}

.dash-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.dash-card-row:last-child {
    border-bottom: none;
}

.row-label {
    color: var(--text-light);
    font-size: 0.85rem;
}

.row-value {
    font-weight: 600;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.color-dot {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.qa-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
}

.qa-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.qa-btn i {
    font-size: 1.1rem;
    color: var(--primary);
}

/* ==================== MENU MANAGEMENT TAB ==================== */
.menu-actions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.menu-items-count {
    margin-right: auto;
    font-size: 0.88rem;
    color: var(--text-light);
    font-weight: 600;
}

/* Categories */
.categories-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.empty-categories {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border);
}

.empty-categories i {
    font-size: 3rem;
    color: var(--text-lighter);
    margin-bottom: 16px;
}

.empty-categories h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-categories p {
    color: var(--text-light);
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Category Card */
.category-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
}

.category-card:hover {
    box-shadow: var(--shadow);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.category-header:hover {
    background: var(--bg);
}

.category-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-expand-icon {
    transition: transform 0.3s ease;
    color: var(--text-lighter);
    font-size: 0.85rem;
}

.category-card.expanded .category-expand-icon {
    transform: rotate(-90deg);
}

.category-name {
    font-weight: 700;
    font-size: 1rem;
}

.category-name-en {
    color: var(--text-lighter);
    font-size: 0.82rem;
    font-weight: 400;
    margin-right: 6px;
}

.category-items-badge {
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 50px;
}

.category-header-actions {
    display: flex;
    gap: 4px;
}

.cat-action-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-lighter);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.cat-action-btn:hover {
    background: var(--border-light);
    color: var(--text);
}

.cat-action-btn.edit:hover { color: var(--primary); }
.cat-action-btn.delete:hover { color: #EF4444; background: #FEE2E2; }
.cat-action-btn.add-item:hover { color: #10B981; background: #ECFDF5; }

/* Category Body (items list) */
.category-body {
    display: none;
    border-top: 1px solid var(--border-light);
    padding: 0;
}

.category-card.expanded .category-body {
    display: block;
}

.category-items-list {
    padding: 12px 20px;
}

.empty-items {
    text-align: center;
    padding: 20px;
    color: var(--text-lighter);
    font-size: 0.9rem;
}

.empty-items i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

/* Menu Item Row */
.menu-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: 1px solid transparent;
    margin-bottom: 8px;
}

.menu-item-row:hover {
    background: var(--bg);
    border-color: var(--border);
}

.menu-item-row-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--border-light);
}

.menu-item-row-image-placeholder {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
    flex-shrink: 0;
}

.menu-item-row-info {
    flex: 1;
    min-width: 0;
}

.menu-item-row-name {
    font-weight: 600;
    font-size: 0.92rem;
}

.menu-item-row-desc {
    font-size: 0.78rem;
    color: var(--text-lighter);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.menu-item-row-price {
    font-weight: 800;
    color: var(--primary);
    font-size: 0.88rem;
    white-space: nowrap;
}

.menu-item-row-status {
    font-size: 0.78rem;
    padding: 2px 10px;
    border-radius: 50px;
}

.item-status-available {
    background: #ECFDF5;
    color: #059669;
}

.item-status-unavailable {
    background: #FEF2F2;
    color: #DC2626;
}

.menu-item-row-actions {
    display: flex;
    gap: 4px;
}

.item-action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    background: transparent;
    color: var(--text-lighter);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.item-action-btn:hover { background: var(--border-light); }
.item-action-btn.edit:hover { color: var(--primary); }
.item-action-btn.delete:hover { color: #EF4444; background: #FEE2E2; }

/* ==================== ORDERS TAB ==================== */
.coming-soon {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}

.coming-soon-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.coming-soon h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.coming-soon > p {
    color: var(--text-light);
    margin-bottom: 24px;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

.coming-soon-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.coming-soon-features span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text);
}

.coming-soon-features i {
    color: #10B981;
}

/* ==================== QR CODE TAB ==================== */
.qr-container {
    max-width: 800px;
}

.qr-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    display: flex;
    gap: 30px;
    padding: 30px;
}

.qr-preview {
    width: 260px;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.qr-preview #qrcode {
    padding: 16px;
}

.qr-preview #qrcode img {
    width: 220px;
    height: 220px;
    image-rendering: pixelated;
}

.qr-preview-placeholder {
    text-align: center;
    color: var(--text-lighter);
    padding: 20px;
}

.qr-preview-placeholder i {
    font-size: 3rem;
    margin-bottom: 12px;
}

.qr-preview-placeholder p {
    font-size: 0.9rem;
}

.qr-info {
    flex: 1;
}

.qr-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.qr-url-box {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.qr-url-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 0.85rem;
    direction: ltr;
    text-align: left;
    background: var(--bg);
    color: var(--text);
}

.qr-url-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.qr-url-box button {
    background: var(--primary-bg);
    color: var(--primary);
    border: 1px solid var(--border);
}

.qr-url-box button:hover {
    background: var(--primary);
    color: var(--white);
}

.qr-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.qr-tips {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: var(--radius);
    padding: 16px 20px;
}

.qr-tips p {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #92400E;
}

.qr-tips p i {
    color: #F59E0B;
}

.qr-tips ul {
    padding-right: 20px;
}

.qr-tips li {
    font-size: 0.85rem;
    color: #92400E;
    margin-bottom: 4px;
    list-style: disc;
}

/* ==================== SETTINGS TAB ==================== */
.settings-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 700px;
}

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

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
}

.settings-card-header i {
    color: var(--primary);
    font-size: 1.1rem;
}

.settings-card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

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

.settings-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* ==================== SLIDER IMAGE UPLOAD ==================== */
.slider-image-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 16px;
    position: relative;
}

.slider-image-upload:hover,
.slider-image-upload.drag-over {
    border-color: var(--primary);
    background: rgba(13, 115, 119, 0.03);
}

.slider-image-placeholder i {
    font-size: 2rem;
    color: var(--text-lighter);
    margin-bottom: 8px;
    display: block;
}

.slider-image-placeholder p {
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
}

.slider-image-placeholder span {
    font-size: 0.85rem;
    color: var(--text-light);
}

.slider-image-placeholder small {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-lighter);
}

.slider-image-preview {
    text-align: center;
    position: relative;
}

.slider-image-preview img {
    max-height: 150px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.slider-image-remove {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #EF4444;
    color: #fff;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.slider-image-remove:hover {
    transform: scale(1.2);
}

/* ==================== SLIDER IMAGE ITEM ==================== */
.slider-image-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.slider-image-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.slider-image-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e5e7eb;
}
.slider-image-info {
    flex: 1;
    min-width: 0;
}
.slider-image-info .slider-image-alt {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.slider-image-info .slider-image-link {
    font-size: 0.75rem;
    color: var(--text-lighter);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
    text-align: right;
}
.slider-image-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.slider-image-actions button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-image-actions button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.slider-image-actions button.delete-btn:hover {
    background: #EF4444;
    border-color: #EF4444;
}

/* ==================== FORM ELEMENTS ==================== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--text);
    transition: var(--transition);
    background: var(--white);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13,115,119,0.1);
}

.form-input.error {
    border-color: #EF4444;
}

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

.form-hint {
    font-size: 0.78rem;
    color: var(--text-lighter);
    margin-top: 4px;
}

.required {
    color: #EF4444;
}

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

.color-picker-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-color {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 2px;
    background: none;
}

.form-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.form-color::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.color-hex-input {
    flex: 1;
}

.price-input-group {
    display: flex;
    align-items: center;
    gap: 0;
}

.price-input-group input {
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.price-currency {
    padding: 10px 12px;
    background: var(--border-light);
    border: 1.5px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-light);
}

.subdomain-group {
    display: flex;
    align-items: center;
}

.subdomain-prefix {
    padding: 10px 14px;
    background: var(--border-light);
    border: 1.5px solid var(--border);
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.85rem;
    color: var(--text-light);
    white-space: nowrap;
}

.subdomain-group input {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

/* Item Image Upload */
.item-image-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.item-image-upload:hover,
.item-image-upload.drag-over {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.item-image-placeholder i {
    font-size: 2rem;
    color: var(--text-lighter);
    margin-bottom: 8px;
}

.item-image-placeholder span {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
}

.item-image-hint {
    font-size: 0.78rem !important;
    color: var(--text-lighter) !important;
    margin-top: 4px;
}

.item-image-preview {
    position: relative;
    display: inline-block;
}

.item-image-preview img {
    max-height: 120px;
    border-radius: var(--radius-sm);
}

.item-image-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #EF4444;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s ease;
}

.modal-sm { max-width: 400px; }
.modal-lg { max-width: 600px; }

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

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--border-light);
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--border);
}

.modal-body {
    padding: 24px;
}

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

/* Delete Icon */
.delete-icon {
    text-align: center;
    font-size: 2.5rem;
    color: #F59E0B;
    margin-bottom: 12px;
}

/* Success Check */
.success-check {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ECFDF5;
    color: #10B981;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 50%;
    transform: translateX(50%) translateY(100px);
    background: var(--text);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.toast.success { background: #059669; }
.toast.error { background: #DC2626; }

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 260px;
        --header-height: 56px;
    }

    .dash-header-inner {
        padding: 0 12px;
    }

    .dash-hamburger {
        display: flex;
    }

    .dash-user-badge span {
        display: none;
    }

    .logout-text {
        display: none;
    }

    /* Sidebar hidden off-screen by default - slides in from left */
    .dash-sidebar {
        right: -100%;
        display: flex;
        z-index: 60;
        box-shadow: var(--shadow-lg);
        width: 280px;
        transition: right 0.3s ease;
    }

    .dash-sidebar.open {
        right: 0;
    }

    .dash-sidebar-overlay {
        display: block;
    }

    .dash-nav-item span {
        display: inline;
    }

    .dash-nav-item {
        justify-content: flex-start;
        padding: 12px 16px;
    }

    .dash-nav-item i {
        font-size: 1.05rem;
        margin: 0;
    }

    .dash-sidebar-footer {
        display: block;
    }

    .dash-main {
        margin-right: 0;
        padding: 16px;
        width: 100%;
        overflow-x: hidden;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .dash-cards {
        grid-template-columns: 1fr;
    }

    .overview-welcome {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .welcome-date {
        align-self: center;
    }

    .tab-header h1 {
        font-size: 1.2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .qr-card {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }

    .qr-preview {
        width: 100%;
    }

    .menu-actions-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .menu-items-count {
        margin-right: 0;
        text-align: center;
    }

    .menu-item-row {
        flex-wrap: wrap;
    }

    .menu-item-row-desc {
        max-width: 150px;
    }

    .settings-actions {
        flex-direction: column;
    }

    .quick-actions {
        flex-direction: column;
    }

    .qa-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-number {
        font-size: 1.2rem;
    }
}

/* ============================================================
   ORDERS TAB
   ============================================================ */
.orders-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.orders-filter {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.order-filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.orders-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-lighter);
}

.orders-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--border);
}

.orders-empty h3 {
    color: var(--text);
    margin-bottom: 8px;
}

.orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.order-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.2s;
}

.order-card-new {
    border-color: var(--danger);
    box-shadow: 0 0 0 1px var(--danger);
    animation: orderPulse 2s infinite;
}

@keyframes orderPulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(239,68,68,0.3); }
    50% { box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
}

.order-card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg);
}

.order-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.order-id {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-light);
    direction: ltr;
}

.order-status-badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
}

.order-status-new { background: #fef2f2; color: var(--danger); }
.order-status-sent { background: #fffbeb; color: #d97706; }
.order-status-completed { background: #ecfdf5; color: var(--success); }

.order-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-light);
}

.order-card-items {
    padding: 8px 16px;
}

.order-item-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.order-item-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg);
}

.order-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
    font-size: 1rem;
}

.order-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-item-name {
    font-weight: 700;
    font-size: 0.85rem;
}

.order-item-meta {
    font-size: 0.75rem;
    color: var(--text-light);
}

.order-item-total {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
    white-space: nowrap;
}

.order-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--border-light);
    background: var(--bg);
}

.order-card-total {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-card-total span {
    font-size: 0.75rem;
    color: var(--text-light);
}

.order-card-total strong {
    font-size: 1.1rem;
    color: var(--primary);
}

.order-card-actions .btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.order-status-badge.sent {
    color: #d97706;
    font-weight: 700;
    font-size: 0.8rem;
}

.order-status-badge.done {
    color: var(--success);
    font-weight: 700;
    font-size: 0.8rem;
}

.order-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger);
    color: #fff;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 900;
    margin-right: 6px;
}

.order-title-count {
    font-size: 0.8rem;
    color: var(--text-lighter);
    font-weight: 400;
    margin-right: 8px;
}

/* ============================================================
   MENU - DIRECT ORDER BUTTON
   ============================================================ */
.cart-direct-btn {
    margin-top: 8px !important;
    background: var(--primary) !important;
}

.cart-direct-btn:hover {
    background: var(--primary-dark) !important;
}

/* ============================================================
   MENU - ORDER SUCCESS TOAST
   ============================================================ */
.order-success-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--success);
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(16,185,129,0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s;
}

.order-success-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.order-success-icon {
    font-size: 1.5rem;
}

.order-success-text h4 {
    font-size: 1rem;
    font-weight: 700;
}

.order-success-text p {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* ============================================================
   MENU - DELIVERY MODAL (reuses table-modal classes)
   ============================================================ */
#deliveryModal .table-number-input-group {
    margin-bottom: 8px;
}

#deliveryModal .table-number-input {
    text-align: right;
    font-size: 0.95rem;
    padding: 12px 16px;
    height: auto;
}

#deliveryModal .table-modal-actions {
    margin-top: 12px;
}

/* ============================================================
   STATISTICS
   ============================================================ */
.stats-container {
    padding: 0 4px;
}

.stats-loading {
    text-align: center;
    padding: 60px 20px;
}

.stats-loading p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 12px;
}

.stats-error {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.stats-error i {
    font-size: 2.5rem;
    color: #EF4444;
    margin-bottom: 12px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

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

.stat-card-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-card-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
}

.stat-card-label {
    font-size: 0.78rem;
    color: var(--text-light);
    font-weight: 500;
}

.stats-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.stats-section-header h2 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    .stats-cards {
        grid-template-columns: 1fr 1fr;
    }
}

/* Hourly Chart */
.hourly-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 160px;
    padding: 0 4px;
    border-bottom: 1px solid var(--border);
}

.hourly-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    position: relative;
}

.hourly-bar {
    width: 100%;
    max-width: 28px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.hourly-bar.peak {
    background: #e65100;
    opacity: 1;
}

.hourly-label {
    font-size: 0.6rem;
    color: var(--text-lighter);
    margin-top: 4px;
    white-space: nowrap;
}

/* Type Chart */
.pie-bar {
    display: flex;
    height: 32px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.pie-bar-segment {
    transition: all 0.3s ease;
    cursor: pointer;
}

.pie-bar-segment:hover {
    opacity: 0.8;
}

.pie-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text);
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 6px;
}

/* Daily Chart */
.daily-bars {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 120px;
    padding: 0 4px;
    border-bottom: 1px solid var(--border);
}

.daily-bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.daily-bar {
    width: 100%;
    max-width: 24px;
    background: var(--primary-light);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    opacity: 0.8;
}

.daily-label {
    font-size: 0.55rem;
    color: var(--text-lighter);
    margin-top: 3px;
    white-space: nowrap;
}

/* Peak Info */
.peak-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.peak-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    line-height: 1.6;
}

.peak-card i {
    font-size: 1.5rem;
}

.peak-card-high {
    background: #fff3e0;
    color: #e65100;
}

.peak-card-low {
    background: #e3f2fd;
    color: #1565c0;
}

.peak-card-avg {
    background: #e8f5e9;
    color: #2e7d32;
}
