/* ============================================================
   IZONE Africa × Magic City — Admin
   Professional CMS theme (dark cosmic identity)
   ============================================================ */

:root {
    --admin-bg: #080b18;
    --admin-bg-soft: #0c1124;
    --admin-panel: #111834;
    --admin-panel-2: #161f42;
    --admin-border: #232d55;
    --admin-border-soft: #1b2445;
    --admin-text: #e7ebf9;
    --admin-text-muted: #8b94bc;
    --admin-text-dim: #5c6590;
    --admin-accent: #4f6ef7;
    --admin-accent-2: #9a5cff;
    --admin-gradient: linear-gradient(135deg, #4f6ef7 0%, #9a5cff 100%);
    --admin-green: #22c55e;
    --admin-amber: #f59e0b;
    --admin-red: #ef4444;
    --admin-sidebar-w: 264px;
    --admin-sidebar-w-collapsed: 76px;
    --admin-radius: 12px;
    --admin-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body.admin-body {
    font-family: "Segoe UI", "Instrument Sans", Arial, sans-serif;
    background:
        radial-gradient(1100px 500px at 85% -10%, rgba(79, 110, 247, 0.16) 0%, transparent 55%),
        radial-gradient(900px 480px at -10% 110%, rgba(154, 92, 255, 0.10) 0%, transparent 55%),
        var(--admin-bg);
    color: var(--admin-text);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
svg { display: block; }

/* ---------- Shell ---------- */
.admin-shell {
    display: grid;
    grid-template-columns: var(--admin-sidebar-w) 1fr;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: rgba(13, 18, 38, 0.94);
    border-right: 1px solid var(--admin-border-soft);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.22s ease;
    z-index: 60;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 18px;
    border-bottom: 1px solid var(--admin-border-soft);
    white-space: nowrap;
    overflow: hidden;
}

.brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background: var(--admin-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    letter-spacing: 0.5px;
}

.brand-text { line-height: 1.15; }
.brand-text .brand-name { font-size: 13px; font-weight: 700; letter-spacing: 0.3px; }
.brand-text .brand-sub { font-size: 11px; color: var(--admin-accent-2); font-weight: 600; }

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px 20px;
}

.sidebar-scroll::-webkit-scrollbar { width: 6px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--admin-border); border-radius: 4px; }

.nav-section { margin-bottom: 18px; }

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--admin-text-dim);
    padding: 0 10px;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 10px;
    margin: 2px 0;
    border-radius: 9px;
    color: var(--admin-text-muted);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--admin-text); }

.nav-item.active {
    background: rgba(79, 110, 247, 0.16);
    color: #fff;
    box-shadow: inset 2px 0 0 var(--admin-accent);
}

.nav-item svg { flex: 0 0 18px; width: 18px; height: 18px; }

/* Nav groups with children */
.nav-group {
    position: relative;
}

.nav-group .nav-item {
    justify-content: space-between;
}

.nav-group .nav-item::after {
    content: '';
    flex: 0 0 18px;
}

.nav-group .nav-item .chevron {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.nav-group.expanded .chevron {
    transform: rotate(90deg);
}

/* Nav children (sub-items) */
.nav-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
    opacity: 0;
    margin-top: 2px;
}

.nav-children.expanded {
    max-height: 500px;
    opacity: 1;
}

.nav-child {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7px 10px 7px 42px;
    margin: 1px 0;
    border-radius: 8px;
    color: var(--admin-text-muted);
    font-size: 12.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-child:hover { background: rgba(255, 255, 255, 0.04); color: var(--admin-text); }

.nav-child.active {
    background: rgba(79, 110, 247, 0.12);
    color: var(--admin-accent);
}

.nav-child .nav-soon {
    margin-left: auto;
}

/* Collapsed sidebar state for groups */
body.sidebar-collapsed .nav-children {
    display: none;
}

body.sidebar-collapsed .nav-group .nav-item::after {
    display: none;
}

body.sidebar-collapsed .nav-group .chevron {
    display: none;
}

body.sidebar-collapsed .nav-group .nav-item {
    justify-content: center;
    padding: 10px;
}

.sidebar-actions {
    padding: 12px;
    border-top: 1px solid var(--admin-border-soft);
    display: grid;
    gap: 8px;
}

.sidebar-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--admin-border-soft);
    color: var(--admin-text-muted);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.sidebar-action:hover { background: rgba(255, 255, 255, 0.08); color: var(--admin-text); }

.sidebar-action.primary {
    background: var(--admin-gradient);
    border: 0;
    color: #fff;
}
.sidebar-action.primary:hover { filter: brightness(1.1); }

.sidebar-action svg { flex: 0 0 16px; width: 16px; height: 16px; }

/* Collapsed state */
body.sidebar-collapsed .admin-shell { grid-template-columns: var(--admin-sidebar-w-collapsed) 1fr; }
body.sidebar-collapsed .admin-sidebar { width: var(--admin-sidebar-w-collapsed); }
body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .nav-section-title,
body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .sidebar-action span { display: none; }
body.sidebar-collapsed .nav-item,
body.sidebar-collapsed .sidebar-action { justify-content: center; padding: 10px; }
body.sidebar-collapsed .sidebar-brand { justify-content: center; }

/* ---------- Backdrop (mobile) ---------- */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }

/* ---------- Main ---------- */
.admin-main { display: flex; flex-direction: column; min-width: 0; }

/* ---------- Topbar ---------- */
.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    background: rgba(11, 16, 34, 0.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--admin-border-soft);
}

.icon-btn {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid var(--admin-border-soft);
    background: rgba(255, 255, 255, 0.03);
    color: var(--admin-text-muted);
}

.icon-btn:hover { color: var(--admin-text); background: rgba(255, 255, 255, 0.07); }
.icon-btn svg { width: 19px; height: 19px; }

.topbar-search {
    flex: 1;
    max-width: 460px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    height: 38px;
    border-radius: 9px;
    border: 1px solid var(--admin-border-soft);
    background: rgba(255, 255, 255, 0.03);
    color: var(--admin-text-dim);
    font-size: 13px;
}

.topbar-search svg { width: 16px; height: 16px; flex: 0 0 16px; }
.topbar-search input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--admin-text);
    font-size: 13px;
}

.notif-btn { position: relative; }
.notif-dot {
    position: absolute;
    top: 8px;
    right: 9px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--admin-red);
    border: 2px solid var(--admin-panel);
}

.user-chip { position: relative; }

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px 5px 5px;
    border-radius: 10px;
    border: 1px solid var(--admin-border-soft);
    background: rgba(255, 255, 255, 0.03);
    color: var(--admin-text);
}

.user-menu-btn:hover { background: rgba(255, 255, 255, 0.07); }

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--admin-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.user-meta { text-align: left; line-height: 1.15; }
.user-meta .user-name { font-size: 13px; font-weight: 600; }
.user-meta .user-role { font-size: 11px; color: var(--admin-accent-2); font-weight: 600; }

.user-menu-btn .chevron { width: 15px; height: 15px; color: var(--admin-text-dim); }

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--admin-panel);
    border: 1px solid var(--admin-border);
    border-radius: 11px;
    box-shadow: var(--admin-shadow);
    padding: 6px;
    display: none;
}

.user-dropdown.open { display: block; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--admin-text-muted);
    font-size: 13px;
    text-align: left;
}

.dropdown-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--admin-text); }
.dropdown-item.danger:hover { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }
.dropdown-item svg { width: 16px; height: 16px; flex: 0 0 16px; }

.dropdown-sep { height: 1px; background: var(--admin-border-soft); margin: 6px 4px; }

/* ---------- Page ---------- */
.admin-page { padding: 24px; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: 0.2px; }
.page-head .page-sub { font-size: 13px; color: var(--admin-text-muted); margin-top: 4px; }

/* ---------- Summary cards ---------- */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 26px;
}

.summary-card {
    background: linear-gradient(180deg, var(--admin-panel) 0%, var(--admin-panel-2) 100%);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--admin-radius);
    padding: 16px;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.summary-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 90px;
    height: 90px;
    background: radial-gradient(circle at top right, rgba(79, 110, 247, 0.16), transparent 70%);
}

.summary-label {
    font-size: 12px;
    color: var(--admin-text-muted);
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.summary-label svg { width: 15px; height: 15px; color: var(--admin-accent); flex: 0 0 15px; }

.summary-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.summary-value small { font-size: 14px; font-weight: 600; color: var(--admin-text-muted); }

.summary-hint { margin-top: 8px; font-size: 11px; color: var(--admin-text-dim); }

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.badge.green { background: rgba(34, 197, 94, 0.16); color: #4ade80; }
.badge.amber { background: rgba(245, 158, 11, 0.16); color: #fbbf24; }
.badge.red { background: rgba(239, 68, 68, 0.16); color: #f87171; }
.badge.violet { background: rgba(154, 92, 255, 0.16); color: #c084fc; }
.badge.blue { background: rgba(79, 110, 247, 0.16); color: #93aaff; }

/* ---------- Sections ---------- */
.dashboard-sections {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.panel {
    background: var(--admin-panel);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--admin-radius);
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--admin-border-soft);
}

.panel-head h2 { font-size: 14px; font-weight: 700; }

.panel-link { font-size: 12px; color: var(--admin-accent); font-weight: 600; }
.panel-link:hover { text-decoration: underline; }

.panel-body { padding: 14px 16px; }

.empty-state {
    padding: 26px 12px;
    text-align: center;
    color: var(--admin-text-dim);
    font-size: 13px;
}

.empty-state svg { width: 30px; height: 30px; margin: 0 auto 10px; color: var(--admin-text-dim); }

/* Sales overview placeholder bars */
.sales-placeholder {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 150px;
    padding-top: 12px;
}

.sales-bar {
    flex: 1;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, var(--admin-accent) 0%, rgba(79, 110, 247, 0.25) 100%);
    opacity: 0.55;
}

.sales-note {
    margin-top: 12px;
    text-align: center;
    font-size: 12px;
    color: var(--admin-text-dim);
}

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.data-table th {
    text-align: left;
    padding: 10px 16px;
    color: var(--admin-text-dim);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--admin-border-soft);
    white-space: nowrap;
}

.data-table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--admin-border-soft);
    color: var(--admin-text-muted);
    white-space: nowrap;
}

.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }

/* ---------- Profile page ---------- */
.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; }

.profile-card { padding: 22px; text-align: center; }
.profile-avatar {
    width: 84px;
    height: 84px;
    margin: 0 auto 14px;
    border-radius: 22px;
    background: var(--admin-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 800;
    color: #fff;
}
.profile-card h2 { font-size: 17px; margin-bottom: 4px; }
.profile-card .role-line { font-size: 13px; color: var(--admin-accent-2); font-weight: 600; }

.profile-meta { padding: 6px 0; }
.profile-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--admin-border-soft);
    font-size: 13px;
}
.profile-row:last-child { border-bottom: 0; }
.profile-row .k { color: var(--admin-text-dim); }
.profile-row .v { color: var(--admin-text); font-weight: 600; word-break: break-all; text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
    .summary-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
    .dashboard-sections { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: var(--admin-sidebar-w);
        transform: translateX(-100%);
        box-shadow: var(--admin-shadow);
    }
    body.sidebar-open .admin-sidebar { transform: translateX(0); }
    body.sidebar-collapsed .admin-sidebar { width: var(--admin-sidebar-w); }
    body.sidebar-collapsed .brand-text,
    body.sidebar-collapsed .nav-section-title,
    body.sidebar-collapsed .nav-item span,
    body.sidebar-collapsed .sidebar-action span { display: inline; }
    body.sidebar-collapsed .nav-item,
    body.sidebar-collapsed .sidebar-action { justify-content: flex-start; padding: 9px 10px; }
    body.sidebar-collapsed .sidebar-brand { justify-content: flex-start; }
    .user-meta { display: none; }
}

