/* =========================================================
   Mandoop CRM — Modern Design System (RTL)
   Primary: Cairo · Dark sidebar · Blue→Indigo gradient · Soft shadows
   ========================================================= */

:root {
    /* Slate scale */
    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    /* Brand gradient */
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --indigo-700: #4338ca;

    /* Status */
    --emerald-50:  #ecfdf5;
    --emerald-100: #d1fae5;
    --emerald-500: #10b981;
    --emerald-600: #059669;

    --amber-50:  #fffbeb;
    --amber-100: #fef3c7;
    --amber-500: #f59e0b;
    --amber-600: #d97706;

    --rose-50:  #fff1f2;
    --rose-100: #ffe4e6;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;

    --sky-50:  #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;

    --violet-50:  #f5f3ff;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;

    --sidebar-w: 280px;
    --header-h: 76px;

    --font: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --shadow-soft:    0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-card:    0 4px 12px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.03);
    --shadow-brand:   0 10px 30px rgba(79, 70, 229, 0.22), 0 4px 12px rgba(59, 130, 246, 0.18);
    --shadow-emerald: 0 10px 30px rgba(16, 185, 129, 0.22);
    --shadow-rose:    0 10px 30px rgba(244, 63, 94, 0.22);
    --shadow-amber:   0 10px 30px rgba(245, 158, 11, 0.22);
}

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

body {
    font-family: var(--font);
    background-color: var(--slate-50);
    color: var(--slate-800);
    direction: rtl;
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    font-weight: 500;
    position: relative;
    min-height: 100vh;
}

/* Fixed grid pattern layer */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.055) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Animated radial glow layer — RGB slowly cycles through hues */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.22) 0%, transparent 40%),
        radial-gradient(circle at 85% 10%, rgba(59, 130, 246, 0.18) 0%, transparent 35%),
        radial-gradient(circle at 75% 85%, rgba(59, 130, 246, 0.16) 0%, transparent 40%),
        radial-gradient(circle at 10% 80%, rgba(59, 130, 246, 0.18) 0%, transparent 35%);
    pointer-events: none;
    animation: pageGlowPulse 14s ease-in-out infinite,
               pageGlowHue 30s linear infinite;
}

@keyframes pageGlowPulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1) translate(0, 0);
    }
    25% {
        opacity: 1;
        transform: scale(1.08) translate(-15px, 10px);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02) translate(20px, -15px);
    }
    75% {
        opacity: 1;
        transform: scale(1.1) translate(-10px, -10px);
    }
}

@keyframes pageGlowHue {
    0%   { filter: hue-rotate(0deg);   }
    25%  { filter: hue-rotate(90deg);  }
    50%  { filter: hue-rotate(180deg); }
    75%  { filter: hue-rotate(270deg); }
    100% { filter: hue-rotate(360deg); }
}

a { color: var(--indigo-600); text-decoration: none; }
a:hover { color: var(--indigo-700); }

h1, h2, h3, h4, h5 {
    margin: 0 0 8px 0;
    color: var(--slate-800);
    font-weight: 800;
    letter-spacing: -0.01em;
}
p { margin: 0 0 12px 0; color: var(--slate-600); }

/* =========================================================
   LAYOUT SHELL
   ========================================================= */

.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--slate-900);
    color: #fff;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px 16px;
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 18px;
}

.sidebar .brand .logo {
    width: 48px; height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--blue-500) 0%, var(--indigo-600) 100%);
    display: grid; place-items: center;
    color: #fff; font-weight: 900; font-size: 20px;
    box-shadow: var(--shadow-brand);
}

.sidebar .brand .title {
    font-weight: 900;
    font-size: 18px;
    color: #fff;
    letter-spacing: -0.01em;
}
.sidebar .brand .subtitle {
    color: var(--slate-400);
    font-size: 11.5px;
    font-weight: 500;
}

.nav-section { padding: 10px 0 6px; }
.nav-section .label {
    padding: 0 14px 10px;
    font-size: 10.5px;
    color: var(--slate-500);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 800;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: var(--slate-300);
    font-weight: 600;
    font-size: 13.5px;
    margin: 3px 0;
    transition: background 0.15s, color 0.15s;
    position: relative;
}
.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: #fff;
}
.nav-item.active {
    background: linear-gradient(135deg, var(--blue-500), var(--indigo-600));
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.nav-item .ico {
    width: 20px; height: 20px;
    display: grid; place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}
.nav-item .badge {
    margin-inline-start: auto;
    background: var(--rose-500);
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 10.5px;
    font-weight: 800;
}

.main {
    flex: 1;
    margin-right: var(--sidebar-w);
    min-width: 0;
}

.topbar {
    height: var(--header-h);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky; top: 0; z-index: 30;
}
.topbar .page-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--slate-800);
    letter-spacing: -0.015em;
}
.topbar .topbar-spacer { flex: 1; }

