/* Login / Change password — Figma "Hero Section" theme
   Palette: navy #233255 · gold #F6AD2B · sky #7FBDE4 · cream #FDFDF5 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Thai+Looped:wght@400;500;600;700;800&display=swap');

:root {
    --navy:  #233255;
    --gold:  #F6AD2B;
    --sky:   #7FBDE4;
    --cream: #FDFDF5;
    --muted: #657088;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', 'Noto Sans Thai Looped', sans-serif;
    min-height: 100vh;
    display: flex;
    background: var(--cream);
    color: rgba(35,50,85,0.85);
    -webkit-font-smoothing: antialiased;
}

/* LEFT PANEL — navy ไล่ไปฟ้า มุมขวาโค้ง + วงแหวนตกแต่ง */
.login-left {
    width: 52%;
    background: linear-gradient(160deg, #233255 0%, #2F4A74 55%, #5D8DB6 100%);
    border-radius: 0 48px 48px 0;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px;
    overflow: hidden;
    box-shadow: 8px 0 30px rgba(35,50,85,0.18);
}
.login-left::before,
.login-left::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.login-left::before {
    width: 420px; height: 420px;
    border: 2px solid rgba(246,173,43,0.35);
    top: -140px; right: -120px;
}
.login-left::after {
    width: 260px; height: 260px;
    border: 2px solid rgba(255,255,255,0.18);
    bottom: -80px; left: -70px;
}
.login-left-content { position: relative; z-index: 1; text-align: center; max-width: 440px; }
.school-logo {
    width: 96px; height: 96px; object-fit: contain; margin-bottom: 22px;
    background: var(--cream); border-radius: 24px; padding: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.school-title { font-size: 13px; font-weight: 700; color: var(--gold); letter-spacing: 3px; text-transform: uppercase; margin-bottom: 10px; }
.school-name { font-size: 22px; font-weight: 700; color: #fff; line-height: 1.45; margin-bottom: 6px; }
.school-sub { font-size: 13px; color: rgba(255,255,255,0.65); margin-bottom: 30px; }
.divider { width: 60px; height: 3px; background: var(--gold); border-radius: 2px; margin: 0 auto 26px; }
.system-badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(246,173,43,0.5);
    border-radius: 34px;
    padding: 9px 22px;
    display: inline-flex; align-items: center; gap: 8px;
    color: #fff; font-size: 13.5px; margin-bottom: 30px;
    backdrop-filter: blur(4px);
}
.system-badge i { color: var(--gold); }
.school-info { display: flex; flex-direction: column; gap: 9px; width: 100%; }
.info-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.72); font-size: 13px; }
.info-item i { color: var(--gold); width: 16px; text-align: center; }

/* RIGHT PANEL */
.login-right {
    width: 48%;
    display: flex; align-items: center; justify-content: center;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}
/* วงกลมจุดตกแต่งแบบ Hero */
.login-right::before,
.login-right::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.login-right::before { width: 34px; height: 34px; border: 3px solid rgba(246,173,43,0.45); top: 12%; right: 14%; }
.login-right::after  { width: 22px; height: 22px; border: 2px solid rgba(35,50,85,0.2); bottom: 14%; left: 12%; }

.login-box { width: 100%; max-width: 390px; position: relative; z-index: 1; }
.login-header { margin-bottom: 30px; }
.login-header h2 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.3;
    margin-bottom: 8px;
    background: linear-gradient(100deg, #D98F12 0%, #233255 45%, #5D8DB6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex; align-items: center; gap: 10px;
}
.login-header h2 i { -webkit-text-fill-color: initial; font-size: 28px; }
.login-header p { font-size: 14.5px; color: rgba(35,50,85,0.7); line-height: 1.6; }

.form-group { margin-bottom: 18px; }
.form-label { font-size: 14px; font-weight: 500; color: rgba(35,50,85,0.85); margin-bottom: 7px; display: block; }