@media (max-width: 640px) {
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-page { padding: 16px; }
    .topbar-search { display: none; }
    .page-head h1 { font-size: 19px; }
}

@media (max-width: 420px) {
    .summary-grid { grid-template-columns: 1fr; }
}
/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    border-radius: 9px;
    border: 1px solid var(--admin-border);
    background: transparent;
    color: var(--admin-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}
.btn:hover { background: rgba(255, 255, 255, 0.06); }
.btn-primary {
    background: var(--admin-gradient);
    border: 0;
    color: #fff;
}
.btn-primary:hover { background: var(--admin-gradient); filter: brightness(1.1); }
.btn-ghost { border: 1px solid var(--admin-border); color: var(--admin-text-muted); }
.btn-danger { border: 1px solid rgba(239, 68, 68, 0.4); color: #f87171; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }

.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Inputs ---------- */
.input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 9px;
    border: 1px solid var(--admin-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--admin-text);
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.22);
}
.input::placeholder { color: var(--admin-text-dim); }
select.input option { background: var(--admin-panel); color: var(--admin-text); }

/* ---------- Filter bar ---------- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--admin-panel);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--admin-radius);
    padding: 12px;
    margin-bottom: 16px;
}
.filter-search { flex: 1 1 220px; max-width: 420px; }
.filter-bar select.input { width: auto; min-width: 150px; }

/* ---------- Flash ---------- */
.flash {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid;
}
.flash-success { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.35); color: #4ade80; }
.flash-error { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.35); color: #f87171; }

/* ---------- Table extras ---------- */
.thumb {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: var(--admin-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}
.cell-main { font-weight: 600; color: var(--admin-text); }
.cell-sub { font-size: 11.5px; color: var(--admin-text-dim); }
.text-dim { color: var(--admin-text-dim); }
.row-actions { display: flex; align-items: center; gap: 8px; }
.empty-state-lg { padding: 46px 16px; }
.empty-state-lg svg { width: 42px; height: 42px; }
.empty-state-lg p { margin-bottom: 14px; }

/* ---------- Pagination ---------- */
.pagination-wrap { padding: 14px 16px; border-top: 1px solid var(--admin-border-soft); }
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--admin-text-muted);
}
.pagination-links { display: flex; align-items: center; gap: 6px; }
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    color: var(--admin-text-muted);
    font-size: 12.5px;
    font-weight: 600;
}
.page-link:hover { background: rgba(255, 255, 255, 0.06); color: var(--admin-text); }
.page-link.disabled { opacity: 0.4; pointer-events: none; }
.page-link.active {
    background: var(--admin-gradient);
    border-color: transparent;
    color: #fff;
}
.page-ellipsis { color: var(--admin-text-dim); padding: 0 2px; }

/* ---------- Product form ---------- */
.product-form {
    background: var(--admin-panel);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--admin-radius);
    padding: 20px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-field label,
.field-label { font-size: 12.5px; font-weight: 600; color: var(--admin-text-muted); }
.field-error { font-size: 12px; color: #f87171; }
.field-hint { font-size: 12px; color: var(--admin-text-dim); }
.span-2 { grid-column: span 2; }
.check-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.check-option {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--admin-text-muted);
    cursor: pointer;
}
.check-option input { accent-color: var(--admin-accent); width: 15px; height: 15px; }
.check-row-wrap { gap: 10px 20px; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--admin-border-soft); }

/* ---------- Form Layout (Gift Service style) ---------- */
.form-layout { display: flex; flex-direction: column; gap: 20px; }
.form-section { background: var(--admin-panel); border: 1px solid var(--admin-border-soft); border-radius: var(--admin-radius); padding: 20px; }
.form-section h2 { font-size: 14px; font-weight: 700; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--admin-border-soft); }
.form-row { display: flex; gap: 16px; }
.form-row .form-field { flex: 1; min-width: 0; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--admin-border-soft); }

@media (max-width: 640px) {
    .form-grid, .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
    .span-2 { grid-column: span 1; }
    .form-row { flex-direction: column; }
    .filter-bar select.input { width: 100%; min-width: 0; }
    .icon-picker-row { flex-wrap: wrap; }
    .icon-picker-trigger { width: 100%; }
    .svg-picker-dialog { max-width: 95vw; max-height: 85vh; }
    .svg-picker-grid { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
}

/* ---------- Media library ---------- */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    padding: 16px;
}
.media-card {
    background: var(--admin-panel-2);
    border: 1px solid var(--admin-border-soft);
    border-radius: 11px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.media-thumb {
    aspect-ratio: 4 / 3;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-file-icon { font-size: 30px; opacity: 0.5; }
.media-meta { padding: 10px 11px; flex: 1; min-width: 0; }
.media-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--admin-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.media-dims { font-size: 11px; color: var(--admin-text-dim); margin-bottom: 7px; }
.media-meta-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.media-type { font-size: 10.5px; color: var(--admin-text-dim); }
.media-actions { padding: 0 11px 11px; }
.badge.gray { background: rgba(139, 148, 188, 0.16); color: var(--admin-text-muted); }

/* Media toolbar & view toggles */
.media-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid var(--admin-border-soft); }
.media-view-toggles { display: flex; gap: 4px; }
.media-view-btn { padding: 5px 8px !important; }
.media-view-btn.active { background: var(--admin-primary, #4f6ef7); color: #fff; }
.media-count-label { font-size: 12px; color: var(--admin-text-dim); }

/* List view */
.media-view-list { display: flex; flex-direction: column; gap: 0; padding: 0; }
.media-view-list .media-card { flex-direction: row; border-radius: 0; border-bottom: 1px solid var(--admin-border-soft); }
.media-view-list .media-card:last-child { border-bottom: none; }
.media-view-list .media-thumb { width: 60px; height: 60px; aspect-ratio: 1; flex-shrink: 0; border-radius: 0; }
.media-view-list .media-meta { flex: 1; padding: 8px 12px; display: flex; align-items: center; gap: 16px; }
.media-view-list .media-name { margin-bottom: 0; white-space: nowrap; min-width: 150px; }
.media-view-list .media-dims { margin-bottom: 0; }
.media-view-list .media-tags { display: none; }
.media-view-list .media-meta-row { margin-left: auto; }
.media-view-list .media-actions { padding: 8px 12px; flex-shrink: 0; display: flex; gap: 6px; align-items: center; }

/* Large view */
.media-view-large { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding: 16px; }
.media-view-large .media-thumb { aspect-ratio: 16 / 10; }

/* Selected card */
.media-card.is-selected { border-color: var(--admin-primary, #4f6ef7); box-shadow: 0 0 0 2px rgba(79, 110, 247, 0.3); }

/* Multi-select mode */
#mediaMultiSelectBtn.active { background: var(--admin-primary, #4f6ef7); color: #fff; }
.media-card { position: relative; }
.media-card-check {
    position: absolute; top: 8px; left: 8px; width: 22px; height: 22px;
    background: var(--admin-panel); border: 1.5px solid var(--admin-border);
    border-radius: 4px; display: flex; align-items: center; justify-content: center;
    color: transparent; cursor: pointer; z-index: 3; transition: all 0.15s;
}
.media-card-check svg { width: 14px; height: 14px; }
.media-card.is-checked .media-card-check { background: var(--admin-primary, #4f6ef7); border-color: var(--admin-primary, #4f6ef7); color: #fff; }
.media-card.is-checked { border-color: var(--admin-primary, #4f6ef7); box-shadow: 0 0 0 2px rgba(79, 110, 247, 0.25); }
.media-selection-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 16px; border-bottom: 1px solid var(--admin-border-soft);
    background: rgba(79, 110, 247, 0.08);
    font-size: 13px; color: var(--admin-text);
}
.media-selection-bar[hidden] { display: none; }
.media-selection-actions { display: flex; gap: 8px; align-items: center; }

/* Detail panel (side panel) */
.media-detail-panel {
    position: fixed; top: 0; right: 0; width: 360px; height: 100vh;
    background: var(--admin-panel); border-left: 1px solid var(--admin-border-soft);
    box-shadow: -4px 0 24px rgba(0,0,0,0.15); z-index: 1000;
    display: flex; flex-direction: column; overflow: hidden;
    transition: transform 0.2s ease;
}
.media-detail-panel[hidden] { display: none; }
.detail-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--admin-border-soft); }
.detail-panel-head h3 { font-size: 14px; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.detail-panel-body { flex: 1; overflow-y: auto; padding: 16px; }
.detail-panel-preview { margin-bottom: 16px; background: rgba(0,0,0,0.2); border-radius: 8px; padding: 8px; text-align: center; }
.detail-panel-preview img { max-height: 240px; object-fit: contain; }
.detail-panel-meta { display: flex; flex-direction: column; gap: 8px; }
.detail-panel-meta dt { font-size: 11px; font-weight: 600; color: var(--admin-text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.detail-panel-meta dd { font-size: 13px; color: var(--admin-text); margin: 0; word-break: break-word; }
.detail-panel-meta > div { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; border-bottom: 1px solid var(--admin-border-soft); }
.detail-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--admin-border-soft); }

@media (max-width: 768px) {
    .media-detail-panel { width: 100%; }
}

/* ---------- Upload panel ---------- */
.upload-panel {
    background: var(--admin-panel);
    border: 1px solid var(--admin-border-soft);
    border-radius: var(--admin-radius);
    padding: 16px;
    margin-bottom: 16px;
}
.upload-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 34px 16px;
    border: 1.5px dashed var(--admin-border);
    border-radius: 11px;
    color: var(--admin-text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.upload-drop:hover { border-color: var(--admin-accent); background: rgba(79, 110, 247, 0.05); }
.upload-drop input[type="file"] { display: none; }
.upload-drop strong { color: var(--admin-text); font-size: 14px; }
.upload-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }

/* ---------- Modal ---------- */
body.modal-open { overflow: hidden; }
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 18, 0.72);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal {
    width: 100%;
    max-width: 92vw;
    max-height: 85vh;
    background: var(--admin-panel);
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    box-shadow: var(--admin-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--admin-border-soft);
}
.modal-head h3 { font-size: 16px; }
.modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--admin-text-muted);
    font-size: 20px;
    line-height: 1;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.1); color: var(--admin-text); }
.modal-tabs { display: flex; gap: 10px; padding: 14px 24px 0; }
.modal-tab {
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 10px 10px 0 0;
    background: transparent;
    color: var(--admin-text-muted);
    font-size: 13px;
    font-weight: 600;
    border-bottom-color: var(--admin-border);
}
.modal-tab.active { background: rgba(79, 110, 247, 0.12); color: var(--admin-text); border-color: var(--admin-border); border-bottom-color: transparent; }
.modal-body { padding: 20px 24px 24px; overflow-y: auto; min-height: 320px; }
.picker-toolbar { margin-bottom: 16px; }

.media-pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}
.media-pick-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--admin-border-soft);
    border-radius: 10px;
    background: var(--admin-panel-2);
    color: var(--admin-text);
    text-align: left;
    transition: border-color 0.15s ease, transform 0.1s ease;
}
.media-pick-item:hover { border-color: var(--admin-accent); transform: translateY(-1px); }
.media-pick-thumb {
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 28px;
}
.media-pick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-pick-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--admin-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.picker-upload-btn { margin-top: 16px; }
.picker-upload-status.ok { color: var(--admin-green); }
.picker-upload-status.error { color: #f87171; }

/* ---------- Logo / image pick preview ---------- */
.media-pick-preview {
    width: 180px;
    height: 120px;
    border: 1px dashed var(--admin-border);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--admin-text-dim);
    font-size: 12.5px;
    text-align: center;
    padding: 8px;
}
.media-preview-img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }

