/* =========================================================
   Zuber Mobile Academy — Admin theme
   Layered on top of Filament's compiled CSS (no build step).
   ========================================================= */

:root {
    --zma-brand: #b0135a;
    --zma-brand-2: #e0326f;
    --zma-brand-deep: #6e0a37;
    --zma-plum-1: #2a0a1e;
    --zma-plum-2: #14060f;
    --zma-bg: #f6f4f9;
    --zma-card: #ffffff;
    --zma-border: rgba(17, 12, 34, 0.07);
    --zma-shadow: 0 1px 2px rgba(17, 12, 34, 0.04), 0 8px 24px -12px rgba(17, 12, 34, 0.12);
    --zma-shadow-hover: 0 2px 4px rgba(17, 12, 34, 0.05), 0 18px 40px -16px rgba(176, 19, 90, 0.28);
    --zma-radius: 1.1rem;
}

.dark {
    --zma-bg: #0d0a12;
    --zma-card: #16121d;
    --zma-border: rgba(255, 255, 255, 0.07);
    --zma-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 30px -14px rgba(0, 0, 0, 0.7);
    --zma-shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.4), 0 18px 40px -16px rgba(224, 50, 111, 0.35);
}

/* ---------- Page background ---------- */
.fi-body {
    background:
        radial-gradient(1200px 500px at 100% -10%, rgba(176, 19, 90, 0.07), transparent 60%),
        radial-gradient(900px 400px at -10% 110%, rgba(99, 102, 241, 0.05), transparent 60%),
        var(--zma-bg) !important;
    background-attachment: fixed !important;
}

