/*
 * PIMS — Login Page
 * Specific styles for login.php
 * Base styles: see pims-base.css
 */

body.login-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: var(--font-sans);
    background: #f3f4f6;
    overflow-x: hidden;
}

body.login-page::before {
    content: none;
}

.login-shell {
    width: min(900px, 95%);
    animation: loginShellIn 0.6s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)) 0.2s both;
}

.login-card {
    width: 100%;
    max-width: 900px;
    min-height: 520px;
    display: grid;
    grid-template-columns: 48% 52%;
    border-radius: 20px;
    overflow: hidden;
    border: none;
    padding: 0;
    background: #ffffff;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12), 0 8px 20px rgba(0, 0, 0, 0.06);
}

.login-splash {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.22), transparent 34%),
        radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.12), transparent 30%),
        rgba(10, 10, 10, 0.94);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
    pointer-events: none;
}

.login-splash.is-visible {
    opacity: 1;
    visibility: visible;
}

.login-splash.is-leaving {
    opacity: 0;
}

.login-splash.is-hidden {
    visibility: hidden;
}

.login-splash-card {
    min-width: min(420px, 92vw);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    transform: translateY(18px) scale(0.98);
    transition: transform 0.52s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.login-splash.is-visible .login-splash-card {
    transform: translateY(0) scale(1);
}

.login-splash-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-splash-logo {
    width: 108px;
    max-width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

.login-splash-copy {
    color: #ffffff;
}

.login-splash-kicker {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(255,255,255,0.62);
    margin-bottom: 6px;
}

.login-splash-title {
    font-size: 2rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.04em;
    margin-bottom: 6px;
}

.login-splash-sub {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.01em;
}

@keyframes loginShellIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form-pane {
    width: 100%;
    padding: 52px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

.login-copy {
    margin-bottom: 0;
}

.login-kicker {
    margin: 0 0 8px;
    color: var(--em-600);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.login-title {
    margin: 0 0 6px;
    color: #0a0a0a;
    font-size: 1.3rem;
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.login-sub {
    margin: 0 0 32px;
    color: #9ca3af;
    font-size: 0.78rem;
    font-weight: 400;
}

.login-error {
    min-height: 0;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    border-left: 3px solid #ef4444;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.35;
    padding: 10px 14px;
}

.login-error:empty {
    display: none;
}

.login-field {
    margin-bottom: 20px;
}

.login-field:last-of-type {
    margin-bottom: 24px;
}

.login-label {
    display: block;
    margin-bottom: 6px;
    color: #374151;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.login-input {
    width: 100%;
    display: block;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    background: #f9fafb;
    color: #111111;
    padding: 11px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-sans);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-input:focus {
    outline: none;
    border-color: #111111;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.07);
}

.login-input::placeholder {
    color: var(--gray-400);
}

.login-btn {
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 10px;
    background: #111111;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.login-btn:hover {
    background: #2d2d2d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.login-btn:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.68rem;
    color: #9ca3af;
}

.login-brand-pane {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(ellipse at 30% 40%, rgba(16, 185, 129, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 70%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        #0a0a0a;
}

.brand-grid {
    display: none;
}

.login-logo {
    position: relative;
    text-align: center;
    margin-bottom: 0;
}

.login-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.login-brand-logo {
    width: 104px;
    max-width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

.brand-eyebrow {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.brand-title {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 1.6rem;
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-family: var(--font-sans);
    max-width: 300px;
}

.brand-sub {
    margin: 0;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Final collision guards against legacy .login-* rules in pims-base.css */
body.login-page .login-title {
    text-align: left;
    font-size: 1.45rem;
    font-weight: 900;
}

body.login-page .login-sub {
    text-align: left;
    font-weight: 500;
}

body.login-page .login-logo {
    margin-bottom: 0;
}

.login-brand-pane::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(16, 185, 129, 0.5), transparent);
}

.login-brand-pane::after {
    content: 'v2.0';
    position: absolute;
    bottom: 24px;
    right: 24px;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: rgba(16, 185, 129, 0.6);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    padding: 3px 9px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .login-card {
        grid-template-columns: 1fr;
        min-height: auto;
        border-radius: 16px;
    }

    .login-brand-pane {
        min-height: 180px;
        display: none;
    }

    .login-form-pane {
        padding: 36px 28px;
    }

    .login-splash-card {
        min-width: 0;
        width: 100%;
        padding: 22px 20px;
    }
}

@media (max-width: 640px) {
    body.login-page {
        padding: 12px;
    }
}