/* ---------- Media library: structured upload ---------- */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}
.upload-col { display: flex; flex-direction: column; gap: 10px; }
.source-options { display: flex; gap: 8px; flex-wrap: wrap; }
.coming-soon-box {
    border: 1px dashed var(--admin-border);
    border-radius: 10px;
    padding: 18px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--admin-text-muted);
    font-size: 13px;
    line-height: 1.9;
}
.media-preview-empty { opacity: 0.6; }
.media-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 7px; }

/* ---------- Media viewer (lightbox) ---------- */
.media-viewer { margin-bottom: 16px; }
.media-viewer-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px 16px;
}
.media-viewer-meta div { display: flex; flex-direction: column; gap: 2px; }
.media-viewer-meta dt {
    font-size: 11px;
    color: var(--admin-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.media-viewer-meta dd { font-size: 13px; color: var(--admin-text); word-break: break-word; }

/* ---------- Crop editor ---------- */
.crop-toolbar { margin-bottom: 12px; }
.crop-stage {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--admin-border-soft);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.crop-stage canvas { cursor: move; max-width: 100%; }
.crop-status { margin-top: 8px; }

/* ---------- Image editor ---------- */
.modal-wide { max-width: 960px; }
.image-editor-layout { display: flex; gap: 16px; }
.image-editor-canvas-wrap { flex: 1; min-width: 0; }
.image-editor-sidebar { width: 240px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.editor-section { padding: 10px 0; border-bottom: 1px solid var(--admin-border-soft); }
.editor-section:last-child { border-bottom: none; }
.editor-btn-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.editor-slider { margin-top: 8px; }
.editor-slider label { display: flex; justify-content: space-between; font-size: 12px; color: var(--admin-text-dim); margin-bottom: 4px; }
.editor-slider input[type="range"] { width: 100%; accent-color: var(--admin-primary, #4f6ef7); }
.editor-filter.active { background: var(--admin-primary, #4f6ef7); color: #fff; border-color: var(--admin-primary, #4f6ef7); }
.editor-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.editor-actions .btn { flex: 1; min-width: 80px; }

@media (max-width: 768px) {
    .image-editor-layout { flex-direction: column; }
    .image-editor-sidebar { width: 100%; }
}

@media (max-width: 900px) {
    .upload-grid { grid-template-columns: 1fr; }
}

/* ---------- Product gallery ---------- */
#productGallery { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.gallery-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--admin-border-soft);
    border-radius: 10px;
    background: var(--admin-panel-2);
}
.gallery-row.is-primary { border-color: var(--admin-accent); box-shadow: 0 0 0 2px rgba(79, 110, 247, 0.2); }
.gallery-row.dragging { opacity: 0.5; }
.gallery-thumb {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.25);
}
.gallery-name {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    color: var(--admin-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gallery-alt { flex: 1 1 180px; min-width: 120px; max-width: 260px; padding: 7px 10px; }
.gallery-row .btn-xs { flex: 0 0 auto; }

/* ---------- Brand / category form ---------- */
.panel-form { padding: 20px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; grid-auto-rows: minmax(200px, auto); }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--admin-text-muted); margin-bottom: 6px; }
.form-label .req { color: #f87171; }
.form-label .hint { color: var(--admin-text-dim); font-weight: 400; }
.form-group { margin-bottom: 16px; min-width: 0; }
.form-group-check { display: flex; align-items: flex-end; }
.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--admin-text-muted);
    cursor: pointer;
    padding-bottom: 10px;
}
.check input { accent-color: var(--admin-accent); width: 15px; height: 15px; }

/* ---------- Settings ---------- */
.settings-group { margin-bottom: 26px; }
.settings-group-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--admin-accent);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--admin-border-soft);
    margin-bottom: 16px;
}

/* ---------- Settings section tabs ---------- */
.settings-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.settings-tab {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    background: var(--admin-panel);
    min-width: 180px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.settings-tab:hover { border-color: rgba(79, 110, 247, 0.5); }

.settings-tab.active {
    border-color: var(--admin-accent);
    background: rgba(79, 110, 247, 0.12);
    box-shadow: 0 0 0 2px rgba(79, 110, 247, 0.2);
}

.settings-tab .st-label { font-size: 13.5px; font-weight: 700; color: var(--admin-text); }
.settings-tab .st-hint { font-size: 11.5px; color: var(--admin-text-dim); }

@media (max-width: 640px) {
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Settings Control Center ---------- */
.flash-danger {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
    padding: 10px 14px;
    border-radius: var(--admin-radius);
    margin-bottom: 14px;
}
.hidden-form { display: none; }
.checks-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.checks-row .check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--admin-text); }
.btn-ghost.danger { color: #f87171; border-color: rgba(239, 68, 68, 0.35); }
.btn-ghost.danger:hover { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }
.w-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.invoice-preview {
    border: 1px dashed var(--admin-border);
    border-radius: 8px;
    padding: 16px;
    margin: 10px 0;
    background: #fff;
    color: #111;
    min-height: 60px;
}
.receipt-preview summary {
    cursor: pointer;
    color: var(--admin-accent);
    font-weight: 700;
    margin: 8px 0;
}

/* ---------- Sidebar "Soon" markers ---------- */
.nav-soon {
    margin-left: auto;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(154, 92, 255, 0.14);
    color: var(--admin-accent-2);
    border: 1px solid rgba(154, 92, 255, 0.28);
}

body.sidebar-collapsed .nav-soon { display: none; }

/* ---------- Date range selector ---------- */
.range-selector {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--admin-panel);
    border: 1px solid var(--admin-border-soft);
    border-radius: 11px;
    flex-wrap: wrap;
}

.range-chip {
    padding: 6px 13px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--admin-text-muted);
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.range-chip:hover { color: var(--admin-text); background: rgba(255, 255, 255, 0.05); }

.range-chip.active {
    background: var(--admin-gradient);
    color: #fff;
}

/* ---------- Chart legend ---------- */
.chart-legend { display: flex; align-items: center; gap: 14px; }

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--admin-text-muted);
}

.legend-item .dot { width: 9px; height: 9px; border-radius: 3px; }
.legend-item .dot.revenue { background: var(--admin-accent); }
.legend-item .dot.orders { background: var(--admin-green); }

/* ---------- CSS bar chart ---------- */
.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 210px;
    padding-top: 10px;
}

.chart-col { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100%; }

.chart-bars-row {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    min-height: 0;
}

.chart-bar {
    width: 100%;
    max-width: 26px;
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    transition: opacity 0.15s ease;
}

.chart-bar.revenue {
    background: linear-gradient(180deg, var(--admin-accent) 0%, rgba(79, 110, 247, 0.35) 100%);
}

.chart-bar.orders {
    background: linear-gradient(180deg, var(--admin-green) 0%, rgba(34, 197, 94, 0.3) 100%);
}

.chart-col:hover .chart-bar { opacity: 0.85; }

.chart-label {
    margin-top: 8px;
    text-align: center;
    font-size: 10px;
    color: var(--admin-text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-label.hide { visibility: hidden; }

/* ---------- Brand comparison ---------- */
.brand-comp { margin-bottom: 18px; }
.brand-comp:last-child { margin-bottom: 4px; }

.brand-comp-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.brand-comp-name { font-size: 13.5px; font-weight: 700; color: var(--admin-text); }

.brand-comp-counts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.brand-comp-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.brand-comp-fill { height: 100%; border-radius: 999px; transition: width 0.4s ease; }
.brand-comp-fill.izone { background: linear-gradient(90deg, var(--admin-accent), #7c8cff); }
.brand-comp-fill.mc { background: linear-gradient(90deg, var(--admin-accent-2), #c084fc); }

.brand-comp-rev { margin-top: 6px; font-size: 12px; color: var(--admin-text-muted); }

/* ---------- Order status cards ---------- */
.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.status-card {
    background: var(--admin-panel-2);
    border: 1px solid var(--admin-border-soft);
    border-radius: 11px;
    padding: 13px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-card-value { font-size: 24px; font-weight: 800; line-height: 1; }

.status-card-label { font-size: 12px; color: var(--admin-text-muted); }

.status-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.status-split-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--admin-text-dim);
    margin-bottom: 8px;
}

.status-split-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--admin-border-soft);
    font-size: 13px;
    color: var(--admin-text-muted);
}

.status-split-row:last-child { border-bottom: 0; }
.status-split-row strong { color: var(--admin-text); }

/* ---------- Stat chips ---------- */
.stat-chips {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.stat-chip {
    flex: 1 1 90px;
    min-width: 0;
    background: var(--admin-panel-2);
    border: 1px solid var(--admin-border-soft);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11px;
    color: var(--admin-text-muted);
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}

.stat-chip-value { font-size: 18px; font-weight: 800; color: var(--admin-text); line-height: 1; }
.stat-chip.warn .stat-chip-value { color: var(--admin-amber); }
.stat-chip.danger .stat-chip-value { color: var(--admin-red); }

/* ---------- Stock lists ---------- */
.stock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }

.stock-list { list-style: none; }

.stock-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--admin-border-soft);
    font-size: 13px;
    color: var(--admin-text-muted);
}

.stock-list li:last-child { border-bottom: 0; }
.stock-list li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stock-list li strong { color: var(--admin-text); }
.stock-list li strong.amber { color: var(--admin-amber); }
.stock-list li strong.red { color: var(--admin-red); }

.panel-subtitle {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--admin-text-dim);
    margin-bottom: 8px;
}

.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 18px; }

@media (max-width: 640px) {
    .status-split, .stock-grid, .split-2 { grid-template-columns: 1fr; gap: 12px; }
    .chart-bars { height: 170px; }
}

/* ==================================================================
   Product Creation Wizard
   ================================================================== */
.wizard-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    margin-bottom: 20px;
    background: var(--admin-panel);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
}

.progress-step {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--admin-text-dim);
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
}

.progress-step.active {
    color: #fff;
    background: var(--admin-accent);
    border-color: transparent;
}

.progress-step.done {
    color: var(--admin-accent);
    background: rgba(79, 110, 247, 0.12);
    border-color: rgba(79, 110, 247, 0.35);
}

.step-head { margin-bottom: 18px; }
.step-head h2 { font-size: 16px; font-weight: 700; }
.step-head p { font-size: 12.5px; color: var(--admin-text-muted); margin-top: 4px; }

.major-cards, .type-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.major-card, .type-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    background: var(--admin-panel);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.major-card:hover, .type-card:hover { border-color: rgba(79, 110, 247, 0.5); }

.major-card input, .type-card input { display: none; }

.major-card:has(input:checked), .type-card:has(input:checked) {
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 2px rgba(79, 110, 247, 0.25);
}

.major-card-name, .type-card-name { font-size: 14px; font-weight: 700; color: var(--admin-text); }
.major-card-sub, .type-card-sub { font-size: 12px; color: var(--admin-text-dim); }

.major-card.izone { border-left: 4px solid var(--admin-accent); }
.major-card.magic { border-left: 4px solid var(--admin-green); }

.attr-panel {
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    background: var(--admin-panel);
    margin-bottom: 14px;
}

.attr-list { display: flex; flex-direction: column; gap: 12px; padding: 14px; }

.attr-block {
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
}

.attr-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.attr-name { font-weight: 700; font-size: 13.5px; }

.attr-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.opt-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12.5px;
    border-radius: 999px;
    background: rgba(79, 110, 247, 0.12);
    border: 1px solid rgba(79, 110, 247, 0.35);
    color: var(--admin-text);
}

.opt-remove {
    border: 0;
    background: transparent;
    color: var(--admin-text-dim);
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
}