.topbar .user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px 6px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--slate-100);
    font-weight: 700;
    color: var(--slate-700);
    font-size: 13px;
}
.topbar .user-chip .avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-500), var(--indigo-600));
    color: #fff;
    display: grid; place-items: center;
    font-weight: 900;
    font-size: 14px;
    box-shadow: var(--shadow-brand);
}

.content { padding: 28px; }

/* =========================================================
   CARDS / PANELS
   ========================================================= */

.card {
    background: #fff;
    border: 1px solid var(--slate-100);
    border-radius: 24px;
    padding: 28px;
    box-shadow: var(--shadow-card);
}
.card + .card { margin-top: 20px; }

.card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}
.card-head h3 { font-size: 17px; font-weight: 900; margin: 0; color: var(--slate-800); }
.card-head .sub { color: var(--slate-500); font-size: 13px; font-weight: 500; }

.glass-panel {
    background: #ffffff;
    border: 1px solid var(--slate-100);
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.03);
}

.glass-panel h3, .glass-panel h4 { color: var(--slate-800); }

/* =========================================================
   STAT CARDS (generic compact grid)
   ========================================================= */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--slate-100);
    border-radius: 20px;
    padding: 20px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.stat-card .stat-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.stat-card .label {
    color: var(--slate-400);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    margin-bottom: 4px;
}
.stat-card .value {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--slate-800);
    line-height: 1.15;
}
.stat-card .stat-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}
.stat-card.primary  .stat-icon { background: #e0e7ff;          color: var(--indigo-600); }
.stat-card.info     .stat-icon { background: var(--sky-100);   color: var(--sky-600); }
.stat-card.success  .stat-icon { background: var(--emerald-100); color: var(--emerald-600); }
.stat-card.warning  .stat-icon { background: var(--amber-100); color: var(--amber-600); }
.stat-card.danger   .stat-icon { background: var(--rose-100);  color: var(--rose-600); }
.stat-card.purple   .stat-icon { background: #ede9fe;          color: var(--violet-600); }

/* =========================================================
   PAGE HERO (explainer banner at top of every page)
   ========================================================= */

.page-hero {
    position: relative;
    border-radius: 24px;
    padding: 28px 32px;
    margin-bottom: 28px;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.1);
}

/* Hero themes (gradients) */
.page-hero.theme-indigo  { background: linear-gradient(120deg, #0d9488 0%, #06b6d4 55%, #0ea5e9 120%); } /* teal → cyan → sky */
.page-hero.theme-sky     { background: linear-gradient(120deg, #0ea5e9 0%, #0284c7 60%, #1e40af 120%); }
.page-hero.theme-violet  { background: linear-gradient(120deg, #ec4899 0%, #db2777 50%, #be185d 110%); } /* pink → fuchsia */
.page-hero.theme-amber   { background: linear-gradient(120deg, #f59e0b 0%, #f97316 50%, #ef4444 110%); }
.page-hero.theme-emerald { background: linear-gradient(120deg, #059669 0%, #10b981 50%, #06b6d4 110%); }
.page-hero.theme-rose    { background: linear-gradient(120deg, #e11d48 0%, #be185d 50%, #ef4444 110%); }
.page-hero.theme-slate   { background: linear-gradient(120deg, #0f172a 0%, #334155 55%, #475569 120%); }

/* Decorative animated orbs */
.page-hero::before,
.page-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(30px);
    z-index: -1;
    pointer-events: none;
}
.page-hero::before {
    width: 220px; height: 220px;
    background: rgba(255,255,255,0.25);
    top: -80px; inset-inline-start: -60px;
    animation: heroPulse 8s ease-in-out infinite;
}
.page-hero::after {
    width: 160px; height: 160px;
    background: rgba(255,255,255,0.18);
    bottom: -60px; inset-inline-end: 20%;
    animation: heroPulse 10s ease-in-out infinite reverse;
}

/* Dot grid overlay */
.page-hero .ph-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.25) 1px, transparent 0);
    background-size: 24px 24px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

/* Rotating decorative ring */
.page-hero .ph-ring {
    position: absolute;
    top: 50%; inset-inline-end: -70px;
    width: 260px; height: 260px;
    border: 2px dashed rgba(255,255,255,0.25);
    border-radius: 50%;
    transform: translateY(-50%);
    animation: spin 28s linear infinite;
    pointer-events: none;
}
.page-hero .ph-ring::before {
    content: '';
    position: absolute;
    top: 50%; inset-inline-end: -8px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    transform: translateY(-50%);
    box-shadow: 0 0 20px rgba(255,255,255,0.6);
}

/* Content */
.page-hero .ph-body {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.page-hero .ph-icon {
    width: 72px; height: 72px;
    border-radius: 22px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(255,255,255,0.3);
    display: grid; place-items: center;
    color: #fff;
    font-size: 34px;
    box-shadow: 0 14px 28px rgba(0,0,0,0.15);
    flex-shrink: 0;
    animation: iconFloat 4s ease-in-out infinite;
}
@keyframes iconFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-6px) rotate(-4deg); }
}

.page-hero .ph-text { flex: 1; min-width: 220px; }
.page-hero .ph-title {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 6px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}
.page-hero .ph-desc {
    color: rgba(255,255,255,0.88);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.6;
    max-width: 720px;
    margin: 0;
}

.page-hero .ph-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.page-hero .ph-tip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.1px;
    transition: transform 0.2s, background 0.2s;
}
.page-hero .ph-tip:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.25);
}
.page-hero .ph-tip i { font-size: 12px; }

.page-hero .ph-action {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-inline-start: auto;
}
.page-hero .ph-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: rgba(255,255,255,0.95);
    color: var(--indigo-600);
    border-radius: 14px;
    font-weight: 800;
    font-size: 13.5px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 10px 24px rgba(0,0,0,0.15);
    transition: transform 0.15s;
    text-decoration: none;
}
.page-hero .ph-btn:hover {
    transform: translateY(-2px);
    color: var(--indigo-700);
}

@media (max-width: 700px) {
    .page-hero { padding: 22px; }
    .page-hero .ph-title { font-size: 20px; }
    .page-hero .ph-icon { width: 56px; height: 56px; font-size: 26px; }
    .page-hero .ph-ring { display: none; }
}

/* =========================================================
   CREATIVE DASHBOARD HERO CARDS — gradient + shapes + motion
   ========================================================= */

.dashboard-hero {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}
@media (min-width: 700px)  { .dashboard-hero { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .dashboard-hero { grid-template-columns: repeat(3, 1fr); } }

.hero-card {
    position: relative;
    min-height: 170px;
    border-radius: 24px;
    padding: 26px 28px;
    background: #ffffff;
    overflow: hidden;
    border: 1px solid var(--slate-100);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    isolation: isolate;
    transition: transform 0.25s cubic-bezier(.22, 1, .36, 1), box-shadow 0.25s;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 22px;
    align-items: center;
    cursor: default;
}
.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    border-color: color-mix(in srgb, var(--hc-icon, #4f46e5) 25%, var(--slate-100));
}

/* Soft corner glow (behind content) */
.hero-card::before {
    content: '';
    position: absolute;
    width: 220px; height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--hc-glow, rgba(59,130,246,0.18)) 0%, transparent 70%);
    top: -70px;
    inset-inline-start: -80px;
    z-index: 0;
    pointer-events: none;
}

/* Bottom accent bar (full width, theme color) */
.hero-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--hc-from, #3b82f6), var(--hc-to, #6366f1));
    z-index: 1;
}

/* Theme color variables */
.hero-card.theme-indigo  { --hc-from: #0d9488; --hc-to: #0ea5e9; --hc-icon: #0d9488; --hc-iconbg: #ccfbf1; --hc-glow: rgba(13,148,136,0.18); }
.hero-card.theme-sky     { --hc-from: #0ea5e9; --hc-to: #2563eb; --hc-icon: #0284c7; --hc-iconbg: #e0f2fe; --hc-glow: rgba(14,165,233,0.18); }
.hero-card.theme-violet  { --hc-from: #ec4899; --hc-to: #be185d; --hc-icon: #db2777; --hc-iconbg: #fce7f3; --hc-glow: rgba(236,72,153,0.18); }
.hero-card.theme-amber   { --hc-from: #f59e0b; --hc-to: #ef4444; --hc-icon: #d97706; --hc-iconbg: #fef3c7; --hc-glow: rgba(245,158,11,0.2); }
.hero-card.theme-emerald { --hc-from: #059669; --hc-to: #06b6d4; --hc-icon: #059669; --hc-iconbg: #d1fae5; --hc-glow: rgba(5,150,105,0.18); }
.hero-card.theme-rose    { --hc-from: #e11d48; --hc-to: #be185d; --hc-icon: #e11d48; --hc-iconbg: #ffe4e6; --hc-glow: rgba(225,29,72,0.18); }

/* Layer content above decorations */
.hero-card .hc-icon-wrap,
.hero-card .hc-body { position: relative; z-index: 2; }
.hero-card .shape-layer,
.hero-card .hc-top,
.hero-card .hc-foot { display: none; } /* legacy classes disabled, new structure uses .hc-body */

/* ICON on the LEFT (visual left = end in RTL, via order) */
.hero-card .hc-icon-wrap {
    order: 2; /* place after body in RTL flow = visually left */
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-card .hc-body { order: 1; }

/* BIG circular icon */
.hero-card .hc-icon {
    width: 86px; height: 86px;
    border-radius: 50%;
    background: var(--hc-iconbg, #e0e7ff);
    color: var(--hc-icon, #4f46e5);
    display: grid; place-items: center;
    font-size: 40px;
    flex-shrink: 0;
    transition: transform 0.3s;
    box-shadow:
        0 12px 32px var(--hc-glow, rgba(59,130,246,0.2)),
        inset 0 0 0 4px rgba(255,255,255,0.9);
    position: relative;
}
/* Decorative outer ring around icon */
.hero-card .hc-icon::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px dashed color-mix(in srgb, var(--hc-icon, #4f46e5) 25%, transparent);
    animation: spin 30s linear infinite;
}
.hero-card:hover .hc-icon {
    transform: scale(1.08);
}

/* Body: text + metrics */
.hero-card .hc-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    min-width: 0;
}

.hero-card .hc-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: var(--slate-500);
    text-transform: uppercase;
}

.hero-card .hc-value {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--hc-icon, var(--slate-800));
}

/* Bottom pill */
.hero-card .hc-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--hc-iconbg, var(--slate-50));
    font-size: 11.5px;
    font-weight: 800;
    color: var(--hc-icon, var(--slate-700));
    align-self: flex-start;
    margin-top: 4px;
}
.hero-card .hc-pill .live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--hc-icon, var(--blue-500));
    animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.5; transform: scale(1.3); }
}

/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 13.5px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
    letter-spacing: -0.01em;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(135deg, var(--blue-500), var(--indigo-600));
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.btn-primary:hover { filter: brightness(1.05); color: #fff; box-shadow: 0 14px 36px rgba(79, 70, 229, 0.3); }

.btn-success { background: linear-gradient(135deg, #10b981, #059669); color: #fff; box-shadow: var(--shadow-emerald); }
.btn-success:hover { color: #fff; filter: brightness(1.05); }

.btn-danger  { background: linear-gradient(135deg, var(--rose-500), var(--rose-600)); color: #fff; box-shadow: var(--shadow-rose); }
.btn-danger:hover { color: #fff; filter: brightness(1.05); }

.btn-warning { background: linear-gradient(135deg, var(--amber-500), var(--amber-600)); color: #fff; box-shadow: var(--shadow-amber); }
.btn-warning:hover { color: #fff; filter: brightness(1.05); }

.btn-outline {
    background: #fff;
    border-color: var(--slate-200);
    color: var(--slate-700);
    box-shadow: var(--shadow-soft);
}
.btn-outline:hover { background: var(--slate-50); border-color: var(--slate-300); }

.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 10px; }
.btn-block { width: 100%; justify-content: center; }

/* =========================================================
   FORMS
   ========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.form-full { grid-column: 1 / -1; }

.field label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--slate-600);
    margin-bottom: 8px;
}
.input, .select, .textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--slate-200);
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    background: #ffffff;
    color: var(--slate-800);
    font-weight: 500;
    transition: border 0.15s, box-shadow 0.15s;
}
.input:hover, .select:hover, .textarea:hover {
    border-color: var(--slate-300);
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}
.input::placeholder, .textarea::placeholder { color: var(--slate-400); }
.textarea { min-height: 96px; resize: vertical; }

.form-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-700);
}
.form-check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--indigo-600); }

/* =========================================================
   INPUT WITH ICON (icon on right for RTL)
   ========================================================= */

.input-group {
    position: relative;
    display: block;
}
.input-group .input,
.input-group .select,
.input-group .textarea {
    padding-inline-end: 44px;
}
.input-group .input-icon {
    position: absolute;
    top: 50%;
    inset-inline-end: 14px;
    transform: translateY(-50%);
    color: var(--slate-400);
    font-size: 18px;
    pointer-events: none;
    line-height: 1;
    transition: color 0.15s;
}
.input-group:focus-within .input-icon { color: var(--indigo-500); }

.input-group.textarea-group .input-icon {
    top: 16px;
    transform: none;
}

/* Form row stacks */
.form-stack > * + * { margin-top: 24px; }

/* Nested panel inside a card (soft, lighter) */
.nested-card {
    background: rgba(241, 245, 249, 0.7);
    border: 1px solid var(--slate-200);
    border-radius: 20px;
    padding: 20px 22px;
}
.nested-card .nested-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: var(--slate-600);
    margin-bottom: 14px;
}
.nested-card .nested-head i { color: var(--indigo-500); font-size: 16px; }

/* Label strong */
.field label.label-strong {
    font-size: 13px;
    font-weight: 800;
    color: var(--slate-700);
    margin-bottom: 10px;
}

/* Section head inside glass panel */
.section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--slate-100);
}
.section-head .section-icon {
    width: 44px; height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue-500), var(--indigo-600));
    color: #fff;
    display: grid; place-items: center;
    font-size: 20px;
    box-shadow: var(--shadow-brand);
}
.section-head .section-title {
    font-size: 17px;
    font-weight: 900;
    color: var(--slate-800);
    letter-spacing: -0.015em;
}
.section-head .section-sub {
    font-size: 12.5px;
    color: var(--slate-500);
    font-weight: 500;
}

/* Explicit grid helpers for forms */
.grid-cols-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
@media (max-width: 900px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .grid-cols-4 { grid-template-columns: 1fr; }
}

/* =========================================================
   TABLE
   ========================================================= */

.table-wrap {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid var(--slate-100);
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.table th, .table td {
    padding: 14px 18px;
    text-align: start;
    border-bottom: 1px solid var(--slate-100);
    vertical-align: middle;
}
.table thead th {
    background: var(--slate-50);
    font-size: 12px;
    font-weight: 800;
    color: var(--slate-500);
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--slate-50); }
.table td strong { color: var(--slate-800); font-weight: 700; }

/* Borderless soft table for dashboard glass panels */
.table-soft {
    width: 100%;
    border-collapse: collapse;
    text-align: start;
    font-size: 13.5px;
}
.table-soft thead th {
    font-size: 11px;
    font-weight: 800;
    color: var(--slate-400);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 10px 12px;
    border-bottom: 1px solid var(--slate-100);
    text-align: start;
    background: transparent;
}
.table-soft tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--slate-50);
    vertical-align: middle;
    color: var(--slate-700);
}
.table-soft tbody tr:last-child td { border-bottom: none; }
.table-soft tbody tr { transition: background 0.15s; }
.table-soft tbody tr:hover { background: rgba(248, 250, 252, 0.6); }
.table-soft td strong { color: var(--slate-800); font-weight: 800; }

/* =========================================================
   BADGES / CHIPS
   ========================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.2px;
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.badge-success { background: var(--emerald-50); color: var(--emerald-600); border-color: #a7f3d0; }
.badge-warning { background: var(--amber-50);   color: var(--amber-600);   border-color: #fde68a; }
.badge-danger  { background: var(--rose-50);    color: var(--rose-600);    border-color: #fecdd3; }
.badge-info    { background: var(--sky-50);     color: var(--sky-600);     border-color: #bae6fd; }
.badge-muted   { background: var(--slate-100);  color: var(--slate-500);   border-color: var(--slate-200); }
.badge-primary { background: #eef2ff;           color: var(--indigo-600);  border-color: #c7d2fe; }
.badge-blue    { background: #dbeafe;           color: var(--blue-600);    border-color: #bfdbfe; }
.badge-violet  { background: #ede9fe;           color: var(--violet-600);  border-color: #ddd6fe; }

/* Status pill for deal stages */
.stage-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    border: 1px solid transparent;
}
.stage-initial_meeting  { background: var(--slate-100); color: var(--slate-600); border-color: var(--slate-200); }
.stage-contract_signed  { background: #dbeafe; color: var(--blue-600); border-color: #bfdbfe; }
.stage-payments_received{ background: var(--emerald-50); color: var(--emerald-600); border-color: #a7f3d0; }
.stage-delivered        { background: #ede9fe; color: var(--violet-600); border-color: #ddd6fe; }
.stage-cancelled        { background: var(--rose-50); color: var(--rose-600); border-color: #fecdd3; }

/* =========================================================
   ALERTS
   ========================================================= */

.alert {
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-weight: 600;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-success { background: var(--emerald-50); color: var(--emerald-600); border-color: var(--emerald-100); }
.alert-danger  { background: var(--rose-50);    color: var(--rose-600);    border-color: var(--rose-100); }

/* =========================================================
   TABS
   ========================================================= */

.tabs {
    display: inline-flex;
    gap: 4px;
    padding: 5px;
    background: var(--slate-100);
    border-radius: 16px;
    margin-bottom: 24px;
}
.tab-btn {
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    color: var(--slate-500);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: -0.005em;
    transition: all 0.15s;
}
.tab-btn:hover { color: var(--slate-700); }
.tab-btn.active {
    background: #fff;
    color: var(--indigo-600);
    box-shadow: var(--shadow-card);
}

/* =========================================================
   PRODUCT / CARD GRID
   ========================================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.product-card {
    background: #fff;
    border: 1px solid var(--slate-100);
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
    border-color: var(--slate-200);
}
.product-card .pmedia {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    position: relative;
    overflow: hidden;
}
.product-card .pmedia img, .product-card .pmedia video { width: 100%; height: 100%; object-fit: cover; }
.product-card .pmedia .ph {
    position: absolute; inset: 0; display: grid; place-items: center;
    font-size: 48px; color: rgba(79, 70, 229, 0.3);
}
.product-card .pbody { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.product-card .ptitle {
    font-size: 16px;
    font-weight: 900;
    margin: 0 0 6px;
    color: var(--slate-800);
    letter-spacing: -0.01em;
}
.product-card .pdesc {
    color: var(--slate-500);
    font-size: 13px;
    flex: 1;
    margin-bottom: 14px;
    line-height: 1.55;
}
.product-card .pfoot {
    display: grid; grid-template-columns: 1fr 1fr 1fr;
    border-top: 1px solid var(--slate-100);
    padding-top: 14px;
    gap: 6px;
}
.product-card .pfoot .mini {
    text-align: center;
}
.product-card .pfoot .mini .t { font-size: 10.5px; color: var(--slate-400); font-weight: 700; letter-spacing: 0.3px; text-transform: uppercase; }
.product-card .pfoot .mini .v { font-size: 14px; font-weight: 900; color: var(--slate-800); }
.product-card .price { font-weight: 900; font-size: 18px; color: var(--indigo-600); }

/* =========================================================
   MEDIA TILES
   ========================================================= */

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.media-tile {
    aspect-ratio: 1;
    background: var(--slate-50);
    border: 1px solid var(--slate-100);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    display: grid; place-items: center;
}
.media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; }
.media-tile .mtype {
    position: absolute; top: 8px; inset-inline-start: 8px;
    background: rgba(15,23,42,0.75); color: #fff; font-size: 10px;
    padding: 3px 10px; border-radius: 999px; font-weight: 800;
    backdrop-filter: blur(8px);
}
.media-tile .mdel { position: absolute; bottom: 8px; inset-inline-end: 8px; }

/* =========================================================
   UTILITIES
   ========================================================= */

.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }

.flex-col { display: flex; flex-direction: column; gap: 12px; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.text-muted { color: var(--slate-500); }
.text-hint  { color: var(--slate-400); }
.text-primary { color: var(--indigo-600); }
.text-success { color: var(--emerald-600); }
.text-danger { color: var(--rose-600); }
.text-warning { color: var(--amber-600); }

.fw-bold { font-weight: 800; }
.font-sm { font-size: 12px; }
.font-lg { font-size: 16px; }

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

@media (max-width: 1100px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    :root { --sidebar-w: 0px; }
    .sidebar { transform: translateX(100%); transition: transform 0.2s; width: 280px; }
    .sidebar.show { transform: translateX(0); }
    .main { margin-right: 0; }
    .content { padding: 18px; }
    .topbar { padding: 0 18px; }
    .card { padding: 22px; border-radius: 20px; }
}

/* =========================================================
   SPLIT SCREEN LOGIN
   ========================================================= */

.login-shell {
    height: 100vh;
    width: 100%;
    display: flex;
    overflow: hidden;
    background: #fff;
    font-family: var(--font);
}

/* ===== FORM PANEL (right in RTL, first in DOM) ===== */
.login-form-panel {
    width: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}
@media (min-width: 1024px) {
    .login-form-panel { width: 50%; padding: 64px; }
}
@media (min-width: 1280px) {
    .login-form-panel { width: 45%; padding: 72px; }
}

.login-form-inner {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

.login-top-btn {
    position: absolute;
    top: 24px;
    inset-inline-end: 24px;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--slate-100);
    color: var(--slate-600);
    border: none;
    cursor: pointer;
    display: grid; place-items: center;
    font-size: 18px;
    transition: all 0.15s;
}
.login-top-btn:hover {
    background: var(--slate-200);
    color: var(--slate-800);
    transform: rotate(-15deg);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 44px;
}
.login-brand .logo-box {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue-500), var(--indigo-600));
    color: #fff;
    display: grid; place-items: center;
    font-weight: 900;
    font-size: 20px;
    box-shadow: var(--shadow-brand);
}
.login-brand .logo-text {
    font-weight: 900;
    font-size: 17px;
    color: var(--slate-900);
    letter-spacing: -0.01em;
}
.login-brand .logo-sub {
    font-size: 12px;
    color: var(--slate-500);
    font-weight: 600;
}

.login-headline {
    font-size: 32px;
    font-weight: 900;
    color: var(--slate-900);
    letter-spacing: -0.025em;
    margin-bottom: 10px;
}
.login-subtitle {
    color: var(--slate-500);
    font-weight: 500;
    font-size: 14.5px;
    margin-bottom: 36px;
}

.login-input-wrap {
    position: relative;
    background: var(--slate-50);
    border: 1.5px solid var(--slate-200);
    border-radius: 14px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: all 0.15s;
}
.login-input-wrap:focus-within {
    background: #fff;
    border-color: var(--blue-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}
.login-input-wrap:focus-within .login-input-icon { color: var(--blue-600); }

.login-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 0;
    font-size: 14.5px;
    font-family: inherit;
    font-weight: 500;
    color: var(--slate-800);
    outline: none;
}
.login-input-wrap input::placeholder { color: var(--slate-400); }

.login-input-icon {
    color: var(--slate-400);
    font-size: 18px;
    transition: color 0.15s;
    flex-shrink: 0;
    margin-inline-start: 10px;
}

.login-eye-btn {
    background: transparent;
    border: none;
    color: var(--slate-400);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    margin-inline-end: -4px;
}
.login-eye-btn:hover { color: var(--slate-700); }

.login-field-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--slate-700);
    margin-bottom: 8px;
    display: block;
}

.login-form-stack > * + * { margin-top: 18px; }

/* Custom checkbox */
.login-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-700);
}
.login-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.login-check .box {
    width: 20px; height: 20px;
    border-radius: 6px;
    border: 1.5px solid var(--slate-300);
    background: #fff;
    display: grid; place-items: center;
    transition: all 0.15s;
    flex-shrink: 0;
}
.login-check .box i { color: #fff; font-size: 12px; opacity: 0; }
.login-check input:checked ~ .box {
    background: var(--blue-600);
    border-color: var(--blue-600);
}
.login-check input:checked ~ .box i { opacity: 1; }

.login-forgot {
    font-size: 13px;
    font-weight: 700;
    color: var(--blue-600);
}

.login-submit {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: var(--blue-600);
    color: #fff;
    font-weight: 800;
    font-size: 15px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: -0.01em;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25), 0 4px 12px rgba(37, 99, 235, 0.15);
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.login-submit:hover { background: var(--blue-500); }
.login-submit:active { transform: scale(0.98); }

.login-footer-text {
    text-align: center;
    color: var(--slate-500);
    font-size: 13px;
    margin-top: 28px;
}
.login-footer-text a { color: var(--blue-600); font-weight: 700; }

/* ===== HERO PANEL (left in RTL, second in DOM) ===== */
.login-hero-panel {
    display: none;
    flex: 1;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3730a3 100%);
    color: #fff;
    padding: 60px;
    flex-direction: column;
    justify-content: center;
}
@media (min-width: 1024px) {
    .login-hero-panel { display: flex; }
}

/* Radial dot pattern */
.login-hero-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.15) 1px, transparent 0);
    background-size: 32px 32px;
    opacity: 0.4;
    pointer-events: none;
}

/* Floating blurry orbs */
.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: overlay;
    pointer-events: none;
}
.login-orb-1 {
    width: 520px; height: 520px;
    background: rgba(96, 165, 250, 0.45);
    top: -140px; inset-inline-end: -180px;
    animation: floatOrb 10s ease-in-out infinite;
}
.login-orb-2 {
    width: 460px; height: 460px;
    background: rgba(129, 140, 248, 0.4);
    bottom: -160px; inset-inline-start: -140px;
    animation: floatOrb 13s ease-in-out infinite reverse;
}
@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -40px) scale(1.08); }
}

