/* bidadoo Login — Custom Entra External ID Login Page */

:root {
    --bdo-red: #c82319;
    --bdo-red-hover: #a51d14;
    --bdo-red-active: #8a1810;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #888888;
    --border: #d0d0d0;
    --border-focus: #c82319;
    --bg-page: #f5f5f5;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --error-red: #d32f2f;
    --error-bg: #fdecea;
    --radius: 6px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Roboto', -apple-system, 'Segoe UI', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 24px;
}

.login-card {
    background: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 40px 36px;
    position: relative;
}

.logo-section {
    text-align: center;
    margin-bottom: 32px;
}

.logo {
    height: 36px;
    width: auto;
}

/* If no SVG logo, use text fallback */
.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--bdo-red);
    letter-spacing: -0.5px;
}

h1 {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    transition: border-color 0.15s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px rgba(200, 35, 25, 0.12);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    color: #ffffff;
    background-color: var(--bdo-red);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.15s;
    margin-top: 4px;
}

.btn-primary:hover {
    background-color: var(--bdo-red-hover);
}

.btn-primary:active {
    background-color: var(--bdo-red-active);
}

.btn-primary:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.btn-google {
    width: 100%;
    padding: 11px 12px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.15s, border-color 0.15s;
}

.btn-google:hover {
    background-color: #f8f8f8;
    border-color: #bbb;
}

.google-icon {
    flex-shrink: 0;
}

.btn-link {
    width: 100%;
    padding: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    margin-top: 4px;
}

.btn-link:hover {
    color: var(--bdo-red);
    text-decoration: underline;
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider span {
    padding: 0 16px;
}

.switch-view {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 24px;
}

.switch-view a {
    color: var(--bdo-red);
    text-decoration: none;
    font-weight: 500;
}

.switch-view a:hover {
    text-decoration: underline;
}

.signin-email-display {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: var(--radius);
}

.otp-message {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.error-message {
    background: var(--error-bg);
    color: var(--error-red);
    font-size: 14px;
    padding: 10px 14px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    line-height: 1.4;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 10;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: var(--bdo-red);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.footer {
    text-align: center;
    padding: 16px 0;
    font-size: 12px;
    color: var(--text-muted);
}

.footer a {
    color: var(--text-muted);
    text-decoration: none;
}

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

.footer-sep {
    margin: 0 8px;
}

/* Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    .login-card {
        padding: 32px 24px;
    }
}
