/* ============================================
   AUTH.CSS - Shared Authentication Styles
   Dark Theme Only (Default)
   For login.php and register.php
   ============================================ */

/* Reset e variabili di base - DARK THEME */
:root {
    --primary-color: #004C97;
    --secondary-color: #1A75FF;
    --accent-color: #FFD700;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --text-color: #f1f5f9;
    --text-light: #cbd5e1;
    --grid-color: rgba(0, 76, 151, 0.1);
    --glass-bg: rgba(30, 41, 59, 0.9);
    --glass-border: rgba(75, 85, 99, 0.3);
    --transition-theme: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: var(--transition-theme);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    overflow-x: hidden;
    color: var(--text-color);
    line-height: 1.6;
}

/* Enhanced Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(rgba(0, 76, 151, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 76, 151, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

/* Floating Tech Elements */
.tech-bg {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

/* Water Flow Animation */
.water-flow {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--primary-color) 20%,
        var(--secondary-color) 40%,
        transparent 60%);
    animation: flow 8s linear infinite;
}

.water-flow:nth-child(1) {
    animation-delay: 0s;
    left: -50%;
}

.water-flow:nth-child(2) {
    animation-delay: 2s;
    left: -25%;
}

.water-flow:nth-child(3) {
    animation-delay: 4s;
    left: 0%;
}

.water-flow:nth-child(4) {
    animation-delay: 6s;
    left: 25%;
}

@keyframes flow {
    0% {
        transform: translateY(-100%) rotate(0deg);
    }
    100% {
        transform: translateY(100%) rotate(5deg);
    }
}

/* Valve Icons Background */
.valve-pattern {
    position: absolute;
    width: 60px;
    height: 60px;
    color: var(--secondary-color);
    opacity: 0.15;
    animation: float-horizontal 30s infinite linear;
}

.valve-pattern i {
    font-size: 3.75rem;
}

.valve-pattern:nth-child(5) {
    top: 10%;
    left: -100px;
    animation-delay: 0s;
}

.valve-pattern:nth-child(6) {
    top: 35%;
    left: -100px;
    animation-delay: 7.5s;
}

.valve-pattern:nth-child(7) {
    top: 60%;
    left: -100px;
    animation-delay: 15s;
}

.valve-pattern:nth-child(8) {
    top: 85%;
    left: -100px;
    animation-delay: 22.5s;
}

@keyframes float-horizontal {
    0% {
        transform: translateX(0) rotate(0deg);
    }
    100% {
        transform: translateX(calc(100vw + 200px)) rotate(360deg);
    }
}

/* Modern Navbar */
.navbar {
    background: rgba(0, 76, 151, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.2rem 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.8rem 0;
    background: rgba(0, 76, 151, 0.98) !important;
}

.navbar-brand img {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 0.3rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.navbar-nav .nav-link:hover::before {
    left: 100%;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Glass Cards */
.login-card,
.registration-card {
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(75, 85, 99, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
    margin: 2rem auto;
    animation: slideUp 0.6s ease-out;
    width: 100%;
    max-width: 550px;
}

.registration-card {
    max-width: 900px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2.5rem 2rem !important;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.card-header h1 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.card-header .logo-container {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin-bottom: 1rem;
}

.card-body {
    padding: 2rem !important;
    box-sizing: border-box;
    overflow: hidden;
}

/* Account Type Selector (Register Only) */
.account-type-selector {
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #374151, #4b5563);
    border-radius: 16px;
    border: 2px solid rgba(96, 165, 250, 0.3);
    position: relative;
    overflow: hidden;
}

.selector-title {
    color: #93c5fd;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.toggle-container {
    position: relative;
    z-index: 1;
}

.toggle-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
}

.toggle-option {
    flex: 1;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(55, 65, 81, 0.8);
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    color: #f9fafb;
}

.toggle-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 76, 151, 0.1), transparent);
    transition: left 0.6s ease;
}

.toggle-option.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 76, 151, 0.3);
}

.toggle-option.active::before {
    left: 100%;
}

.toggle-option:not(.active):hover {
    background: rgba(75, 85, 99, 1);
    border-color: rgba(96, 165, 250, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 76, 151, 0.1);
}

.toggle-option:not(.active):hover::before {
    left: 100%;
}

.option-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.toggle-option:not(.active) .option-icon {
    background: #60a5fa;
    color: white;
}

.option-text h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.option-text p {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0;
    transition: color 0.3s ease;
}

.toggle-option:not(.active) .option-text h4 {
    color: #f9fafb;
}

.toggle-option:not(.active) .option-text p {
    color: #d1d5db;
}

/* Switch centrale */
.toggle-switch {
    position: relative;
    z-index: 10;
}

.toggle-input {
    display: none;
}

