/* assets/css/login.css */
:root{
    --bg1:#0f172a;
    --bg2:#1e3a8a;
    --card:#ffffff;
    --text:#0f172a;
    --muted:#64748b;
    --line:#d8e2f0;
    --primary:#1d4ed8;
    --primary-hover:#1e40af;
    --danger-bg:#fee2e2;
    --danger-text:#991b1b;
    --success-bg:#dcfce7;
    --success-text:#166534;
    --shadow:0 24px 60px rgba(0,0,0,.25);
    --radius:24px;
}

*{
    box-sizing:border-box;
}

html,
body{
    margin:0;
    padding:0;
    min-height:100%;
    font-family:"Noto Sans Thai",sans-serif;
    color:var(--text);
    background:
        radial-gradient(circle at top left, rgba(59,130,246,.22), transparent 34%),
        radial-gradient(circle at bottom right, rgba(96,165,250,.14), transparent 28%),
        linear-gradient(135deg,var(--bg1),var(--bg2));
}

body{
    min-height:100vh;
}

.page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:32px 16px;
}

.shell{
    width:min(100%, 980px);
    display:grid;
    grid-template-columns:1.05fr .95fr;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.08);
    border-radius:32px;
    overflow:hidden;
    backdrop-filter:blur(10px);
    box-shadow:var(--shadow);
}

.hero{
    position:relative;
    padding:42px 34px;
    color:#fff;
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 24%),
        radial-gradient(circle at 80% 30%, rgba(255,255,255,.08), transparent 20%),
        linear-gradient(160deg, rgba(37,99,235,.95), rgba(15,23,42,.92));
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    min-height:560px;
}

.hero-badge{
    display:inline-flex;
    align-items:center;
    gap:8px;
    width:max-content;
    padding:8px 12px;
    border-radius:999px;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.12);
    font-size:14px;
    font-weight:600;
    margin-bottom:auto;
}

.hero-title{
    font-size:42px;
    line-height:1.08;
    font-weight:800;
    margin:0 0 12px;
    letter-spacing:-.02em;
}

.hero-desc{
    margin:0;
    color:rgba(255,255,255,.82);
    font-size:16px;
    line-height:1.7;
    max-width:420px;
}

.card-wrap{
    background:var(--card);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:28px;
}

.card{
    width:100%;
    max-width:420px;
}

.title{
    font-size:36px;
    line-height:1.15;
    font-weight:800;
    margin:0 0 6px;
    color:#020617;
}

.muted{
    color:var(--muted);
    font-size:16px;
    margin-bottom:22px;
}

.field{
    margin-top:14px;
}

.field label{
    display:block;
    margin-bottom:8px;
    font-weight:700;
    font-size:15px;
    color:#0f172a;
}

.field input{
    width:100%;
    height:52px;
    padding:0 16px;
    border:1px solid var(--line);
    border-radius:16px;
    outline:none;
    font-size:16px;
    transition:border-color .2s ease, box-shadow .2s ease, background .2s ease;
    background:#fff;
}

.field input:focus{
    border-color:#93c5fd;
    box-shadow:0 0 0 4px rgba(59,130,246,.12);
}

.btn{
    margin-top:18px;
    width:100%;
    height:52px;
    border:none;
    border-radius:16px;
    background:var(--primary);
    color:#fff;
    font-weight:800;
    font-size:16px;
    cursor:pointer;
    transition:transform .15s ease, background .2s ease, opacity .2s ease;
}

.btn:hover{
    background:var(--primary-hover);
}

.btn:active{
    transform:translateY(1px);
}

.btn:disabled{
    opacity:.7;
    cursor:not-allowed;
}

.msg{
    margin-top:14px;
    padding:12px 14px;
    border-radius:14px;
    display:none;
    font-size:14px;
    line-height:1.5;
}

.msg.error{
    display:block;
    background:var(--danger-bg);
    color:var(--danger-text);
}

.msg.success{
    display:block;
    background:var(--success-bg);
    color:var(--success-text);
}

.helper{
    margin-top:16px;
    color:#94a3b8;
    font-size:13px;
    text-align:center;
}

@media (max-width: 820px){
    .page{
        align-items:flex-start;
        padding:0;
    }

    .shell{
        width:100%;
        min-height:100vh;
        border:none;
        border-radius:0;
        grid-template-columns:1fr;
        background:transparent;
        box-shadow:none;
    }

    .hero{
        min-height:220px;
        padding:28px 22px 34px;
        border-radius:0 0 28px 28px;
    }

    .hero-badge{
        margin-bottom:34px;
    }

    .hero-title{
        font-size:28px;
        margin-bottom:8px;
    }

    .hero-desc{
        font-size:14px;
        line-height:1.6;
    }

    .card-wrap{
        padding:18px 16px 28px;
        background:transparent;
        margin-top:-18px;
    }

    .card{
        background:#fff;
        border-radius:26px;
        padding:24px 20px 22px;
        box-shadow:0 18px 40px rgba(15,23,42,.18);
    }

    .title{
        font-size:26px;
    }

    .muted{
        font-size:15px;
        margin-bottom:18px;
    }
}

@media (max-width: 420px){
    .hero{
        min-height:200px;
        padding:22px 18px 30px;
    }

    .card-wrap{
        padding:16px 12px 24px;
    }

    .card{
        padding:22px 18px 20px;
        border-radius:22px;
    }

    .field input,
    .btn{
        height:50px;
    }
}