/* ═══════════════════════════════════════════════════════
   LUXVOO Admin Dashboard — Sky-Blue Glassmorphism Theme
   Design: White BG • Black Text • Sky-Blue Glass Accents
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Tajawal:wght@300;400;500;700;800;900&display=swap');

/* ── CSS Custom Properties ────────────────────────── */
:root {
    --bg-primary: #F8FAFC;
    --bg-white: #FFFFFF;
    --bg-glass: rgba(135, 206, 250, 0.06);
    --bg-glass-active: rgba(0, 180, 216, 0.08);
    --bg-glass-border: rgba(135, 206, 250, 0.18);
    --bg-glass-hover: rgba(0, 180, 216, 0.12);
    --bg-sidebar: rgba(255, 255, 255, 0.92);
    --bg-card: rgba(255, 255, 255, 0.85);

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --text-inverse: #FFFFFF;

    --accent: #0EA5E9;
    --accent-light: #38BDF8;
    --accent-lighter: #BAE6FD;
    --accent-dark: #0284C7;
    --accent-gradient: linear-gradient(135deg, #0EA5E9, #06B6D4);
    --accent-gradient-hover: linear-gradient(135deg, #0284C7, #0891B2);

    --success: #10B981;
    --success-light: rgba(16, 185, 129, 0.1);
    --warning: #F59E0B;
    --warning-light: rgba(245, 158, 11, 0.1);
    --danger: #EF4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --info: #6366F1;
    --info-light: rgba(99, 102, 241, 0.1);

    --glass-blur: blur(20px);
    --glass-shadow: 0 4px 30px rgba(14, 165, 233, 0.08);
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(14, 165, 233, 0.06);
    --card-shadow-hover: 0 4px 20px rgba(14, 165, 233, 0.14);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --header-height: 64px;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Background Pattern ───────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(14, 165, 233, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(6, 182, 212, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(99, 102, 241, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-dark); }

/* ── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent-lighter); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-light); }

/* ══════════════════════════════════════════════════════
   LOGIN SCREEN
   ══════════════════════════════════════════════════════ */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 50%, #BAE6FD 100%);
    position: relative;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(14, 165, 233, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(6, 182, 212, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.login-card {
    position: relative;
    width: 420px;
    max-width: 92vw;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: 0 8px 40px rgba(14, 165, 233, 0.12);
    animation: loginSlideUp 0.6s ease-out;
}

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

.login-brand {
    text-align: center;
    margin-bottom: 36px;
}

.login-brand .logo-circle {
    width: 64px;
    height: 64px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
    font-weight: 800;
    color: white;
    letter-spacing: 1px;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.3);
}

.login-brand h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.login-brand p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1.5px solid rgba(14, 165, 233, 0.15);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-normal);
}

.login-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background: white;
}

.login-form input::placeholder { color: var(--text-muted); }

.login-error {
    display: none;
    background: var(--danger-light);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 16px;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

.login-error.visible { display: block; animation: shake 0.3s ease-out; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ══════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    line-height: 1.4;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 2px 12px rgba(14, 165, 233, 0.25);
}
.btn-primary:hover {
    background: var(--accent-gradient-hover);
    box-shadow: 0 4px 18px rgba(14, 165, 233, 0.35);
    transform: translateY(-1px);
}

.btn-full { width: 100%; padding: 14px 20px; font-size: 1rem; }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--bg-glass-border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-glass);
}

.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: var(--radius-sm); }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #DC2626; }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }

.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #D97706; }

.btn-icon {
    padding: 8px;
    background: var(--bg-glass);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1;
}
.btn-icon:hover { color: var(--accent); background: var(--bg-glass-hover); }

/* ══════════════════════════════════════════════════════
   LAYOUT — Sidebar + Main
   ══════════════════════════════════════════════════════ */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ── Sidebar ──────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--bg-sidebar);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--bg-glass-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: width var(--transition-slow), transform var(--transition-slow);
    box-shadow: 2px 0 20px rgba(14, 165, 233, 0.04);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--bg-glass-border);
}

.sidebar-brand .logo-icon {
    width: 38px;
    height: 38px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: white;
    letter-spacing: 1px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.2);
}

.sidebar-brand .brand-info h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.sidebar-brand .brand-info span {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 16px 14px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--bg-glass-hover);
    color: var(--accent);
}

