/**
 * Walliux — Admin login & auth pages
 */

:root {
    --auth-bg: #090B14;
    --auth-panel: #0C0F1A;
    --auth-card: #121827;
    --auth-border: rgba(255, 255, 255, 0.06);
    --auth-primary: #7C4DFF;
    --auth-primary-hover: #8F67FF;
    --auth-primary-glow: rgba(124, 77, 255, 0.35);
    --auth-text: #FFFFFF;
    --auth-text-secondary: #A4A8B3;
    --auth-radius: 20px;
    --auth-radius-lg: 28px;
    --auth-font: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* ============================================================
   Admin login — split layout
   ============================================================ */
.auth-admin-body {
    margin: 0;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: var(--auth-font);
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

.admin-login {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

/* Left hero */
.admin-login-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    padding: 24px 40px;
}

.admin-login-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 15% 35%, rgba(124, 77, 255, 0.28) 0%, transparent 58%),
        radial-gradient(ellipse 55% 45% at 85% 15%, rgba(99, 102, 241, 0.18) 0%, transparent 52%),
        linear-gradient(155deg, #0a0d18 0%, #121827 48%, #090b14 100%);
}

.admin-login-brand .site-brand-img,
.site-brand-img--login {
    height: 36px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.admin-login-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(9, 11, 20, 0.82) 0%, rgba(124, 77, 255, 0.22) 55%, rgba(9, 11, 20, 0.88) 100%),
        linear-gradient(180deg, rgba(9, 11, 20, 0.35) 0%, rgba(9, 11, 20, 0.92) 100%);
}

.admin-login-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    height: auto;
    max-height: 100%;
    min-height: 0;
    padding: 0;
    gap: 28px;
}

.admin-login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--auth-text);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

.admin-login-brand-text {
    font-family: 'Plus Jakarta Sans', var(--auth-font);
}

.admin-login-hero-main {
    flex: 0 1 auto;
    min-height: 0;
    padding: 0;
}

.admin-login-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    color: var(--auth-primary);
    background: rgba(124, 77, 255, 0.14);
    border: 1px solid rgba(124, 77, 255, 0.28);
    margin-bottom: 12px;
}

.admin-login-hero-title {
    font-family: 'Plus Jakarta Sans', var(--auth-font);
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin: 0 0 10px;
}

.admin-login-accent {
    color: var(--auth-primary);
}

.admin-login-hero-desc {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
    max-width: 400px;
    margin: 0 0 16px;
}

.admin-login-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-login-features li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-login-feature-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--auth-text);
}

.admin-login-feature-icon i {
    font-size: 17px;
    line-height: 1;
    display: block;
    margin-top: 10px;
}

.admin-login-features strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--auth-text);
}

.admin-login-features span {
    display: block;
    font-size: 12px;
    line-height: 1.4;
    color: var(--auth-text-secondary);
}

.admin-login-copyright {
    margin: 0;
    flex-shrink: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}

/* Right panel */
.admin-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-panel);
    padding: 16px 20px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.admin-login-panel-inner {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-login-card {
    width: 100%;
    background: linear-gradient(165deg, rgba(22, 28, 45, 0.95) 0%, rgba(14, 18, 32, 0.98) 100%);
    border: 1px solid var(--auth-border);
    border-radius: 22px;
    padding: 24px 26px 20px;
    box-shadow:
        0 0 0 1px rgba(124, 77, 255, 0.06),
        0 16px 48px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(124, 77, 255, 0.08);
}

.admin-login-card-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--auth-primary) 0%, #6B3FE8 100%);
    box-shadow: 0 6px 20px var(--auth-primary-glow);
    color: #fff;
}

.admin-login-card-icon i {
    font-size: 22px;
    line-height: 1;
    display: block;
}

.admin-login-card-title {
    text-align: center;
    font-family: 'Plus Jakarta Sans', var(--auth-font);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    letter-spacing: -0.02em;
}

.admin-login-card-subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--auth-text-secondary);
    margin: 0 0 20px;
}

/* Alerts */
.auth-alert {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    margin-bottom: 14px;
    line-height: 1.4;
}

.auth-alert.error {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.35);
    color: #fda4af;
}

.auth-alert.success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
}

/* Form fields */
.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-field {
    margin-bottom: 12px;
}

.admin-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-text-secondary);
    margin-bottom: 8px;
}

.admin-field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.admin-field-label-row label {
    margin-bottom: 0;
}

