/* ══════════════════════════════════════
   ADMIN RESPONSIVE CSS
══════════════════════════════════════ */

/* ── Hamburger Button ── */
.hamburger-btn {
    display: none;
    background: rgba(255, 208, 0, 0.08);
    border: 1px solid rgba(255, 208, 0, 0.2);
    color: var(--gold);
    font-size: 1.2rem;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease;
    line-height: 1;
}
.hamburger-btn:hover {
    background: rgba(255, 208, 0, 0.15);
}

/* ── Sidebar Overlay (mobile) ── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active {
    display: block;
}

/* ══════════════════════════════════════
   TABLET (≤ 1024px)
══════════════════════════════════════ */
@media (max-width: 1024px) {
    .analytics-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .analytics-grid {
        grid-template-columns: 1fr;
    }
}

/* ══════════════════════════════════════
   MOBILE (≤ 768px)
══════════════════════════════════════ */
@media (max-width: 768px) {
    /* Show hamburger */
    .hamburger-btn {
        display: flex;
    }

    /* Sidebar slides in from left */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 1000;
        transition: transform 0.3s ease;
    }
    .sidebar.active {
        transform: translateX(0);
    }

    /* Content takes full width */
    .content {
        margin-left: 0;
        padding: 1rem;
    }

    /* Dashboard grid single column */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .widget.widget-revenue,
    .widget.widget-catalog {
        grid-column: span 2;
    }

    /* Top bar stacks */
    .top-bar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .top-bar h2 {
        font-size: 1.6rem;
    }

    /* Tables */
    table, .item-table {
        font-size: 0.82rem;
    }
    .table-container, .item-table-wrapper {
        overflow-x: auto;
    }

    /* Category tabs scroll */
    .category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 0.5rem;
        padding-bottom: 4px;
    }
    .category-tab {
        white-space: nowrap;
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    /* Section tabs scroll */
    .section-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }
    .section-tab {
        white-space: nowrap;
    }

    /* Modal */
    .modal-card {
        width: 95vw;
        padding: 1.25rem;
    }

    /* Editor actions stack */
    .editor-actions {
        flex-direction: column;
    }

    /* Modal actions stack */
    .modal-actions {
        flex-direction: column-reverse;
    }

    /* Notifications at bottom on mobile */
    .notification-container {
        position: fixed;
        bottom: 20px;
        top: auto;
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .notification {
        animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    @keyframes slideUp {
        from { transform: translateY(120%) scale(0.95); opacity: 0; }
        to   { transform: translateY(0) scale(1); opacity: 1; }
    }
    
    .notification.fade-out {
        animation: slideDown 0.3s ease forwards;
    }
    
    @keyframes slideDown {
        to { transform: translateY(120%) scale(0.95); opacity: 0; }
    }

    /* Nav items */
    nav li {
        padding: 10px 12px;
        font-size: 0.88rem;
    }
    .logo h1 {
        font-size: 1.3rem;
    }

    /* Schedule grid single column */
    .schedule-grid {
        grid-template-columns: 1fr;
    }

    /* Form grid single column */
    .form-grid {
        grid-template-columns: 1fr;
    }

    /* Analytics */
    .analytics-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    /* Table controls wrap */
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .search-input {
        min-width: unset;
        width: 100%;
    }

    /* Delivery actions stack */
    .delivery-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ══════════════════════════════════════
   SMALL MOBILE (≤ 480px)
══════════════════════════════════════ */
@media (max-width: 480px) {
    .content {
        padding: 0.75rem;
    }
    .top-bar h2 {
        font-size: 1.4rem;
    }
    .card {
        padding: 1rem;
    }
    .widget .value {
        font-size: 1.6rem;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .widget.widget-revenue,
    .widget.widget-catalog {
        grid-column: span 1;
    }
    .analytics-stat-grid {
        grid-template-columns: 1fr 1fr;
    }
    .modal-card {
        padding: 1rem;
    }
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        width: 100%;
        text-align: center;
    }
}
