/* ============================================================
   login.css — Modern Split Screen Login
   ============================================================ */

@font-face { font-family: 'Kanit'; font-weight: 300; font-style: normal; font-display: swap; src: url('../../fonts/kanit/Kanit-Light.woff2') format('woff2'); }
@font-face { font-family: 'Kanit'; font-weight: 400; font-style: normal; font-display: swap; src: url('../../fonts/kanit/Kanit-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Kanit'; font-weight: 500; font-style: normal; font-display: swap; src: url('../../fonts/kanit/Kanit-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Kanit'; font-weight: 600; font-style: normal; font-display: swap; src: url('../../fonts/kanit/Kanit-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Kanit'; font-weight: 700; font-style: normal; font-display: swap; src: url('../../fonts/kanit/Kanit-Bold.woff2') format('woff2'); }

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

:root {
    --brand:       #FF4D00;
    --brand-dark:  #cc3d00;
    --brand-light: #ff7a3d;
}

body {
    font-family: 'Kanit', sans-serif;
    min-height: 100vh;
    display: flex;
    background: #f0f2f5;
}

/* ═══════════════════════════════
   LEFT PANEL — Branding
═══════════════════════════════ */
.login-left {
    flex: 1;
    background: linear-gradient(150deg, #ff7a3d 0%, var(--brand) 50%, #c93a00 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

/* Circle decorations */
.login-left::before {
    content: '';
    position: absolute;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    top: -120px; left: -120px;
}
.login-left::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    bottom: -80px; right: -80px;
}

.left-logo {
    margin-bottom: 40px;
    z-index: 1;
}

.left-logo img {
    height: 80px;
    width: auto;
}

/* SVG Illustration area */
.left-illustration {
    z-index: 1;
    width: 100%;
    max-width: 360px;
    margin-bottom: 40px;
}

.left-illustration svg {
    width: 100%;
    height: auto;
}

.left-text {
    z-index: 1;
    text-align: center;
    color: #fff;
}

.left-text h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.left-text p {
    font-size: 0.95rem;
    font-weight: 300;
    opacity: 0.85;
    line-height: 1.6;
}

/* ═══════════════════════════════
   RIGHT PANEL — Login Form
═══════════════════════════════ */
.login-right {
    width: 1000px;
    flex-shrink: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    box-shadow: -8px 0 40px rgba(0,0,0,0.08);
}

.login-form-wrap {
    width: 100%;
    max-width: 360px;
}

/* Brand badge */
.form-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 36px;
}

.form-brand img {
    height: 100px;
    width: auto;
}

.form-brand-text {
    line-height: 1.2;
}

.form-brand-text .name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d2d2d;
}

.form-brand-text .sub {
    font-size: 0.75rem;
    font-weight: 300;
    color: #999;
}

/* Heading */
.form-heading {
    margin-bottom: 28px;
    text-align: center;
}

.form-heading h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.form-heading p {
    font-size: 0.85rem;
    font-weight: 300;
    color: #999;
}

/* Alert */
.alert-error {
    background: #fff2f0;
    border-left: 4px solid var(--brand);
    border-radius: 6px;
    color: #cf1322;
    font-size: 0.85rem;
    padding: 10px 14px;
    margin-bottom: 20px;
}

.alert-success {
    background: #f6ffed;
    border-left: 4px solid #52c41a;
    border-radius: 6px;
    color: #237804;
    font-size: 0.85rem;
    padding: 10px 14px;
    margin-bottom: 20px;
}

.login-forgot a {
    color: var(--brand);
    font-size: 0.85rem;
    text-decoration: none;
}
.login-forgot a:hover { text-decoration: underline; }

/* Input fields */
.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    font-family: 'Kanit', sans-serif;
    font-size: 0.92rem;
    font-weight: 300;
    color: #333;
    background: #fafafa;
    border: 1.5px solid #e8e8e8;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-control::placeholder { color: #bbb; }

.form-control:focus {
    background: #fff;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(255,77,0,0.08);
}

/* Input icons */
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s;
}

.form-group:focus-within .input-icon { color: var(--brand); }

.input-password-wrap { position: relative; }
.input-password-wrap .form-control { padding-right: 42px; }
.btn-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.btn-toggle-password:hover { color: #6c757d; }
.btn-toggle-password svg { width: 18px; height: 18px; }

/* Submit */
.btn-login {
    width: 100%;
    padding: 13px;
    margin-top: 4px;
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--brand);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(255,77,0,0.35);
}

.btn-login:hover {
    background: var(--brand-dark);
    box-shadow: 0 3px 10px rgba(255,77,0,0.45);
}

.btn-login:active { transform: scale(0.99); }

/* Note */
.login-note {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    font-size: 0.76rem;
    font-weight: 300;
    color: #bbb;
    line-height: 1.7;
}

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   1. Tablet landscape  ≤ 1199px
   2. Tablet portrait   ≤ 1023px
   3. Mobile            ≤ 767px   (stack, compact left)
   4. Small mobile      ≤ 479px   (hide illustration)
   5. XS                ≤ 359px
═══════════════════════════════════════════════════ */

/* 1 — Tablet landscape */
@media (max-width: 1199px) {
    .login-right {
        width: 420px;
        padding: 52px 40px;
    }

    .left-illustration { max-width: 300px; }
}

/* 2 — Tablet portrait */
@media (max-width: 1023px) {
    .login-left  { padding: 48px 32px; }

    .login-right {
        width: 360px;
        padding: 48px 32px;
    }

    .left-illustration { max-width: 240px; margin-bottom: 28px; }
    .left-text h2      { font-size: 1.55rem; }
    .form-heading h1   { font-size: 1.4rem; }
}

/* 3 — Mobile (stack) */
@media (max-width: 767px) {
    body {
        flex-direction: column;
        background: #fff;
    }

    /* Left → compact top bar */
    .login-left {
        flex: none;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 20px 24px;
        min-height: unset;
    }

    /* Hide circle decorations on mobile */
    .login-left::before,
    .login-left::after { display: none; }

    .left-logo {
        margin-bottom: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .left-logo img { height: 40px; }

    .left-illustration { display: none; }

    .left-text {
        text-align: right;
    }

    .left-text h2 { font-size: 1rem; margin-bottom: 2px; }
    .left-text p  { font-size: 0.78rem; }

    /* Right → full-width form card */
    .login-right {
        width: 100%;
        flex: 1;
        padding: 40px 24px 32px;
        box-shadow: none;
        align-items: flex-start;
    }

    .login-form-wrap { max-width: 100%; }

    .form-brand img    { height: 75px; }
    .form-heading h1   { font-size: 1.45rem; }
}

/* 4 — Small mobile */
@media (max-width: 479px) {
    .login-left { padding: 16px 20px; }

    .left-text { display: none; }

    .login-right { padding: 32px 20px 28px; }

    .form-brand      { margin-bottom: 28px; }
    .form-brand img  { height: 68px; }

    .form-heading          { margin-bottom: 22px; }
    .form-heading h1       { font-size: 1.3rem; }

    .form-control    { padding: 11px 12px; font-size: 0.88rem; }
    .btn-login       { padding: 12px; font-size: 0.95rem; }
    .login-note      { font-size: 0.72rem; margin-top: 22px; }
}

/* 5 — XS (320px–359px) */
@media (max-width: 359px) {
    .login-left  { padding: 14px 16px; }
    .login-right { padding: 28px 16px 24px; }

    .form-heading h1 { font-size: 1.2rem; }
    .btn-login       { font-size: 0.9rem; }
}
