/* Ladislav Font for Logo ONLY */
@font-face {
    font-family: "Ladislav";
    src: url(/Ladislav_SemiBold.woff) format('woff');
}

/* ========================================================================== */
/* CSS RESET & BASE STYLES */
/* ========================================================================== */

/* Universal box-sizing (critical for proper layout) */
*, *::before, *::after {
    box-sizing: border-box;
}

/* ========================================================================== */
/* BRAND COLORS (Constants) */
/* ========================================================================== */

:root {
    /* Branduals Orange - Official brand color */
    --branduals-orange: #ef4600;
    --branduals-orange-rgb: 239, 70, 0;
    --branduals-orange-light: #ef7a2f;
    --branduals-orange-lighter: #ef8b4a;
}

/* ========================================================================== */
/* THEME VARIABLES */
/* ========================================================================== */

/* Default theme based on system preference (when no data-theme attribute) */
@media (prefers-color-scheme: light) {
    :root {
        --bg-gradient-start: #f5f5f7;
        --bg-gradient-mid: #ffffff;
        --bg-gradient-end: #f5f5f7;
        --card-bg: rgba(255, 255, 255, 0.95);
        --input-bg: rgba(255, 255, 255, 0.95);
        --input-border: rgba(0, 0, 0, 0.12);
        --input-border-hover: rgba(0, 0, 0, 0.2);
        --text-primary: #1d1d1f;
        --text-secondary: rgba(0, 0, 0, 0.7);
        --text-tertiary: rgba(0, 0, 0, 0.5);
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-gradient-start: #0d0f13;
        --bg-gradient-mid: #1A1D23;
        --bg-gradient-end: #0d0f13;
        --card-bg: rgba(26, 29, 35, 0.95);
        --input-bg: rgba(26, 29, 35, 0.95);
        --input-border: rgba(255, 255, 255, 0.12);
        --input-border-hover: rgba(255, 255, 255, 0.2);
        --text-primary: #ffffff;
        --text-secondary: rgba(255, 255, 255, 0.6);
        --text-tertiary: rgba(255, 255, 255, 0.4);
    }
}

/* Manual theme overrides (when user explicitly selects a theme) */
[data-theme="light"] {
    --bg-gradient-start: #f5f5f7;
    --bg-gradient-mid: #ffffff;
    --bg-gradient-end: #f5f5f7;
    --card-bg: rgba(255, 255, 255, 0.95);
    --input-bg: rgba(255, 255, 255, 0.95);
    --input-border: rgba(0, 0, 0, 0.12);
    --input-border-hover: rgba(0, 0, 0, 0.2);
    --text-primary: #1d1d1f;
    --text-secondary: rgba(0, 0, 0, 0.7);
    --text-tertiary: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] {
    --bg-gradient-start: #0d0f13;
    --bg-gradient-mid: #1A1D23;
    --bg-gradient-end: #0d0f13;
    --card-bg: rgba(26, 29, 35, 0.95);
    --input-bg: rgba(26, 29, 35, 0.95);
    --input-border: rgba(255, 255, 255, 0.12);
    --input-border-hover: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --text-tertiary: rgba(255, 255, 255, 0.4);
}

/* Global Styles */
html {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-mid) 50%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================================================
   FIXED PAGE HEADER - Logo & Language Selector
   ============================================================================ */

.auth-page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    z-index: 1000;
    background: transparent;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-logo-small {
    font-family: 'Ladislav', sans-serif;
    font-size: 1.5rem;
    color: var(--branduals-orange);
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: opacity 0.2s ease;
    text-decoration: none;
    user-select: none;
}