.nav-item.active {
    background: var(--bg-glass-active);
    color: var(--accent);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--accent);
}

.nav-item .nav-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item .nav-badge {
    margin-left: auto;
    background: var(--accent-gradient);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

.nav-item .nav-badge.danger { background: var(--danger); }

/* ── Sidebar Footer ───────────────────────────────── */
.sidebar-footer {
    padding: 14px 14px;
    border-top: 1px solid var(--bg-glass-border);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.admin-profile:hover { background: var(--bg-glass-hover); }

.admin-profile .avatar {
    width: 36px;
    height: 36px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.admin-profile .profile-info {
    flex: 1;
    min-width: 0;
}

.admin-profile .profile-info .name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-profile .profile-info .role {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ── Main Content ─────────────────────────────────── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-slow);
}

/* ── Header ───────────────────────────────────────── */
.page-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--bg-glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.page-header .header-left h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.page-header .header-left p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-icon-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--accent);
    border-color: rgba(14, 165, 233, 0.25);
}

.header-icon-btn .badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.live-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--success-light);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
}

.live-status .dot {
    width: 7px;
    height: 7px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* ── Page Container ───────────────────────────────── */
.page-container {
    padding: 24px 28px;
    animation: fadeIn 0.3s ease-out;
}

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

.page-container[style*="display: none"] { animation: none; }

/* ══════════════════════════════════════════════════════
   STATS CARDS GRID
   ══════════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--card-shadow);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(14, 165, 233, 0.25);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    border-radius: 3px 3px 0 0;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.stat-card:hover::before { opacity: 1; }

.stat-card .stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.stat-card .stat-icon.sky { background: rgba(14, 165, 233, 0.1); color: var(--accent); }
.stat-card .stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-card .stat-icon.amber { background: var(--warning-light); color: var(--warning); }
.stat-card .stat-icon.red { background: var(--danger-light); color: var(--danger); }
.stat-card .stat-icon.indigo { background: var(--info-light); color: var(--info); }

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.stat-card .stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.stat-trend.up { background: var(--success-light); color: var(--success); }
.stat-trend.down { background: var(--danger-light); color: var(--danger); }

/* ══════════════════════════════════════════════════════
   GLASS CARD
   ══════════════════════════════════════════════════════ */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: box-shadow var(--transition-normal);
}

.glass-card:hover { box-shadow: var(--card-shadow-hover); }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--bg-glass-border);
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body { padding: 20px 22px; }

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.three-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

/* ══════════════════════════════════════════════════════
   DATA TABLE
   ══════════════════════════════════════════════════════ */
.data-table-wrapper {
    overflow-x: auto;
}

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

.data-table thead th {
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-align: left;
    background: rgba(14, 165, 233, 0.03);
    border-bottom: 1px solid var(--bg-glass-border);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 14px 16px;
    font-size: 0.88rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(14, 165, 233, 0.06);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-glass);
}

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

/* ── Status Badges ────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    font-size: 0.73rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-active, .badge-open, .badge-published, .badge-confirmed, .badge-fulfilled, .badge-fully_paid { background: var(--success-light); color: var(--success); }
.badge-pending, .badge-ringing { background: var(--warning-light); color: var(--warning); }
.badge-suspended, .badge-missed, .badge-draft, .badge-cancelled, .badge-refunded { background: var(--danger-light); color: var(--danger); }
.badge-ended, .badge-closed, .badge-archived { background: rgba(100, 116, 139, 0.1); color: #64748B; }
.badge-reviewed, .badge-accepted, .badge-in_inspection { background: var(--info-light); color: var(--info); }
.badge-escrow_held, .badge-escrow_secured, .badge-deposit_received { background: rgba(14, 165, 233, 0.12); color: #0284C7; font-weight: 700; border: 1px solid rgba(14, 165, 233, 0.25); }
.badge-banned { background: var(--danger); color: white; }

/* ══════════════════════════════════════════════════════
   TOOLBAR
   ══════════════════════════════════════════════════════ */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.toolbar .search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.toolbar .search-box input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    font-family: inherit;
    font-size: 0.88rem;
    border: 1.5px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-normal);
}

.toolbar .search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.08);
}

.toolbar .search-box::before {
    content: '🔍';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
}

