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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
}

.login-logo {
    text-align: center;
    margin-bottom: 8px;
}

.login-logo img {
    height: 52px;
    object-fit: contain;
}

.login-logo-placeholder {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    margin: 0 auto;
}

.login-app-name {
    text-align: center;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 28px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.login-heading {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 28px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    font-size: 15px;
    color: #111827;
    background: #f9fafb;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}

input:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

input.otp-input {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 10px;
    text-align: center;
    padding: 14px;
    color: #2563eb;
}

.btn {
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 9px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, opacity 0.15s;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
    background: #2563eb;
    color: #fff;
    margin-top: 6px;
}

.btn-primary:hover:not(:disabled) { background: #1d4ed8; }

.btn-ghost {
    background: transparent;
    color: #6b7280;
    font-size: 13px;
    padding: 9px;
    margin-top: 4px;
}

.btn-ghost:hover:not(:disabled) { color: #374151; background: #f3f4f6; }

.status-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
    text-align: center;
    font-weight: 500;
}

.status-box.visible { display: block; }

.error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
}

.error-box.visible { display: block; }

.otp-info {
    background: #eff6ff;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13px;
    color: #1e40af;
    margin-bottom: 16px;
    line-height: 1.5;
    text-align: center;
}

.divider {
    height: 1px;
    background: #f3f4f6;
    margin: 18px 0;
}

.footer-note {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 24px;
    line-height: 1.5;
}

.footer-note a { color: #6b7280; text-decoration: none; }
.footer-note a:hover { text-decoration: underline; }

.step { display: block; }
.step.hidden { display: none; }

.success-box {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.success-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.success-msg {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
    .login-card { padding: 32px 24px; }
}