.auth-logo-small:hover {
    opacity: 0.85;
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

[data-theme="light"] .theme-switcher {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.theme-option {
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .theme-option {
    color: rgba(0, 0, 0, 0.5);
    border-right: 1px solid rgba(0, 0, 0, 0.15);
}

.theme-option:last-child {
    border-right: none;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .theme-option:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.8);
}

.theme-option.active {
    background: rgba(var(--branduals-orange-rgb), 0.15);
    color: var(--branduals-orange);
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    color: var(--text-secondary);
    position: relative;
}

[data-theme="light"] .language-selector {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.language-selector:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .language-selector:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

.language-selector i {
    font-size: 1rem;
    opacity: 0.7;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 200px;
    background: var(--card-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: none;
    z-index: 1001;
}

[data-theme="light"] .language-dropdown {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.language-dropdown.active {
    display: block;
}

.language-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .language-option {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .language-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.language-option.selected {
    background: rgba(var(--branduals-orange-rgb), 0.1);
}

.language-name {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.language-native {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

/* Mobile Header Adjustments */
@media (max-width: 640px) {
    .auth-header {
        padding: 1rem 1.25rem;
        gap: 1rem;
    }

    .auth-logo-small {
        font-size: 1.25rem;
    }

    .language-selector {
        font-size: 0.8125rem;
        padding: 0.4rem 0.75rem;
    }
}

/* Main Content Centering */
.main-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    padding-top: 5rem; /* Account for fixed header */
}

/* Auth Container - Modern Card Design */
.auth-container {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

/* Auth Card */
.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}

@media (min-width: 641px) {
    .auth-card {
        padding: 3.5rem 3rem;
    }
}

.auth-card:hover {
    box-shadow:
        0 24px 72px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(var(--branduals-orange-rgb), 0.1);
}

.auth-title {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    margin: 0 0 2.5rem 0;
}

.auth-subtitle .brand-name,
.subtitle .brand-name {
    color: var(--branduals-orange);
    font-weight: 600;
    font-family: 'Ladislav', sans-serif;
}

/* Form Styling */
.auth-form {
    margin-top: 2rem;
}

.auth-form .mud-input-root {
    margin-bottom: 1.5rem;
}

/* MudBlazor Outlined Inputs - Clean & Modern */
.auth-form .mud-input-outlined {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.auth-form .mud-input-outlined:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.auth-form .mud-input-outlined.mud-input-focused {
    border-color: var(--branduals-orange);
    border-width: 2px;
}

.auth-form .mud-input-outlined .mud-input-slot {
    padding: 14px 16px;
}

/* Input Label Styling */
.auth-form .mud-input-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    font-weight: 400;
}

.auth-form .mud-input-label-outlined {
    color: rgba(255, 255, 255, 0.6);
    background: rgba(26, 29, 35, 0.95);
}

.auth-form .mud-input-label-focused {
    color: var(--branduals-orange);
}

/* Input Text Color */
.auth-form .mud-input-text {
    color: #ffffff;
    font-size: 0.9375rem;
}

/* Remove underline animation for outlined variant */
.auth-form .mud-input-outlined .mud-input-underline::before,
.auth-form .mud-input-outlined .mud-input-underline::after {
    display: none;
}

/* Primary Button - Branduals Orange */
.auth-button-primary {
    margin-top: 1.5rem;
    height: 48px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-transform: none;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, var(--branduals-orange) 0%, var(--branduals-orange-light) 100%);
    box-shadow: 0 2px 8px rgba(var(--branduals-orange-rgb), 0.15);
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.auth-button-primary:hover {
    background: linear-gradient(135deg, var(--branduals-orange-light) 0%, var(--branduals-orange-lighter) 100%);
    box-shadow: 0 3px 10px rgba(var(--branduals-orange-rgb), 0.2);
    filter: brightness(1.05);
}

.auth-button-primary:active {
    filter: brightness(0.95);
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 200;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15), transparent);
}

[data-theme="light"] .auth-divider::before,
[data-theme="light"] .auth-divider::after {
    background: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.15), transparent);
}

.auth-divider span {
    padding: 0 1rem;
}

/* Social Sign-In Buttons */
.social-button {
    height: 48px;
    border-radius: 10px;
    font-weight: 500;
    text-transform: none;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.social-button:hover {
    opacity: 0.9;
    border-color: rgba(255, 255, 255, 0.2);
}

.social-button-google {
    background-color: #4285f4;
}

.social-button-google:hover {
    background-color: #5a95f5;
}

.social-button-linkedin {
    background-color: #0077B5;
}

.social-button-linkedin:hover {
    background-color: #006399;
}

.social-button-microsoft {
    background-color: #2f2f2f;
    border-color: rgba(255, 255, 255, 0.2);
}

.social-button-microsoft:hover {
    background-color: #3f3f3f;
}

.social-button .button-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

/* Footer Links */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

[data-theme="light"] .auth-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.auth-footer a {
    color: var(--branduals-orange);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: var(--branduals-orange-light);
    text-decoration: underline;
}

/* Terms */
.auth-terms {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    line-height: 1.6;
}

.auth-terms a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: underline;
}

.auth-terms a:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Password Field with Toggle */
.password-field {
    position: relative;
    display: block;
    width: 100%;
}

.password-field .form-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.1rem;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.password-toggle:hover {
    color: var(--text-secondary);
}

.password-toggle:focus {
    outline: none;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.password-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.password-strength-fill {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-fill.weak {
    width: 33%;
    background: #f44336;
}

.password-strength-fill.medium {
    width: 66%;
    background: #ff9800;
}

.password-strength-fill.strong {
    width: 100%;
    background: #4caf50;
}

.password-strength-text {
    font-size: 0.8rem;
    font-weight: 500;
}

.password-strength-text.weak {
    color: #f44336;
}

.password-strength-text.medium {
    color: #ff9800;
}

.password-strength-text.strong {
    color: #4caf50;
}

/* Checkbox and Forgot Password Row */
.form-checkbox-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.form-checkbox {
    display: flex;
    align-items: center;
}

.form-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: var(--branduals-orange);
    border-radius: 3px;
    outline: none;
}

/* Two Column Layout for Name Fields */
.name-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 640px) {
    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-logo .branduals-logo {
        font-size: 2rem;
    }

    .name-fields {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .main-content {
        padding: 1rem 0.5rem;
    }
}

/* Loading State */
.auth-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Error Messages */
.mud-input-error .mud-input {
    border-color: #f44336 !important;
}

.mud-input-helper-text {
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeIn 0.5s ease;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--branduals-orange);
    outline-offset: 2px;
}

/* Remove default MudBlazor focus styles */
.mud-button:focus-visible,
.mud-input:focus-visible {
    outline: none;
}

/* Override MudBlazor ripple color for primary buttons */
.auth-button-primary .mud-ripple {
    color: rgba(255, 255, 255, 0.3);
}

/* ========================================================================== */
/* PLAIN HTML INPUT STYLES (2025+ Modern Design) */
/* ========================================================================== */

/* Form Field Container */
.form-field {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

/* Light theme label color override */
[data-theme="light"] .form-label {
    color: rgba(0, 0, 0, 0.75);
}

/* Plain Text Inputs */
.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    transition: all 0.2s ease;
    outline: none;
}

.form-input::placeholder {
    color: var(--text-tertiary);
    font-weight: 300;
}

.form-input:hover {
    border-color: var(--input-border-hover);
}

.form-input:focus {
    border-color: var(--branduals-orange);
    border-width: 2px;
    padding: 13px 15px; /* Adjust to compensate for border width */
}

.form-input.error {
    border-color: #f44336;
}

/* Autofill Styling Override - Theme Aware */
[data-theme="dark"] .form-input:-webkit-autofill,
[data-theme="dark"] .form-input:-webkit-autofill:hover,
[data-theme="dark"] .form-input:-webkit-autofill:focus,
[data-theme="dark"] .form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(26, 29, 35, 0.95) inset !important;
    box-shadow: 0 0 0 1000px rgba(26, 29, 35, 0.95) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    caret-color: #ffffff !important;
}

[data-theme="dark"] .form-input:-webkit-autofill:focus {
    border-color: var(--branduals-orange) !important;
    border-width: 2px !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(26, 29, 35, 0.95) inset !important;
    box-shadow: 0 0 0 1000px rgba(26, 29, 35, 0.95) inset !important;
}

[data-theme="light"] .form-input:-webkit-autofill,
[data-theme="light"] .form-input:-webkit-autofill:hover,
[data-theme="light"] .form-input:-webkit-autofill:focus,
[data-theme="light"] .form-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.95) inset !important;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.95) inset !important;
    -webkit-text-fill-color: #1d1d1f !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 10px !important;
    caret-color: #1d1d1f !important;
}

