/* Shared styling for login.php, setup_2fa.php, and verify_2fa.php */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f2f4f7;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: #fff;
    width: 100%;
    max-width: 380px;
    padding: 32px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.auth-card.auth-card-wide {
    max-width: 440px;
}

.auth-card h1 {
    font-size: 20px;
    margin: 0 0 4px;
    color: #1a1a1a;
    text-align: center;
}

.auth-card p.subtitle {
    margin: 0 0 24px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

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

.auth-card input[type="text"],
.auth-card input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 18px;
}

.auth-card input[type="text"]:focus,
.auth-card input[type="password"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.auth-card button {
    width: 100%;
    padding: 10px 12px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.auth-card button:hover {
    background: #1d4ed8;
}

.auth-card .error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 18px;
}

/* ---- "Sign in with Google" (shown only when enabled in Settings > APIs) ---- */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
    color: #9ca3af;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.google-form {
    margin: 0;
}

/* Scoped to .auth-card so it beats the generic ".auth-card button" rule
   (which is otherwise more specific and would repaint this blue). */
.auth-card .google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.auth-card .google-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.auth-card .google-btn:active {
    background: #f3f4f6;
}

.auth-card .google-btn svg {
    flex-shrink: 0;
}

/* ---- Two-factor setup / verify pages ---- */

.auth-card .qr-wrap {
    display: flex;
    justify-content: center;
    padding: 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
}

.auth-card .secret-key {
    text-align: center;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 14px;
    letter-spacing: 1px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 18px;
    word-break: break-all;
}

.auth-card .hint {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.5;
}

.auth-card .back-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
}

.auth-card .back-link:hover {
    color: #2563eb;
}

.auth-card input.code-input {
    text-align: center;
    font-size: 22px;
    letter-spacing: 6px;
    font-family: "SFMono-Regular", Consolas, monospace;
}
