/* ── DARK (default) ── */

@charset "UTF-8";

:root {
    --bg: #eef2f7;
    --surface: #ffffff;
    --surface2: #f6f8fa;
    --border: #d0d7de;
    --accent: #00248f;
    --accent2: #b87d00;
    --accent3: #b5006b;
    --text: #0e0f0f;
    --muted: #57606a;
    --danger: #cf222e;
    --info: #0969da;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --grid-color: rgba(0, 0, 0, 0.04);
}

/* ── LIGHT ── */
[data-theme="light"] {
    --bg: #0d1117;
    --surface: #161b22;
    --surface2: #1c2128;
    --border: #30363d;
    --accent: #00248f;
    --accent2: #f0b429;
    --accent3: #e84393;
    --text: #e6edf3;
    --muted: #8b949e;
    --danger: #f85149;
    --info: #58a6ff;
    --radius: 10px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    --grid-color: rgba(255, 255, 255, 0.03);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    transition:
        background-color 0.25s ease,
        border-color 0.22s ease,
        color 0.2s ease,
        box-shadow 0.25s ease;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--text);
    display: flex;
    align-items: stretch;
}

/* ── GRID BG ── */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* ── THEME TOGGLE ── */
.theme-btn {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 100;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 14px 5px 11px;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: "Plus Jakarta Sans", sans-serif;
    box-shadow: var(--shadow);
}

.theme-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── LAYOUT ── */
.login-wrap {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ── LEFT PANEL ── */
.left-panel {
    width: 45%;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 48px;
    position: relative;
    overflow: hidden;
}

.left-panel::after {
    content: "";
    position: absolute;
    bottom: -80px;
    right: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(0, 208, 132, 0.12) 0%,
        transparent 70%
    );
    pointer-events: none;
}

.left-panel::before {
    content: "";
    position: absolute;
    top: -60px;
    left: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(88, 166, 255, 0.07) 0%,
        transparent 70%
    );
    pointer-events: none;
}

/* BRAND */
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #fffcfc;
    flex-shrink: 0;
}

.brand-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.brand-region {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
}

/* INFO BLOCK */
.left-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
}

.left-info h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    margin-bottom: 14px;
}

.left-info h1 span {
    color: var(--accent);
}

.left-info p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
    max-width: 320px;
}

/* STAT PILLS */
.stat-pills {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 28px;
}

.stat-pill {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.pill-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.pill-label {
    font-size: 10px;
    color: var(--muted);
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.pill-value {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
    font-family: "DM Mono", monospace;
}

/* LEFT FOOTER */
.left-footer {
    font-size: 11px;
    color: var(--muted);
}

.left-footer a {
    color: var(--accent);
    text-decoration: none;
}

/* ── RIGHT PANEL (FORM) ── */
.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.form-card {
    width: 100%;
    max-width: 400px;
}

.form-card-header {
    margin-bottom: 28px;
}

.form-card-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 5px;
}

.form-card-header p {
    font-size: 12.5px;
    color: var(--muted);
}

/* FORM ELEMENTS */
.field-group {
    margin-bottom: 16px;
}

.field-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.field-wrap {
    position: relative;
}

.field-wrap .field-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 15px;
    pointer-events: none;
}

.field-wrap .toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 15px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.field-wrap .toggle-pw:hover {
    color: var(--text);
}

.field-input {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    font-family: "Plus Jakarta Sans", sans-serif;
    padding: 10px 12px 10px 38px;
    outline: none;
}

.field-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.12);
}

.field-input::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

[data-theme="light"] .field-input {
    background: #f6f8fa;
}

[data-theme="light"] .field-input:focus {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 143, 92, 0.12);
}

/* ROLE SELECT */
.role-select {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.role-opt {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 9px 8px;
    text-align: center;
    cursor: pointer;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface2);
    user-select: none;
}

.role-opt.selected {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 208, 132, 0.08);
}

[data-theme="light"] .role-opt.selected {
    background: rgba(0, 143, 92, 0.08);
}

.role-opt i {
    display: block;
    font-size: 18px;
    margin-bottom: 3px;
}

/* REMEMBER + FORGOT */
.form-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.remember-wrap {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.remember-wrap input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.remember-wrap span {
    font-size: 12px;
    color: var(--muted);
}

.forgot-link {
    font-size: 12px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* SUBMIT BTN */
.btn-login {
    width: 100%;
    background: var(--accent);
    color: #fffbfb;
    border: none;
    border-radius: 8px;
    padding: 11px;
    font-size: 13.5px;
    font-weight: 800;
    font-family: "Plus Jakarta Sans", sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

.btn-login:hover {
    opacity: 0.88;
}

.btn-login:active {
    transform: scale(0.99);
}

.btn-login .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* DIVIDER */
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    font-size: 11px;
    color: var(--muted);
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* GUEST BTN */
.btn-guest {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    font-family: "Plus Jakarta Sans", sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-guest:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ERROR MSG */
.err-msg {
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: 7px;
    padding: 9px 13px;
    font-size: 12px;
    color: var(--danger);
    display: none;
    margin-bottom: 14px;
    align-items: center;
    gap: 7px;
}

.err-msg.show {
    display: flex;
}

/* FOOTER */
.form-footer {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    margin-top: 22px;
}

.form-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* VERSION BADGE */
.ver-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 18px;
}

.ver-badge span {
    color: var(--accent);
}

/* STATUS DOT */
.dot-live {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 208, 132, 0.5);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(0, 208, 132, 0);
    }
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .left-panel {
        display: none;
    }

    .right-panel {
        padding: 30px 20px;
    }
}
