.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 80px;
    background: linear-gradient(135deg, #fff5f8 0%, #f9f3ff 50%, #fff 100%);
}

/* ── Sidebar ── */
.sidebar {
    width: 290px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem 1.5rem;
    box-shadow: 4px 0 30px rgba(100, 13, 95, 0.06);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    border-right: 1px solid rgba(238, 102, 166, 0.15);
}

.user-info-sidebar {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(238, 102, 166, 0.2);
}

.avatar-large {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--main-color), var(--ternary-color));
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(217, 22, 86, 0.3);
}

.user-info-sidebar h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ternary-color);
    margin-bottom: 5px;
}

.user-info-sidebar p {
    font-size: 0.85rem;
    color: #999;
}

/* Sidebar Nav */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    color: #666;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1);
}

.sidebar-nav a i {
    font-size: 1rem;
    width: 22px;
    text-align: center;
}

.sidebar-nav a:hover {
    background: rgba(217, 22, 86, 0.06);
    color: var(--main-color);
    transform: translateX(5px);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--main-color), var(--ternary-color));
    color: white;
    box-shadow: 0 8px 20px rgba(217, 22, 86, 0.3);
}

#logout-link:hover {
    background: rgba(255, 0, 0, 0.06) !important;
    color: #e53935 !important;
}

/* ── Main Content ── */
.main-content {
    flex: 1;
    padding: 2.5rem 3.5rem;
    overflow-y: auto;
}

/* ─── Dashboard Responsive Styles ───────────────────────── */