/* ---------- Sidebar (always rich plum) ---------- */
.fi-sidebar {
    background: linear-gradient(180deg, var(--zma-plum-1) 0%, var(--zma-plum-2) 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.04) !important;
    box-shadow: 4px 0 30px -12px rgba(0, 0, 0, 0.45);
}
.fi-sidebar-header {
    background: transparent !important;
    box-shadow: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.fi-sidebar .fi-sidebar-group-label,
.fi-sidebar .fi-sidebar-group-btn {
    color: rgba(255, 255, 255, 0.42) !important;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 0.68rem !important;
    font-weight: 600;
}
.fi-sidebar .fi-sidebar-group-collapse-btn { color: rgba(255, 255, 255, 0.35) !important; }
.fi-sidebar .fi-sidebar-item-btn {
    border-radius: 0.8rem !important;
    transition: background 0.18s ease, transform 0.18s ease;
}
.fi-sidebar .fi-sidebar-item-label { color: rgba(255, 255, 255, 0.78) !important; font-weight: 500; }
.fi-sidebar .fi-sidebar-item-icon { color: rgba(255, 255, 255, 0.5) !important; }
.fi-sidebar .fi-sidebar-item-btn:hover { background: rgba(255, 255, 255, 0.06) !important; transform: translateX(2px); }
.fi-sidebar .fi-sidebar-item-btn:hover .fi-sidebar-item-label { color: #fff !important; }
.fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: linear-gradient(135deg, var(--zma-brand-2) 0%, var(--zma-brand) 55%, var(--zma-brand-deep) 100%) !important;
    box-shadow: 0 10px 24px -10px rgba(224, 50, 111, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-icon { color: #fff !important; }
.fi-sidebar .fi-sidebar-item .fi-badge {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    --tw-ring-color: transparent !important;
}
.fi-sidebar .fi-sidebar-item.fi-active .fi-badge { background: rgba(255, 255, 255, 0.22) !important; }
.fi-sidebar .fi-sidebar-close-collapse-sidebar-btn,
.fi-sidebar .fi-sidebar-open-collapse-sidebar-btn,
.fi-sidebar .fi-sidebar-header-controls button { color: rgba(255, 255, 255, 0.6) !important; }

/* Brand */
.zma-brand { display: flex; align-items: center; gap: 0.7rem; }
.zma-brand-mark {
    display: grid; place-items: center;
    width: 2.4rem; height: 2.4rem; border-radius: 0.8rem;
    background: linear-gradient(135deg, #f0457f, var(--zma-brand) 55%, var(--zma-brand-deep));
    color: #fff;
    box-shadow: 0 8px 20px -8px rgba(224, 50, 111, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.zma-brand-mark svg { width: 1.45rem; height: 1.45rem; }
.zma-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.zma-brand-name { font-weight: 700; font-size: 1rem; color: #fff; letter-spacing: -0.01em; }
.zma-brand-sub { font-size: 0.68rem; color: rgba(255, 255, 255, 0.5); letter-spacing: 0.06em; text-transform: uppercase; }
/* brand shown on light surfaces (login page, mobile topbar) */
.fi-simple-layout .zma-brand-name, .fi-topbar .zma-brand-name { color: #1d1024; }
.fi-simple-layout .zma-brand-sub, .fi-topbar .zma-brand-sub { color: #8b7b92; }
.dark .fi-simple-layout .zma-brand-name, .dark .fi-topbar .zma-brand-name { color: #fff; }

/* Sidebar footer card */
.zma-sidebar-card {
    margin: 0.75rem; padding: 0.8rem 0.9rem;
    display: flex; gap: 0.7rem; align-items: center;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(224, 50, 111, 0.18), rgba(99, 102, 241, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.zma-sidebar-card-icon {
    flex: none; display: grid; place-items: center;
    width: 2.1rem; height: 2.1rem; border-radius: 0.65rem;
    background: rgba(16, 185, 129, 0.18); color: #34d399;
}
.zma-sidebar-card-title { font-size: 0.78rem; font-weight: 600; color: #fff; }
.zma-sidebar-card-sub { font-size: 0.68rem; color: rgba(255, 255, 255, 0.5); }
.fi-sidebar:not(.fi-sidebar-open) .zma-sidebar-card { display: none; }
.zma-ic { width: 1.15rem; height: 1.15rem; }

/* ---------- Topbar: frosted glass ---------- */
.fi-topbar {
    background: color-mix(in srgb, var(--zma-bg) 72%, transparent) !important;
    backdrop-filter: saturate(170%) blur(14px);
    -webkit-backdrop-filter: saturate(170%) blur(14px);
    box-shadow: none !important;
    border-bottom: 1px solid var(--zma-border) !important;
}

/* ---------- Page header ---------- */
.fi-header-heading { letter-spacing: -0.025em; font-weight: 700 !important; }
.fi-header-subheading { max-width: 60ch; }

/* ---------- Cards: sections, tables, widgets ---------- */
.fi-section:not(.fi-section-not-contained),
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-wi-chart,
.fi-modal-window {
    border-radius: var(--zma-radius) !important;
    background: var(--zma-card) !important;
    box-shadow: var(--zma-shadow) !important;
    --tw-ring-color: var(--zma-border) !important;
    border: 1px solid var(--zma-border);
}
.fi-section-header-heading { font-weight: 600 !important; letter-spacing: -0.01em; }
.fi-section-header .fi-icon { color: var(--zma-brand) !important; }

/* Stats */
.fi-wi-stats-overview-stat {
    position: relative; overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.fi-wi-stats-overview-stat:hover { transform: translateY(-3px); box-shadow: var(--zma-shadow-hover) !important; }
.fi-wi-stats-overview-stat::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--zma-brand-2), var(--zma-brand), #6366f1);
    opacity: 0.85;
}
.fi-wi-stats-overview-stat-label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem !important; font-weight: 600 !important; }
.fi-wi-stats-overview-stat-value { font-size: 1.85rem !important; letter-spacing: -0.03em; font-weight: 700 !important; }

/* Tables */
.fi-ta-header-cell { text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.7rem !important; }
.fi-ta-row { transition: background 0.15s ease; }
.fi-ta-row:hover { background: color-mix(in srgb, var(--zma-brand) 4%, transparent) !important; }
.zma-thumb { border-radius: 0.6rem !important; object-fit: cover; box-shadow: 0 4px 12px -6px rgba(0, 0, 0, 0.35); }

/* Tabs */
.fi-tabs { border-radius: 0.95rem !important; box-shadow: var(--zma-shadow) !important; }
.fi-tabs-item.fi-active { box-shadow: inset 0 -2px 0 var(--zma-brand); }

/* Buttons */
.fi-btn { border-radius: 0.75rem !important; transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease; }
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link) {
    background-image: linear-gradient(135deg, var(--zma-brand-2), var(--zma-brand) 60%, var(--zma-brand-deep)) !important;
    box-shadow: 0 8px 18px -8px rgba(176, 19, 90, 0.7);
    color: #fff !important;
}
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link) .fi-icon { color: #fff !important; }
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link):hover { transform: translateY(-1px); filter: brightness(1.06); }

/* Inputs */
.fi-input-wrp { border-radius: 0.75rem !important; transition: box-shadow 0.15s ease; }
.fi-input-wrp:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--zma-brand) 14%, transparent) !important; }
.fi-badge { border-radius: 999px !important; font-weight: 600; }

/* ---------- Welcome hero ---------- */
.zma-hero {
    position: relative; overflow: hidden;
    border-radius: 1.4rem;
    padding: 1.6rem 1.8rem;
    color: #fff;
    background:
        radial-gradient(600px 220px at 85% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
        linear-gradient(120deg, #3b0a29 0%, var(--zma-brand-deep) 30%, var(--zma-brand) 65%, #e0326f 100%);
    box-shadow: 0 24px 48px -24px rgba(176, 19, 90, 0.7);
}
.zma-hero-glow {
    position: absolute; right: -60px; bottom: -80px; width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 196, 0, 0.35), transparent 65%);
    filter: blur(4px); pointer-events: none;
}
.zma-hero-body { position: relative; display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; justify-content: space-between; }
.zma-hero-kicker { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.7; }
.zma-hero-title { font-size: 1.65rem; font-weight: 700; letter-spacing: -0.03em; margin: 0.15rem 0 0.35rem; }
.zma-hero-sub { opacity: 0.88; font-size: 0.92rem; max-width: 62ch; }
.zma-hero-actions { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.zma-hero-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.6rem 1rem; border-radius: 0.8rem;
    font-size: 0.85rem; font-weight: 600; color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
    transition: background 0.15s ease, transform 0.15s ease;
}
.zma-hero-btn:hover { background: rgba(255, 255, 255, 0.22); transform: translateY(-1px); }
.zma-hero-btn-primary { background: #fff; color: var(--zma-brand-deep); border-color: #fff; }
.zma-hero-btn-primary:hover { background: #fff5f9; }
.zma-live-dot {
    display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%;
    background: #ff4d6d; margin: 0 0.15rem 0 0.35rem;
    box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.7); animation: zma-pulse 1.6s infinite;
}
@keyframes zma-pulse { 70% { box-shadow: 0 0 0 10px rgba(255, 77, 109, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0); } }

/* ---------- Settings page ---------- */
.zma-settings-actions {
    position: sticky; bottom: 1rem; z-index: 5;
    display: flex; justify-content: flex-end;
    margin-top: 1.25rem;
}

/* ---------- Login page ---------- */
.fi-simple-layout {
    background:
        radial-gradient(800px 500px at 0% 0%, rgba(224, 50, 111, 0.35), transparent 60%),
        radial-gradient(700px 500px at 100% 100%, rgba(99, 102, 241, 0.28), transparent 60%),
        linear-gradient(135deg, #1a0613 0%, #3b0a29 50%, #14060f 100%) !important;
}
.fi-simple-main {
    border-radius: 1.5rem !important;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.97) !important;
}
.dark .fi-simple-main { background: rgba(22, 18, 29, 0.95) !important; }
.fi-simple-header-heading { letter-spacing: -0.02em; }

/* Scrollbar */
.fi-sidebar-nav::-webkit-scrollbar { width: 6px; }
.fi-sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 999px; }

@media (max-width: 640px) {
    .zma-hero { padding: 1.2rem; }
    .zma-hero-title { font-size: 1.3rem; }
}

/* ---------- Secure preview player ---------- */
.zma-preview-frame { position: relative; border-radius: 1rem; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.zma-preview-video { width: 100%; height: 100%; display: block; background: #000; }
.zma-preview-watermark {
    position: absolute; top: 12%; left: 8%; pointer-events: none;
    color: rgba(255, 255, 255, 0.35); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    animation: zma-wm 18s linear infinite alternate;
}
@keyframes zma-wm { 0% { top: 10%; left: 6%; } 33% { top: 70%; left: 55%; } 66% { top: 30%; left: 62%; } 100% { top: 78%; left: 10%; } }
.zma-preview-overlay { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 600; background: rgba(0, 0, 0, 0.55); }
.zma-preview-error { color: #fecdd3; padding: 1rem; text-align: center; }
.zma-preview-meta { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 0.75rem; font-size: 0.8rem; color: #64748b; }
