/*
 * Gaya merek Visitor (dari desain Figma "Visitor SaaS — Redesign Dashboard").
 * Dipakai oleh panel Filament (render hook HEAD_END) dan halaman publik tamu.
 * Sengaja berupa CSS biasa tanpa langkah build.
 */

:root {
    --brand-navy: #033780;
    --brand-blue: #1565d8;
    --brand-yellow: #f7bd0c;
    --brand-tint: #e8f1ff;
    --brand-tint-strong: #dae7fa;
    --brand-page: #f5f8fd;
    --brand-text-strong: #10182b;
    --brand-text: #243b53;
    --brand-muted: #64748b;
    --brand-border: #e2e8f0;
    --brand-radius-card: 16px;
}

/* ---------- Logo Birran (animasi masuk) ---------- */
.birran-logo { display: block; width: 100%; height: auto; color: #000; overflow: visible; }

.birran-logo.is-animated .birran-gold,
.birran-logo.is-animated .birran-navy {
    transform-box: fill-box;
    transform-origin: center;
    animation: birran-pop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.birran-logo.is-animated .birran-gold { --from-rotate: 90deg; }
.birran-logo.is-animated .birran-navy { --from-rotate: -90deg; animation-delay: 0.2s; }

.birran-logo.is-animated .birran-name { animation: birran-slide-in 0.45s ease-out 0.8s both; }
.birran-logo.is-animated .birran-tagline { animation: birran-rise-in 0.4s ease-out 1.05s both; }

@keyframes birran-pop {
    from { opacity: 0; transform: rotate(var(--from-rotate)) scale(0.4); }
    to { opacity: 1; transform: none; }
}
@keyframes birran-slide-in {
    from { opacity: 0; transform: translateX(-28px); }
    to { opacity: 1; transform: none; }
}
@keyframes birran-rise-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Splash screen ---------- */
.brand-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 40px;
    background: linear-gradient(180deg, #fff 55%, var(--brand-tint));
    transition: opacity 0.4s ease, visibility 0.4s;
}
.brand-splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.brand-splash__logo { width: min(380px, 70vw); }
.brand-splash__progress { display: grid; gap: 14px; justify-items: center; width: min(240px, 60vw); }
.brand-splash__bar { width: 100%; height: 6px; border-radius: 999px; background: #eef2f6; overflow: hidden; opacity: 0; animation: birran-rise-in 0.3s ease-out 1.2s forwards; }
.brand-splash__bar > span { display: block; height: 100%; border-radius: 999px; background: var(--brand-yellow); transform-origin: left; transform: scaleX(0); animation: brand-bar 0.7s ease-in-out 1.3s forwards; }
.brand-splash__caption { font-size: 13px; font-weight: 500; color: var(--brand-muted); opacity: 0; animation: birran-rise-in 0.3s ease-out 1.2s forwards; }

@keyframes brand-bar { to { transform: scaleX(1); } }

/* ---------- Loader (ikon berputar) ---------- */
.brand-loader {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none; /* ditampilkan Livewire lewat wire:loading.grid */
    place-items: center;
    background: rgba(3, 55, 128, 0.28);
    backdrop-filter: blur(2px);
}
.brand-loader__card {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 28px 40px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(10, 42, 94, 0.18);
}
.brand-loader__mark { width: 56px; animation: brand-spin 1.6s ease-in-out infinite; }
.brand-loader__text { font-size: 14px; font-weight: 500; color: var(--brand-muted); animation: brand-pulse 1.6s ease-in-out infinite; }

@keyframes brand-spin {
    0% { transform: rotate(0) scale(1); }
    50% { transform: rotate(-180deg) scale(0.86); }
    100% { transform: rotate(-360deg) scale(1); }
}
@keyframes brand-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    .birran-logo.is-animated .birran-gold,
    .birran-logo.is-animated .birran-navy,
    .birran-logo.is-animated .birran-name,
    .birran-logo.is-animated .birran-tagline,
    .brand-splash__bar,
    .brand-splash__bar > span,
    .brand-splash__caption { animation: none; opacity: 1; transform: none; }
    .brand-loader__mark, .brand-loader__text { animation: none; }
}

/* ---------- Panel Filament ---------- */
body.fi-body, .fi-body { background: var(--brand-page); }
.dark .fi-body { background: inherit; }

/* Sidebar & topbar putih dengan garis tipis */
.fi-sidebar, .fi-sidebar-nav { background: #fff; }
.fi-topbar > nav { background: #fff; border-bottom: 1px solid var(--brand-border); box-shadow: none; }
.dark .fi-sidebar, .dark .fi-sidebar-nav { background: inherit; }
.dark .fi-topbar > nav { background: inherit; }

/* Menu aktif: pil navy */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background: var(--brand-navy); border-radius: 12px; }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-icon { color: #fff; font-weight: 600; }
.fi-sidebar-item > .fi-sidebar-item-btn { border-radius: 12px; }

/* Kartu & seksi: sudut besar, bayangan lembut */
.fi-section, .fi-ta-ctn, .fi-wi-stats-overview-stat {
    border-radius: var(--brand-radius-card);
    box-shadow: 0 8px 24px rgba(10, 42, 94, 0.08);
}

/* Tombol: bentuk pil. Aksi utama di header halaman berwarna kuning dengan teks navy */
.fi-btn { border-radius: 999px; font-weight: 600; }
.fi-header .fi-btn.fi-color-primary:not(.fi-outlined) {
    background-color: var(--brand-yellow);
    color: var(--brand-navy);
}
.fi-header .fi-btn.fi-color-primary:not(.fi-outlined):hover { background-color: #e5ad08; }

/* Badge berbentuk pil */
.fi-badge { border-radius: 999px; }

/* Judul halaman navy */
.fi-header-heading { color: var(--brand-navy); font-weight: 700; letter-spacing: -0.3px; }

/* Halaman login */
.fi-simple-layout { background: linear-gradient(180deg, #fff 55%, var(--brand-tint)); }
.fi-simple-main { border-radius: 24px; box-shadow: 0 16px 38px rgba(10, 42, 94, 0.12); }
.fi-simple-header-heading { color: var(--brand-navy); font-weight: 700; }

/* ---------- Halaman laporan (tata letak sendiri; panel tidak memuat utilitas Tailwind kustom) ---------- */
.report-filters { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.report-field { display: grid; gap: 4px; font-size: 14px; font-weight: 500; }
.report-note { margin-top: 12px; font-size: 14px; color: var(--brand-muted); }
.report-stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.report-stat__label { font-size: 13px; color: var(--brand-muted); }
.report-stat__value { margin-top: 4px; font-size: 24px; font-weight: 700; color: var(--brand-navy); }
.report-split { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.report-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--brand-border); font-size: 14px; }
.report-row:last-child { border-bottom: 0; }
.report-row strong { font-weight: 600; }
.report-empty { font-size: 14px; color: var(--brand-muted); }
.report-days { display: grid; gap: 4px; }
.report-day { display: grid; grid-template-columns: 90px 1fr 32px; align-items: center; gap: 12px; font-size: 13px; }
.report-day__label { color: var(--brand-muted); }
.report-day__bar { height: 12px; border-radius: 999px; background: var(--brand-blue); }
.report-day strong { font-weight: 600; text-align: right; }

/* ---------- Banner saat masuk sebagai pengguna lain ---------- */
.impersonation-banner { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 8px 16px; background: var(--brand-yellow); color: var(--brand-navy); font-size: 14px; }
.impersonation-banner form { margin: 0; }
.impersonation-banner button { border: 0; border-radius: 999px; padding: 4px 14px; background: var(--brand-navy); color: #fff; font-weight: 600; cursor: pointer; }
