:root {
    --ink: #111827;
    --muted: #6b7280;
    --brand: #ff6a00;
    --brand2: #ff3d3d;
    --dark: #1a0c02;
    --paper: #fffaf4;
    --soft: #fff3e8;
    --line: rgba(17, 24, 39, 0.10);
    --orange-line: rgba(255, 106, 0, 0.22);
    --shadow: 0 24px 70px rgba(17, 24, 39, 0.14);
    --shadow2: 0 12px 28px rgba(17, 24, 39, 0.10);
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans Thai", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 106, 0, 0.08), transparent 28%),
        radial-gradient(circle at 82% 70%, rgba(255, 61, 61, 0.06), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #fffaf5 100%);
}

/* ===================== HEADER ===================== */

header {
    background: var(--dark);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 106, 0, 0.22);
}

.header-inner {
    width: min(var(--max), calc(100% - 40px));
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
    border-radius: 999px;
}

.nav {
    display: flex;
    gap: 12px;
    align-items: center;
}

.nav a {
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    transition: 0.25s ease;
}

.nav .login {
    color: #fff;
    background: #535353;
}

.nav .login:hover {
    background: rgba(255, 255, 255, 0.18);
}

.nav .register {
    color: #fff;
    background: linear-gradient(90deg, var(--brand2), var(--brand));
    box-shadow: 0 8px 20px rgba(255, 106, 0, 0.28);
}

.nav .register:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 106, 0, 0.34);
}

/* ===================== LOGIN PAGE ===================== */

.login-page {
    width: min(var(--max), calc(100% - 40px));
    margin: 0 auto;
    min-height: calc(90vh - 69px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 54px 0;
}

.login-shell {
    width: min(980px, 100%);
    display: flex;
    overflow: hidden;
    border-radius: 28px;
    background: #fff;
    border: 1px solid rgba(255, 106, 0, 0.16);
    box-shadow: var(--shadow);
}

/* ===================== LEFT PANEL ===================== */

.login-art {
    position: relative;
    flex: 1.05;
    min-height: 580px;
    padding: 54px 48px;
    overflow: hidden;
    background:
        radial-gradient(circle at 14% 12%, rgba(255, 106, 0, 0.16), transparent 24%),
        radial-gradient(circle at 92% 86%, rgba(255, 190, 120, 0.24), transparent 28%),
        linear-gradient(145deg, #fff7ee 0%, #fffdf9 58%, #ffe9d4 100%);
}

.login-art::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 230px;
    height: 170px;
    background-image: radial-gradient(rgba(255, 106, 0, 0.32) 1.4px, transparent 1.4px);
    background-size: 13px 13px;
    opacity: 0.75;
}

.login-art::after {
    content: "";
    position: absolute;
    right: -90px;
    bottom: -100px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 106, 0, 0.10);
}

.login-art-content {
    position: relative;
    z-index: 2;
}

.login-art h1 {
    margin: 26px 0 0;
    font-size: clamp(34px, 4.2vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.045em;
    color: var(--ink);
}

.login-art h1 span {
    color: #ff6600;
}

.login-art p {
    max-width: 420px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

.login-mascot-wrap {
    position: absolute;
    left: 42px;
    right: 30px;
    top: 0px;
    z-index: 2;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.login-mascot {
    width: min(430px, 94%);
    max-height: auto;
    object-fit: contain;
    filter: drop-shadow(0 22px 30px rgba(255, 106, 0, 0.18));
}

.login-spark {
    position: absolute;
    z-index: 1;
    color: #ffb321;
    font-size: 28px;
    font-weight: 950;
}

.login-spark.s1 {
    left: 70px;
    bottom: 210px;
}

.login-spark.s2 {
    right: 92px;
    top: 165px;
}

.login-spark.s3 {
    right: 150px;
    bottom: 138px;
    font-size: 20px;
}

/* ===================== RIGHT FORM ===================== */

.login-form-panel {
    flex: 0.95;
    padding: 58px 52px;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at top right, rgba(255, 106, 0, 0.06), transparent 32%),
        #ffffff;
}

.login-form-inner {
    width: 100%;
}

.login-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.login-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: var(--brand);
    background: rgba(255, 106, 0, 0.10);
    margin-bottom: 0;
}

.login-icon i {
    font-size: 24px;
}

.login-title {
    margin: 0;
    font-size: 36px;
    line-height: 1.15;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.login-desc {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.login-alert {
    margin-top: 22px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(239, 68, 68, 0.18);
    background: #fff1f1;
    color: #b42318;
    font-size: 14px;
    line-height: 1.6;
}

.login-alert ul {
    margin: 0;
    padding-left: 20px;
}

.login-form {
    margin-top: 28px;
}

.form-group {
    margin-bottom: 18px;
}

.form-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
}

.input-wrap {
    position: relative;
}

.input-wrap i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 18px;
}

.input-wrap input {
    width: 100%;
    height: 48px;
    border: 1px solid rgba(17, 24, 39, 0.14);
    border-radius: 15px;
    padding: 0 44px;
    outline: none;
    color: var(--ink);
    background: #fff;
    font: inherit;
    font-size: 14px;
    transition: 0.2s ease;
}

.input-wrap input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.12);
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    width: 34px;
    height: 34px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
}

.password-toggle i {
    position: static;
    transform: none;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 2px 0 22px;
}

.remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.remember input {
    accent-color: var(--brand);
}

.forgot-link {
    color: var(--brand2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
}

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

.submit-btn {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    background: linear-gradient(90deg, var(--brand2), var(--brand));
    box-shadow: 0 14px 28px rgba(255, 106, 0, 0.28);
    font: inherit;
    font-size: 15px;
    font-weight: 950;
    cursor: pointer;
    transition: 0.25s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(255, 106, 0, 0.36);
}

.login-divider {
    margin: 28px 0 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 800;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(17, 24, 39, 0.10);
}

.register-cta {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.register-cta a {
    color: var(--brand2);
    text-decoration: none;
    font-weight: 950;
}

.register-cta a:hover {
    text-decoration: underline;
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 900px) {
    .login-shell {
        max-width: 560px;
        flex-direction: column;
    }

    .login-art {
        display: none;
        min-height: 360px;
        padding: 34px 30px;
    }

    .login-art h1 {
        font-size: 34px;
    }

    .login-mascot-wrap {
        left: 20px;
        right: 20px;
        bottom: 12px;
    }

    .login-mascot {
        max-height: 180px;
    }

    .login-form-panel {
        padding: 36px 30px 40px;
    }
}

@media (max-width: 480px) {
    .header-inner {
        flex-direction: column;
        gap: 12px;
        padding: 12px 0;
    }

    .logo img {
        height: 34px;
    }

    .nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav a {
        padding: 9px 16px;
        font-size: 13px;
    }

    .login-page {
        width: min(100% - 24px, var(--max));
        padding: 28px 0;
    }

    .login-shell {
        border-radius: 22px;
    }

    .login-art {
        min-height: 320px;
        padding: 28px 22px;
    }

    .login-art p {
        font-size: 13px;
    }

    .login-form-panel {
        padding: 30px 22px 34px;
    }

    .login-title {
        font-size: 30px;
    }

    .login-options {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* ===================== REMEMBER LOGIN ===================== */

.remember-hint {
    margin: -8px 0 20px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 106, 0, 0.14);
    border-radius: 14px;
    color: #7c2d12;
    background: rgba(255, 247, 237, 0.88);
    font-size: 12px;
    line-height: 1.65;
    font-weight: 700;
}

.remember input {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    cursor: pointer;
}