:root {
    --primary: #1b4332;
    --primary-light: #2d6a4f;
    --primary-glow: rgba(27, 67, 50, 0.15);
    --bg-white: #ffffff;
    --off-white: #f5f6f8;
    --text-dark: #0a0a0a;
    --text-muted: #6b737e;
    --border: rgba(0, 0, 0, 0.07);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.14);
    --danger: #e53e3e;
    --danger-bg: #fff5f5;
    --success: #276749;
    --success-bg: #f0fff4;
    --warn-bg: #fffbeb;
    --warn: #b7791f;
    --transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 16px;
    --radius-lg: 24px;
}

[data-theme="dark"] {
    --bg-white: #141414;
    --off-white: #0d0d0d;
    --text-dark: #f0f0f0;
    --text-muted: #888;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.6);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--off-white);
    color: var(--text-dark);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ========== LAYOUT ========== */
.admin-container { display: flex; min-height: 100vh; }

/* ========== SIDEBAR ========== */
.sidebar {
    width: 270px;
    min-width: 270px;
    background: var(--primary);
    color: white;
    padding: 2.5rem 1.8rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 200;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
}

.sidebar-tagline {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 4px;
    margin-bottom: 3rem;
}

.nav-menu { flex: 1; display: flex; flex-direction: column; gap: 4px; }

.nav-menu a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}
.nav-menu a.active, .nav-menu a:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.sidebar-footer { margin-top: auto; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); }

.theme-toggle-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}
.theme-toggle-btn:hover { background: rgba(255,255,255,0.15); color: white; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    backdrop-filter: blur(4px);
}

/* ========== MAIN CONTENT ========== */
.main-content { flex: 1; padding: 3rem 3rem 5rem; overflow-y: auto; }

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    gap: 20px;
}

.header-tag {
    font-size: 0.72rem;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    margin-bottom: 6px;
}

.header-info h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.4rem;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 4px;
}
.header-info p { color: var(--text-muted); font-size: 0.95rem; }

/* ========== BUTTONS ========== */
.btn {
    padding: 0.85rem 1.8rem;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(27, 67, 50, 0.25);
}
.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(27, 67, 50, 0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-glow); }

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 8px 20px rgba(229, 62, 62, 0.25);
}
.btn-danger:hover { background: #c53030; transform: translateY(-2px); }

/* ========== STATS ========== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: fadeUp 0.5s ease both;
}

.stat-num {
    font-size: 2.2rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    line-height: 1;
}

.stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; letter-spacing: 0.5px; }

/* ========== SEARCH ========== */
.search-bar-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.8rem 1.4rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    color: var(--text-muted);
    transition: var(--transition);
}
.search-bar-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    color: var(--primary);
}

.search-input {
    border: none;
    outline: none;
    flex: 1;
    font-family: inherit;
    font-size: 0.95rem;
    background: transparent;
    color: var(--text-dark);
}

/* ========== TABLE ========== */
.catalog-table-container { animation: fadeUp 0.6s 0.15s ease both; }

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

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

th {
    text-align: left;
    padding: 1.1rem 1.4rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--off-white);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }

tr { transition: background 0.2s ease; }
tr:hover td { background: rgba(27, 67, 50, 0.015); }

.row-anim {
    animation: fadeUp 0.6s ease both;
}

tr { transition: background 0.2s ease; }
tr:hover td { background: rgba(27, 67, 50, 0.015); }

.prod-img {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: transform 0.3s ease;
}
tr:hover .prod-img { transform: scale(1.08); }

.actions { display: flex; gap: 8px; }

