﻿/* ════════════════════════════════════════════════════════════════════
   SystemLogin.css  —  JPSC Group Holdings Inc.
   Aligned with SharedTheme.css / Theme.css / Accent.css
   Brand: Gold #C8900A · Blue #1A4F8A
   Supports [data-theme="dark"] (default) and [data-theme="light"]
   ════════════════════════════════════════════════════════════════════ */

/* ── Brand tokens (mirrors MasterPage root) ─────────────────────── */
:root {
    /* Gold */
    --brand-gold: #C8900A;
    --brand-gold-light: #E8A612;
    --brand-gold-pale: #FDF3DC;
    --brand-gold-glow: rgba(200,144,10,0.22);
    /* Blue */
    --brand-blue: #1A4F8A;
    --brand-blue-mid: #2D6EC0;
    --brand-blue-light: #EBF3FD;
    --brand-blue-glow: rgba(26,79,138,0.28);
    /* Surfaces — dark defaults */
    --login-body-bg: #F2F5F9;
    --login-panel-bg: #ffffff;
    --login-card-bg: #ffffff;
    --login-left-bg: #0F1C2E; /* keep left panel dark — brand anchor */
    --login-text: #0F172A;
    --login-text-muted: #64748B;
    --login-border: #E4EAF0;
    --login-input-bg: #F7FAFD;
    --login-input-text: #0F172A;
    --login-icon-bg: #F7FAFD;
    --login-icon-color: #64748B;
}

/* ── Light overrides ────────────────────────────────────────────── */
[data-theme="light"] {
    --login-body-bg: #F2F5F9;
    --login-panel-bg: #ffffff;
    --login-card-bg: #ffffff;
    --login-left-bg: #0F1C2E; /* keep left panel dark — brand anchor */
    --login-text: #0F172A;
    --login-text-muted: #64748B;
    --login-border: #E4EAF0;
    --login-input-bg: #F7FAFD;
    --login-input-text: #0F172A;
    --login-icon-bg: #F7FAFD;
    --login-icon-color: #64748B;
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Body ───────────────────────────────────────────────────────── */
body {
    min-height: 100vh;
    background-color: var(--login-body-bg);
    background-image: radial-gradient(ellipse 80% 60% at 20% 50%, rgba(26,79,138,0.18) 0%, transparent 65%), radial-gradient(ellipse 60% 50% at 80% 50%, rgba(200,144,10,0.07) 0%, transparent 65%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    padding-bottom: 130px;
    transition: background-color 0.22s ease;
}

/* ── Card wrapper ────────────────────────────────────────────────── */
.login-wrapper {
    display: flex;
    width: 900px;
    min-height: 540px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--login-border), 0 30px 70px rgba(0,0,0,0.45), 0 0 80px rgba(26,79,138,0.12);
    transition: box-shadow 0.22s ease;
}

/* ════════════════════════════════════════════════════════════════
   LEFT PANEL — always dark navy, gold accent strip
   ════════════════════════════════════════════════════════════════ */
.login-left {
    flex: 0 0 340px;
    background: linear-gradient(160deg, #0F1C2E 0%, #0B1520 100%);
    border-right: 1px solid var(--login-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 52px 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    /* Gold top accent bar */
    .login-left::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, transparent, var(--brand-gold), transparent);
    }

    /* Subtle background glow */
    .login-left::after {
        content: '';
        position: absolute;
        bottom: -80px;
        left: 50%;
        transform: translateX(-50%);
        width: 300px;
        height: 300px;
        background: radial-gradient(circle, rgba(200,144,10,0.08) 0%, transparent 70%);
        pointer-events: none;
    }

    .login-left .brand-icon {
        width: 220px;
        height: 220px;
        background: rgba(200,144,10,0.10);
        border: 1px solid rgba(200,144,10,0.25);
        border-radius: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 24px;
        overflow: hidden;
        box-shadow: 0 0 0 1px rgba(200,144,10,0.15), 0 8px 24px rgba(0,0,0,0.30);
        transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

        .login-left .brand-icon:hover {
            transform: scale(1.04);
            box-shadow: 0 0 0 1px rgba(200,144,10,0.35), 0 12px 32px rgba(0,0,0,0.35);
        }

        .login-left .brand-icon img {
            width: 130%;
            height: 130%;
            object-fit: contain;
        }

/* Gold diamond accent — matches SharedTheme h3::before */
.login-left-diamond {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: var(--brand-gold);
    border-radius: 3px;
    transform: rotate(45deg);
    box-shadow: 0 0 8px var(--brand-gold-glow);
    margin-bottom: 14px;
}

.login-left h1 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #EDF2F7;
    line-height: 1.4;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.login-left .login-system-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-gold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.login-left .divider {
    width: 36px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-gold), transparent);
    border-radius: 2px;
    margin: 14px auto 16px;
}


/* ════════════════════════════════════════════════════════════════
   RIGHT PANEL — form area
   ════════════════════════════════════════════════════════════════ */
.login-right {
    flex: 1;
    background: var(--login-card-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px 48px;
    position: relative;
    transition: background-color 0.22s ease;
}

    /* Gold top accent bar — mirrors left panel */
    .login-right::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--brand-gold), var(--brand-blue-mid));
    }

