/* Created by AI: style chung trang Đăng nhập + Xác nhận OTP (nền trắng, cửa sổ máy bay) */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 15px; color: #282828; background: #fff;
}
.page { display: flex; min-height: 100vh; }

/* Cột form */
.side { flex: 1 1 50%; display: flex; flex-direction: column; padding: 32px 48px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 11px; }
.brand b { display: block; font-size: 20px; font-weight: 800; letter-spacing: 1px; color: #04335a; line-height: 1.1; }
.brand span { display: block; font-size: 12px; color: #828282; }

.form-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 0; }
.form-box { width: 100%; max-width: 380px; }
.form-box h1 { margin: 0 0 8px; font-size: 30px; font-weight: 700; color: #1d1d1d; }
.form-box .lead { margin: 0 0 32px; color: #828282; line-height: 1.5; }

.alert {
    display: flex; gap: 10px; align-items: flex-start; margin-bottom: 22px; padding: 12px 14px;
    background: #fff1f1; border-radius: 10px; color: #d50000; font-size: 14px; line-height: 1.45;
}
.alert svg { flex: 0 0 18px; margin-top: 1px; }

.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: #333; }
.ctl { position: relative; }
.ctl input {
    width: 100%; height: 52px; padding: 0 16px; border-radius: 12px;
    border: 1.5px solid #e2e8f0; background: #f7f9fc;
    font: inherit; font-size: 16px; color: #1d1d1d;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.ctl input::placeholder { color: #a0aab8; }
.ctl input:hover { border-color: #b9dcf9; }
.ctl input:focus { outline: none; background: #fff; border-color: #0167b2; box-shadow: 0 0 0 4px #e2f1fc; }
.ctl.has-eye input { padding-right: 52px; }
.eye {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; border: 0; border-radius: 8px; background: none; cursor: pointer;
    color: #828282; display: flex; align-items: center; justify-content: center;
}
.eye:hover { color: #0167b2; background: #e2f1fc; }
.eye .off { display: none; }
.eye.on .on { display: none; }
.eye.on .off { display: block; }
.caps { display: none; margin-top: 6px; font-size: 13px; color: #ec6207; }
.caps.show { display: block; }

.row { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 26px; }
.remember { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; color: #4f4f4f; user-select: none; }
.remember input { width: 18px; height: 18px; margin: 0; accent-color: #0167b2; cursor: pointer; }

.submit {
    width: 100%; height: 52px; border: 0; border-radius: 12px; cursor: pointer;
    background: #0167b2; color: #fff; font: inherit; font-size: 16px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 8px 20px rgba(1, 103, 178, .25);
    transition: background .15s, transform .1s, box-shadow .15s;
}
.submit:hover { background: #087dcc; box-shadow: 0 10px 24px rgba(1, 103, 178, .32); }
.submit:active { transform: translateY(1px); }
.submit:focus-visible { outline: 3px solid #b9dcf9; outline-offset: 2px; }
.submit[disabled] { background: #8cc7f5; box-shadow: none; cursor: wait; }
.spin {
    display: none; width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite;
}
.submit.loading .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.foot { font-size: 13px; color: #a0aab8; }

/* Cột hình: ô cửa sổ máy bay nhìn ra bầu trời */
.visual {
    flex: 1 1 50%; margin: 16px; border-radius: 28px; position: relative; overflow: hidden;
    background: linear-gradient(160deg, #e2f1fc 0%, #f4f9fe 60%, #ffffff 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; padding: 40px;
}
.visual::before, .visual::after {
    content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.visual::before { width: 420px; height: 420px; right: -140px; top: -140px; background: rgba(54, 151, 255, .08); }
.visual::after { width: 300px; height: 300px; left: -100px; bottom: -120px; background: rgba(1, 103, 178, .06); }

.window {
    position: relative; z-index: 1; width: 280px; height: 380px; padding: 20px; border-radius: 140px;
    background: linear-gradient(145deg, #ffffff, #eef3f8);
    box-shadow: 0 30px 60px rgba(1, 103, 178, .18), inset 0 0 0 2px #dde8f2;
}
.glass {
    position: relative; height: 100%; border-radius: 120px; overflow: hidden;
    background: linear-gradient(180deg, #0167b2 0%, #3697ff 45%, #8cc7f5 75%, #e2f1fc 100%);
    box-shadow: inset 0 0 0 6px rgba(0, 0, 0, .04), inset 0 10px 30px rgba(0, 0, 0, .15);
}
.blind {
    position: absolute; left: 0; right: 0; top: 0; height: 16%;
    background: linear-gradient(180deg, #f1f5f9, #e3eaf1); border-bottom: 3px solid #d0dbe6;
}
.blind::after {
    content: ""; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
    width: 34px; height: 5px; border-radius: 3px; background: #c3cfdb;
}
.cloud {
    position: absolute; height: 26px; border-radius: 26px; background: rgba(255, 255, 255, .9);
    animation: drift linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
.cloud::before { width: 34px; height: 34px; left: 14px; top: -16px; }
.cloud::after { width: 24px; height: 24px; left: 40px; top: -10px; }
.c1 { width: 90px; top: 34%; animation-duration: 16s; }
.c2 { width: 70px; top: 52%; animation-duration: 22s; animation-delay: -9s; opacity: .8; }
.c3 { width: 110px; top: 66%; animation-duration: 28s; animation-delay: -4s; opacity: .7; }
@keyframes drift { from { transform: translateX(260px); } to { transform: translateX(-140px); } }
.wing { position: absolute; left: -10px; bottom: 10%; width: 230px; }
.glare {
    position: absolute; top: 18%; left: 16%; width: 18px; height: 55%; border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0)); transform: rotate(12deg);
}

.visual-text { position: relative; z-index: 1; text-align: center; max-width: 380px; }
.visual-text h2 { margin: 0 0 10px; font-size: 24px; font-weight: 700; color: #04335a; }
.visual-text p { margin: 0; color: #4f4f4f; line-height: 1.6; }

/* Tablet: thu nhỏ cửa sổ */
@media (max-width: 1100px) {
    .side { padding: 28px 32px; }
    .window { width: 220px; height: 300px; border-radius: 110px; padding: 16px; }
    .glass { border-radius: 94px; }
    .wing { width: 180px; }
}
/* Mobile: chỉ còn form, cửa sổ thu thành dải trang trí trên cùng */
@media (max-width: 860px) {
    .page { flex-direction: column; }
    .visual { display: none; }
    .side { padding: 24px 20px; min-height: 100vh; }
    .side::before {
        content: ""; position: absolute; left: 0; right: 0; top: 0; height: 220px; z-index: -1;
        background: linear-gradient(180deg, #e2f1fc 0%, #ffffff 100%);
    }
    .form-wrap { align-items: flex-start; padding: 48px 0 32px; }
    .form-box h1 { font-size: 26px; }
    .foot { text-align: center; }
}

/* Trang Xác nhận OTP */
.otp-badge {
    width: 56px; height: 56px; border-radius: 16px; margin-bottom: 20px;
    background: #e2f1fc; color: #0167b2; display: flex; align-items: center; justify-content: center;
}
.otp-channels { display: flex; gap: 10px; margin: -14px 0 28px; flex-wrap: wrap; }
.otp-channels span {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
    background: #f7f9fc; border: 1px solid #e2e8f0; font-size: 13px; font-weight: 600; color: #4f4f4f;
}
.ctl input.otp-input {
    height: 60px; text-align: center; font-size: 28px; font-weight: 700; letter-spacing: 14px;
    padding: 0 0 0 14px; font-family: Consolas, "Courier New", monospace;
}
.ctl input.otp-input::placeholder { letter-spacing: 14px; color: #cbd5e1; }
.hint { margin-top: 8px; font-size: 13px; color: #828282; }
.back {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 22px;
    color: #0167b2; font-weight: 600; font-size: 14px; text-decoration: none;
}
.back:hover { color: #087dcc; text-decoration: underline; }
.expired { padding: 16px; border-radius: 12px; background: #fff5d4; color: #7a4a00; font-size: 14px; line-height: 1.5; margin-bottom: 8px; }
