/* ═══════════════════════════════════════════════════════════════════════════
   KODA GRID PRODUCTION — ADMINISTRATIVE CONTROL CENTER
   Modulo-Engineered Enterprise Admin Architecture
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --bg-main: #f8fafc;
    --bg-surface: rgba(255, 255, 255, 0.88);
    --bg-card: rgba(255, 255, 255, 0.95);
    --border-color: rgba(14, 165, 233, 0.22);
    --border-subtle: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --accent: #0284c7;
    --accent-glow: rgba(2, 132, 199, 0.18);
    --accent-cyan: #0ea5e9;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-amber: #f59e0b;
    --accent-purple: #8b5cf6;
    --sidebar-width: 260px;
    --header-height: 70px;
    --font-head: 'Space Grotesk', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --shadow-card: 0 10px 30px -10px rgba(14, 165, 233, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] {
    --bg-main: #070d19;
    --bg-surface: rgba(11, 19, 36, 0.85);
    --bg-card: rgba(13, 23, 44, 0.92);
    --border-color: rgba(56, 189, 248, 0.22);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.22);
    --accent-cyan: #00e5ff;
    --shadow-card: 0 15px 40px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(56, 189, 248, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
}

body, .sidebar-nav, .table-responsive, .modal-body {
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

body::-webkit-scrollbar, .sidebar-nav::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar, .modal-body::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

body::-webkit-scrollbar-thumb, .sidebar-nav::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb, .modal-body::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.48);
    border: 3px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
}

/* Background Cyber Grid */
#admin-bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.45;
}

/* ── 1. ACCESS GATE (UNAUTHORIZED STATE) ── */
.access-gate-wrap {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-main);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.access-gate-wrap.active {
    display: flex;
}

.access-gate-card {
    max-width: 480px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(24px);
    position: relative;
    overflow: hidden;
}

.access-gate-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.15), rgba(56, 189, 248, 0.25));
    border: 1px solid var(--border-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--accent);
}

.access-gate-title {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.access-gate-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 28px;
}

.access-gate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-family: var(--font-head);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.4);
    transition: all 0.2s ease;
}

.access-gate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.55);
}

/* ── 2. MAIN ADMIN LAYOUT ── */
.admin-layout {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow: visible;
}

/* SIDEBAR */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(28px);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    height: 100vh;
    height: 100dvh;
    left: 0;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-subtle);
    text-decoration: none;
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
}

.sidebar-brand-meta strong {
    display: block;
    font-family: var(--font-head);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.sidebar-brand-meta span {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 16px;
    overflow-y: auto;
    min-height: 0;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-category {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 12px 14px 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(14, 165, 233, 0.08);
    color: var(--text-primary);
    transform: translateX(3px);
}

.sidebar-link:hover i {
    color: var(--accent);
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.15), rgba(14, 165, 233, 0.1));
    border-color: var(--border-color);
    color: var(--accent);
    box-shadow: 0 4px 14px var(--accent-glow);
}

.sidebar-link.active i {
    color: var(--accent);
}

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

.user-badge-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(14, 165, 233, 0.06);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
}

.user-badge-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    overflow: hidden;
}

.user-badge-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-badge-info {
    flex: 1;
    overflow: hidden;
}

.user-badge-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-badge-role {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
}

/* MAIN WORKSPACE */
.admin-workspace {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
}