.toolbar select {
    padding: 9px 14px;
    font-family: inherit;
    font-size: 0.88rem;
    border: 1.5px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    color: var(--text-secondary);
    outline: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.toolbar select:focus { border-color: var(--accent); }

/* ══════════════════════════════════════════════════════
   FORM CONTROLS
   ══════════════════════════════════════════════════════ */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.9rem;
    border: 1.5px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    background: var(--bg-white);
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.08);
}

.form-group textarea { min-height: 100px; resize: vertical; }

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-switch .slider {
    position: absolute;
    inset: 0;
    background: #CBD5E1;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.toggle-switch .slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-fast);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .slider { background: var(--accent); }
.toggle-switch input:checked + .slider::before { transform: translateX(20px); }

/* ══════════════════════════════════════════════════════
   SERVICE HEALTH
   ══════════════════════════════════════════════════════ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.service-item:hover { background: var(--bg-glass-hover); }

.service-item .service-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.service-dot.nominal { background: var(--success); }
.service-dot.degraded { background: var(--warning); }
.service-dot.down { background: var(--danger); }

.service-item .service-name {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
}

.service-item .service-latency {
    font-size: 0.73rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════
   CHAT / MESSAGES
   ══════════════════════════════════════════════════════ */
.chat-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: calc(100vh - var(--header-height) - 48px);
    gap: 0;
}

.conversations-list {
    border-right: 1px solid var(--bg-glass-border);
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(14, 165, 233, 0.05);
    transition: background var(--transition-fast);
}

.conversation-item:hover, .conversation-item.active {
    background: var(--bg-glass-active);
}