.action-btn {
    padding: 0.45rem 1rem;
    border-radius: 100px;
    border: none;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.edit-btn { background: var(--primary-glow); color: var(--primary); }
.edit-btn:hover { background: rgba(27, 67, 50, 0.2); }

.delete-btn { background: var(--danger-bg); color: var(--danger); }
.delete-btn:hover { background: rgba(229, 62, 62, 0.15); }

/* ========== LOADING & EMPTY ========== */
.loading-state, .empty-state {
    padding: 6rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
}

.empty-state svg { opacity: 0.3; }
.empty-state h3 { font-size: 1.4rem; color: var(--text-dark); }
.empty-state p { max-width: 300px; font-size: 0.95rem; }

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ========== MODAL ========== */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}
.modal.active { display: flex; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-panel {
    background: var(--bg-white);
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    position: relative;
    z-index: 1;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Premium Visible Scrollbar for Modal */
.modal-panel::-webkit-scrollbar {
    width: 6px;
}
.modal-panel::-webkit-scrollbar-track {
    background: transparent;
}
.modal-panel::-webkit-scrollbar-thumb {
    background: rgba(27, 67, 50, 0.15);
    border-radius: 10px;
}
.modal-panel::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2.5rem 2.5rem 0;
    position: sticky;
    top: 0;
    background: var(--bg-white);
    z-index: 10;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-tag {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}
#modalTitle { font-family: 'Playfair Display', serif; font-size: 1.8rem; letter-spacing: -0.5px; }

.modal-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--off-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
    flex-shrink: 0;
    margin-left: 1rem;
}
.modal-close-btn:hover { background: var(--danger-bg); color: var(--danger); border-color: transparent; transform: rotate(90deg); }

/* ========== STEP INDICATOR ========== */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.8rem 2.5rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;
}

.step span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--off-white);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition);
}

.step label {
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.step.active span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 6px 14px rgba(27, 67, 50, 0.3);
}
.step.active label { color: var(--primary); }

.step.done span {
    background: var(--primary-glow);
    color: var(--primary);
    border-color: var(--primary);
}

.step-line {
    height: 2px;
    width: 60px;
    background: var(--border);
    margin: 0 8px;
    margin-bottom: 20px;
    border-radius: 2px;
    transition: var(--transition);
}
.step-line.done { background: var(--primary); }

/* ========== FORM STEPS ========== */
.form-step {
    display: none;
    padding: 2rem 2.5rem;
    flex-direction: column;
    gap: 0;
    animation: fadeIn 0.35s ease;
}
.form-step.active { display: flex; }

.form-group { margin-bottom: 1.4rem; }

.form-group label {
    display: block;
    margin-bottom: 0.55rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}
.required { color: var(--danger); margin-left: 2px; }

.input-wrap { position: relative; }

.input-wrap input {
    width: 100%;
    padding: 0.9rem 1.1rem 0.9rem 1.1rem;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--bg-white);
    color: var(--text-dark);
    transition: var(--transition);
    outline: none;
}
.input-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.input-wrap input.invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.1); }

.input-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

textarea {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--bg-white);
    color: var(--text-dark);
    resize: vertical;
    min-height: 110px;
    outline: none;
    transition: var(--transition);
}
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }
textarea.invalid { border-color: var(--danger); }

.char-count { text-align: right; font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

.field-error {
    display: block;
    font-size: 0.82rem;
    color: var(--danger);
    margin-top: 5px;
    min-height: 18px;
    transition: var(--transition);
}

/* ========== DROP ZONES ========== */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    background: var(--off-white);
}
.drop-zone:hover, .drop-zone.over {
    border-color: var(--primary);
    background: var(--primary-glow);
}
.drop-zone.has-image { border-style: solid; border-color: var(--primary); }

.file-input {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 20;
}

.drop-zone-inner {
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}
.drop-icon { color: var(--primary); opacity: 0.6; transition: var(--transition); }
.drop-zone:hover .drop-icon { opacity: 1; transform: translateY(-4px); }

.drop-zone-title { font-size: 0.95rem; font-weight: 500; }
.drop-zone-title span { color: var(--primary); text-decoration: underline; }
.drop-zone-sub { font-size: 0.8rem; }

.drop-zone-sm .drop-zone-inner { padding: 1.5rem 1rem; }
.drop-zone-sm .drop-zone-inner span { font-size: 0.85rem; }

.preview-zone {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.drop-zone.has-image .preview-zone {
    opacity: 1;
}

.drop-zone.has-image .file-input {
    pointer-events: none;
}

.preview-zone img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius) - 4px);
    pointer-events: none;
}

.preview-zone .remove-img-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    color: var(--danger);
    transition: var(--transition);
    pointer-events: auto;
}
.preview-zone .remove-img-btn:hover { background: var(--danger); color: white; }

.secondary-images-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;

    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* ========== REVIEW CARD ========== */
.review-card {
    display: flex;
    gap: 1.5rem;
    background: var(--off-white);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.review-img-wrap {
    width: 110px;
    min-width: 110px;
    height: 110px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--border);
    position: relative;
}
.review-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

