/*
 * Pregnancy Gurukul staff console: a soft, calm skin over Filament,
 * matching the parent portal (cream background, plum accent, rounded cards).
 */

:root {
    --pg-plum: #8e44ad;
    --pg-plum-deep: #5b2a78;
    --pg-plum-soft: #f4ecfa;
    --pg-rose: #f2a7b8;
    --pg-navy: #102e46;
    --pg-cream: #fbf8f4;
    --pg-ink: #1f1b24;
    --pg-muted: #6b6475;
    --pg-line: #ece6f1;
    --pg-card: #ffffff;
    --pg-radius: 18px;
    --pg-shadow: 0 1px 2px rgba(31, 27, 36, 0.04), 0 8px 24px -12px rgba(91, 42, 120, 0.12);
    --pg-display: 'Fraunces', Georgia, serif;
}

/* ---------- Page canvas ---------- */

.fi-body {
    background:
        radial-gradient(1200px 500px at 100% -10%, rgba(242, 167, 184, 0.16), transparent 60%),
        radial-gradient(900px 500px at -10% 0%, rgba(142, 68, 173, 0.08), transparent 60%),
        var(--pg-cream);
    color: var(--pg-ink);
}

.fi-header-heading {
    font-family: var(--pg-display);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--pg-ink);
}

.fi-header-subheading {
    color: var(--pg-muted);
}

/* ---------- Sidebar ---------- */

@media (min-width: 1024px) {
    .fi-sidebar {
        background: rgba(255, 255, 255, 0.78);
        backdrop-filter: blur(12px);
        border-inline-end: 1px solid var(--pg-line);
    }
}

.fi-sidebar-header {
    background: transparent;
    box-shadow: none;
    border-bottom: 1px solid var(--pg-line);
}

.fi-sidebar-nav {
    padding-top: 1.25rem;
}

.fi-sidebar-group-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a39bab;
}

.fi-sidebar-item-btn {
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-btn:hover {
    background: var(--pg-plum-soft);
    transform: translateX(2px);
}

.fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-btn:hover .fi-sidebar-item-icon,
.fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-btn:hover .fi-sidebar-item-label {
    color: var(--pg-plum-deep);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: linear-gradient(135deg, var(--pg-plum) 0%, var(--pg-plum-deep) 100%);
    box-shadow: 0 8px 18px -10px rgba(91, 42, 120, 0.8);
}

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

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

.fi-sidebar-footer {
    border-top: 1px solid var(--pg-line);
}

.pg-sidebar-footer {
    padding: 0.75rem 0.25rem 0.25rem;
}

.pg-sidebar-site {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--pg-plum-soft), #fdf1f4);
    color: var(--pg-ink);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pg-sidebar-site:hover {
    transform: translateY(-1px);
    box-shadow: var(--pg-shadow);
}

.pg-sidebar-site > span:nth-child(2) {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.pg-sidebar-site strong {
    font-size: 0.85rem;
}

.pg-sidebar-site small {
    font-size: 0.72rem;
    color: var(--pg-muted);
}

.pg-sidebar-site > svg {
    width: 1rem;
    height: 1rem;
    color: var(--pg-plum);
}

.pg-sidebar-site-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    background: #fff;
    color: var(--pg-plum);
}

.pg-sidebar-site-icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

/* Hide the footer card when the sidebar is collapsed to icons. */
.fi-sidebar:not(.fi-sidebar-open) .pg-sidebar-site > span:nth-child(2),
.fi-sidebar:not(.fi-sidebar-open) .pg-sidebar-site > svg {
    display: none;
}

@media (max-width: 1023px) {
    .fi-sidebar .pg-sidebar-site > span:nth-child(2),
    .fi-sidebar .pg-sidebar-site > svg {
        display: flex;
    }
}

/* ---------- Topbar ---------- */

.fi-topbar {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    box-shadow: none;
    border-bottom: 1px solid var(--pg-line);
}

.fi-topbar > nav,
.fi-topbar nav {
    background: transparent;
    box-shadow: none;
}

.fi-global-search-field .fi-input-wrp {
    border-radius: 999px;
    background: var(--pg-cream);
}

.fi-user-avatar {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--pg-plum-soft);
}

/* ---------- Cards, sections, widgets ---------- */

