@import url('./fonts.css');

/* ============================================================
   IWU panel polish — tampilan modern & tidak kaku.
   Dimuat SETELAH style Filament (render hook STYLES_AFTER).
   ============================================================ */

/* ---------- Latar belakang halaman: mesh gradient + grid halus ---------- */

.fi-body {
    background-color: #f6f5f9;
    background-image:
        radial-gradient(1000px 540px at 88% -12%, rgba(153, 19, 115, 0.09), transparent 58%),
        radial-gradient(820px 460px at -12% 4%, rgba(166, 17, 130, 0.07), transparent 55%),
        radial-gradient(920px 560px at 50% 118%, rgba(124, 58, 237, 0.06), transparent 60%),
        linear-gradient(rgba(125, 16, 95, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 16, 95, 0.04) 1px, transparent 1px);
    background-size: auto, auto, auto, 40px 40px, 40px 40px;
}

.dark .fi-body {
    background-color: #0d0812;
    background-image:
        radial-gradient(1000px 540px at 88% -12%, rgba(166, 17, 130, 0.17), transparent 58%),
        radial-gradient(820px 460px at -12% 4%, rgba(125, 16, 95, 0.14), transparent 55%),
        radial-gradient(920px 560px at 50% 118%, rgba(124, 58, 237, 0.11), transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: auto, auto, auto, 40px 40px, 40px 40px;
}

/* ---------- Topbar kaca (glassy) ---------- */

.fi-topbar {
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    box-shadow: 0 1px 0 rgba(125, 16, 95, 0.07), 0 12px 30px -24px rgba(125, 16, 95, 0.45);
}

.dark .fi-topbar {
    background: rgba(15, 9, 20, 0.72);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 30px -24px rgba(0, 0, 0, 0.9);
}

.fi-topbar-collapse-sidebar-btn-ctn .fi-icon-btn {
    border-radius: 0.6rem;
}

.fi-topbar-collapse-sidebar-btn-ctn .fi-icon-btn:hover {
    background-color: rgba(153, 19, 115, 0.08);
    color: var(--primary-600);
}

/* ---------- Sidebar: panel kaca, item aktif bergradien ---------- */

.fi-main-sidebar {
    background: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    backdrop-filter: blur(12px) saturate(150%);
    border-right: 1px solid rgba(125, 16, 95, 0.08);
}

.dark .fi-main-sidebar {
    background: rgba(17, 10, 23, 0.55);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.fi-sidebar-group-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(125, 16, 95, 0.55);
}

.dark .fi-sidebar-group-label {
    color: rgba(255, 255, 255, 0.4);
}

.fi-sidebar-item-label {
    font-weight: 600;
}

.fi-sidebar-item.fi-sidebar-item-has-url > .fi-sidebar-item-btn:hover {
    background-color: rgba(153, 19, 115, 0.07);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: transparent;
    background-image: linear-gradient(135deg, #7d105f 0%, #a61182 100%);
    box-shadow: 0 10px 24px -14px rgba(125, 16, 95, 0.7);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-icon,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label {
    color: #fff;
}

.fi-sidebar-item.fi-active
    > .fi-sidebar-item-btn
    > .fi-sidebar-item-grouped-border
    > .fi-sidebar-item-grouped-border-part {
    background-color: #fff;
}

.fi-sidebar-header .fi-logo {
    border-radius: 8px;
}

/* ---------- Header halaman ---------- */

.fi-header-heading {
    letter-spacing: -0.02em;
}

.fi-header-subheading {
    color: rgba(90, 74, 86, 0.9);
}

.dark .fi-header-subheading {
    color: rgba(255, 255, 255, 0.6);
}

/* ---------- Input & tombol ---------- */

.fi-input-wrp,
.fi-input {
    border-radius: 0.8rem;
}

.fi-input-wrp:focus-within {
    box-shadow: 0 0 0 4px rgba(153, 19, 115, 0.14);
}

.fi-btn {
    border-radius: 0.75rem;
    font-weight: 600;
}

.fi-btn.fi-color-primary {
    box-shadow: 0 10px 22px -14px rgba(153, 19, 115, 0.55);
}

/* ---------- Hero banner dashboard ---------- */

.iwu-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    background-image: linear-gradient(120deg, #4c0c3c 0%, #7d105f 55%, #a61182 100%);
    box-shadow: 0 24px 48px -20px rgba(125, 16, 95, 0.5);
    padding: 2.25rem 2rem;
}

.iwu-hero-glow {
    position: absolute;
    border-radius: 9999px;
    filter: blur(70px);
    pointer-events: none;
}

.iwu-hero-glow-1 {
    top: -80px;
    right: -40px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.18);
}

.iwu-hero-glow-2 {
    bottom: -110px;
    left: 15%;
    width: 260px;
    height: 260px;
    background: rgba(255, 105, 180, 0.25);
}

.iwu-hero-inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
}

.iwu-hero-kicker {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.iwu-hero-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #fff;
}

.iwu-hero-subtitle {
    margin: 0;
    max-width: 34rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

.iwu-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.iwu-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #7d105f;
    background: #fff;
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.iwu-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.4);
}

.iwu-hero-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 15rem;
    padding: 0.9rem 1.1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(6px);
}

.iwu-hero-badge-icon {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    flex-shrink: 0;
    border-radius: 0.85rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.iwu-hero-badge-title {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.iwu-hero-badge-sub {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- Kartu statistik ---------- */

.fi-wi-stats-overview-stat {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fi-wi-stats-overview-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px -20px rgba(125, 16, 95, 0.45);
}

.fi-wi-stats-overview-stat-value {
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

/* ---------- Daftar aktivitas terbaru ---------- */

.iwu-log-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 0.6rem;
    border-radius: 0.85rem;
    transition: background-color 0.15s ease;
}

.iwu-log-item:hover {
    background: rgba(153, 19, 115, 0.06);
}

.iwu-log-dot {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    flex-shrink: 0;
    border-radius: 0.7rem;
    color: #fff;
    background: #6b7280;
}

.iwu-log-dot.event-login {
    background: #16a34a;
}

.iwu-log-dot.event-logout {
    background: #6b7280;
}

.iwu-log-dot.event-failed_login {
    background: #dc2626;
}

.iwu-log-dot.event-created {
    background: #2563eb;
}

.iwu-log-dot.event-updated {
    background: #d97706;
}

.iwu-log-dot.event-deleted {
    background: #dc2626;
}

.iwu-log-badge {
    flex-shrink: 0;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #7d105f;
    background: rgba(153, 19, 115, 0.1);
}

@media (max-width: 639px) {
    .iwu-hero {
        padding: 1.5rem 1.25rem;
    }

    .iwu-hero-badge {
        min-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