/* SVG geometric lines */
.login-svg-curves {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    opacity: 0.1;
    pointer-events: none;
}

/* Floating decorative glass card */
.login-deco-card {
    position: absolute;
    top: 18%;
    inset-inline-start: 8%;
    width: 160px;
    height: 100px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 18px;
    transform: rotate(-8deg);
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
    animation: floatCard 8s ease-in-out infinite;
}
@keyframes floatCard {
    0%, 100% { transform: rotate(-8deg) translateY(0); }
    50%      { transform: rotate(-8deg) translateY(-18px); }
}

/* Hero content */
.login-hero-content {
    position: relative;
    z-index: 2;
    max-width: 520px;
}

.login-hero-logo {
    width: 72px; height: 72px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    display: grid; place-items: center;
    color: #fff;
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 36px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.login-hero-title {
    font-size: 44px;
    font-weight: 900;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.login-hero-desc {
    font-size: 16px;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
    margin-bottom: 40px;
    font-weight: 500;
}

.login-feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}
.login-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: default;
}
.login-feature .f-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.2);
    display: grid; place-items: center;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.login-feature:hover .f-icon {
    transform: scale(1.1) rotate(-5deg);
    background: rgba(255,255,255,0.15);
}
.login-feature .f-text {
    color: #fff;
    font-weight: 600;
    font-size: 14.5px;
}