.fi-section:not(.fi-section-not-contained),
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-wi-chart .fi-section {
    border-radius: var(--pg-radius);
    background: var(--pg-card);
    box-shadow: var(--pg-shadow);
    --tw-ring-color: var(--pg-line);
}

.fi-section-header-heading {
    font-weight: 700;
    color: var(--pg-ink);
}

.fi-section-header-description {
    color: var(--pg-muted);
}

.fi-wi-stats-overview-stat {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fi-wi-stats-overview-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 1px 2px rgba(31, 27, 36, 0.04), 0 16px 32px -16px rgba(91, 42, 120, 0.25);
}

.fi-wi-stats-overview-stat::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--pg-plum), var(--pg-rose));
    opacity: 0.85;
}

.fi-wi-stats-overview-stat-label-ctn > svg,
.fi-wi-stats-overview-stat-label-ctn .fi-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0.5rem;
    border-radius: 12px;
    background: var(--pg-plum-soft);
    color: var(--pg-plum);
}

.fi-wi-stats-overview-stat-label {
    font-weight: 600;
    color: var(--pg-muted);
}

.fi-wi-stats-overview-stat-value {
    font-family: var(--pg-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--pg-ink);
}

/* ---------- Tables ---------- */

.fi-ta-header-cell {
    background: #fbf8fd;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--pg-muted);
}

.fi-ta-row {
    transition: background-color 0.15s ease;
}

.fi-ta-row:hover {
    background: #fcf9fe;
}

.fi-ta-header-heading {
    font-weight: 700;
}

/* ---------- Controls ---------- */

.fi-btn {
    border-radius: 11px;
    font-weight: 600;
}

.fi-btn.fi-color-primary:not(.fi-outlined) {
    background-image: linear-gradient(135deg, var(--pg-plum), var(--pg-plum-deep));
    box-shadow: 0 8px 18px -10px rgba(91, 42, 120, 0.8);
}

.fi-badge {
    border-radius: 999px;
    font-weight: 600;
}

.fi-input-wrp {
    border-radius: 11px;
}

.fi-input-wrp:focus-within {
    box-shadow: 0 0 0 4px rgba(142, 68, 173, 0.12);
}

.fi-tabs {
    border-radius: 14px;
}

.fi-tabs-item.fi-active {
    background: var(--pg-plum-soft);
}

/* ---------- Welcome banner ---------- */

.pg-welcome {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 1.5rem;
    align-items: center;
    padding: 1.75rem 2rem;
    border-radius: 24px;
    color: #fff;
    background:
        radial-gradient(420px 220px at 90% 10%, rgba(242, 167, 184, 0.45), transparent 70%),
        radial-gradient(360px 260px at 0% 120%, rgba(255, 255, 255, 0.12), transparent 70%),
        linear-gradient(135deg, #6c2f8c 0%, var(--pg-plum) 50%, #b25c9a 100%);
    box-shadow: 0 24px 48px -28px rgba(91, 42, 120, 0.9);
}

.pg-welcome::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -90px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 36px solid rgba(255, 255, 255, 0.06);
    pointer-events: none;
}

.pg-welcome-date {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
}

.pg-welcome h2 {
    margin-top: 0.35rem;
    font-family: var(--pg-display);
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    font-weight: 700;
    line-height: 1.15;
}

.pg-welcome-text > p:not(.pg-welcome-date) {
    margin-top: 0.4rem;
    opacity: 0.88;
}

.pg-welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.pg-welcome-action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.18s ease, transform 0.18s ease;
}

.pg-welcome-action:first-child {
    background: #fff;
    color: var(--pg-plum-deep);
}

.pg-welcome-action:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.26);
}

.pg-welcome-action:first-child:hover {
    background: #fff;
}

.pg-welcome-action svg {
    width: 1rem;
    height: 1rem;
}

.pg-welcome-highlights {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.pg-welcome-highlights li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
}

.pg-welcome-highlights strong {
    font-family: var(--pg-display);
    font-size: 1.8rem;
    line-height: 1.1;
}

.pg-welcome-highlights li > span:last-child {
    font-size: 0.8rem;
    opacity: 0.85;
}

.pg-welcome-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.35rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
}

.pg-welcome-icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