.conversation-item .conv-avatar {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.conversation-item .conv-info { flex: 1; min-width: 0; }

.conversation-item .conv-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.conversation-item .conv-preview {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-item .conv-meta {
    text-align: right;
    flex-shrink: 0;
}

.conversation-item .conv-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.conversation-item .unread-badge {
    display: inline-block;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    margin-top: 4px;
}

.chat-area {
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.chat-msg {
    margin-bottom: 12px;
    max-width: 70%;
    animation: fadeIn 0.2s ease-out;
}

.chat-msg.incoming { margin-right: auto; }
.chat-msg.outgoing { margin-left: auto; }

.chat-msg .msg-bubble {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-msg.incoming .msg-bubble {
    background: var(--bg-glass);
    border: 1px solid var(--bg-glass-border);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-msg.outgoing .msg-bubble {
    background: var(--accent-gradient);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-msg .msg-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 4px;
}

.chat-msg.outgoing .msg-time { text-align: right; }

.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--bg-glass-border);
    background: rgba(255,255,255,0.5);
}

.chat-input-bar input {
    flex: 1;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 0.9rem;
    border: 1.5px solid var(--bg-glass-border);
    border-radius: var(--radius-full);
    background: var(--bg-white);
    color: var(--text-primary);
    outline: none;
}

.chat-input-bar input:focus { border-color: var(--accent); }

/* ══════════════════════════════════════════════════════
   CHART PLACEHOLDER
   ══════════════════════════════════════════════════════ */
.chart-container {
    position: relative;
    height: 220px;
    padding: 10px 0;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100%;
    gap: 12px;
    padding: 0 10px;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.chart-bar {
    width: 100%;
    max-width: 40px;
    border-radius: 6px 6px 2px 2px;
    background: var(--accent-gradient);
    transition: height 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    min-height: 4px;
    cursor: pointer;
}

.chart-bar:hover { opacity: 0.85; }

.chart-bar.secondary { background: rgba(14, 165, 233, 0.2); }

.chart-bar-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ══════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active { display: flex; }

.modal-content {
    background: var(--bg-white);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-xl);
    width: 520px;
    max-width: 92vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(14, 165, 233, 0.15);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

.modal-header h3 { font-size: 1.05rem; font-weight: 700; }

.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover { color: var(--danger); }

.modal-body { padding: 24px; }

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid var(--bg-glass-border);
}

/* ══════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state h4 { font-size: 1rem; color: var(--text-secondary); margin-bottom: 4px; }
.empty-state p { font-size: 0.85rem; }

/* ══════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--bg-white);
    border: 1px solid var(--bg-glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    font-size: 0.88rem;
    min-width: 280px;
    max-width: 400px;
    animation: toastSlide 0.4s ease-out;
    transition: opacity 0.3s, transform 0.3s;
}

.toast.removing { opacity: 0; transform: translateX(100%); }

@keyframes toastSlide {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.info { border-left: 4px solid var(--accent); }
.toast.warning { border-left: 4px solid var(--warning); }

/* ══════════════════════════════════════════════════════
   LOADING SPINNER
   ══════════════════════════════════════════════════════ */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--bg-glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 40px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    flex-direction: column;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

/* ══════════════════════════════════════════════════════
   AUDIT LOG
   ══════════════════════════════════════════════════════ */
.audit-entry {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(14, 165, 233, 0.06);
}

.audit-entry:last-child { border-bottom: none; }

.audit-entry .audit-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.audit-entry .audit-info { flex: 1; }
.audit-entry .audit-action { font-size: 0.88rem; font-weight: 500; color: var(--text-primary); }
.audit-entry .audit-actor { font-size: 0.78rem; color: var(--text-muted); }
.audit-entry .audit-time { font-size: 0.73rem; color: var(--text-muted); flex-shrink: 0; }

/* ══════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .two-col-grid, .three-col-grid { grid-template-columns: 1fr; }
    .chat-layout { grid-template-columns: 240px 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
        box-shadow: 4px 0 30px rgba(0,0,0,0.1);
    }

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

    .main-content { margin-left: 0; }

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

    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    .page-container { padding: 16px; }

    .chat-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .conversations-list { max-height: 40vh; border-right: none; border-bottom: 1px solid var(--bg-glass-border); }

    .page-header { padding: 0 16px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .toolbar { flex-direction: column; }
    .toolbar .search-box { min-width: 100%; }
}

/* ── Sidebar overlay for mobile ───────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 99;
}

.sidebar-overlay.active { display: block; }

/* ══════════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════════ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* ══════════════════════════════════════════════════════
   MULTI-IMAGE GALLERY & UPLOAD MANAGER
   ══════════════════════════════════════════════════════ */
.image-dropzone {
    border: 2px dashed rgba(14, 165, 233, 0.4);
    background: rgba(14, 165, 233, 0.03);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.image-dropzone:hover, .image-dropzone.dragover {
    border-color: #0EA5E9;
    background: rgba(14, 165, 233, 0.08);
    transform: scale(1.005);
}

.dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.dropzone-icon {
    font-size: 2.2rem;
    line-height: 1;
}

.dropzone-text strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.dropzone-text p {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.upload-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(14, 165, 233, 0.15);
    border-radius: 2px;
    margin-top: 14px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0284C7, #38BDF8);
    transition: width 0.3s ease;
}

.content-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    max-height: 250px;
    overflow-y: auto;
    padding: 6px 2px;
}

.gallery-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border-color: rgba(14, 165, 233, 0.5);
}

.gallery-card.is-primary {
    border: 2px solid #0EA5E9;
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.35);
}

.gallery-img-wrap {
    width: 100%;
    height: 95px;
    background: #000;
    position: relative;
    overflow: hidden;
}

.gallery-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-card:hover .gallery-img-wrap img {
    transform: scale(1.05);
}

.primary-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(135deg, #0284C7, #0EA5E9);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
}

.gallery-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    background: rgba(15, 23, 42, 0.85);
    gap: 4px;
}

.gallery-actions button {
    background: none;
    border: none;
    font-size: 0.72rem;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    transition: background 0.15s;
    color: var(--text-primary);
}

.btn-make-primary {
    color: #38BDF8 !important;
    font-weight: 600;
}

.btn-make-primary:hover {
    background: rgba(56, 189, 248, 0.15);
}

.btn-delete-img {
    color: #EF4444 !important;
}

.btn-delete-img:hover {
    background: rgba(239, 68, 68, 0.15);
}

.table-product-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    background: #111;
    flex-shrink: 0;
}

.photos-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(14, 165, 233, 0.12);
    color: #38BDF8;
    border: 1px solid rgba(56, 189, 248, 0.25);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.photos-badge:hover {
    background: rgba(14, 165, 233, 0.25);
    border-color: #38BDF8;
}

/* ── Store & Mobile App Control Center ────────────────── */
.control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
    gap: 22px;
    margin-bottom: 24px;
}

.setting-hint {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

.broadcast-preview-box {
    margin-top: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.08);
}

.broadcast-preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 6px;
}