.admin-forgot-link {
    font-size: 12px;
    font-weight: 500;
    color: var(--auth-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.admin-forgot-link:hover {
    color: var(--auth-primary-hover);
}

.admin-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-input-icon {
    position: absolute;
    left: 14px;
    font-size: 15px;
    color: var(--auth-text-secondary);
    pointer-events: none;
    z-index: 1;
}

.admin-input-wrap input {
    width: 100%;
    background: rgba(9, 11, 20, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--auth-text);
    padding: 11px 14px 11px 40px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-input-wrap input::placeholder {
    color: rgba(164, 168, 179, 0.65);
}

.admin-input-wrap input:focus {
    outline: none;
    border-color: rgba(124, 77, 255, 0.55);
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.15);
}

.admin-password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--auth-text-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.admin-password-toggle:hover {
    color: var(--auth-text);
    background: rgba(255, 255, 255, 0.06);
}

.admin-input-wrap input[type="password"],
.admin-input-wrap input[type="text"] {
    padding-right: 44px;
}

/* Remember me */
.admin-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 14px;
    cursor: pointer;
    font-size: 13px;
    color: var(--auth-text-secondary);
    user-select: none;
}

.admin-remember input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.admin-remember-box {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(9, 11, 20, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.admin-remember-box::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) scale(0);
    margin-top: -2px;
    transition: transform 0.15s ease;
}

.admin-remember input:checked + .admin-remember-box {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.admin-remember input:checked + .admin-remember-box::after {
    transform: rotate(45deg) scale(1);
}

.admin-remember input:focus-visible + .admin-remember-box {
    box-shadow: 0 0 0 3px rgba(124, 77, 255, 0.25);
}

/* Sign in button */
.admin-btn-signin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--auth-primary) 0%, #6B3FE8 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 24px var(--auth-primary-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.admin-btn-signin i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.admin-btn-signin:hover {
    filter: brightness(1.06);
    box-shadow: 0 12px 32px rgba(124, 77, 255, 0.45);
}

.admin-btn-signin:hover i {
    transform: translateX(3px);
}

.admin-btn-signin:active {
    transform: scale(0.98);
}

.admin-login-card-footer {
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--auth-text-secondary);
}

.admin-login-card-footer a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.admin-login-card-footer a:hover {
    color: var(--auth-primary-hover);
}

.admin-login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 14px 0 0;
    font-size: 11px;
    color: var(--auth-text-secondary);
}

.admin-login-security i {
    color: var(--auth-primary);
    font-size: 14px;
}

.admin-login-security span {
    color: var(--auth-primary);
    font-weight: 600;
}

/* ============================================================
   Register / legacy auth card (walliux layout)
   ============================================================ */
.auth-page {
    padding: 48px 0 64px;
    min-height: calc(100vh - var(--home-navbar-height, 72px) - 120px);
    display: flex;
    align-items: center;
}

.auth-card {
    max-width: 420px;
    margin: 0 auto;
    background: rgba(18, 24, 39, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 32px 28px;
}

.auth-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
}

.auth-subtitle {
    font-size: 14px;
    line-height: 1.55;
    color: #A4A8B3;
    margin: 0 0 24px;
}

.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
}

.auth-field input {
    width: 100%;
    background: rgba(9, 11, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: #fff;
    padding: 12px 14px;
    font-size: 14px;
}

.auth-field input:focus {
    outline: none;
    border-color: rgba(124, 77, 255, 0.5);
}

.auth-submit {
    width: 100%;
    margin-top: 8px;
    padding: 12px;
    font-weight: 700;
}

.auth-switch {
    margin: 20px 0 0;
    font-size: 13px;
    color: #A4A8B3;
    text-align: center;
}

.auth-switch a {
    color: #7C4DFF;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
    .auth-admin-body {
        height: auto;
        max-height: none;
        overflow: auto;
    }

    .admin-login {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        overflow: visible;
    }

    .admin-login-hero {
        height: auto;
        min-height: auto;
        padding: 28px 24px;
    }

    .admin-login-hero-inner {
        max-width: 480px;
        gap: 24px;
    }

    .admin-login-hero-main {
        padding: 0;
    }

    .admin-login-features {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .admin-login-panel {
        height: auto;
        min-height: auto;
        padding: 24px 20px 32px;
        overflow: visible;
    }
}

@media (max-width: 640px) {
    .admin-login-features {
        grid-template-columns: 1fr;
    }

    .admin-login-card {
        padding: 28px 22px 24px;
        border-radius: 22px;
    }

    .admin-login-hero-inner {
        padding: 24px 20px 28px;
    }
}