.opt-remove:hover { color: #f87171; }

.attr-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.attr-actions select.input { width: auto; min-width: 240px; flex: 1; }

.variation-table input.input { min-width: 90px; padding: 6px 8px; }
.variation-table .var-options { font-weight: 600; min-width: 160px; }

.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--admin-border);
}

.wizard-summary {
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    background: var(--admin-panel);
    padding: 16px;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
    font-size: 13px;
}

.summary-grid div { padding: 6px 0; border-bottom: 1px dashed var(--admin-border); }
.summary-grid .summary-full { grid-column: span 2; }

/* Product Preview Card */
.preview-card {
    display: flex; gap: 20px; padding: 20px; background: #fff;
    border: 1px solid var(--admin-border); border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.preview-image {
    width: 180px; height: 180px; object-fit: cover; border-radius: 6px;
    border: 1px solid var(--admin-border); flex-shrink: 0;
}
.preview-image.placeholder {
    display: flex; align-items: center; justify-content: center;
    background: #f3f4f6; color: var(--admin-text-dim); font-size: 13px;
}
.preview-info { flex: 1; min-width: 0; }
.preview-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--admin-text); }
.preview-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.preview-badge {
    display: inline-block; padding: 2px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    background: var(--admin-primary, #4f6ef7); color: #fff;
}
.preview-prices { display: flex; gap: 10px; align-items: baseline; margin-bottom: 10px; }
.preview-price { font-size: 20px; font-weight: 700; color: var(--admin-primary, #4f6ef7); }
.preview-price-original { font-size: 14px; color: var(--admin-text-dim); text-decoration: line-through; }
.preview-price-sale { font-size: 20px; font-weight: 700; color: #ef4444; }
.preview-short-desc {
    font-size: 13px; color: var(--admin-text-dim); margin-bottom: 12px;
    max-height: 60px; overflow: hidden;
}
.preview-meta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
    font-size: 12px; color: var(--admin-text-dim);
    border-top: 1px solid var(--admin-border); padding-top: 10px;
}
.preview-meta div { padding: 3px 0; }
.preview-meta strong { color: var(--admin-text); }
.preview-variations { margin-top: 6px; padding: 6px 0; }
.preview-variation-row { font-size: 12px; color: var(--admin-text-dim); padding: 2px 0; border-bottom: 1px dashed var(--admin-border); }
.preview-variation-row:last-child { border-bottom: none; }

@media (max-width: 640px) {
    .major-cards, .type-cards, .summary-grid { grid-template-columns: 1fr; }
    .summary-grid .summary-full { grid-column: span 1; }
    .wizard-nav { flex-direction: column-reverse; gap: 10px; }
    .preview-card { flex-direction: column; }
    .preview-image { width: 100%; height: 200px; }
}

/* ================================================================
   Homepage Control Center
   ================================================================ */
.hp-flags-table { font-size: 12.5px; }
.hp-flags-table th, .hp-flags-table td { vertical-align: middle; }

.hp-col-product { min-width: 220px; max-width: 320px; }
.hp-product-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hp-product-thumb {
    width: 32px; height: 32px; flex: 0 0 32px;
    border-radius: 6px; object-fit: cover;
    background: rgba(255,255,255,.06);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.hp-product-thumb-empty { border: 1px dashed var(--admin-border); }
.hp-product-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.hp-product-name {
    font-weight: 600; color: var(--admin-text); font-size: 12.5px;
    text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    transition: color .15s ease;
}
.hp-product-name:hover { color: var(--admin-accent); text-decoration: underline; }
.hp-product-sku { font-size: 10.5px; color: var(--admin-text-dim); }

.hp-col-flag { text-align: center; width: 44px; }
.hp-toggle-form { display: inline-flex; margin: 0; }
.hp-toggle {
    width: 26px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 5px; border: 1px solid var(--admin-border);
    font-size: 11px; font-weight: 700; cursor: pointer; line-height: 1;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    padding: 0;
}
.hp-toggle.on {
    background: rgba(34,197,94,.15); border-color: rgba(34,197,94,.4); color: #4ade80;
}
.hp-toggle.on:hover { background: rgba(34,197,94,.25); }
.hp-toggle.off {
    background: transparent; border-color: var(--admin-border); color: var(--admin-text-dim);
}
.hp-toggle.off:hover { border-color: rgba(255,255,255,.25); color: var(--admin-text-muted); }

.hp-col-actions { width: 100px; white-space: nowrap; }
.hp-actions { display: flex; align-items: center; gap: 5px; }
.hp-action-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 600;
    text-decoration: none; cursor: pointer; line-height: 1.4;
    transition: background .15s ease, color .15s ease;
}
.hp-action-edit {
    background: var(--admin-accent); color: #fff; border: none;
}
.hp-action-edit:hover { filter: brightness(1.15); }
.hp-action-view {
    background: transparent; color: var(--admin-text-muted); border: 1px solid var(--admin-border);
}
.hp-action-view:hover { color: var(--admin-text); background: rgba(255,255,255,.06); }

/* Pagination — compact admin controls */
.hp-pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; margin-top: 16px; padding: 8px 0;
}
.hp-page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 34px; min-width: 34px; padding: 0 10px;
    border-radius: 7px; border: 1px solid var(--admin-border);
    color: var(--admin-text-muted); font-size: 12.5px; font-weight: 600;
    text-decoration: none; line-height: 1; cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.hp-page-btn:hover { background: rgba(255,255,255,.06); color: var(--admin-text); }
.hp-page-btn.is-disabled { opacity: .35; pointer-events: none; }
.hp-page-info { font-size: 12px; color: var(--admin-text-dim); margin: 0 6px; }

/* Search result rows */
.hp-search-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--admin-border-soft);
    font-size: 13px;
}
.hp-search-row:last-child { border-bottom: 0; }