/* TOPBAR */
.admin-topbar {
    height: var(--header-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(28px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 90;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

.topbar-page-title {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.topbar-live-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-green);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    color: var(--accent);
    border-color: var(--border-color);
    background: var(--accent-glow);
    transform: translateY(-2px);
}

/* CONTENT VIEWPORT */
.admin-viewport {
    padding: 32px;
    flex: 1;
    min-height: 0;
    overflow: visible;
}

.tab-section {
    display: none;
}

.tab-section.active {
    display: block;
    animation: fadeInSection 0.3s ease;
}

@keyframes fadeInSection {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* SECTION HEADINGS */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-head-info h2 {
    font-family: var(--font-head);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.section-head-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ── 3. KPI STATS GRID ── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.25s ease;
}

.kpi-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 16px 36px -10px var(--accent-glow);
}

.kpi-content .kpi-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.kpi-content .kpi-val {
    font-family: var(--font-head);
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 8px 0 4px;
}

.kpi-content .kpi-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.kpi-icon.blue { background: rgba(2, 132, 199, 0.12); color: #0284c7; }
.kpi-icon.green { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.kpi-icon.purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.kpi-icon.red { background: rgba(239, 68, 68, 0.12); color: #ef4444; }

/* ── 4. DATA TABLES & CARDS ── */
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
    margin-bottom: 24px;
}

.admin-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 16px;
    color: var(--text-secondary);
    font-size: 13px;
}

.admin-list-toolbar > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-save-order {
    width: auto;
    padding: 10px 16px;
    font-size: 13px;
}

.btn-save-order:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-save-order.has-pending-order {
    animation: savePulse 1.4s ease-in-out infinite;
}

@keyframes savePulse {
    50% { box-shadow: 0 0 24px rgba(14, 165, 233, 0.55); }
}

.admin-reorder-card {
    transition: transform 0.24s cubic-bezier(.2,.8,.2,1), opacity 0.2s ease, box-shadow 0.2s ease;
}

.admin-reorder-card.is-dragging {
    opacity: 0.5;
    transform: scale(0.985) rotate(-0.35deg);
    box-shadow: 0 18px 40px rgba(2, 132, 199, 0.24);
}

.admin-list-avatar {
    flex: 0 0 48px;
}

.admin-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-drag-handle {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: grab;
    touch-action: none;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.admin-drag-handle:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: scale(1.06);
}

.admin-drag-handle:active { cursor: grabbing; }

.visit-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.visit-notice i { color: var(--accent); margin-top: 2px; }

.visit-access-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.visit-access-row .form-input { max-width: 360px; }
.visit-access-row .btn-primary { width: auto; padding: 10px 16px; font-size: 13px; }
.visits-table { min-width: 980px; }
.visits-table td { max-width: 330px; white-space: normal; overflow-wrap: anywhere; }
.table-empty { padding: 24px !important; text-align: center; color: var(--text-muted); }

.card-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title-bar h3 {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title-bar h3 i {
    color: var(--accent);
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: rgba(14, 165, 233, 0.03);
}

/* User cell */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-cell-avt {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(14, 165, 233, 0.15);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    overflow: hidden;
}

.user-cell-avt img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-cell-meta strong {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
}

.user-cell-meta span {
    font-size: 12px;
    color: var(--text-muted);
}

/* Status Badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.status-pill.active { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.status-pill.banned { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.status-pill.google { background: rgba(66, 133, 244, 0.12); color: #4285f4; }
.status-pill.email { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

/* Action Buttons */
.action-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-action-small {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-action-small:hover {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.btn-action-small.red:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: #ef4444;
    color: #ef4444;
}

.btn-action-small.green:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: #10b981;
    color: #10b981;
}

/* ── 5. MODULO-STYLE PERMISSION BADGES ── */
.perms-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.perm-badge {
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    font-family: monospace;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.perm-badge:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    transform: scale(1.05);
}

.perm-badge.active {
    background: rgba(2, 132, 199, 0.18);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.3);
}

.perm-badge.locked {
    cursor: not-allowed;
    opacity: 0.85;
}

/* Master Admin Crown Pill */
.master-crown {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.15));
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 6px;
    color: #f59e0b;
    font-size: 11px;
    font-weight: 800;
}

/* ── 6. FORMS & INPUTS ── */
.admin-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.5);
}

/* ── 7. PRODUCT MATRIX CARD PREVIEWS ── */
.products-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.product-item-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all 0.2s ease;
}

.product-item-card.product-reorder-card {
    position: relative;
    cursor: default;
    transition: transform 0.24s cubic-bezier(.2,.8,.2,1), opacity 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-item-card.product-reorder-card.is-dragging {
    opacity: 0.58;
    transform: scale(1.025) rotate(-1deg);
    border-color: var(--accent);
    box-shadow: 0 18px 38px rgba(14, 165, 233, 0.3);
    z-index: 2;
}

.product-order-toolbar span { display: inline-flex; align-items: center; gap: 9px; }
.product-order-toolbar span i { color: var(--accent); }
.product-drag-handle { flex: 0 0 36px; }
.product-drag-handle:hover { animation: dragGripWiggle 0.48s ease-in-out; }

@keyframes dragGripWiggle {
    25% { transform: scale(1.08) rotate(-8deg); }
    60% { transform: scale(1.08) rotate(8deg); }
}

.product-item-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.product-preview-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--accent);
    overflow: hidden;
    flex-shrink: 0;
}

.product-preview-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.product-item-info {
    flex: 1;
    overflow: hidden;
}

.product-item-info strong {
    display: block;
    font-size: 15px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-item-info span {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* ── 8. MODALS ── */
.admin-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

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

.admin-modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    max-width: 540px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: modalPop 0.25s ease;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: #ef4444;
}

.modal-body {
    padding: 24px;
    max-height: 75vh;
    overflow-y: auto;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.info-item {
    background: var(--bg-surface);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.info-item .lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.info-item .val {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 4px;
    word-break: break-all;
}

/* Toast */
.admin-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    padding: 12px 20px;
    background: #0f172a;
    border: 1px solid var(--accent);
    color: #fff;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.admin-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-workspace {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .admin-viewport { padding: 22px 18px; }
    .admin-list-toolbar { align-items: flex-start; flex-direction: column; }
    .visit-access-row { align-items: stretch; flex-direction: column; }
    .visit-access-row .form-input { max-width: none; }
}
