/* ============================================================
   Login Page — PNX Labs dark theme
   PNX Labs Development Portal
   ============================================================ */

:root {
    --bg-primary: #0F0F0F;
    --bg-surface: #181818;
    --bg-surface-2: #1F1F1F;
    --bg-hover: #262626;
    --border-subtle: #2A2A2A;
    --border-strong: #363636;
    --text-primary: #EDEDED;
    --text-muted: #A6A6A6;
    --text-muted-2: #7A7A7A;
    --accent-blue: #77B901;          /* PNX primary green */
    --accent-blue-hover: #8BD10F;
    --accent-indigo: #393BD6;        /* PNX interactive blue */
    --accent-green: #77B901;
    --accent-red: #EB521D;           /* PNX alert */
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 50% -10%, rgba(119, 185, 1, 0.16) 0%, rgba(119, 185, 1, 0) 55%),
        var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
}

/* ---------- Wrapper ---------- */
.login-wrapper {
    width: 100%;
    max-width: 440px;
}

/* ---------- Card ---------- */
.login-container {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    border-top: 3px solid var(--accent-green);
    box-shadow: var(--shadow-lg);
    padding: 40px 36px;
    text-align: center;
}

/* ---------- Logo ---------- */
.logo-space {
    margin-bottom: 20px;
}

.logo {
    height: auto;
    width: 60%;
    max-width: 200px;
    display: inline-block;
}

/* ---------- Heading ---------- */
.login-container h1 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 26px;
    color: #FFFFFF;
}

/* ---------- Messages ---------- */
.success-message,
.error-message {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: left;
    border: 1px solid transparent;
}

.success-message {
    background: rgba(119, 185, 1, 0.12);
    color: #9BD13C;
    border-color: rgba(119, 185, 1, 0.35);
}

.error-message {
    background: rgba(235, 82, 29, 0.12);
    color: #F5916B;
    border-color: rgba(235, 82, 29, 0.4);
}

/* ---------- Info text ---------- */
.info-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: left;
    line-height: 1.6;
}

/* ---------- Form ---------- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-group input {
    padding: 12px 14px;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-group input::placeholder {
    color: var(--text-muted-2);
}

.form-group input:focus {
    border-color: var(--accent-blue);
    background: var(--bg-hover);
    box-shadow: 0 0 0 3px rgba(119, 185, 1, 0.18);
}

/* Verification code field — centered, monospace, larger */
#login_code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.4rem;
    letter-spacing: 0.5em;
    text-align: center;
}

/* ---------- Buttons ---------- */
.btn-primary {
    margin-top: 6px;
    padding: 13px 20px;
    background: var(--accent-blue);
    color: #000000;
    border: 1px solid #77B901;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    box-shadow: 0 4px 16px rgba(119, 185, 1, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ---------- Secondary forms (resend / cancel) ---------- */
.secondary-form {
    margin-top: 12px;
    text-align: center;
}

.btn-secondary {
    padding: 10px 20px;
    background: var(--bg-surface-2);
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
    box-shadow: 0 4px 14px rgba(119, 185, 1, 0.2);
}

.btn-link {
    background: none;
    border: none;
    padding: 6px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.btn-link:hover {
    color: var(--accent-red);
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .login-container {
        padding: 28px 20px;
    }

    .logo {
        width: 60%;
    }

    .login-container h1 {
        font-size: 1.2rem;
    }
}