* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #F0F4F8;
    color: #333;
    -webkit-tap-highlight-color: transparent;
}
.page {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px 24px;
    max-width: 420px;
    margin: 0 auto;
}
.logo-wrap {
    width: 160px;
    height: 160px;
    background: #fff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 48px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
    overflow: hidden;
}
.logo-wrap img {
    width: 140px;
    height: auto;
    object-fit: contain;
}
.form { width: 100%; }
.field {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 28px;
    height: 52px;
    padding: 0 18px;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    border: 1px solid #EEF1F5;
}
.field svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    stroke: #9AA3AF;
    fill: none;
    margin-right: 12px;
}
.field input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    background: transparent;
    color: #333;
    height: 100%;
}
.field input::placeholder { color: #B0B8C4; }
.row-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 6px 4px 18px;
    font-size: 14px;
}
.row-links a { color: #1B9E5A; text-decoration: underline; text-underline-offset: 2px; }
.remember {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1B9E5A;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}
.remember input { display: none; }
.check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #1B9E5A;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.remember input:checked + .check {
    background: #1B9E5A;
}
.remember input:checked + .check::after {
    content: "✓";
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.agree-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    color: #1B9E5A;
    padding: 0 4px;
}
.agree-row a { color: #1B9E5A; text-decoration: underline; text-underline-offset: 2px; }
.agree-row input { display: none; }
.btn-sign {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 28px;
    background: #1B9E5A;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(27,158,90,.35);
}
.btn-sign:active { opacity: .92; }
.btn-sign:disabled { opacity: .7; }
.forget {
    display: block;
    text-align: center;
    margin-top: 28px;
    color: #1B9E5A;
    font-size: 15px;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.version {
    position: fixed;
    right: 16px;
    bottom: 12px;
    font-size: 12px;
    color: #B0B8C4;
}

/* OTP Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 340px;
    padding: 24px 20px 20px;
    position: relative;
}
.modal h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #222;
}
.modal .close-x {
    position: absolute;
    right: 14px;
    top: 14px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.otp-info { font-size: 13px; color: #666; margin-bottom: 16px; }
.otp-row {
    display: flex;
    align-items: center;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    padding: 0 12px;
    height: 48px;
    margin-bottom: 14px;
}
.otp-row input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    letter-spacing: 4px;
}
.otp-send {
    border: none;
    background: #1B9E5A;
    color: #fff;
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}
.btn-verify {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: #1B9E5A;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}