/* INPUT WRAP */
.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

/* icon ซ้าย — pointer-events: none เพื่อไม่ขวาง input */
.input-wrap > i:first-child {
    position: absolute;
    left: 18px;
    color: rgba(35,50,85,0.55);
    font-size: 15px;
    pointer-events: none;
    z-index: 1;
}

.input-wrap input {
    width: 100%;
    padding: 13px 46px 13px 46px;
    border: 0.5px solid #E5E5E5;
    border-radius: 30px;
    font-family: inherit;
    font-size: 15px;
    color: var(--navy);
    outline: none;
    transition: all 0.25s;
    background: #fff;
    box-shadow: inset 0 4px 5px rgba(0,0,0,0.05);
}
.input-wrap input::placeholder { color: rgba(35,50,85,0.35); letter-spacing: .02em; }
.input-wrap input:focus {
    border-color: var(--sky);
    box-shadow: inset 0 4px 5px rgba(0,0,0,0.03), 0 0 0 3.5px rgba(127,189,228,0.3);
}

/* icon ตาขวา — คลิกได้, z-index สูงกว่า input */
#toggleIcon {
    position: absolute;
    right: 18px;
    font-size: 16px;
    color: var(--muted);
    cursor: pointer;
    z-index: 2;
    transition: color 0.2s;
    user-select: none;
}
#toggleIcon:hover { color: var(--navy); }

/* BUTTON — pill ไล่สีฟ้า→ทอง→ฟ้า ตัวอักษร navy ตามปุ่ม "Join us today" */
.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(100deg, #9DB9B6 0%, #F6AD2B 50%, #7FBDE4 100%);
    background-size: 160% 100%;
    background-position: 50% 0;
    color: var(--navy);
    border: none;
    border-radius: 34px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-top: 10px;
    box-shadow: 0 6px 18px rgba(246,173,43,0.3);
}
.btn-login:hover { transform: translateY(-1px); background-position: 0 0; box-shadow: 0 10px 24px rgba(35,50,85,0.2); }
.btn-login:active { transform: translateY(0); }
.btn-login:focus-visible { outline: none; box-shadow: 0 0 0 3.5px rgba(127,189,228,0.5); }

/* ALERTS — แบบ Event card */
.alert {
    padding: 12px 16px; border-radius: 8px; font-size: 14px;
    display: block; position: relative; margin-bottom: 16px;
    color: rgba(35,50,85,0.85);
}
.alert:has(> i:first-child) { padding-left: 40px !important; }
.alert > i:first-child { position: absolute; left: 14px; top: 13px; }
.alert-danger  { background: linear-gradient(90deg, rgba(246,43,43,0.22), rgba(246,43,43,0.04)); border-left: 4px solid #F62B2B; }
.alert-danger i { color: #C23329; }
.alert-success { background: linear-gradient(90deg, rgba(77,193,82,0.26), rgba(77,193,82,0.05)); border-left: 4px solid #4DC152; }
.alert-success i { color: #2F8535; }
.alert-warning { background: linear-gradient(90deg, rgba(246,173,43,0.3), rgba(246,173,43,0.05)); border-left: 4px solid var(--gold); }
.alert-warning i { color: #A86A00; }

/* FOOTER */
.login-footer {
    margin-top: 28px; padding-top: 20px;
    border-top: 1px solid rgba(35,50,85,0.1);
    text-align: center; font-size: 12px; color: var(--muted); line-height: 1.8;
}
.login-footer a { color: #C98300; font-weight: 500; }
.login-footer a:hover { color: var(--navy); }

/* RESPONSIVE */
@media (max-width: 768px) {
    body { flex-direction: column; }
    .login-left { width: 100%; padding: 32px 24px; min-height: auto; border-radius: 0 0 36px 36px; }
    .school-info { display: none; }
    .login-right { width: 100%; padding: 32px 20px; }
    .login-header h2 { font-size: 28px; }
}
