@import url('variables.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ===== Split-screen admin login (Orchid Academy mockup) ===== */
html.login-body,
html:has(.login-body) {
    height: 100%;
}

.login-body {
    margin: 0;
    min-height: 100%;
    font-family: 'Inter', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    background: #0b1120;
}

.login-split {
    display: flex;
    min-height: 100dvh;
    min-height: 100vh;
}

/* —— Left: hero —— */
.login-hero {
    position: relative;
    flex: 1 1 50%;
    min-height: 320px;
    overflow: hidden;
    display: none;
}

@media (min-width: 900px) {
    .login-hero {
        display: block;
    }
}

.login-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 40%;
    filter: grayscale(100%) contrast(1.08);
}

.login-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 12, 22, 0.15) 0%, rgba(8, 12, 22, 0.55) 45%, rgba(8, 12, 22, 0.92) 100%),
        linear-gradient(90deg, rgba(8, 12, 22, 0.35) 0%, transparent 55%);
}

.login-hero-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 48px 56px 56px;
    z-index: 1;
    max-width: 520px;
}

.login-hero-title {
    margin: 0 0 16px;
    font-size: clamp(1.75rem, 3.2vw, 2.35rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--orchid-gold, #d4a84b);
}

.login-hero-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.88);
    max-width: 420px;
}

/* —— Right: form panel —— */
.login-panel {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b1120;
    padding: 32px 24px;
    box-sizing: border-box;
}

.login-panel-inner {
    width: 100%;
    max-width: 400px;
    animation: panelIn 0.5s ease forwards;
}

@keyframes panelIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 36px;
}

.login-brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--orchid-gold, #d4a84b);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.15), 0 4px 14px rgba(0, 0, 0, 0.25);
}

.login-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.login-brand-text strong {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.login-brand-text span {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #94a3b8;
}

.login-welcome {
    margin: 0 0 8px;
    font-size: 1.65rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.03em;
}

.login-subtitle {
    margin: 0 0 28px;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #94a3b8;
}

.login-alert {
    display: none;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 16px;
    background: rgba(220, 38, 38, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.82rem;
}

.login-alert.show {
    display: flex;
}

.login-field {
    margin-bottom: 18px;
}

.login-field > label,
.login-label-row label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--orchid-gold, #d4a84b);
    margin-bottom: 8px;
}

.login-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.login-label-row label {
    margin-bottom: 0;
}

.login-forgot {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--orchid-gold, #d4a84b);
    text-decoration: none;
    white-space: nowrap;
}

.login-forgot:hover {
    color: var(--orchid-gold-light, #f0d78a);
    text-decoration: underline;
}

.login-input-wrap {
    position: relative;
}

.login-input-wrap > i.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.88rem;
    pointer-events: none;
}

.login-input-wrap input {
    width: 100%;
    padding: 13px 14px 13px 42px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #f1f5f9;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-input-wrap input::placeholder {
    color: #475569;
}

.login-input-wrap input:-webkit-autofill,
.login-input-wrap input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #111827 inset;
    -webkit-text-fill-color: #f1f5f9;
    caret-color: #f1f5f9;
}

.login-input-wrap input:focus {
    outline: none;
    border-color: rgba(212, 168, 75, 0.5);
    box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.12);
}

.login-input-wrap:focus-within > i.field-icon {
    color: var(--orchid-gold, #d4a84b);
}

.login-input-wrap.has-toggle input {
    padding-right: 44px;
}

.login-toggle-pw {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
}

.login-toggle-pw:hover {
    color: #94a3b8;
}

.login-remember {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 22px;
    font-size: 0.8rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1.4;
}

.login-remember input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--orchid-gold, #d4a84b);
    cursor: pointer;
}

.login-submit {
    width: 100%;
    padding: 14px 20px;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1a1408;
    background: var(--orchid-gold, #d4a84b);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.login-submit:hover:not(:disabled) {
    background: var(--orchid-gold-light, #e0b85a);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(212, 168, 75, 0.35);
}

.login-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.login-help {
    margin: 28px 0 0;
    font-size: 0.8rem;
    color: #64748b;
    text-align: center;
}

.login-help a {
    color: var(--orchid-gold, #d4a84b);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.login-help a:hover {
    text-decoration: underline;
}

.login-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-top: 32px;
    padding-top: 0;
}

.login-legal a {
    font-size: 0.72rem;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.login-legal a:hover {
    color: #94a3b8;
}

@media (max-width: 899px) {
    .login-panel-inner {
        max-width: 420px;
    }

    .login-hero-copy {
        padding: 32px 28px;
    }
}

@media (max-width: 480px) {
    .login-panel {
        padding: 24px 18px;
    }

    .login-brand {
        margin-bottom: 28px;
    }

    .login-welcome {
        font-size: 1.4rem;
    }

    .login-legal {
        gap: 10px 16px;
    }
}

/* ===== Session / not-authenticated card (unchanged layout) ===== */
.session-card.login-card {
    text-align: center;
    background: rgba(18, 24, 38, 0.36) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
}

.login-page {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 45%;
}

.login-bg-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 90% 80% at 50% 50%, rgba(8, 12, 22, 0.25) 0%, rgba(8, 12, 22, 0.82) 100%),
        linear-gradient(180deg, rgba(8, 12, 22, 0.55) 0%, rgba(8, 12, 22, 0.9) 100%);
}

.login-center {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 440px;
    padding: 16px 20px;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    padding: 32px 28px 28px;
    border-radius: 20px;
    background: rgba(18, 24, 38, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.login-card-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.login-card-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--orchid-gold, #d4a84b);
}

.login-card-brand-text h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.login-card-brand-text p {
    font-size: 0.8rem;
    color: #8b95a8;
    margin: 2px 0 0;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
}

.login-lead {
    font-size: 0.875rem;
    color: #8b95a8;
    margin: 0 0 24px;
}

.session-card .login-card-brand {
    margin-bottom: 14px;
}

.session-card .login-card-logo {
    width: 52px;
    height: 52px;
}

.session-card .icon-wrap {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(212, 168, 75, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--orchid-gold, #d4a84b);
    font-size: 1.25rem;
}

.session-card .login-lead {
    margin-bottom: 16px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.62);
}

.session-card .login-submit {
    text-decoration: none;
    width: auto;
    display: inline-flex;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    gap: 8px;
}

.session-card .login-title {
    font-size: 1.25rem;
    margin: 0 0 6px;
}