/* Tablet (768px - 1024px) */
@media all and (max-width:1024px) {
    .sidebar {
        width: 250px;
        padding: 2rem 1.2rem;
    }
    
    .avatar-large {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .main-content {
        padding: 2rem;
    }
}

/* Mobile (≤768px) */
@media all and (max-width:768px) {
    .dashboard-wrapper {
        flex-direction: column;
        padding-top: 70px;
    }
    
    .sidebar {
        width: 100%;
        position: fixed;
        top: 70px;
        left: -100%;
        z-index: 1000;
        height: calc(100vh - 70px);
        transition: left 0.3s ease;
        border-right: none;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        padding: 1.5rem;
    }
    
    .avatar-large {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .user-info-sidebar {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .sidebar-nav a {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    /* Mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
        font-size: 24px;
        cursor: pointer;
    }
}

/* Small Mobile (≤480px) */
@media all and (max-width:480px) {
    .main-content {
        padding: 1rem;
    }
    
    .sidebar {
        padding: 1.5rem 1rem;
    }
    
    .avatar-large {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .user-info-sidebar h3 {
        font-size: 1rem;
    }
    
    .user-info-sidebar p {
        font-size: 0.8rem;
    }
    
    .sidebar-nav a {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(238, 102, 166, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.icon-box {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.icon-box.purple { background: rgba(100, 13, 95, 0.1); color: #640D5F; }
.icon-box.pink   { background: rgba(217, 22, 86, 0.1); color: #d91656; }
.icon-box.blue   { background: rgba(0, 150, 200, 0.1); color: #0097a7; }

.stat-info h4 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--ternary-color);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-info p {
    color: #999;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ── Recent Orders Section ── */
.recent-orders {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(238, 102, 166, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ternary-color);
}

.view-all {
    color: var(--main-color);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 14px;
    border: 1px solid var(--main-color);
    border-radius: 20px;
    transition: 0.3s;
}

.view-all:hover {
    background: var(--main-color);
    color: white;
}

/* Table */
.orders-table-wrapper { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th {
    text-align: left;
    padding: 15px 12px;
    border-bottom: 2px solid rgba(238, 102, 166, 0.15);
    color: #999;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 15px 12px;
    border-bottom: 1px solid #f5f5f5;
    color: #555;
    font-size: 0.95rem;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-badge.preparing { background: #fff8e1; color: #ff8f00; }
.status-badge.delivered { background: #e8f5e9; color: #2e7d32; }
.status-badge.cancelled { background: #fce4ec; color: #c62828; }

/* ── Orders Tab ── */
.order-card-premium {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(238, 102, 166, 0.1);
    transition: 0.3s;
}

.order-card-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.07);
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.order-header h4 { color: var(--ternary-color); font-size: 1.1rem; font-weight: 700; }
.order-header .date { font-size: 0.85rem; color: #aaa; margin-top: 5px; }
.order-total { font-size: 1.3rem; font-weight: 800; color: var(--main-color); }

/* Order Tracker (using shared styles from styles.css) */
.order-tracker-container {
    margin-top: 25px;
}

/* ── Settings Form ── */
.premium-form {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 35px;
    border-radius: 20px;
    max-width: 800px;
    border: 1px solid rgba(238, 102, 166, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #eee;
    border-radius: 12px;
    background: #fafafa;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--main-color);
    background: var(--surface-color);
    box-shadow: 0 0 0 4px rgba(217, 22, 86, 0.08);
    outline: none;
}

.save-btn {
    padding: 14px 35px;
    background: linear-gradient(135deg, var(--main-color), var(--ternary-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(217, 22, 86, 0.3);
}

.save-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(217, 22, 86, 0.4);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .main-content { padding: 2rem 2rem; }
}

@media (max-width: 768px) {
    .dashboard-wrapper { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; }
    .stats-grid { grid-template-columns: 1fr; }
    .main-content { padding: 1.5rem; }
    .form-row { grid-template-columns: 1fr; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Dark Mode ── */
[data-theme='dark'] .dashboard-wrapper { background: #0f0f1a; }
[data-theme='dark'] .sidebar { background: rgba(20, 20, 35, 0.8); border-color: rgba(255,255,255,0.05); }
[data-theme='dark'] .stat-card,
[data-theme='dark'] .recent-orders,
[data-theme='dark'] .premium-form,
[data-theme='dark'] .order-card-premium { background: rgba(25, 25, 40, 0.8); border-color: rgba(255,255,255,0.07); }
[data-theme='dark'] .sidebar-nav a { color: #aaa; }
[data-theme='dark'] th { border-color: rgba(255,255,255,0.07); color: #666; }
[data-theme='dark'] td { border-color: rgba(255,255,255,0.04); color: #ccc; }
[data-theme='dark'] .step .dot { background: #2a2a3a; }
[data-theme='dark'] .line { background: #2a2a3a; }
[data-theme='dark'] .form-group input,
[data-theme='dark'] .form-group textarea { background: #1e1e2e; border-color: #333; color: white; }
[data-theme='dark'] .stat-info h4 { color: #f0f0f0; }
/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--surface-color);
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    width: 500px;
    max-width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation: slideDown 0.4s ease;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close-modal:hover { color: var(--main-color); }

.modal-header { margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.modal-item-list { list-style: none; padding: 0; }
.modal-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f9f9f9; }
.modal-item:last-child { border: none; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── App Style Order List ── */
.app-order-history-header {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

.app-order-history-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.app-stat-col h5 {
    font-size: 0.75rem;
    color: #999;
    font-weight: 500;
    margin-bottom: 4px;
}

.app-stat-col p {
    font-size: 1.1rem;
    font-weight: 800;
    color: #333;
}

.app-stat-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #333;
    cursor: pointer;
}

.app-graph-placeholder {
    height: 80px;
    background: #f9f9f9;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.app-graph-placeholder svg {
    width: 100%;
    height: 100%;
}

.app-graph-labels {
    position: absolute;
    top: 5px; left: 10px;
    font-size: 0.7rem;
    color: #aaa;
}
.app-graph-labels.bottom {
    top: auto; bottom: 5px; left: 50%;
    transform: translateX(-50%);
}

.pull-refresh-text {
    text-align: center;
    color: #aaa;
    font-size: 0.85rem;
    margin: 20px 0;
}

.app-order-item {
    display: flex;
    align-items: center;
    background: var(--surface-color);
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 15px;
}

.app-order-item:last-child {
    border-bottom: none;
}

.app-order-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background: #f5f5f5;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.app-order-content {
    flex: 1;
}

.app-order-title {
    font-weight: 700;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.app-order-paid {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 8px;
}

.app-order-badges {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-price-badge {
    background: #e63946;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
}

.app-status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.app-status-badge.ready { color: #333; }
.app-status-badge.completed { color: #2e7d32; }
.app-status-badge.cancelled { color: #c62828; }
.app-status-badge.pending, .status-badge.pending { background: #e0f2fe; color: #0284c7; }
.app-status-badge.confirmed, .status-badge.confirmed { background: #f3e8ff; color: #7c3aed; }
.app-status-badge.ready_for_pickup, .status-badge.ready_for_pickup { background: #ecfdf5; color: #059669; }
.app-status-badge.delivery, .app-status-badge.out_for_delivery, .status-badge.delivery, .status-badge.out_for_delivery { background: #fff7ed; color: #ea580c; }
.app-status-badge.rejected, .status-badge.rejected { background: #fee2e2; color: #dc2626; }

.app-order-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.app-order-time {
    font-size: 0.75rem;
    color: #aaa;
}

.app-reorder-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.app-reorder-btn:hover {
    background: #e0e0e0;
    color: #000;
}

[data-theme='dark'] .app-order-history-header,
[data-theme='dark'] .app-order-item {
    background: rgba(25, 25, 40, 0.8);
    border-color: rgba(255,255,255,0.05);
}
[data-theme='dark'] .app-order-title,
[data-theme='dark'] .app-stat-col p { color: var(--surface-color); }
[data-theme='dark'] .app-graph-placeholder { background: rgba(0,0,0,0.2); }
[data-theme='dark'] .app-reorder-btn { background: #333; color: var(--surface-color); }

/* ── App Curved Header ── */
.app-order-history-top-header {
    background: linear-gradient(135deg, #e63946, #c92a3b);
    border-radius: 0 0 35px 35px;
    padding: 30px 24px 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 10px 25px rgba(230, 57, 70, 0.2);
    margin: -2.5rem -3.5rem 30px -3.5rem; /* Break main content padding boundaries */
}

.app-back-btn {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface-color);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: 0.2s ease;
    color: #e63946;
    font-size: 1.1rem;
}

.app-back-btn:hover {
    transform: translateY(-50%) scale(1.05);
    background: #fdfdfd;
}

.app-order-history-top-header h2 {
    color: #ffffff !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px;
    margin: 0 !important;
}

@media (max-width: 768px) {
    .app-order-history-top-header {
        margin: -1.5rem -1.5rem 25px -1.5rem;
        padding: 25px 20px 20px;
    }
}