@media (max-width: 900px) {
    .pg-welcome {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
}

@media (max-width: 520px) {
    .pg-welcome-highlights {
        grid-template-columns: 1fr;
    }
}

/* ---------- Most played ---------- */

.pg-rank {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.pg-rank li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pg-rank-icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 12px;
    background: var(--pg-plum-soft);
    color: var(--pg-plum);
}

.pg-rank li:nth-child(even) .pg-rank-icon {
    background: #fdecf0;
    color: #c25a77;
}

.pg-rank-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.pg-rank-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pg-rank-title {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.pg-rank-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pg-rank-bar {
    height: 6px;
    border-radius: 999px;
    background: #f3eef7;
    overflow: hidden;
}

.pg-rank-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--pg-plum), var(--pg-rose));
}

.pg-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    color: var(--pg-muted);
    text-align: center;
}

.pg-empty svg {
    width: 2rem;
    height: 2rem;
    color: #c9b6d8;
}

/* ---------- Staff login ---------- */

.fi-simple-layout:has(.pg-login-aside) {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: stretch;
    min-height: 100dvh;
    background: var(--pg-cream);
}

.fi-simple-layout:has(.pg-login-aside) .fi-simple-main-ctn {
    padding: 2rem 1.5rem;
}

.fi-simple-layout:has(.pg-login-aside) .fi-simple-main {
    max-width: 26rem;
    margin: 0;
    padding: 2.5rem 2.25rem;
    border-radius: 24px;
    box-shadow: 0 1px 2px rgba(31, 27, 36, 0.04), 0 30px 60px -30px rgba(91, 42, 120, 0.3);
    --tw-ring-color: var(--pg-line);
}

.fi-simple-layout:has(.pg-login-aside) .fi-simple-header-heading {
    font-family: var(--pg-display);
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.fi-simple-layout:has(.pg-login-aside) .fi-simple-header-subheading {
    color: var(--pg-muted);
}

.pg-login-aside {
    position: relative;
    overflow: hidden;
    display: flex;
    padding: 3rem;
    color: #fff;
    background:
        radial-gradient(520px 320px at 85% 15%, rgba(242, 167, 184, 0.5), transparent 70%),
        radial-gradient(480px 380px at 10% 100%, rgba(255, 255, 255, 0.12), transparent 70%),
        linear-gradient(150deg, var(--pg-navy) 0%, #4a2766 55%, var(--pg-plum) 100%);
}

.pg-login-aside::before,
.pg-login-aside::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.pg-login-aside::before {
    width: 520px;
    height: 520px;
    right: -180px;
    bottom: -200px;
    animation: pg-drift 14s ease-in-out infinite alternate;
}

.pg-login-aside::after {
    width: 320px;
    height: 320px;
    right: -60px;
    bottom: -80px;
    background: rgba(255, 255, 255, 0.04);
    animation: pg-drift 10s ease-in-out infinite alternate-reverse;
}

@keyframes pg-drift {
    to {
        translate: -24px -18px;
    }
}

.pg-login-aside-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    max-width: 30rem;
}

.pg-login-logo {
    height: 3rem;
    width: auto;
    align-self: flex-start;
    padding: 0.6rem 0.9rem;
    border-radius: 14px;
    background: #fff;
    box-sizing: content-box;
}

.pg-login-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pg-login-kicker svg {
    width: 0.9rem;
    height: 0.9rem;
}

.pg-login-copy h2 {
    margin-top: 1rem;
    font-family: var(--pg-display);
    font-size: clamp(2rem, 3.2vw, 2.75rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.pg-login-copy p {
    margin-top: 0.85rem;
    font-size: 1.05rem;
    opacity: 0.82;
}

.pg-login-points {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pg-login-points li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.pg-login-points svg {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0.55rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
}

.pg-login-foot {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.75;
}

.pg-login-foot svg {
    width: 1rem;
    height: 1rem;
}

.pg-login-foot a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 960px) {
    .fi-simple-layout:has(.pg-login-aside) {
        grid-template-columns: 1fr;
    }

    .pg-login-aside {
        padding: 1.5rem;
    }

    .pg-login-aside-inner {
        gap: 1rem;
    }

    .pg-login-points,
    .pg-login-foot,
    .pg-login-copy p {
        display: none;
    }

    .pg-login-copy h2 {
        font-size: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pg-login-aside::before,
    .pg-login-aside::after {
        animation: none;
    }

    .fi-sidebar-item-btn,
    .fi-wi-stats-overview-stat,
    .pg-welcome-action,
    .pg-sidebar-site {
        transition: none;
    }
}
