/* ==========================================================================
   PRMIS staff sign-in. Left: form over the clinic illustration. Right: blue
   brand panel with a diagonal edge, the seal, mission and vision.
   ========================================================================== */

.prmis-login {
    /* Blue theme for the Filament fields and button on this page only. */
    --primary-50: 239, 246, 255;
    --primary-100: 219, 234, 254;
    --primary-200: 191, 219, 254;
    --primary-300: 147, 197, 253;
    --primary-400: 96, 165, 250;
    --primary-500: 59, 130, 246;
    --primary-600: 29, 78, 216;
    --primary-700: 30, 64, 175;
    --primary-800: 30, 58, 138;
    --primary-900: 23, 37, 84;
    --primary-950: 15, 23, 60;

    --navy: #0b2463;
    --blue: #1d4ed8;
    --sky: #38bdf8;
    --gold: #fbbf24;

    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    grid-template-columns: minmax(0, 1fr);
    overflow-x: hidden;
    background: #eff6ff;
    color: #0f172a;
}

@media (min-width: 1024px) {
    .prmis-login {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    }
}

[x-cloak] {
    display: none !important;
}

/* ------------------------------------------------------------------ Form side */

.prmis-login__main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
    background: url('../images/login-bg.svg') center bottom / cover no-repeat;
    isolation: isolate;
}

/* Faded wash over the illustration so the form stays readable. */
.prmis-login__main::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 60% 55% at 48% 50%, rgb(255 255 255 / 0.95) 0%, rgb(255 255 255 / 0.86) 60%, rgb(255 255 255 / 0.6) 100%);
    backdrop-filter: grayscale(0.25);
}

.prmis-login__card {
    width: 100%;
    max-width: 25rem;
}

.prmis-login__mobile-logo {
    display: block;
    width: 5.5rem;
    height: 5.5rem;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 6px 14px rgb(29 78 216 / 0.25));
}

@media (min-width: 1024px) {
    .prmis-login__mobile-logo {
        display: none;
    }
}

.prmis-login__header {
    margin-bottom: 1.75rem;
    text-align: center;
}

.prmis-login__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.875rem;
    color: #64748b;
}

.prmis-login__header h1 {
    margin: 0;
    font-size: clamp(1.75rem, 3.2vw, 2.35rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--navy);
}

.prmis-login__portal {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.85rem 0 0;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    background: #e8f0ff;
    box-shadow: 0 0 0 6px rgb(255 255 255 / 0.9);
    color: var(--blue);
    font-size: 0.8125rem;
    font-weight: 600;
}

.prmis-login__portal-icon {
    width: 1rem;
    height: 1rem;
}

/* Fields: soft blue fill like the reference, white on focus. */
.prmis-login .fi-input-wrp {
    background: #eef4ff;
    border-radius: 0.6rem;
    box-shadow: none;
    --tw-ring-color: rgb(29 78 216 / 0.15);
}

.prmis-login .fi-input-wrp:focus-within {
    background: #ffffff;
    --tw-ring-color: rgb(var(--primary-600));
}

.prmis-login .fi-fo-field-wrp-label span {
    font-weight: 600;
    color: #1e293b;
}

.prmis-login .fi-form-actions .fi-btn {
    padding-block: 0.7rem;
    border-radius: 0.6rem;
    background: linear-gradient(180deg, #2563eb, #1d4ed8);
    box-shadow: 0 8px 20px -8px rgb(29 78 216 / 0.6);
    font-size: 0.9375rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.prmis-login .fi-form-actions .fi-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -10px rgb(29 78 216 / 0.7);
}

.prmis-login__caps {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: -0.5rem 0 0;
    font-size: 0.8125rem;
    color: #b45309;
}

.prmis-login__caps-icon {
    width: 1rem;
    height: 1rem;
}

.prmis-login__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgb(15 23 42 / 0.08);
    font-size: 0.8125rem;
    color: #64748b;
}