[data-theme="light"] .form-input:-webkit-autofill:focus {
    border-color: var(--branduals-orange) !important;
    border-width: 2px !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.95) inset !important;
    box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.95) inset !important;
}

/* Field Error Message */
.field-error {
    font-size: 0.8rem;
    color: #f44336;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ========================================================================== */
/* 6-DIGIT CODE INPUT (Signature Component) */
/* ========================================================================== */

.code-input-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 2rem 0;
}

.code-input {
    width: 56px;
    height: 64px;
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    color: var(--branduals-orange);
    background: rgba(26, 29, 35, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    transition: all 0.2s ease;
    outline: none;
    font-family: 'Courier New', monospace;
}

.code-input:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.code-input:focus {
    border-color: var(--branduals-orange);
    box-shadow: 0 0 0 4px rgba(var(--branduals-orange-rgb), 0.1);
    transform: scale(1.05);
}

.code-input.filled {
    background: rgba(var(--branduals-orange-rgb), 0.1);
    border-color: var(--branduals-orange);
}

/* Light theme overrides (system preference OR manual selection) */
@media (prefers-color-scheme: light) {
    .code-input {
        background: rgba(255, 255, 255, 0.95);
        border: 2px solid rgba(0, 0, 0, 0.12);
        color: var(--branduals-orange);
    }

    .code-input:hover {
        border-color: rgba(0, 0, 0, 0.3);
    }

    .code-input.filled {
        background: rgba(var(--branduals-orange-rgb), 0.1);
        border-color: var(--branduals-orange);
    }
}

[data-theme="light"] .code-input {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(0, 0, 0, 0.12);
    color: var(--branduals-orange);
}

[data-theme="light"] .code-input:hover {
    border-color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .code-input.filled {
    background: rgba(var(--branduals-orange-rgb), 0.1);
    border-color: var(--branduals-orange);
}

@media (max-width: 640px) {
    .code-input {
        width: 48px;
        height: 56px;
        font-size: 1.5rem;
    }

    .code-input-container {
        gap: 8px;
    }
}

/* ========================================================================== */
/* LANGUAGE SWITCHER */
/* ========================================================================== */

.language-switcher {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 10;
}

.lang-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(26, 29, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-button:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(26, 29, 35, 0.95);
}

.lang-icon {
    width: 20px;
    height: 20px;
}

/* Language Dropdown */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 150px;
    background: rgba(26, 29, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.lang-dropdown.show,
.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.15s ease;
}

.lang-option:hover {
    color: #ffffff;
    background: rgba(var(--branduals-orange-rgb), 0.1);
}

.lang-option.active {
    color: var(--branduals-orange);
    background: rgba(var(--branduals-orange-rgb), 0.1);
}

/* ========================================================================== */
/* LOGO OUTSIDE CARD */
/* ========================================================================== */

.auth-logo-outside {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.auth-logo-outside .branduals-logo {
    font-family: 'Ladislav', sans-serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--branduals-orange);
    letter-spacing: 0.05em;
    margin: 0;
}

.auth-logo-outside .logo-image {
    height: 36px;
    width: auto;
}

/* Adjust auth-container to account for logo outside */
.auth-container-with-logo {
    padding-top: 5rem;
}

/* ========================================================================== */
/* AUTH HEADER */
/* ========================================================================== */

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.02em;
}

.auth-header .subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin: 0;
    line-height: 1.5;
}

