/* ===== CSS VARIABLES ===== */
:root {
    --primary-color: #00548f;
    --primary-dark: #003f6b;
    --primary-light: #e3f2fd;
    --gradient-start: #6a4c93;
    --gradient-middle: #8b5fbf;
    --gradient-end: #a855f7;
    --white-color: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Border Radius */
    --border-radius: 0.5rem;
    --border-radius-sm: 0.25rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-700);
}

.auth-body {
    height: 100vh;
    overflow: hidden;
}

/* ===== MAIN CONTAINER ===== */
.auth-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ===== LEFT SIDE - FORM SECTION ===== */
.auth-form-section {
    flex: 1;
    background: var(--white-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 400px;
    z-index: 2;
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
    gap: 1rem;
}

.logo-image {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.auth-content {
    width: 100%;
}

/* ===== RIGHT SIDE - GRADIENT SECTION ===== */
.auth-gradient-section {
    flex: 1;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-middle) 50%, var(--gradient-end) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gradient-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white-color);
    padding: 2rem;
    max-width: 500px;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.gradient-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.gradient-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 1s ease-out 0.2s both;
}

/* ===== DECORATIVE ELEMENTS ===== */
.gradient-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 15%;
    animation-delay: 2s;
}

.circle-3 {
    width: 100px;
    height: 100px;
    top: 60%;
    right: 30%;
    animation-delay: 4s;
}

.decoration-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.line {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    transform-origin: center;
}

.line-1 {
    width: 2px;
    height: 300px;
    top: 20%;
    left: 20%;
    transform: rotate(15deg);
    animation: pulse 4s ease-in-out infinite;
}

.line-2 {
    width: 2px;
    height: 200px;
    bottom: 30%;
    right: 25%;
    transform: rotate(-30deg);
    animation: pulse 4s ease-in-out infinite 1s;
}

.line-3 {
    width: 2px;
    height: 150px;
    top: 50%;
    left: 60%;
    transform: rotate(45deg);
    animation: pulse 4s ease-in-out infinite 2s;
}

/* ===== FORM STYLES ===== */
.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    text-align: center;
}

.auth-subtitle {
    color: var(--gray-600);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: var(--transition-fast);
    background: var(--white-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 84, 143, 0.25);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-invalid:focus {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--danger-color);
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    border: 2px solid var(--gray-400);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    min-height: 48px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white-color);
    width: 100%;
    margin-bottom: 1rem;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #002a4a 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
    border-color: var(--gray-400);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--gray-500);
    font-size: 0.9rem;
}

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

.auth-divider::before {
    margin-right: 1rem;
}

.auth-divider::after {
    margin-left: 1rem;
}

/* ===== ALERT STYLES ===== */
.alert {
    padding: 0.875rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: rgba(40, 167, 69, 0.2);
    color: #155724;
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.2);
    color: #721c24;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    border-color: rgba(23, 162, 184, 0.2);
    color: #0c5460;
}

/* ===== LOADING STATES ===== */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-form-section {
        flex: none;
        height: 60vh;
        padding: 1.5rem;
    }
    
    .auth-gradient-section {
        flex: none;
        height: 40vh;
    }
    
    .gradient-title {
        font-size: 2.5rem;
    }
    
    .gradient-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .auth-form-section {
        height: 70vh;
        padding: 1rem;
    }
    
    .auth-gradient-section {
        height: 30vh;
    }
    
    .auth-form-wrapper {
        max-width: 350px;
    }
    
    .auth-logo {
        margin-bottom: 2rem;
    }
    
    .logo-text {
        font-size: 1.25rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .gradient-title {
        font-size: 2rem;
    }
    
    .gradient-subtitle {
        font-size: 0.9rem;
    }
    
    .decoration-circle {
        display: none;
    }
    
    .line {
        display: none;
    }
}

@media (max-width: 480px) {
    .auth-form-section {
        padding: 0.75rem;
    }
    
    .auth-form-wrapper {
        max-width: 100%;
    }
    
    .form-control {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
    }
    
    .gradient-title {
        font-size: 1.75rem;
    }
    
    .gradient-subtitle {
        font-size: 0.85rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

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

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.w-100 { width: 100%; }

.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }
.text-info { color: var(--info-color); }
.text-muted { color: var(--gray-600); }

/* ===== PASSKEY BUTTON STYLES ===== */
.btn-passkey {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    color: white;
    transition: var(--transition);
    font-size: 1rem;
    letter-spacing: 0.025em;
}

.btn-passkey:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-passkey:focus {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 0.25rem rgba(0, 84, 143, 0.25);
    color: white;
}

.btn-passkey:active {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(0);
    color: white;
}