/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {
    text-align: center;
    padding: 72px 24px;
    color: var(--slate-500);
}
.empty-state .emoji {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.35;
    display: inline-block;
}
.empty-state h3, .empty-state h4 { color: var(--slate-700); margin-bottom: 8px; }

/* =========================================================
   PAGINATION
   ========================================================= */

nav[role="navigation"] {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}
.pagination li a, .pagination li span {
    padding: 8px 14px;
    border-radius: 12px;
    border: 1px solid var(--slate-200);
    display: inline-block;
    color: var(--slate-700);
    background: #fff;
    font-weight: 700;
    font-size: 13px;
    min-width: 38px;
    text-align: center;
    transition: all 0.15s;
}
.pagination li a:hover { background: var(--slate-50); border-color: var(--slate-300); }
.pagination li.active span {
    background: linear-gradient(135deg, var(--blue-500), var(--indigo-600));
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-brand);
}
.pagination li.disabled span { opacity: 0.4; }

/* =========================================================
   MEDIA UPLOAD PANEL
   ========================================================= */

.media-upload-panel {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04) 0%, rgba(59, 130, 246, 0.06) 100%);
    border: 2px dashed rgba(79, 70, 229, 0.3);
    border-radius: 24px;
    padding: 28px;
    margin-bottom: 20px;
}
.media-upload-panel h4 {
    margin: 0 0 16px;
    color: var(--indigo-600);
    font-weight: 900;
    font-size: 15px;
}

.media-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.media-tab {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: #fff;
    text-align: center;
    cursor: pointer;
    font-weight: 800;
    font-size: 13px;
    color: var(--slate-500);
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.media-tab:hover { border-color: var(--indigo-500); color: var(--indigo-600); }
.media-tab.active {
    background: linear-gradient(135deg, var(--blue-500), var(--indigo-600));
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-brand);
}

/* =========================================================
   REPRESENTATIVE CARD (uses gradient background)
   ========================================================= */

.rep-card-media {
    background: linear-gradient(135deg, var(--blue-500) 0%, var(--indigo-600) 100%) !important;
    display: grid;
    place-items: center;
}
.rep-card-media .avatar-big {
    width: 96px; height: 96px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    display: grid; place-items: center;
    font-size: 40px;
    font-weight: 900;
    color: #fff;
}

.story-card-media {
    background: linear-gradient(135deg, #f97316 0%, #ec4899 100%) !important;
    display: grid; place-items: center;
    color: #fff;
}

/* =========================================================
   ICONS (Phosphor)
   ========================================================= */

.ph { vertical-align: middle; line-height: 1; }