/* ── Theme toggle ───────────────────────────────────────────────── */
.login-theme-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--login-border);
    background: var(--login-input-bg);
    color: var(--login-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
}

    .login-theme-btn:hover {
        background: var(--brand-gold-pale);
        color: var(--brand-gold);
        border-color: rgba(200,144,10,0.40);
        transform: scale(1.06);
    }

/* ── Headings ───────────────────────────────────────────────────── */
.login-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--login-text);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 0.845rem;
    color: var(--login-text-muted);
    margin-bottom: 30px;
}

/* ── Labels ─────────────────────────────────────────────────────── */
.form-label {
    font-size: 0.80rem;
    font-weight: 600;
    color: var(--login-text);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ── Input group ────────────────────────────────────────────────── */
.form-control {
    border-radius: 10px;
    border: 1.5px solid var(--login-border);
    padding: 10px 14px;
    font-size: 0.875rem;
    background: var(--login-input-bg);
    color: var(--login-input-text);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

    .form-control:focus {
        border-color: var(--brand-gold);
        box-shadow: 0 0 0 3px var(--brand-gold-glow);
        outline: none;
        background: var(--login-panel-bg);
    }

    .form-control::placeholder {
        color: var(--login-text-muted);
    }

.input-icon {
    border-radius: 10px 0 0 10px !important;
    border: 1.5px solid var(--login-border);
    border-right: none !important;
    background: var(--login-icon-bg);
    color: var(--login-icon-color);
    transition: color 0.2s, background 0.2s;
}

.input-with-icon {
    border-radius: 0 10px 10px 0 !important;
    border-left: none !important;
}

.input-middle {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
}

/* Focus propagates gold border to siblings via parent */
.input-group:focus-within .input-icon,
.input-group:focus-within .btn-toggle-pw {
    border-color: var(--brand-gold);
    color: var(--brand-gold);
}

/* ── Password toggle ────────────────────────────────────────────── */
.btn-toggle-pw {
    border: 1.5px solid var(--login-border);
    border-left: none;
    border-radius: 0 10px 10px 0;
    background: var(--login-icon-bg);
    color: var(--login-icon-color);
    padding: 0 14px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    cursor: pointer;
}

    .btn-toggle-pw:hover {
        background: var(--brand-gold-pale);
        color: var(--brand-gold);
    }

    .btn-toggle-pw:focus {
        outline: none;
        box-shadow: none;
    }

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
}

/* ── Login button — blue gradient matching SharedTheme ──────────── */
.btn-login {
    background: linear-gradient(135deg, var(--brand-blue-mid) 0%, var(--brand-blue) 100%);
    border: none;
    border-radius: 10px;
    padding: 11px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    width: 100%;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 12px var(--brand-blue-glow);
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    margin-top: 6px;
    cursor: pointer;
}

    .btn-login:hover {
        opacity: 0.90;
        transform: translateY(-1px);
        box-shadow: 0 6px 22px var(--brand-blue-glow);
    }

    .btn-login:active {
        transform: translateY(0);
    }

/* ── Remember me ────────────────────────────────────────────────── */
.remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

    .remember-row input[type="checkbox"] {
        width: 15px;
        height: 15px;
        accent-color: var(--brand-blue-mid);
        cursor: pointer;
    }

    .remember-row label {
        font-size: 0.815rem;
        color: var(--login-text-muted);
        cursor: pointer;
        margin: 0;
    }

/* ── Error panel (asp:Panel fallback — hidden when Swal is used) ── */
.error-msg {
    background: rgba(220,38,38,0.08);
    border: 1px solid rgba(220,38,38,0.25);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.825rem;
    color: #f87171;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="light"] .error-msg {
    background: #fff3f3;
    border-color: #f5c6cb;
    color: #dc3545;
}

/* ── Validator messages ──────────────────────────────────────────── */
.validator-msg {
    font-size: 0.755rem;
    color: #f87171;
    margin-top: 5px;
    display: block;
    letter-spacing: 0.01em;
}

[data-theme="light"] .validator-msg {
    color: #dc3545;
}

/* ── Footer ─────────────────────────────────────────────────────── */
.footer-text {
    text-align: center;
    font-size: 0.755rem;
    color: var(--login-text-muted);
    margin-top: 26px;
    opacity: 0.75;
}

/* ── SweetAlert2 — aligned with JPSCTheme.js BrandSwal mixin ────── */
.swal-login-popup {
    border-radius: 16px !important;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #2D6EC0, #1A4F8A) !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    padding: 10px 24px !important;
}

    .swal2-confirm:focus {
        box-shadow: 0 0 0 3px var(--brand-blue-glow) !important;
    }

/* ── Somee ad fix ───────────────────────────────────────────────── */
center {
    position: fixed !important;
    bottom: 65px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 9999 !important;
    font-size: 0.75rem !important;
    color: #aaa !important;
    white-space: nowrap !important;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .login-wrapper {
        flex-direction: column;
        width: 95%;
        min-height: unset;
    }

    .login-left {
        flex: none;
        padding: 36px 28px;
        border-right: none;
        border-bottom: 1px solid var(--login-border);
    }

    .login-right {
        padding: 36px 28px;
    }
}