.prmis-login__links a {
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
}

.prmis-login__links a:hover {
    text-decoration: underline;
}

.prmis-login__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 1rem 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
}

.prmis-login__footer-icon {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
}

/* ----------------------------------------------------------------- Brand side */

.prmis-login__brand {
    position: relative;
    display: none;
    overflow: hidden;
    color: #e2e8f0;
    background:
        radial-gradient(circle at 70% 20%, rgb(56 189 248 / 0.25), transparent 45%),
        radial-gradient(circle at 30% 90%, rgb(37 99 235 / 0.45), transparent 50%),
        linear-gradient(160deg, #1e40af 0%, #0b2463 60%, #071a4a 100%);
    clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%);
    margin-left: -6rem; /* slide under the form side so the diagonal overlaps it */
}

@media (min-width: 1024px) {
    .prmis-login__brand {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Paw-print texture */
.prmis-login__brand::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90' viewBox='0 0 90 90'%3E%3Cg fill='%23ffffff' transform='translate(45 48) rotate(-18)'%3E%3Cellipse cx='-9' cy='-8' rx='3.6' ry='4.6'/%3E%3Cellipse cx='-3' cy='-13' rx='3.6' ry='4.8'/%3E%3Cellipse cx='4' cy='-13' rx='3.6' ry='4.8'/%3E%3Cellipse cx='10' cy='-8' rx='3.6' ry='4.6'/%3E%3Cpath d='M0 -6 C 7 -6 12 0 12 5 C 12 10 7 11 4 10 C 2 9 1 9 0 9 C -1 9 -2 9 -4 10 C -7 11 -12 10 -12 5 C -12 0 -7 -6 0 -6 Z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

/* Diagonal accent stripes along the slanted edge */
.prmis-login__stripe {
    position: absolute;
    top: 0;
    bottom: 0;
    pointer-events: none;
}

.prmis-login__stripe--sky {
    left: 0;
    width: 22%;
    background: linear-gradient(180deg, #7dd3fc, #2563eb);
    clip-path: polygon(72% 0, 100% 0, 30% 100%, 0 100%);
    opacity: 0.9;
}

.prmis-login__stripe--gold {
    left: 0;
    width: 22%;
    background: var(--gold);
    clip-path: polygon(98% 0, 100% 0, 22% 42%, 20% 42%);
}

.prmis-login__stripe--gold-bottom {
    left: 0;
    width: 22%;
    background: var(--gold);
    clip-path: polygon(46% 62%, 48.5% 62%, 10% 100%, 7.5% 100%);
}

.prmis-login__brand-inner {
    position: relative;
    z-index: 1;
    max-width: 30rem;
    padding: 3rem 2.5rem 3rem 7rem;
    text-align: center;
}

.prmis-login__logo {
    width: 9.5rem;
    height: 9.5rem;
    margin: 0 auto 1.25rem;
    filter: drop-shadow(0 10px 24px rgb(0 0 0 / 0.35));
    animation: prmis-float 6s ease-in-out infinite;
}

@keyframes prmis-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
    .prmis-login__logo { animation: none; }
}

.prmis-login__brand h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
}

.prmis-login__tagline {
    margin: 0.5rem 0 1.75rem;
    font-size: 0.8125rem;
    color: #bae6fd;
}

.prmis-login__brand section + section {
    margin-top: 1.25rem;
}

.prmis-login__brand h3 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gold);
}

.prmis-login__brand section p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.65;
    color: rgb(226 232 240 / 0.82);
}

/* Short screens: tighten the brand panel. */
@media (min-width: 1024px) and (max-height: 720px) {
    .prmis-login__logo { width: 7rem; height: 7rem; margin-bottom: 0.75rem; }
    .prmis-login__tagline { margin-bottom: 1rem; }
    .prmis-login__brand section p { font-size: 0.8125rem; line-height: 1.55; }
}
