/*
 * Sign-in screen (ADR-074): a brand panel beside Filament's own form, for the applicant
 * portal and the staff panel (`.tema-masuk` is injected only on those
 * two login pages, so every rule below is gated by :has(.tema-masuk)).
 *
 * Mobile first: below `lg` the panel is a compact strip above the form; from `lg` the two
 * sit side by side (7/12 and 5/12). Colours come from the school's --brand-* tokens only,
 * never a literal (DesignTokensOnlyTest). No opacity on text over the brand band (ADR-071):
 * muted text is a colour-mix of the on-colour, which keeps its contrast measurable.
 * Loads after admin-a11y.css, so it never sets a control's height, padding or font size.
 */
.fi-simple-layout:has(.tema-masuk) {
    display: flex;
    flex-direction: column;
    /* Filament centres the layout's children; the panel must fill the width and the height. */
    align-items: stretch;
    justify-content: stretch;
    min-height: 100dvh;
    background: var(--brand-surface-card);
}

/* The brand already stands in the panel; a second logo above the form is noise. */
.fi-simple-layout:has(.tema-masuk) .fi-simple-header .fi-logo {
    display: none;
}

.tema-masuk {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.25rem 1rem;
    color: var(--brand-on-primary-dark);
    /* Dark shade to a blend that stays on the dark side: the on-colour is chosen for the
       dark shade (--brand-on-primary-dark), so no text may sit on the plain light primary. */
    background: linear-gradient(155deg, var(--brand-primary-dark), color-mix(in srgb, var(--brand-primary-dark) 60%, var(--brand-primary)));
}

/* The "aurora": two soft colour glows on one layer that fills the panel and drifts. The layer
   is inset:0 (never wider than the panel), so nothing pokes out of the viewport. */
.tema-masuk__aurora {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 85% 8%, color-mix(in srgb, var(--brand-secondary) 32%, transparent), transparent 38%),
        radial-gradient(circle at 10% 95%, color-mix(in srgb, var(--brand-accent) 38%, transparent), transparent 42%);
    background-size: 140% 140%;
    animation: tema-masuk-hanyut 16s ease-in-out infinite alternate;
}

/* A fine dot grid that fades towards the form side. */
.tema-masuk__titik {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(color-mix(in srgb, var(--brand-on-primary-dark) 22%, transparent) 1px, transparent 1.5px);
    background-size: 1.5rem 1.5rem;
    mask-image: linear-gradient(160deg, currentColor, transparent 75%);
}

.tema-masuk__merek {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    animation: tema-masuk-naik 0.6s ease-out both;
}

.tema-masuk .tema-merek {
    color: var(--brand-on-primary-dark);
}

.tema-masuk__label {
    margin: 0;
    padding-left: 0.75rem;
    border-left: 2px solid var(--brand-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand-on-primary-dark);
}

/* The headline block and contact cards are for the wide screen; a phone gets form first. */
.tema-masuk__isi,
.tema-masuk__kaki {
    display: none;
}

.tema-masuk__judul {
    margin: 0 0 1rem;
    font-family: var(--brand-font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--brand-on-primary-dark);
    animation: tema-masuk-naik 0.7s 0.1s ease-out both;
}

/* A solid accent, not clipped gradient text: it stays readable in forced colours and its
   contrast can be measured. */
.tema-masuk__sorot {
    color: var(--brand-secondary-light);
}

.tema-masuk__paragraf {
    max-width: 32rem;
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--brand-on-primary-dark);
    animation: tema-masuk-naik 0.7s 0.2s ease-out both;
}

.tema-masuk__langkah,
.tema-masuk__kontak {
    display: grid;
    gap: 0.75rem;
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.tema-masuk__langkah {
    counter-reset: none;
}

/* Glass cards over the gradient. */
.tema-masuk__kartu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    padding: 1rem 1.125rem;
    border: 1px solid color-mix(in srgb, var(--brand-on-primary-dark) 28%, transparent);
    border-radius: var(--brand-radius-lg);
    background: color-mix(in srgb, var(--brand-on-primary-dark) 12%, transparent);
    backdrop-filter: blur(10px);
    animation: tema-masuk-naik 0.7s 0.3s ease-out both;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.tema-masuk__kartu:hover {
    transform: translateY(-3px);
    background: color-mix(in srgb, var(--brand-on-primary-dark) 20%, transparent);
}

.tema-masuk__kartu-judul {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-secondary-light);
}

.tema-masuk__kartu-nilai {
    font-weight: 600;
    overflow-wrap: anywhere;
    color: var(--brand-on-primary-dark);
}

.tema-masuk__kaki {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--brand-on-primary-dark);
}

/* The form half: roomy, rounded inputs, a bold primary button. */
.fi-simple-layout:has(.tema-masuk) .fi-simple-main-ctn {
    flex: 1;
    padding: 2rem 1rem 3rem;
    animation: tema-masuk-geser 0.6s ease-out both;
}

.fi-simple-layout:has(.tema-masuk) .fi-simple-main {
    width: 100%;
    max-width: 28rem;
    margin: 0 auto;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
}

.fi-simple-layout:has(.tema-masuk) .fi-simple-header-heading {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--brand-ink);
}

.fi-simple-layout:has(.tema-masuk) .fi-input-wrp {
    border-radius: var(--brand-radius-lg);
    background: var(--brand-surface);
    box-shadow: none;
    border: 2px solid var(--brand-border);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.fi-simple-layout:has(.tema-masuk) .fi-input-wrp:focus-within {
    border-color: var(--brand-primary);
    background: var(--brand-surface-card);
}

.fi-simple-layout:has(.tema-masuk) .fi-btn.fi-color {
    width: 100%;
    border-radius: var(--brand-radius-lg);
    font-weight: 700;
    box-shadow: var(--brand-shadow-lg);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.fi-simple-layout:has(.tema-masuk) .fi-btn.fi-color:active {
    transform: scale(0.98);
}

@media (min-width: 64rem) {
    .fi-simple-layout:has(.tema-masuk) {
        flex-direction: row;
    }

    .tema-masuk {
        flex: 7 1 0;
        justify-content: space-between;
        gap: 2rem;
        padding: 4rem;
    }

    .tema-masuk__isi {
        display: block;
        max-width: 36rem;
    }

    .tema-masuk__kaki {
        display: block;
    }

    .tema-masuk__label {
        font-size: 0.8125rem;
    }

    .fi-simple-layout:has(.tema-masuk) .fi-simple-header {
        align-items: flex-start;
    }

    .fi-simple-layout:has(.tema-masuk) .fi-simple-header-heading,
    .fi-simple-layout:has(.tema-masuk) .fi-simple-header-subheading {
        text-align: start;
    }

    .fi-simple-layout:has(.tema-masuk) .fi-simple-main-ctn {
        flex: 5 1 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
    }
}

@keyframes tema-masuk-hanyut {
    from { background-position: 0% 0%; }
    to { background-position: 100% 100%; }
}

@keyframes tema-masuk-naik {
    from { transform: translateY(1rem); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes tema-masuk-geser {
    from { transform: translateX(1.5rem); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .tema-masuk__aurora,
    .tema-masuk__merek,
    .tema-masuk__judul,
    .tema-masuk__paragraf,
    .tema-masuk__kartu,
    .fi-simple-layout:has(.tema-masuk) .fi-simple-main-ctn {
        animation: none;
    }

    .tema-masuk__kartu {
        transition: none;
    }
}
