/* G-Champ Auth — Matching Oral Calculator branding */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #dc143c 0%, #ff6b6b 50%, #ffd700 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ── Container ── */
.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
}

.login-container.wide {
    max-width: 500px;
}

/* ── Header ── */
.login-header {
    background: linear-gradient(135deg, #dc143c 0%, #b01030 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
    border-bottom: 4px solid #ffd700;
}

.login-header.compact {
    padding: 35px 30px;
}

.logo {
    width: 200px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    background: white;
    border-radius: 12px;
    padding: 0px;
}

.login-header h1 {
    font-size: 26px;
    margin-bottom: 5px;
    color: #ffd700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.login-header .app-subtitle {
    font-size: 16px;
    font-weight: 600;
    opacity: 1;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 13px;
    opacity: 0.85;
}

/* ── Body ── */
.login-body {
    padding: 40px 30px;
}

.login-body.compact {
    padding: 35px 30px;
}

/* ── Alerts ── */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: slideIn 0.3s ease;
    display: none;
}

.alert.show,
.alert.visible {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger,
.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* ── Form ── */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.label-hint {
    font-weight: normal;
    font-size: 12px;
    color: #666;
    display: block;
    margin-top: 2px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
}

.form-group input:focus {
    border-color: #dc143c;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.form-group input::placeholder {
    color: #aaa;
}

/* ── TOTP Code Input ── */
.totp-input {
    text-align: center;
    letter-spacing: 8px;
    font-size: 24px;
    font-weight: 700;
}

/* ── Buttons ── */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #dc143c 0%, #ff1744 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.3);
    text-align: center;
    text-decoration: none;
    display: block;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 60, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    background: #f5f7fa;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    text-align: center;
}

.btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* ── QR Code ── */
.qr-container {
    display: flex;
    justify-content: center;
    padding: 16px;
    margin-bottom: 16px;
}

#qrCode canvas {
    border-radius: 8px;
}

.secret-display {
    background: #f5f7fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
    color: #333;
    margin-bottom: 20px;
}

.secret-display .label {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

/* ── Backup Codes ── */
.backup-codes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.backup-code {
    background: #f5f7fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.backup-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 13px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

/* ── Check Email ── */
.email-icon {
    text-align: center;
    font-size: 64px;
    margin-bottom: 16px;
}

.centered-text {
    text-align: center;
    color: #666;
    font-size: 15px;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* ── Password Requirements ── */
.password-requirements {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    font-size: 12px;
}

.password-requirements li {
    padding: 3px 0;
    color: #999;
    transition: color 0.3s;
}

.password-requirements li.met {
    color: #28a745;
}

.password-requirements li::before {
    content: '\2022';
    margin-right: 6px;
}

.password-requirements li.met::before {
    content: '\2713';
}

/* ── Footer ── */
.login-footer {
    text-align: center;
    padding: 20px 30px 30px;
    color: #666;
    font-size: 13px;
}

.login-footer a {
    color: #dc143c;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .login-container {
        margin: 10px;
    }

    .login-header h1 {
        font-size: 24px;
    }

    .login-body {
        padding: 30px 20px;
    }

    .login-body.compact {
        padding: 25px 20px;
    }

    .backup-codes {
        grid-template-columns: 1fr;
    }
}