/* ========================================================================== */
/* SSO SECTION */
/* ========================================================================== */

.sso-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* ========================================================================== */
/* ALERTS */
/* ========================================================================== */

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #ff5252;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #69f0ae;
}

.alert-info {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.3);
    color: #40c4ff;
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ========================================================================== */
/* LINKS */
/* ========================================================================== */

.link {
    color: var(--branduals-orange);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.link:hover {
    color: var(--branduals-orange-light);
    text-decoration: underline;
}

.link-button {
    background: none;
    border: none;
    color: var(--branduals-orange);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-size: inherit;
}

.link-button:hover:not(:disabled) {
    color: var(--branduals-orange-light);
    text-decoration: underline;
}

.link-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.text-center {
    text-align: center;
}

/* ========================================================================== */
/* PLAIN BUTTONS (SSO & Primary) */
/* ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 14px 24px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-full {
    margin-top: 1rem;
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--branduals-orange) 0%, var(--branduals-orange-light) 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(var(--branduals-orange-rgb), 0.15);
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--branduals-orange-light) 0%, var(--branduals-orange-lighter) 100%);
    box-shadow: 0 3px 10px rgba(var(--branduals-orange-rgb), 0.2);
    filter: brightness(1.05);
}

.btn-primary:active:not(:disabled) {
    filter: brightness(0.95);
}

/* SSO Buttons (Outlined with better visual weight) */
.btn-sso {
    background: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .btn-sso {
    background: rgba(0, 0, 0, 0.02);
    color: rgba(0, 0, 0, 0.85);
    border: 1.5px solid rgba(0, 0, 0, 0.15);
}

.btn-sso i {
    font-size: 1.25rem;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-sso:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.05);
    opacity: 0.9;
}

[data-theme="light"] .btn-sso:hover:not(:disabled) {
    border-color: rgba(0, 0, 0, 0.25);
    background: rgba(0, 0, 0, 0.05);
}

.btn-sso-google {
    border-color: rgba(66, 133, 244, 0.3);
}

.btn-sso-google:hover:not(:disabled) {
    border-color: rgba(66, 133, 244, 0.5);
    background: rgba(66, 133, 244, 0.08);
}

.btn-sso-google i {
    color: #4285f4;
}

.btn-sso-linkedin {
    border-color: rgba(0, 119, 181, 0.3);
}

.btn-sso-linkedin:hover:not(:disabled) {
    border-color: rgba(0, 119, 181, 0.5);
    background: rgba(0, 119, 181, 0.08);
}

.btn-sso-linkedin i {
    color: #0077B5;
}

.btn-sso-microsoft {
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .btn-sso-microsoft {
    border-color: rgba(0, 0, 0, 0.2);
}

.btn-sso-microsoft:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .btn-sso-microsoft:hover:not(:disabled) {
    border-color: rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.05);
}

.btn-sso-microsoft i {
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .btn-sso-microsoft i {
    color: rgba(0, 0, 0, 0.7);
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ========================================================================== */
/* RESEND CODE LINK */
/* ========================================================================== */

.resend-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.resend-link button {
    background: none;
    border: none;
    color: var(--branduals-orange);
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 0.2s ease;
}

.resend-link button:hover:not(:disabled) {
    color: var(--branduals-orange-light);
    text-decoration: underline;
}

.resend-link button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================================================== */
/* UTILITY CLASSES FOR INLINE STYLE REPLACEMENTS */
/* ========================================================================== */

/* Email highlight - for displaying email addresses in messages */
.email-highlight {
    color: var(--branduals-orange);
    font-weight: 600;
}

/* Info message text - used for success/informational messages */
.info-message {
    margin: 1.5rem 0;
    color: var(--text-secondary);
}

/* Countdown text - for resend timers */
.countdown-text {
    color: var(--text-secondary);
}

/* Chevron icon in dropdowns */
.chevron-down {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Text sizing utilities */
.text-small {
    font-size: 0.875rem;
}

.text-muted {
    color: var(--text-tertiary);
}

/* Field hint text - small helper text below inputs */
.field-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 0.375rem;
}

/* Optional section */
.optional-section {
    margin: 1.5rem 0 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--input-border);
}

[data-theme="light"] .optional-section {
    border-color: rgba(0, 0, 0, 0.12);
}

.optional-section .subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.5;
    margin: 0 0 1.25rem 0;
    text-align: center;
}

/* ========================================================================== */
/* RESPONSIVE ADJUSTMENTS */
/* ========================================================================== */

@media (max-width: 640px) {
    .language-switcher {
        top: 1rem;
        left: 1rem;
    }

    .auth-logo-outside {
        top: 1rem;
    }

    .auth-logo-outside .branduals-logo {
        font-size: 1.5rem;
    }

    .auth-container-with-logo {
        padding-top: 4rem;
    }
}