.toggle-label {
    display: block;
    width: 80px;
    height: 40px;
    background: rgba(75, 85, 99, 0.5);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid rgba(107, 114, 128, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-slider::before {
    content: '🏢';
    font-size: 0.8rem;
    transition: all 0.4s ease;
}

.toggle-input:checked + .toggle-label {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
}

.toggle-input:checked + .toggle-label .toggle-slider {
    transform: translateX(40px);
}

.toggle-input:checked + .toggle-label .toggle-slider::before {
    content: '👤';
}

.toggle-label:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Company Fields Logic */
.company-fields {
    opacity: 1 !important;
    max-height: 1000px !important;
    overflow: hidden !important;
    transition: all 0.5s ease !important;
    display: block !important;
}

.private-mode .company-fields {
    opacity: 0 !important;
    max-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Input Group Styles */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.input-group label i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
    width: 16px;
    text-align: center;
}

/* Form Controls */
.form-control,
.form-select {
    width: 100% !important;
    max-width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #e5e7eb;
    background-color: #374151;
    background-clip: padding-box;
    border: 2px solid #4b5563;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
}

.form-control:focus,
.form-select:focus {
    color: #e5e7eb;
    background-color: #374151;
    border-color: var(--secondary-color);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(26, 117, 255, 0.25), 0 4px 6px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #9ca3af;
    opacity: 1;
    font-weight: 400;
}

.form-label {
    font-weight: 500;
    color: #e5e7eb;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.form-text {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Container unificato per input con icone */
.input-container {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.input-container .form-control {
    padding-right: 3.5rem !important;
    width: 100% !important;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* Icona per il campo email */
.input-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    padding: 0.5rem;
    border-radius: 8px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    pointer-events: none;
}

/* Password Container */
.password-container {
    position: relative;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.password-container .form-control {
    padding-right: 3.5rem !important;
    width: 100% !important;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
}

.password-toggle:hover {
    color: var(--secondary-color);
    background-color: rgba(26, 117, 255, 0.1);
    transform: translateY(-50%) scale(1.05);
}

.password-toggle:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.password-toggle i {
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

/* Profile Image Upload */
.image-upload-container {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #374151, #4b5563);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.profile-image-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    display: block;
    border: 4px solid var(--primary-color);
    padding: 4px;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.profile-image-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.form-control[type="file"] {
    padding: 0.5rem;
    background: #374151;
    color: white;
}

/* Checkbox Styles */
.form-check {
    margin-bottom: 1rem !important;
    padding: 0.75rem !important;
    background: #374151 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    padding-left: 0.75rem !important;
}

.form-check:hover {
    background: #4b5563 !important;
}

.form-check-input {
    width: 1.25rem !important;
    height: 1.25rem !important;
    margin-top: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    border: 2px solid #6b7280 !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    position: relative !important;
    background: #4b5563 !important;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(0, 76, 151, 0.3) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
}

.form-check-input:focus {
    border-color: var(--secondary-color);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(26, 117, 255, 0.25);
}

.form-check-label {
    margin-bottom: 0 !important;
    cursor: pointer !important;
    user-select: none !important;
    line-height: 1.25 !important;
    padding-left: 0 !important;
    color: #e5e7eb !important;
}

.form-check-label i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.form-check-label a {
    color: var(--secondary-color) !important;
    text-decoration: none;
}

.form-check-label a:hover {
    color: var(--accent-color) !important;
}

/* Modern Button */
.tech-button {
    position: relative;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 76, 151, 0.3);
    cursor: pointer;
}

.tech-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.tech-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 76, 151, 0.4);
    color: white;
}

.tech-button:hover::before {
    left: 100%;
}

.tech-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 76, 151, 0.3);
}

.tech-button:focus {
    outline: 3px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

/* Auth Links */
.auth-links {
    text-align: center;
    padding: 1.5rem;
    color: #e5e7eb;
}

.auth-links a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.auth-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.auth-links a:hover {
    color: var(--accent-color);
}

.auth-links a:hover::after {
    width: 100%;
}

/* Alert Styling */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease-out;
    font-weight: 500;
}

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

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
}

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

.alert ul {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

/* Card Footer */
.card-footer {
    background: #374151;
    border-top: 1px solid #4b5563;
    padding: 1.5rem !important;
    text-align: center;
    color: #e5e7eb;
}

.card-footer a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.card-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.card-footer a:hover {
    color: var(--accent-color);
}

.card-footer a:hover::after {
    width: 100%;
}

/* Footer */
footer {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    margin-top: auto;
    color: #e2e8f0;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
}

footer h3 {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

footer a {
    transition: all 0.3s ease;
    color: var(--secondary-color);
    text-decoration: none;
}

footer a:hover {
    transform: translateX(5px);
    color: var(--accent-color);
}

footer .footer-links a {
    margin: 0 1rem;
    font-weight: 500;
}

footer .footer-links a:hover {
    transform: translateY(-2px);
}

footer .text-muted {
    color: #cbd5e1 !important;
}

footer .btn-outline-primary {
    border-color: #3b82f6;
    color: #3b82f6;
}

footer .btn-outline-primary:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Accessibility */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0.5rem 1rem !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
    background: var(--primary-color) !important;
    color: white !important;
    text-decoration: none !important;
    z-index: 10000 !important;
}

.nav-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-nav {
        margin-top: 1rem;
        background: rgba(31, 41, 55, 0.95);
        padding: 1rem;
        border-radius: 15px;
        border: 1px solid rgba(75, 85, 99, 0.3);
    }

    .navbar-nav .nav-link {
        color: #e5e7eb !important;
    }

    .navbar-nav .nav-link:hover {
        background: rgba(59, 130, 246, 0.1);
        color: var(--secondary-color) !important;
    }

    .login-card,
    .registration-card {
        margin: 1rem;
    }

    .card-header {
        padding: 2rem 1rem !important;
    }

    .card-body {
        padding: 2rem !important;
    }

    .form-control,
    .password-container .form-control,
    .input-container .form-control {
        padding: 0.875rem 1rem;
        padding-right: 3rem !important;
    }

    .input-icon,
    .password-toggle {
        right: 0.75rem;
        width: 2.25rem;
        height: 2.25rem;
    }

    .toggle-options {
        flex-direction: column;
        gap: 1rem;
    }

    .toggle-switch {
        order: -1;
        align-self: center;
    }

    .toggle-option {
        width: 100%;
    }

    .account-type-selector {
        padding: 1.5rem;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --text-color: #ffffff;
    }

    .form-control,
    .tech-button {
        border-width: 3px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
