@font-face {
    font-family: "Noto Sans Thai";
    src: url("site/fonts/noto-sans-thai-400.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Noto Sans Thai";
    src: url("site/fonts/noto-sans-thai-700.ttf") format("truetype");
    font-weight: 700;
    font-display: swap;
}

:root {
    --yellow: #ffca05;
    --yellow-deep: #eeb900;
    --ink: #202320;
    --muted: #74766e;
    --cream: #f7f6f0;
    --line: #e8e8df;
    --green: #416951;
    --green-dark: #2f5140;
    --white: #fff;
    --danger: #9d2f2f;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    font-family: "Noto Sans Thai", system-ui, sans-serif;
    background:
        radial-gradient(circle at 7% 88%, rgba(255, 202, 5, .9) 0 13%, transparent 13.2%),
        radial-gradient(circle at 94% 6%, rgba(65, 105, 81, .95) 0 16%, transparent 16.2%),
        var(--cream);
}

button, input { font: inherit; }

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 38px;
}

.auth-shell {
    width: min(1120px, 100%);
    min-height: 700px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    overflow: hidden;
    background: var(--white);
    border: 1px solid rgba(32, 35, 32, .08);
    border-radius: 28px;
    box-shadow: 0 28px 80px rgba(32, 35, 32, .16);
}

.auth-intro {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 54px;
    overflow: hidden;
    background: var(--green);
    color: var(--white);
}

.auth-intro::after {
    content: "";
    position: absolute;
    right: -95px;
    bottom: -110px;
    width: 330px;
    height: 330px;
    border: 70px solid rgba(255, 202, 5, .95);
    border-radius: 50%;
}

.auth-brand { position: relative; z-index: 1; width: 108px; }
.auth-brand img { display: block; width: 100%; height: auto; border-radius: 4px; }

.auth-intro-copy { position: relative; z-index: 1; margin-top: 90px; max-width: 480px; }
.auth-eyebrow { display: block; margin-bottom: 10px; color: var(--yellow); font-size: 13px; font-weight: 700; letter-spacing: .09em; }
.auth-intro h1 { margin: 0; font-size: clamp(40px, 5vw, 62px); line-height: 1.1; }
.auth-intro-copy p { max-width: 430px; margin: 22px 0 0; color: rgba(255,255,255,.78); font-size: 17px; line-height: 1.85; }

.auth-principles { position: relative; z-index: 1; display: grid; gap: 14px; padding: 0; margin: 44px 0 0; list-style: none; }
.auth-principles li { display: flex; gap: 14px; align-items: center; color: rgba(255,255,255,.87); font-size: 14px; }
.auth-principles span { display: grid; flex: 0 0 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; color: var(--yellow); font-size: 11px; font-weight: 700; }

.auth-people { position: relative; z-index: 1; display: flex; align-items: center; margin-top: auto; padding-top: 40px; }
.auth-people img { width: 48px; height: 48px; object-fit: cover; border: 3px solid var(--green); border-radius: 50%; background: var(--cream); }
.auth-people img + img { margin-left: -13px; }
.auth-people p { max-width: 220px; margin: 0 0 0 16px; color: rgba(255,255,255,.7); font-size: 12px; line-height: 1.55; }

.auth-form-panel { display: grid; place-items: center; padding: 54px; background: #fff; }
.auth-form-wrap { width: min(410px, 100%); }
.auth-mobile-brand { display: none; }
.auth-form-header h2 { margin: 0; font-size: 42px; line-height: 1.2; }
.auth-form-header p { margin: 10px 0 0; color: var(--muted); }
.auth-form-header .auth-eyebrow { color: var(--green); }

.auth-alert { margin-top: 24px; padding: 13px 15px; border: 1px solid #efcaca; border-radius: 12px; background: #fff3f3; color: var(--danger); font-size: 14px; }
.auth-form { display: grid; gap: 22px; margin-top: 32px; }
.auth-field { display: grid; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 700; }
.auth-field input { width: 100%; height: 54px; padding: 0 16px; border: 1px solid #d7d8d1; border-radius: 12px; outline: 0; background: #fbfbf8; color: var(--ink); transition: border .2s, box-shadow .2s, background .2s; }
.auth-field input:focus { border-color: var(--green); background: var(--white); box-shadow: 0 0 0 4px rgba(65, 105, 81, .12); }
.password-control { position: relative; display: block; }
.password-control input { padding-right: 54px; }
.password-toggle { position: absolute; top: 50%; right: 8px; width: 40px; height: 40px; padding: 9px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; transform: translateY(-50%); }
.password-toggle:hover, .password-toggle:focus-visible { background: var(--cream); color: var(--green); outline: 0; }
.password-toggle svg { display: block; width: 100%; height: 100%; fill: currentColor; }

.auth-options { display: flex; gap: 12px; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }
.remember-switch { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.remember-switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { display: block; width: 40px; height: 23px; padding: 3px; border-radius: 20px; background: #c8cac3; transition: background .2s; }
.switch-track span { display: block; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .2s; }
.remember-switch input:checked + .switch-track { background: var(--green); }
.remember-switch input:checked + .switch-track span { transform: translateX(17px); }
.remember-switch input:focus-visible + .switch-track { box-shadow: 0 0 0 4px rgba(65, 105, 81, .18); }
.forgot-placeholder { color: var(--muted); border-bottom: 1px dashed #b7b8b0; cursor: help; }

.auth-submit { height: 56px; border: 0; border-radius: 12px; background: var(--yellow); color: var(--ink); font-weight: 700; cursor: pointer; box-shadow: 0 9px 20px rgba(255, 202, 5, .25); transition: background .2s, transform .2s; }
.auth-submit:hover { background: var(--yellow-deep); transform: translateY(-1px); }
.auth-submit:focus-visible { outline: 4px solid rgba(65, 105, 81, .22); outline-offset: 2px; }

.auth-divider { display: flex; align-items: center; gap: 14px; margin: 28px 0 18px; color: #96988f; font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social-logins { display: flex; justify-content: center; gap: 12px; }
.social-logins button { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fff; opacity: .72; cursor: not-allowed; }
.social-logins svg { width: 22px; height: 22px; }
.social-note { margin: 12px auto 0; max-width: 330px; color: #96988f; text-align: center; font-size: 11px; line-height: 1.6; }
.back-home { display: block; margin-top: 24px; color: var(--green); text-align: center; font-size: 13px; text-decoration: none; }
.back-home:hover { text-decoration: underline; }

@media (max-width: 900px) {
    .auth-page { display: block; padding: 0; background: var(--cream); }
    .auth-shell {
        min-height: 100vh;
        min-height: 100svh;
        width: 100%;
        grid-template-columns: 1fr;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    .auth-intro,
    .auth-form-header .auth-eyebrow,
    .auth-form-header p,
    .forgot-placeholder,
    .auth-divider,
    .social-logins,
    .social-note { display: none; }
    .auth-form-panel { padding: 36px 24px; background: transparent; }
    .auth-mobile-brand { display: block; width: 88px; margin: 0 0 28px; }
    .auth-mobile-brand img { display: block; width: 100%; height: auto; }
    .auth-form-header h2 { font-size: 30px; }
    .auth-form { gap: 20px; margin-top: 28px; }
    .auth-field input { font-size: 16px; }
    .auth-options { justify-content: flex-start; }
    .remember-switch { min-height: 44px; }
    .switch-track { flex-shrink: 0; }
    .back-home { min-height: 44px; padding: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