@media (max-width: 768px) {
    .hp-col-brand, .hp-col-flag:nth-child(8), .hp-col-flag:nth-child(9) { display: none; }
    .hp-product-cell { flex-direction: column; align-items: flex-start; gap: 4px; }
    .hp-actions { flex-direction: column; gap: 3px; }
    .hp-page-btn { height: 32px; min-width: 32px; padding: 0 8px; }
}
/* ── PROJECT ROADMAP ─────────────────────────────── */
.roadmap-nav-children { padding-left: 10px; }
.roadmap-dot { width: 16px; display: inline-block; text-align: center; flex: 0 0 auto; }
.roadmap-milestone { border: 1px solid var(--admin-border, #e5e7eb); border-radius: 8px; margin-bottom: 8px; background: #fff; }
.roadmap-milestone summary {
    cursor: pointer; padding: 10px 12px; list-style: none;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    font-size: 13px;
}
.roadmap-milestone summary::-webkit-details-marker { display: none; }
.roadmap-milestone[open] summary { border-bottom: 1px solid var(--admin-border, #e5e7eb); }
.roadmap-detail { padding: 10px 12px; }
.badge.blue { background: #dbeafe; color: #1d4ed8; }
.badge.amber { background: #fef3c7; color: #92400e; }

/* Roadmap sidebar toggle — separate from the navigable link */
.nav-section { position: relative; }
.roadmap-toggle {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; color: var(--admin-muted, #9ca3af);
    cursor: pointer; font-size: 12px; padding: 4px 6px; line-height: 1;
}
.roadmap-toggle:hover { color: var(--admin-text, #e5e7eb); }
.badge.orange { background: #ffedd5; color: #c2410c; }

/* ============================================================
   Reusable Rich Text Editor (compact / aggressive)
   ============================================================ */
.rte-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--admin-text-muted); margin-bottom: 6px; }
.rich-text-editor {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.rte-shell {
    position: relative;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.rte-shell.rte-fullscreen-on {
    position: fixed; inset: 16px; z-index: 3000;
    display: flex; flex-direction: column;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    border-radius: var(--admin-radius);
}
.rte-shell.rte-fullscreen-on .rte-toolbar { flex: 0 0 auto; }
.rte-shell.rte-fullscreen-on .rte-editor-area { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; }
.rte-shell.rte-fullscreen-on .rte-editor { height: 100%; }

.rte-toolbar { background: #0e1428; border-bottom: 1px solid var(--admin-border); }
.rte-toolbar-row { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 4px 6px; }
.rte-toolbar-row + .rte-toolbar-row { border-top: 1px solid var(--admin-border-soft); }
@media (max-width: 640px) {
    .rte-toolbar-row { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
}
.rte-sep { width: 1px; height: 20px; background: var(--admin-border); margin: 0 4px; flex: 0 0 auto; }
.rte-sep-grow { flex: 1 1 auto; background: transparent; }

.rte-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 28px; flex: 0 0 auto;
    border: 1px solid transparent; border-radius: 6px;
    cursor: pointer; color: var(--admin-text-muted);
    background: transparent; transition: all 0.12s ease; padding: 0;
    position: relative;
}
.rte-btn:hover { background: rgba(79,110,247,0.14); color: var(--admin-text); border-color: rgba(79,110,247,0.3); }
.rte-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(79,110,247,0.5); }
.rte-btn.active { background: rgba(79,110,247,0.28); color: #fff; border-color: var(--admin-accent); }
.rte-ico { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; }
.rte-ico svg { width: 16px; height: 16px; display: block; }
.rte-btn-accent {
    background: linear-gradient(135deg, var(--admin-accent) 0%, var(--admin-accent-2) 100%);
    color: #fff; border-color: transparent; gap: 6px;
}
.rte-btn-accent:hover { color: #fff; filter: brightness(1.08); background: linear-gradient(135deg, var(--admin-accent) 0%, var(--admin-accent-2) 100%); }
.rte-label-text { font-size: 11.5px; font-weight: 600; letter-spacing: 0.3px; }

.rte-color-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.rte-btn .rte-color-input { width: 100%; height: 100%; }

.rte-select {
    height: 28px; padding: 0 20px 0 8px; flex: 0 0 auto;
    border: 1px solid var(--admin-border); border-radius: 6px;
    background: #0a0f1f url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23a8b3d9'/%3E%3C/svg%3E") no-repeat right 6px center;
    color: var(--admin-text); font-size: 12px; cursor: pointer; appearance: none;
}
.rte-select:focus { outline: none; border-color: var(--admin-accent); box-shadow: 0 0 0 2px rgba(79,110,247,0.3); }

.rte-word-count { font-size: 11px; color: var(--admin-text-dim); margin-left: auto; padding: 0 6px; white-space: nowrap; flex: 0 0 auto; }

.rte-editor-area { position: relative; min-height: 200px; flex: 1 1 auto; }
.rte-editor {
    min-height: 240px; padding: 14px 16px;
    background: #fff; color: #1f2937; line-height: 1.65;
    outline: none; font-size: 14px; overflow-y: auto;
}
.rte-editor:focus { box-shadow: inset 0 0 0 2px rgba(79,110,247,0.25); }
.rte-editor-placeholder {
    position: absolute; top: 16px; left: 16px; pointer-events: none;
    color: #9ca3af; font-size: 14px;
}
.rte-source {
    display: block; width: 100%; min-height: 240px; padding: 14px 16px;
    background: #0c1124; color: #dbeafe;
    border: 0; outline: none; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px; resize: vertical; line-height: 1.5;
}

.rte-statusbar {
    display: flex; align-items: center; gap: 14px;
    padding: 4px 10px; border-top: 1px solid var(--admin-border-soft);
    background: #0e1428; color: var(--admin-text-dim); font-size: 11px; min-height: 22px;
}
.rte-status-msg { margin-left: auto; color: var(--admin-accent); }

/* editor content styles */
.rte-editor p { margin: 0 0 0.8rem; }
.rte-editor h1 { font-size: 1.8rem; font-weight: 700; margin: 1rem 0 0.6rem; }
.rte-editor h2 { font-size: 1.5rem; font-weight: 700; margin: 1rem 0 0.6rem; }
.rte-editor h3 { font-size: 1.25rem; font-weight: 600; margin: 0.9rem 0 0.5rem; }
.rte-editor h4 { font-size: 1.1rem; font-weight: 600; margin: 0.8rem 0 0.5rem; }
.rte-editor ul { list-style: disc; padding-left: 1.4rem; margin: 0.4rem 0; }
.rte-editor ol { list-style: decimal; padding-left: 1.4rem; margin: 0.4rem 0; }
.rte-editor li { margin: 0.15rem 0; }
.rte-editor a { color: var(--admin-accent); text-decoration: underline; }
.rte-editor blockquote { border-left: 4px solid var(--admin-accent); padding: 0.4rem 1rem; margin: 0.8rem 0; color: #4b5563; font-style: italic; background: #f8fafc; }
.rte-editor code, .rte-code code { background: #eef2ff; padding: 0.1rem 0.35rem; border-radius: 4px; font-family: ui-monospace, monospace; font-size: 0.9em; }
.rte-editor pre.rte-code, pre.rte-code { background: #0f172a; color: #e2e8f0; padding: 0.8rem 1rem; border-radius: 6px; overflow-x: auto; margin: 0.8rem 0; }
.rte-editor pre.rte-code code { background: none; padding: 0; color: #e2e8f0; }
.rte-editor table.rte-table { border-collapse: collapse; margin: 0.6rem 0; width: 100%; }
.rte-editor table.rte-table td { border: 1px solid #cbd5e1; padding: 6px 8px; min-width: 40px; }
.rte-editor .rte-video video { max-width: 100%; border-radius: 6px; border: 1px solid #e5e7eb; }
.rte-editor hr.rte-page-break { border: 0; border-top: 2px dashed #94a3b8; margin: 1rem 0; }
.rte-editor .rte-comment { background: #fef3c7; color: #92400e; border-radius: 4px; padding: 0 4px; cursor: default; }
.rte-editor .rte-task input[type="checkbox"] { margin-right: 6px; accent-color: var(--admin-accent); }
.rte-editor ul.rte-checklist { list-style: none; padding-left: 0; }
.rte-editor .rte-columns { display: flex; gap: 10px; margin: 0.6rem 0; }
.rte-editor .rte-col { flex: 1; border: 1px dashed #cbd5e1; border-radius: 6px; padding: 6px; min-width: 0; }

/* popovers */
.rte-popover {
    position: absolute; z-index: 4000; min-width: 220px; max-width: 300px;
    background: #0c1124; border: 1px solid var(--admin-border);
    border-radius: 10px; box-shadow: 0 18px 40px rgba(0,0,0,0.4);
}
.rte-popover-head { padding: 8px 10px; border-bottom: 1px solid var(--admin-border-soft); font-size: 12px; font-weight: 700; color: var(--admin-text); }
.rte-popover-body { padding: 8px 10px; }
.rte-emoji-grid, .rte-char-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; max-height: 180px; overflow-y: auto; }
.rte-emoji-item, .rte-char-item {
    display: flex; align-items: center; justify-content: center; height: 30px;
    background: transparent; border: 1px solid transparent; border-radius: 6px;
    cursor: pointer; font-size: 16px; color: var(--admin-text);
}
.rte-emoji-item:hover, .rte-char-item:hover { background: rgba(79,110,247,0.16); border-color: var(--admin-accent); }
.rte-pop-input { width: 100%; margin-bottom: 6px; padding: 6px 8px; border: 1px solid var(--admin-border); border-radius: 6px; background: #0a0f1f; color: var(--admin-text); font-size: 12.5px; }
.rte-pop-input:focus { outline: none; border-color: var(--admin-accent); }
.rte-pop-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rte-pop-actions .btn { font-size: 11.5px; padding: 4px 9px; }
.rte-ai-hint { display: block; margin-top: 6px; font-size: 10.5px; color: var(--admin-text-dim); }
.rte-ai-prompt { min-height: 64px; resize: vertical; }

/* preview modal */
.rte-preview-modal { position: fixed; inset: 0; z-index: 5000; display: none; align-items: center; justify-content: center; }
.rte-preview-modal.open { display: flex; }
.rte-preview-overlay { position: absolute; inset: 0; background: rgba(3,7,18,0.7); backdrop-filter: blur(2px); }
.rte-preview-panel { position: relative; width: 92%; max-width: 820px; max-height: 86vh; background: #fff; border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,0.5); display: flex; flex-direction: column; overflow: hidden; }
.rte-preview-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid #eef0f4; }
.rte-preview-header h3 { margin: 0; font-size: 16px; font-weight: 700; color: #111827; }
.rte-preview-close { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: #6b7280; padding: 0 6px; }
.rte-preview-close:hover { color: #111827; }
.rte-preview-content { flex: 1; overflow-y: auto; padding: 24px 28px; line-height: 1.65; color: #1f2937; }
.rte-preview-content p { margin: 0 0 0.8rem; }
.rte-preview-content h1, .rte-preview-content h2, .rte-preview-content h3 { margin: 1rem 0 0.5rem; color: #111827; }
.rte-preview-content h1 { font-size: 1.8rem; } .rte-preview-content h2 { font-size: 1.5rem; } .rte-preview-content h3 { font-size: 1.25rem; }
.rte-preview-content ul { list-style: disc; padding-left: 1.4rem; }
.rte-preview-content ol { list-style: decimal; padding-left: 1.4rem; }
.rte-preview-content a { color: var(--admin-accent); text-decoration: underline; }
.rte-preview-content img, .rte-preview-content video { max-width: 100%; height: auto; border-radius: 6px; }
.rte-preview-content blockquote { border-left: 4px solid var(--admin-accent); margin: 0.8rem 0; padding: 0.4rem 1rem; color: #4b5563; background: #f8fafc; }
.rte-preview-content table { border-collapse: collapse; width: 100%; margin: 0.6rem 0; }
.rte-preview-content table td { border: 1px solid #cbd5e1; padding: 6px; }
.rte-preview-content pre { background: #0f172a; color: #e2e8f0; padding: 0.8rem 1rem; border-radius: 6px; overflow-x: auto; }
.rte-preview-content pre code { background: none; color: inherit; }
.rte-preview-footer { display: flex; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid #eef0f4; background: #f9fafb; }

/* ================= RTE enhancements (tables, layout, image/video/file, utils) ================= */
.rte-row-3 { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.rte-btn.rte-disabled { opacity: 0.45; cursor: not-allowed; }

/* emoji tabs */
.rte-emoji-tabs { display: flex; gap: 2px; padding: 6px 8px 0; border-bottom: 1px solid var(--admin-border-soft); flex-wrap: wrap; }
.rte-emoji-tab { background: transparent; border: 1px solid transparent; color: var(--admin-text-dim); font-size: 11px; padding: 4px 8px; border-radius: 6px 6px 0 0; cursor: pointer; }
.rte-emoji-tab.active { background: rgba(79,110,247,0.14); color: var(--admin-accent); border-color: var(--admin-border); }
.rte-emoji-tab:hover { color: var(--admin-text); }
.rte-popover-emoji .rte-popover-head { display: flex; align-items: center; gap: 8px; }
.rte-popover-emoji .rte-pop-input { margin-bottom: 0; }

/* table grid */
.rte-table-grid { display: grid; grid-template-columns: repeat(8, 20px); gap: 3px; padding: 4px; justify-content: center; }
.rte-table-cell { width: 20px; height: 20px; background: var(--admin-border-soft); border: 1px solid var(--admin-border); border-radius: 3px; cursor: pointer; }
.rte-table-cell:hover { background: var(--admin-border); }
.rte-table-cell.active { background: var(--admin-accent); border-color: var(--admin-accent); }
.rte-table-size-label { text-align: center; font-size: 11.5px; color: var(--admin-text); padding: 4px 0 6px; font-weight: 600; }

/* layout grid */
.rte-layout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rte-layout-item { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--admin-border-soft); border: 1px solid var(--admin-border); border-radius: 8px; padding: 8px; cursor: pointer; color: var(--admin-text); }
.rte-layout-item:hover { border-color: var(--admin-accent); background: rgba(79,110,247,0.1); }
.rte-layout-preview { display: flex; gap: 2px; width: 100%; height: 34px; }
.rte-layout-col { flex: 1; background: var(--admin-border); border-radius: 3px; }
.rte-layout-col.narrow { flex: 0 0 34%; }
.rte-layout-label { font-size: 10.5px; color: var(--admin-text-dim); }

/* datetime popover */
.rte-popover-datetime { max-width: 240px; }
.rte-pop-label { display: block; font-size: 11px; color: var(--admin-text-dim); margin-bottom: 6px; }
.rte-pop-label .rte-pop-input { margin-bottom: 0; margin-top: 3px; background: #0a0f1f; color-scheme: dark; }
.rte-pop-inline { display: flex; align-items: center; gap: 6px; }
.rte-pop-inline input { accent-color: var(--admin-accent); }

/* modals */
.rte-modal { position: fixed; inset: 0; z-index: 6000; display: none; align-items: center; justify-content: center; }
.rte-modal.open { display: flex; }
.rte-modal-overlay { position: absolute; inset: 0; background: rgba(3,7,18,0.72); backdrop-filter: blur(2px); }
.rte-modal-panel { position: relative; width: 92%; max-width: 640px; max-height: 88vh; background: #0c1124; border: 1px solid var(--admin-border); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,0.55); display: flex; flex-direction: column; overflow: hidden; }
.rte-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--admin-border-soft); }
.rte-modal-header h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--admin-text); }
.rte-modal-close { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--admin-text-dim); padding: 0 6px; }
.rte-modal-close:hover { color: var(--admin-text); }
.rte-modal-tabs { display: flex; gap: 2px; padding: 10px 14px 0; }
.rte-tab { background: transparent; border: 1px solid transparent; color: var(--admin-text-dim); font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 8px 8px 0 0; cursor: pointer; }
.rte-tab.active { background: rgba(79,110,247,0.14); color: var(--admin-accent); border-color: var(--admin-border); }
.rte-modal-body { flex: 1; overflow-y: auto; padding: 14px 18px; }
.rte-modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--admin-border-soft); background: #0a0f1f; }
.rte-footer-note { padding: 6px 18px 0; font-size: 11.5px; color: var(--admin-text-dim); }

/* dropzone */
.rte-dropzone { border: 2px dashed var(--admin-border); border-radius: 10px; padding: 26px 16px; text-align: center; cursor: pointer; transition: 0.15s; }
.rte-dropzone:hover, .rte-dropzone.dragover { border-color: var(--admin-accent); background: rgba(79,110,247,0.06); }
.rte-dropzone-hint { margin: 0; color: var(--admin-text-dim); font-size: 12.5px; }
.rte-dropzone-hint .rte-link { color: var(--admin-accent); text-decoration: underline; }
.rte-dropzone-meta { margin: 8px 0 0; font-size: 11.5px; color: var(--admin-accent); font-weight: 600; }
.rte-help-text { font-size: 11.5px; color: var(--admin-text-dim); margin: 6px 0; }

/* library grid in modal */
.rte-library-toolbar { margin-bottom: 10px; }
.rte-library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 280px; overflow-y: auto; }
.rte-lib-item { display: flex; flex-direction: column; background: var(--admin-border-soft); border: 1px solid var(--admin-border); border-radius: 8px; overflow: hidden; cursor: pointer; padding: 0; }
.rte-lib-item:hover, .rte-lib-item.selected { border-color: var(--admin-accent); }
.rte-lib-item .media-pick-thumb { width: 100%; height: 70px; background: #0a0f1f; overflow: hidden; }
.rte-lib-item img { width: 100%; height: 100%; object-fit: cover; }
.rte-lib-item .media-pick-name { padding: 4px 6px; font-size: 10px; color: var(--admin-text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rte-empty { padding: 20px; text-align: center; color: var(--admin-text-dim); font-size: 12px; }
.rte-library-loading { grid-column: 1 / -1; }

/* Reused existing Media Library picker inside the RTE image modal */
.rte-editor-media-pick .media-picker-preview { display: none; }
.rte-editor-media-pick .media-picker-actions { margin-bottom: 0; }
.rte-editor-media-pick .media-picker-actions .media-picker-upload,
.rte-editor-media-pick .media-picker-actions .media-picker-clear { display: none; }
.rte-editor-media-pick .media-library-upload-btn { display: none; }
.rte-editor-media-pick .form-help { font-size: 11px; color: var(--admin-text-dim); margin-top: 8px; }
.rte-editor-media-pick .media-library-panel { z-index: 210; }

/* image url preview */
.rte-image-url-preview { margin-top: 8px; }
.rte-image-url-preview img { max-width: 100%; max-height: 160px; border-radius: 6px; border: 1px solid var(--admin-border); }

/* image options */
.rte-image-options { margin-top: 12px; border-top: 1px solid var(--admin-border-soft); padding-top: 10px; }
.rte-image-options .rte-pop-input { margin-bottom: 0; }
.rte-option-row { display: flex; gap: 12px; margin: 10px 0; }
.rte-option-row label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--admin-text-dim); flex: 1; }
.rte-option-row .rte-select, .rte-option-row .rte-pop-input { width: 100%; margin-bottom: 0; }
.rte-img-alt, .rte-img-caption { margin-bottom: 0; }

/* paste modal */
.rte-paste-modal { position: fixed; inset: 0; z-index: 7000; display: none; align-items: center; justify-content: center; }
.rte-paste-modal.open { display: flex; }
.rte-paste-overlay { position: absolute; inset: 0; background: rgba(3,7,18,0.72); }
.rte-paste-panel { position: relative; width: 92%; max-width: 560px; background: #0c1124; border: 1px solid var(--admin-border); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,0.55); display: flex; flex-direction: column; overflow: hidden; }
.rte-paste-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--admin-border-soft); }
.rte-paste-header h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--admin-text); }
.rte-paste-close { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--admin-text-dim); padding: 0 6px; }
.rte-paste-body { padding: 16px 18px; }
.rte-paste-textarea { width: 100%; min-height: 160px; resize: vertical; padding: 10px; border: 1px solid var(--admin-border); border-radius: 8px; background: #0a0f1f; color: var(--admin-text); font-size: 13px; font-family: inherit; }
.rte-paste-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--admin-border-soft); background: #0a0f1f; }

/* floating utils */
.rte-floating-utils { position: absolute; right: 10px; bottom: 42px; z-index: 3000; display: flex; flex-direction: column; gap: 6px; }
.rte-shell:not(:hover) .rte-floating-utils { opacity: 0.35; }
.rte-util-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: #0c1124; color: var(--admin-text); border: 1px solid var(--admin-border); border-radius: 10px; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
.rte-util-btn:hover { border-color: var(--admin-accent); color: var(--admin-accent); }
.rte-util-btn .rte-ico { width: 17px; height: 17px; }

/* help modal */
.rte-help-modal { position: fixed; inset: 0; z-index: 6500; display: none; align-items: center; justify-content: center; }
.rte-help-modal.open { display: flex; }
.rte-help-overlay { position: absolute; inset: 0; background: rgba(3,7,18,0.72); }
.rte-help-panel { position: relative; width: 92%; max-width: 560px; max-height: 80vh; background: #0c1124; border: 1px solid var(--admin-border); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,0.55); display: flex; flex-direction: column; overflow: hidden; }
.rte-help-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--admin-border-soft); }
.rte-help-header h3 { margin: 0; font-size: 15px; font-weight: 700; color: var(--admin-text); }
.rte-help-close { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--admin-text-dim); padding: 0 6px; }
.rte-help-body { flex: 1; overflow-y: auto; padding: 16px 18px; color: var(--admin-text); font-size: 13px; line-height: 1.6; }
.rte-help-body h4 { margin: 12px 0 6px; color: var(--admin-accent); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.rte-help-body h4:first-child { margin-top: 0; }
.rte-help-body ul { margin: 4px 0 8px; padding-left: 18px; }
.rte-help-body li { margin: 4px 0; color: var(--admin-text-dim); }
.rte-help-body kbd { background: var(--admin-border-soft); border: 1px solid var(--admin-border); border-radius: 4px; padding: 1px 5px; font-size: 11px; }
.rte-help-footer { display: flex; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--admin-border-soft); background: #0a0f1f; }

/* editor content: new inserted elements */
.rte-editor .rte-cols { display: flex; gap: 10px; margin: 0.6rem 0; }
.rte-editor .rte-cols .rte-col { flex: 1; min-width: 0; border: 1px dashed var(--admin-border); border-radius: 6px; padding: 6px; }
.rte-editor .rte-cols.rte-col-side .rte-col-narrow { flex: 0 0 32%; }
.rte-editor hr.rte-hr { border: 0; border-top: 1px solid var(--admin-border); margin: 1rem 0; }
.rte-editor .rte-toggle { border: 1px solid var(--admin-border); border-radius: 8px; margin: 0.6rem 0; }
.rte-editor .rte-toggle summary { cursor: pointer; padding: 8px 12px; font-weight: 600; color: var(--admin-accent); }
.rte-editor .rte-toggle p { padding: 0 12px 10px; margin: 0; }
.rte-editor blockquote.rte-email { border-left: 4px solid var(--admin-accent); background: rgba(79,110,247,0.06); }
.rte-editor .rte-datetime { font-family: var(--admin-font, monospace); font-size: 12px; color: var(--admin-accent); background: rgba(79,110,247,0.1); padding: 2px 6px; border-radius: 4px; }
.rte-editor .rte-figure { margin: 0.8rem 0; }
.rte-editor .rte-align-left { text-align: left; } .rte-editor .rte-align-center { text-align: center; } .rte-editor .rte-align-right { text-align: right; }
.rte-editor .rte-figure img { max-width: 100%; height: auto; border-radius: 6px; }
.rte-editor .rte-figure figcaption { font-size: 12px; color: var(--admin-text-dim); padding: 4px 0 0; text-align: center; }
.rte-editor .rte-file-link { color: var(--admin-accent); text-decoration: underline; }
.rte-editor .rte-video { display: block; margin: 0.6rem 0; }
.rte-editor .rte-video iframe, .rte-editor .rte-video video { width: 100%; max-width: 100%; border-radius: 8px; aspect-ratio: 16/9; }

/* ================= Template preset selector + preview ================= */
.template-preset-toolbar { border: 1px solid var(--admin-border); border-radius: var(--admin-radius); padding: 10px 12px; background: #fbfcfe; margin-bottom: 12px; }
.template-preset-controls { display: flex; flex-direction: column; gap: 6px; }
.template-preset-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.template-preset-row .input { flex: 0 1 260px; min-width: 180px; margin: 0; }
.template-preset-name { margin: 0; padding: 2px 0; }
.template-preset-preview-panel { max-width: 860px; }
.template-preset-preview-whatsapp { border-top: 1px dashed #cbd5e1; padding: 10px 20px; background: #f8fafc; }
.template-preset-wa-head { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: #64748b; margin-bottom: 6px; }
.template-preset-preview-whatsapp pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: 'Courier New', monospace; font-size: 13px; color: #0f172a; }

/* ================= Asset Picker ================= */
.asset-picker-wrapper { border: 1px solid var(--admin-border); border-radius: var(--admin-radius); padding: 10px 12px; background: #fbfcfe; margin-bottom: 12px; }
.asset-picker-preview { min-height: 80px; margin-bottom: 8px; }
.asset-picker-preview .asset-preview-item { position: relative; display: inline-block; border-radius: 0.375rem; overflow: hidden; border: 1px solid var(--admin-border); }
.asset-picker-preview .asset-preview-item img { max-width: 200px; max-height: 150px; display: block; }
.asset-picker-preview .asset-preview-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; background: #f9fafb; border: 2px dashed var(--admin-border); border-radius: 0.5rem; color: #9ca3af; gap: 0.5rem; }
.asset-picker-preview .asset-preview-empty i { font-size: 2rem; }
.asset-picker-preview .asset-preview-icon { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; background: #eff6ff; border-radius: 0.375rem; color: var(--admin-accent); font-size: 1.5rem; }
.asset-picker-preview .asset-preview-emoji { font-size: 2rem; line-height: 1; }
.asset-preview-remove { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; background: rgba(0,0,0,0.6); color: #fff; border: none; border-radius: 50%; cursor: pointer; font-size: 1.25rem; line-height: 1; display: flex; align-items: center; justify-content: center; }
.asset-preview-remove:hover { background: #ef4444; }
.asset-picker-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.asset-picker-selected-count { font-size: 0.875rem; color: #6b7280; }

.asset-picker-modal { position: fixed; inset: 0; z-index: 5000; display: none; align-items: center; justify-content: center; }
.asset-picker-modal.open { display: flex; }
.asset-picker-overlay { position: absolute; inset: 0; background: rgba(3,7,18,0.7); backdrop-filter: blur(2px); }
.asset-picker-panel { position: relative; width: 92%; max-width: 900px; max-height: 86vh; background: #fff; border-radius: 12px; box-shadow: 0 18px 40px rgba(0,0,0,0.4); display: flex; flex-direction: column; overflow: hidden; }
.asset-picker-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid #eef0f4; }
.asset-picker-title { margin: 0; font-size: 16px; font-weight: 700; color: #111827; }
.asset-picker-close { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: #6b7280; padding: 0 6px; }
.asset-picker-close:hover { color: #111827; }

.asset-picker-toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; padding: 1rem 1.5rem; border-bottom: 1px solid #e5e7eb; background: #f9fafb; }
.asset-picker-search { flex: 1; min-width: 200px; position: relative; }
.asset-picker-search i { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.asset-picker-search input { width: 100%; padding: 0.5rem 0.5rem 0.5rem 2.5rem; border: 1px solid #d1d5db; border-radius: 0.375rem; font-size: 12.5px; }
.asset-picker-tabs { display: flex; gap: 2px; }
.asset-tab { padding: 6px 12px; font-size: 12px; font-weight: 500; color: #6b7280; background: transparent; border: 1px solid transparent; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0; cursor: pointer; transition: all 0.15s; }
.asset-tab:hover { color: #3b82f6; background: rgba(59,130,246,0.08); }
.asset-tab.active { color: var(--admin-accent); border-bottom-color: var(--admin-accent); background: rgba(59,130,246,0.1); }
.asset-filter { padding: 0.5rem 2rem 0.5rem 0.75rem; border: 1px solid var(--admin-border); border-radius: 6px; font-size: 12px; background: #fff; }

.asset-picker-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.asset-picker-pane { flex: 1; overflow-y: auto; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.5rem; padding: 0.75rem; }
.asset-grid:empty::before { content: 'No items found'; grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; height: 200px; color: #9ca3af; font-size: 13px; }

.asset-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.375rem; border: 2px solid transparent; border-radius: 0.375rem; cursor: pointer; background: #f9fafb; transition: all 0.15s; text-align: center; }
.asset-item:hover, .asset-item.selected { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.asset-item.selected::after { content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; font-size: 12px; color: #3b82f6; position: absolute; bottom: 2px; right: 2px; background: #fff; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.asset-item img { width: 100%; height: auto; max-height: 80px; object-fit: cover; border-radius: 4px; }
.asset-item .fa-svg { font-size: 2rem; color: #3b82f6; }
.asset-item span { font-size: 0.7rem; font-weight: 500; color: #1f2937; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.asset-icon-item { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.asset-icon-item i { font-size: 2rem; color: #374151; }
.asset-icon-item span { font-size: 0.65rem; }

.asset-emoji-cat { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #6b7280; padding: 0.25rem 0.5rem; margin-top: 0.5rem; }
.asset-emoji-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 0.5rem 0.75rem; border-bottom: 1px solid #e5e7eb; background: #f9fafb; }
.asset-emoji-tab { background: transparent; border: 1px solid transparent; color: #6b7280; font-size: 11px; padding: 4px 8px; border-radius: 6px 6px 0 0; cursor: pointer; }
.asset-emoji-tab.active { background: rgba(59,130,246,0.14); color: var(--admin-accent); border-color: var(--admin-border); }
.asset-emoji-tab:hover { color: var(--admin-text); }
.asset-emoji-item { display: flex; align-items: center; justify-content: center; height: 36px; background: transparent; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-size: 18px; color: inherit; transition: all 0.15s; }
.asset-emoji-item:hover { background: rgba(59,130,246,0.16); border-color: var(--admin-accent); }
.asset-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; color: #9ca3af; gap: 1rem; text-align: center; }
.asset-empty i { font-size: 2rem; }

.asset-upload-drop { border: 2px dashed #cbd5e1; border-radius: 0.5rem; padding: 2rem; text-align: center; cursor: pointer; transition: all 0.15s; }
.asset-upload-drop:hover { border-color: #3b82f6; background: rgba(59,130,246,0.05); }
.asset-upload-drop.has-file { border-color: #3b82f6; background: rgba(59,130,246,0.1); }
.upload-drop-content { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.upload-drop-content i { font-size: 2.5rem; color: #9ca3af; }
.upload-drop-content strong { color: #1f2937; font-size: 1rem; }
.asset-upload-status { margin-top: 0.75rem; font-size: 0.8125rem; color: #6b7280; }

.asset-picker-url-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #d1d5db; border-radius: 0.375rem; font-size: 13px; }
.asset-url-preview { margin-top: 0.5rem; min-height: 80px; }
.asset-url-preview img { max-width: 100%; max-height: 200px; border-radius: 6px; border: 1px solid #e5e7eb; }

.asset-picker-footer { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; border-top: 1px solid #eef0f4; background: #f9fafb; }
.asset-picker-count { font-size: 13px; color: #6b7280; }
.asset-picker-count .selected-count { font-weight: 700; color: var(--admin-accent); }

.asset-picker-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.asset-picker-selected-count { font-size: 0.875rem; color: #6b7280; }

/* Selection indicator for multi */
.asset-item.selected { box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.asset-item::before { content: ''; position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; background: #fff; border: 2px solid #cbd5e1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #3b82f6; opacity: 0; }
.asset-item.selected::before { content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; font-size: 12px; color: #3b82f6; opacity: 1; border-color: #3b82f6; box-shadow: 0 0 0 2px #fff; }
.asset-item.selected::after { display: none; }

/* ---------- Badge selector ---------- */
.badge-selector { border: 1px solid var(--admin-border-soft); border-radius: 8px; padding: 12px; background: var(--admin-panel-2); }
.badge-preset-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500;
    background: #fff; border: 1px solid var(--admin-border-soft); color: #1f2937;
    cursor: pointer; transition: all 0.15s;
}
.badge-chip:hover { border-color: var(--admin-primary, #4f6ef7); background: rgba(79,110,247,0.06); }
.badge-chip.active { background: var(--admin-primary, #4f6ef7); color: #fff; border-color: var(--admin-primary, #4f6ef7); }
.badge-chip-emoji { font-size: 13px; }
.badge-chip-text { color: #1f2937; }
.badge-custom-add { margin-top: 10px; }
.badge-custom-row { display: flex; gap: 6px; align-items: center; }
.badge-custom-row .input { flex: 1; min-width: 0; }
.badge-selected-area { margin-top: 10px; }
.badge-selected-chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.badge-selected-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
    background: var(--admin-primary, #4f6ef7); color: #fff;
}
.badge-selected-chip .badge-remove {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,0.3);
    border: none; color: #fff; font-size: 11px; cursor: pointer; line-height: 1;
}
.badge-selected-chip .badge-remove:hover { background: rgba(255,255,255,0.5); }
.badge-empty { font-size: 12px; color: var(--admin-text-dim); font-style: italic; }

/* ═══════════════════════════════════════════════════════════════
   PRINTER SCANNER UI
   ═══════════════════════════════════════════════════════════════ */
.printer-scanner-panel { border: 2px dashed var(--admin-border); }
.scanner-actions { display: flex; gap: 10px; margin-bottom: 14px; }
.scanner-status {
    padding: 10px 14px; border-radius: 6px; margin-bottom: 14px;
    font-size: 13px; font-weight: 500;
}
.scanner-info { background: #e0e7ff; color: #3730a3; }
.scanner-success { background: #d1fae5; color: #065f46; }
.scanner-warn { background: #fef3c7; color: #92400e; }
.scanner-error { background: #fee2e2; color: #991b1b; }
.scanner-table-wrap { overflow-x: auto; margin-top: 10px; }
.scanner-table {
    width: 100%; border-collapse: collapse; font-size: 13px;
}
.scanner-table th {
    text-align: left; padding: 8px 10px; font-weight: 600;
    border-bottom: 2px solid var(--admin-border); color: var(--admin-text-dim);
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px;
}
.scanner-table td {
    padding: 8px 10px; border-bottom: 1px solid var(--admin-border);
    vertical-align: middle;
}
.scanner-table tr:hover { background: rgba(79,110,247,0.04); }
.scan-radio { width: 16px; height: 16px; accent-color: var(--admin-primary, #4f6ef7); }
.scan-status {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 11px; font-weight: 600;
}
.status-ok { background: #d1fae5; color: #065f46; }
.status-warn { background: #fef3c7; color: #92400e; }
.status-offline { background: #fee2e2; color: #991b1b; }
.scan-badge {
    display: inline-block; padding: 1px 6px; border-radius: 3px;
    font-size: 10px; font-weight: 700; text-transform: uppercase;
}
.scan-badge-default { background: #dbeafe; color: #1e40af; }
.scan-badge-shared { background: #e0e7ff; color: #3730a3; }
.scan-driver {
    max-width: 200px; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; font-size: 12px; color: var(--admin-text-dim);
}
.scan-profile { min-width: 110px; font-size: 12px; padding: 4px 6px; }
.scanner-empty {
    padding: 24px; text-align: center; color: var(--admin-text-dim);
    background: #f9fafb; border-radius: 6px;
}
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ═══════════════════════════════════════════════════════════════
   PRINTER PROFILES
   ═══════════════════════════════════════════════════════════════ */
.printer-profiles-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px; margin-top: 10px;
}
.printer-profile-card {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px; border: 1px solid var(--admin-border); border-radius: 8px;
    cursor: pointer; transition: all 0.15s ease;
}
.printer-profile-card:hover {
    border-color: var(--admin-primary, #4f6ef7);
    background: rgba(79,110,247,0.04);
    box-shadow: 0 2px 8px rgba(79,110,247,0.1);
}
.profile-icon {
    flex-shrink: 0; width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: #f3f4f6; border-radius: 6px; color: var(--admin-text-dim);
}
.printer-profile-card:hover .profile-icon { background: #e0e7ff; color: var(--admin-primary); }
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.profile-desc { font-size: 12px; color: var(--admin-text-dim); margin-bottom: 6px; }
.profile-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.profile-tag {
    display: inline-block; padding: 1px 6px; border-radius: 3px;
    font-size: 10px; font-weight: 600; background: #f3f4f6;
    color: var(--admin-text-dim);
}

/* ===================== */
/* HERO EDITOR            */
/* ===================== */
.hero-editor { display: flex; flex-direction: column; height: 100%; }
.hero-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; background: #1e1e2e; border-radius: 8px 8px 0 0; gap: 12px; flex-wrap: wrap; }
.hero-toolbar-left { display: flex; align-items: center; gap: 12px; }
.hero-toolbar-right { display: flex; align-items: center; gap: 6px; }
.hero-toolbar-title { color: #fff; font-weight: 600; font-size: 0.9rem; }
.hero-viewport-toggle { display: flex; gap: 2px; }
.hero-viewport-toggle .btn.active { background: #4f6ef7; color: #fff; }
.hero-editor-body { display: flex; flex: 1; min-height: 500px; background: #16162a; }
.hero-left-panel { width: 340px; min-width: 340px; max-width: 340px; overflow-y: auto; background: #1e1e2e; border-right: 1px solid #2a2a3e; }
.hero-left-panel::-webkit-scrollbar { width: 6px; }
.hero-left-panel::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
.hero-canvas-wrap { flex: 1; overflow-y: auto; padding: 24px; display: flex; justify-content: center; align-items: flex-start; background: #0f0f1a; position: sticky; top: 72px; height: calc(100vh - 72px); max-height: calc(100vh - 72px); }
.hero-canvas { background: #1a1a2e; border-radius: 12px; box-shadow: 0 4px 24px rgba(0,0,0,0.4); max-width: 100%; transition: all 0.3s ease; }
.hero-canvas[data-viewport="desktop"] { width: 1920px; max-width: 100%; aspect-ratio: 16/9; }
.hero-canvas[data-viewport="tablet"] { width: 768px; max-width: 100%; aspect-ratio: 4/3; }
.hero-canvas[data-viewport="mobile"] { width: 375px; max-width: 100%; aspect-ratio: 9/16; }
.hero-canvas-frame { width: 100%; height: 100%; position: relative; overflow: hidden; border-radius: 12px; }
.hero-canvas-bg { position: absolute; inset: 0; z-index: 0; }
.hero-canvas-bg-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease, object-position 0.3s ease; }
.hero-canvas-bg-video { width: 100%; height: 100%; object-fit: cover; }
.hero-canvas-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #555; font-size: 1rem; background: #2a2a3e; }
.hero-canvas-overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-canvas-content { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; pointer-events: none; }
.hero-canvas-icon { font-size: 3rem; margin-bottom: 8px; }
.hero-canvas-title { color: #fff; margin: 0; font-size: 2.5rem; text-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.hero-canvas-subtitle { color: #ddd; margin: 8px 0 16px; font-size: 1.2rem; }
.hero-canvas-cta { display: inline-block; padding: 10px 28px; background: #4f6ef7; color: #fff; text-decoration: none; border-radius: 6px; font-weight: 600; }
.hero-canvas-cta:hover { background: #3b5de7; }
.hero-section { border-bottom: 1px solid #2a2a3e; }
.hero-section-header { display: flex; align-items: center; width: 100%; padding: 10px 16px; background: #252540; border: none; color: #ccc; cursor: pointer; font-size: 0.85rem; text-align: left; gap: 8px; }
.hero-section-header:hover { background: #2d2d4a; }
.hero-section-icon { font-size: 1rem; }
.hero-section-title { flex: 1; font-weight: 600; }
.hero-section-chevron { font-size: 0.7rem; }
.hero-section-body { padding: 12px 16px 16px; display: block; }
.hero-section.collapsed .hero-section-body { display: none; }
.hero-field { margin-bottom: 10px; }
.hero-field label { display: block; font-size: 0.75rem; color: #888; margin-bottom: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.hero-input { width: 100%; padding: 6px 10px; background: #2a2a3e; border: 1px solid #3a3a5e; border-radius: 6px; color: #ddd; font-size: 0.85rem; box-sizing: border-box; }
.hero-input:focus { border-color: #4f6ef7; outline: none; }
.hero-input::placeholder { color: #555; }
.hero-select { width: 100%; padding: 6px 10px; background: #2a2a3e; border: 1px solid #3a3a5e; border-radius: 6px; color: #ddd; font-size: 0.85rem; }
.hero-range { width: 100%; }
.hero-range-sm { width: 60px; }
.hero-range-val { font-size: 0.75rem; color: #888; }
.hero-row-inputs { display: flex; gap: 8px; }
.hero-color-input { width: 40px; height: 30px; border: none; border-radius: 4px; cursor: pointer; background: none; }
.hero-color-row { display: flex; align-items: center; gap: 8px; }
.hero-btn-group { display: flex; flex-wrap: wrap; gap: 4px; }
.hero-btn-group .btn.active { background: #4f6ef7; color: #fff; border-color: #4f6ef7; }
.hero-media-row { display: flex; gap: 6px; }
.hero-media-row .hero-input { flex: 1; }
.hero-drop-zone { padding: 12px; border: 2px dashed #3a3a5e; border-radius: 8px; text-align: center; margin-top: 8px; cursor: pointer; transition: border-color 0.2s; }
.hero-drop-zone:hover { border-color: #4f6ef7; }
.hero-drop-zone span { color: #888; font-size: 0.8rem; }
.hero-browse-link { color: #4f6ef7; text-decoration: underline; }
.hero-media-thumb { max-width: 100%; max-height: 120px; border-radius: 6px; margin-top: 8px; }
.hero-media-info { margin-top: 8px; }
.hero-media-source-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.hero-media-source-info { margin-top: 8px; }
.hero-source-panel { display: block; }
.hero-placement-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.hero-placement-grid .btn { width: 100%; font-size: 0.7rem; padding: 4px; }
.hero-placement-grid .btn.active { background: #4f6ef7; color: #fff; }
.hero-size-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero-size-card { background: #2a2a3e; padding: 8px; border-radius: 6px; text-align: center; }
.hero-size-label { display: block; font-size: 0.7rem; color: #888; }
.hero-size-value { display: block; font-weight: 600; font-size: 0.85rem; color: #ddd; }
.hero-focal-wrapper { margin-top: 8px; }
.hero-focal-canvas { width: 100%; height: 100px; background: #2a2a3e; border-radius: 6px; position: relative; cursor: crosshair; margin-bottom: 8px; }
.hero-focal-dot { position: absolute; width: 16px; height: 16px; background: #4f6ef7; border: 2px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); cursor: grab; }
.hero-sticky-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px; background: #1e1e2e; border-radius: 0 0 8px 8px; margin-top: -1px; }
#heroSaveStatus { font-size: 0.8rem; }
.status-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.status-badge.blocked { background: #dc2626; color: #fff; }
.status-badge.connected { background: #059669; color: #fff; }
.status-badge.ready { background: #d97706; color: #fff; }
@media (max-width: 768px) {
    .hero-editor-body { flex-direction: column; }
    .hero-left-panel { width: 100%; min-width: 100%; max-width: 100%; max-height: 40vh; border-right: none; border-bottom: 1px solid #2a2a3e; }
    .hero-canvas-wrap { padding: 12px; position: static; height: auto; max-height: none; }
    .hero-canvas[data-viewport="desktop"], .hero-canvas[data-viewport="tablet"], .hero-canvas[data-viewport="mobile"] { width: 100%; }
    .hero-canvas[data-viewport="mobile"] { aspect-ratio: 9/16; }
    .hero-toolbar { flex-direction: column; gap: 8px; }
    .hero-toolbar-left, .hero-toolbar-right { width: 100%; justify-content: center; flex-wrap: wrap; }
}
@media (max-width: 375px) { .hero-left-panel { max-height: 50vh; } }

/* ============================================================
   Storefront Hero CSS — mirrors hero/slider.blade.php + shop.css
   So the editor preview is pixel-identical to the storefront.
   ============================================================ */

@keyframes fadeSlide {
    from { opacity: 0; transform: translateX(18px); }
    to { opacity: 1; transform: none; }
}

.hero-section {
    position: relative;
    z-index: 5;
}

.hero-slider {
    position: relative;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.10);
    background: linear-gradient(135deg, rgba(47,111,237,.10), rgba(124,58,237,.06));
    min-height: 460px;
    aspect-ratio: 16 / 6;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: none;
    padding: 44px 46px;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

.hero-slide.active {
    display: flex;
    animation: fadeSlide .7s cubic-bezier(.22,1,.36,1);
}

.hero-slide-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.3s cubic-bezier(.22,1,.36,1);
}

.hero-slide-media-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
}

.h-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.h-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(24px, 3.2vw, 42px);
    line-height: 1.2;
    color: #fff;
    margin: 0 0 8px;
}

.h-sub {
    font-size: 16px;
    color: rgba(255,255,255,.85);
    margin: 0 0 16px;
    line-height: 1.5;
}

.slide-cta {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    background: linear-gradient(135deg, #2f6fed, #7c3aed);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 13px 24px;
    border-radius: 999px;
    text-decoration: none;
    transition: transform .3s cubic-bezier(.22,1,.36,1), box-shadow .3s cubic-bezier(.22,1,.36,1);
}

.slide-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -14px rgba(47,111,237,.6);
}

.slide-cta.magic {
    background: linear-gradient(135deg, #f5b301, #e8a0c4);
    color: #3a2200;
}

.slide-cta.magic:hover {
    box-shadow: 0 16px 32px -14px rgba(245,179,1,.55);
}

.slide-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slide-dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.3);
    cursor: pointer;
    padding: 0;
    transition: all .3s cubic-bezier(.22,1,.36,1);
}

.slide-dots button.active {
    background: #fff;
    width: 22px;
    border-radius: 5px;
}

.slide-arrow {
    position: absolute;
    top: 50%;
    margin-top: -20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(10,12,28,.7);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background .25s cubic-bezier(.22,1,.36,1);
}

.slide-arrow:hover {
    background: #7c3aed;
}

.slide-arrow.prev { left: 16px; }
.slide-arrow.next { right: 16px; }

/* Hero editor overlay */
.hero-canvas-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity .3s ease, background .3s ease;
}

/* Hero canvas viewport sizing */
#heroCanvas {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

#heroCanvas[data-viewport="tablet"] .hero-slider {
    max-width: 800px;
    aspect-ratio: 12 / 6.5;
}

#heroCanvas[data-viewport="mobile"] .hero-slider {
    max-width: 400px;
    aspect-ratio: 9 / 16;
}

/* Hero editor canvas wrap */
.hero-canvas-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: rgba(0,0,0,.25);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.10);
    min-height: 500px;
}

@media (max-width: 768px) {
    .hero-canvas-wrap { min-height: 350px; padding: 10px; }
    .hero-slider { min-height: 300px; }
}

/* Emoji Picker Modal */
.emoji-picker-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.emoji-picker-overlay {
    position: absolute;
    inset: 0;
}

.emoji-picker-modal-inner {
    position: relative;
    z-index: 1;
    background: #1a1a2e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
}

.emoji-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.emoji-picker-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #f5f7ff;
}

.emoji-picker-close {
    background: none;
    border: none;
    color: #9aa3c7;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.emoji-picker-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.emoji-picker-grid {
    max-height: 60vh;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.emoji-category {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.emoji-category-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #5c6488;
    margin: 0;
    padding: 4px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.emoji-category-title:first-child {
    border-top: none;
    padding-top: 0;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}

.emoji-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-size: 22px;
    line-height: 1;
    padding: 10px 0;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    background: rgba(47, 111, 237, 0.3);
    border-color: rgba(47, 111, 237, 0.5);
    transform: scale(1.15);
    z-index: 1;
}

@media (max-width: 520px) {
    .emoji-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    .emoji-picker-modal-inner {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        height: 100%;
    }
}

/* ── Product Form: SKU/Barcode/Serial toggles ── */
.id-toggle-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.id-toggle-row .check-option { white-space: nowrap; }
.id-fields-group { margin-top: 8px; }
.id-fields-group .form-grid { gap: 10px; }

/* ── Product Form: Barcode Scanner ── */
.barcode-scan-row { display: flex; gap: 8px; align-items: flex-end; }
.barcode-scan-row .input { flex: 1; }
.scanner-overlay {
    position: fixed; inset: 0; z-index: 300;
    background: rgba(0,0,0,0.85); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 16px;
}
.scanner-overlay video {
    max-width: 90vw; max-height: 60vh; border-radius: 8px;
    border: 2px solid var(--admin-accent);
}
.scanner-overlay .scanner-hint {
    color: #fff; font-size: 13px; text-align: center;
}
.scanner-overlay .scanner-actions { display: flex; gap: 10px; }

/* ── Product Form: Icon/Emoji Picker Trigger ── */
.icon-picker-row {
    display: flex; align-items: center; gap: 6px;
}
.icon-picker-trigger {
    display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
}
.icon-picker-trigger .input { flex: 1; min-width: 0; }
.icon-picker-trigger .icon-preview {
    width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
    font-size: 22px; border: 1px solid var(--admin-border); border-radius: var(--admin-radius);
    background: var(--admin-panel); cursor: default; flex-shrink: 0;
}
.icon-picker-trigger .btn { flex-shrink: 0; }
.icon-picker-btn { flex-shrink: 0; }
.svg-picker-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; }
.svg-picker-modal[hidden] { display: none; }
.svg-picker-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.svg-picker-dialog {
    position: relative; z-index: 1; width: 90%; max-width: 520px; max-height: 80vh;
    background: var(--admin-panel); border: 1px solid var(--admin-border); border-radius: var(--admin-radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25); display: flex; flex-direction: column; overflow: hidden;
}
.svg-picker-dialog-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--admin-border);
}
.svg-picker-dialog-head h3 { margin: 0; font-size: 14px; }
.svg-picker-close { font-size: 18px; line-height: 1; }
.svg-picker-search { display: flex; gap: 8px; padding: 12px 16px 0; }
.svg-picker-search .input { flex: 1; }
.svg-picker-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px; max-height: 50vh; overflow-y: auto; padding: 12px 16px 16px;
}
.svg-picker-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; transition: all 0.15s; min-height: 60px; justify-content: center; }
.svg-picker-item:hover { border-color: var(--admin-accent); background: rgba(79,110,247,0.08); }
.svg-picker-item.selected { border-color: var(--admin-accent); background: rgba(79,110,247,0.15); }
.svg-picker-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; }
.svg-picker-icon svg { width: 32px; height: 32px; }
.svg-picker-icon img { width: 32px; height: 32px; object-fit: contain; }
.svg-picker-item .svg-name { font-size: 9px; color: var(--admin-text-dim); text-align: center; word-break: break-all; line-height: 1.2; }
.svg-picker-loading { text-align: center; padding: 12px; color: var(--admin-text-dim); font-size: 12px; }

/* ── Product Form: Type Config Panels (inline in Step 3) ── */
.type-config-panel {
    margin-top: 16px; padding: 16px;
    border: 1px solid var(--admin-border); border-radius: var(--admin-radius);
    background: var(--admin-panel);
}
.type-config-panel h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.type-config-panel .field-hint { margin-top: 4px; }

/* ── Product Form: Negotiable Price ── */
.negotiable-fields { margin-top: 8px; }
.negotiable-fields .form-grid { gap: 10px; }

/* ── Product Form: Compact Step 1 ── */
.product-form .wizard-step[data-step="1"] .form-grid {
    gap: 10px 14px;
}
.product-form .wizard-step[data-step="1"] .form-field {
    margin-bottom: 0;
}
.product-form .wizard-step[data-step="1"] .form-field label {
    margin-bottom: 4px;
}

/* ── Product Form: Grouped Products Search ── */
.grouped-search { margin-bottom: 10px; }
.grouped-selected-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.grouped-item-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--admin-border); border-radius: 6px; }
.grouped-item-row input[type="checkbox"] { accent-color: var(--admin-accent); }
.grouped-item-name { flex: 1; font-size: 13px; }
.grouped-qty { width: 60px; }