.review-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.review-tag {
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}
.review-details h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: 4px; }
.review-price { color: var(--primary); font-weight: 600; font-size: 1.1rem; margin-bottom: 6px; }
.review-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }

/* ========== STEP NAV ========== */
.step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.btn-submit { min-width: 160px; justify-content: center; }

.dot-spinner { display: flex; gap: 5px; }
.dot-spinner div {
    width: 7px; height: 7px;
    background: white;
    border-radius: 50%;
    animation: dotBounce 0.8s infinite ease;
}
.dot-spinner div:nth-child(2) { animation-delay: 0.15s; }
.dot-spinner div:nth-child(3) { animation-delay: 0.3s; }

/* ========== DELETE CONFIRM ========== */
.confirm-popup {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}
.confirm-popup.active { display: flex; }

.confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.25s ease;
}

.confirm-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
    position: relative;
    z-index: 1;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-icon {
    width: 64px;
    height: 64px;
    background: var(--danger-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--danger);
}

.confirm-card h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin-bottom: 0.8rem; }
.confirm-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 2rem; }

.confirm-actions { display: flex; gap: 1rem; justify-content: center; }
.confirm-actions .btn { flex: 1; justify-content: center; }

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-white);
    border-radius: 14px;
    padding: 1rem 1.4rem;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 360px;
    pointer-events: all;
    animation: toastIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-left: 4px solid transparent;
}
.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.warn { border-color: var(--warn); }

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.toast.success .toast-icon { background: var(--success-bg); color: var(--success); }
.toast.error .toast-icon { background: var(--danger-bg); color: var(--danger); }
.toast.warn .toast-icon { background: var(--warn-bg); color: var(--warn); }

.toast-body { flex: 1; }
.toast-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 1px; }
.toast-msg { font-size: 0.82rem; color: var(--text-muted); }

.toast-dismiss {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 2px;
    transition: color 0.2s;
}
.toast-dismiss:hover { color: var(--text-dark); }

.toast.hiding { animation: toastOut 0.3s ease forwards; }

/* ========== MOBILE MENU BTN ========== */
.mobile-menu-btn {
    display: none;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 12px;
    position: fixed;
    top: 1.2rem;
    left: 1.2rem;
    z-index: 300;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: var(--transition);
}
.mobile-menu-btn:hover { transform: scale(1.05); }

/* ========== ANIMATIONS ========== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(40px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dotBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(60px); } }

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -300px;
        z-index: 200;
        box-shadow: 20px 0 60px rgba(0,0,0,0.15);
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sidebar.active { left: 0; }
    .sidebar-overlay.active { display: block; }
    .mobile-menu-btn { display: flex; }
    .main-content { padding: 5rem 1.5rem 3rem; }
    .content-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .btn-primary { width: 100%; justify-content: center; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .stats-row .stat-card:last-child { grid-column: span 2; }

    /* Card Table for Mobile */
    table, thead, tbody, th, td, tr { display: block; }
    thead tr { position: absolute; top: -9999px; left: -9999px; }
    tr {
        background: var(--bg-white);
        margin-bottom: 16px;
        border-radius: 16px;
        padding: 1.2rem;
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    td {
        border: none;
        padding: 0.6rem 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: right;
    }
    td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--text-muted);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        text-align: left;
    }
    .prod-img { width: 80px; height: 80px; margin: 0 auto 12px; display: block; }
    .modal-panel { max-width: 100%; max-height: 85vh; border-radius: 20px 20px 0 0; margin-top: auto; overflow-y: auto; }
    .modal { align-items: flex-end; }
    .upload-grid { grid-template-columns: 1fr; }
}

@media (max-width: 576px) {
    .stats-row { grid-template-columns: 1fr; }
    .stats-row .stat-card:last-child { grid-column: auto; }
    .modal-header, .form-step { padding-left: 1.5rem; padding-right: 1.5rem; }
    .step-indicator { padding: 1.5rem; }
    .step-nav { flex-direction: column; gap: 10px; }
    .step-nav .btn { width: 100%; justify-content: center; }
    .confirm-actions { flex-direction: column; }
    .toast-container { left: 1rem; right: 1rem; bottom: 1rem; }
    .toast { min-width: 0; }
}