.broadcast-preview-body {
    font-size: 0.82rem;
    color: var(--text-primary);
    line-height: 1.45;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    background: rgba(37, 211, 102, 0.12);
    color: #25D366 !important;
    border: 1px solid rgba(37, 211, 102, 0.3);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-whatsapp:hover {
    background: #25D366;
    color: #FFFFFF !important;
}

.btn-call {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    background: rgba(14, 165, 233, 0.12);
    color: #0EA5E9 !important;
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-call:hover {
    background: #0EA5E9;
    color: #FFFFFF !important;
}

.device-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
}

/* ══════════════════════════════════════════════════════
   OPENSOOQ-STYLE LUXURY LISTING PUBLISHER WIZARD
   ══════════════════════════════════════════════════════ */
.opensooq-wizard-container {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.opensooq-section {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease;
}

.opensooq-section:focus-within {
    border-color: rgba(56, 189, 248, 0.45);
}

.opensooq-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.opensooq-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #F8FAFC;
    margin: 0;
}

.opensooq-section-title span.icon {
    font-size: 1.3rem;
}

.opensooq-section-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Category Selection Grid */
.category-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.category-pick-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

.category-pick-card:hover {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
}

.category-pick-card.active {
    background: linear-gradient(145deg, rgba(2, 132, 199, 0.25) 0%, rgba(56, 189, 248, 0.12) 100%);
    border-color: #38BDF8;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.category-pick-card .cat-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.category-pick-card .cat-name-en {
    font-size: 0.88rem;
    font-weight: 700;
    color: #F8FAFC;
    display: block;
}

.category-pick-card .cat-name-ar {
    font-size: 0.75rem;
    color: #94A3B8;
    display: block;
    margin-top: 2px;
}

.category-pick-card.active .cat-name-en {
    color: #38BDF8;
}

.category-pick-card.active::after {
    content: "✓";
    position: absolute;
    top: 6px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0284C7;
    color: #FFF;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Video Upload Zone & Preview */
.video-upload-box {
    border: 2px dashed rgba(56, 189, 248, 0.35);
    background: rgba(14, 165, 233, 0.03);
    border-radius: 12px;
    padding: 22px 16px;
    text-align: center;
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}

.video-upload-box:hover, .video-upload-box.dragover {
    border-color: #38BDF8;
    background: rgba(14, 165, 233, 0.08);
}

.video-preview-wrapper {
    margin-top: 14px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(56, 189, 248, 0.3);
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.video-preview-wrapper video {
    width: 100%;
    max-height: 320px;
    display: block;
    outline: none;
}

.video-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.video-meta-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #38BDF8;
    font-weight: 600;
}

/* Condition Chips */
.chips-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.8rem;
    color: #CBD5E1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip-btn:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
    color: #FFF;
}

.chip-btn.active {
    background: rgba(14, 165, 233, 0.22);
    border-color: #38BDF8;
    color: #38BDF8;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

/* Structured Specs Form Grid */
.dynamic-specs-container {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.specs-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

/* Live Card Preview */
.live-preview-box {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 0.95) 100%);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    gap: 18px;
    align-items: stretch;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

@media (max-width: 680px) {
    .live-preview-box {
        flex-direction: column;
    }
}

.live-preview-media {
    width: 220px;
    flex-shrink: 0;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #000;
}

@media (max-width: 680px) {
    .live-preview-media {
        width: 100%;
        height: 180px;
    }
}

.live-preview-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-preview-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.live-preview-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.preview-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.preview-badge-cat {
    background: rgba(56, 189, 248, 0.15);
    color: #38BDF8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.preview-badge-video {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: #FFF;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.preview-badge-featured {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #000;
    font-weight: 800;
}

.preview-badge-negotiable {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.live-preview-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #FFF;
    margin: 0 0 6px 0;
}

.live-preview-location {
    font-size: 0.78rem;
    color: #94A3B8;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.live-preview-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: #38BDF8;
    letter-spacing: -0.02em;
}

.live-preview-specs-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.live-spec-pill {
    font-size: 0.72rem;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #CBD5E1;
}

/* ── Arabic / RTL Typography & Layout Overrides ─────── */
html[dir="rtl"], [dir="rtl"] body {
    font-family: 'Tajawal', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: normal;
}

html[dir="rtl"] .sidebar-link {
    text-align: right;
    gap: 12px;
}

html[dir="rtl"] .badge-count {
    margin-right: auto;
    margin-left: 0;
}

html[dir="rtl"] .modal-header .btn-close {
    margin-right: auto;
    margin-left: 0;
}



