/* File: assets/css/auth.css */
:root {
    --color-primary: #2A4D7A;
    --color-secondary: #e53e3e;
    --color-accent: #e53e3e;
    --color-light: #f7fafc;
    --color-dark: #2A4D7A;
    --color-gray: #718096;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.auth-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px;
}

.back-home {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.back-home a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.back-home a:hover {
    background: var(--color-dark);
    transform: translateY(-2px);
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    min-height: 600px;
    transition: var(--transition);
}

/* Form Section */
.form-section {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h1 {
    color: var(--color-primary);
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.form-header p {
    color: var(--color-gray);
    font-size: 1.1rem;
}

.form-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--color-light);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(42, 77, 122, 0.1);
}

.form-control.error {
    border-color: var(--color-secondary);
}

.error-message {
    color: var(--color-secondary);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 42px;
    background: none;
    border: none;
    color: var(--color-gray);
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--color-primary);
}

/* Info Section */
.info-section {
    flex: 1;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%);
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.info-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.1;
}

.info-content {
    position: relative;
    z-index: 1;
    max-width: 400px;
}

.info-content h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.info-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: var(--color-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 77, 122, 0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.btn-accent {
    background: var(--color-accent);
    color: white;
}

.btn-accent:hover {
    background: #c53030;
    transform: translateY(-2px);
}

/* Links */
.form-links {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 0.9rem;
}

.form-links a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

.form-links a:hover {
    color: var(--color-dark);
    text-decoration: underline;
}

/* Session Timer */
.session-timer {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--color-primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-weight: 600;
    box-shadow: var(--shadow);
    z-index: 1000;
    display: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .auth-card {
        flex-direction: column;
        min-height: auto;
    }
    
    .form-section,
    .info-section {
        padding: 30px;
    }
    
    .info-section {
        order: -1;
        min-height: 200px;
    }
    
    .info-content h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .auth-container {
        margin: 10px;
    }
    
    .form-section,
    .info-section {
        padding: 20px;
    }
    
    .form-header h1 {
        font-size: 2rem;
    }
    
    .form-links {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-card {
    animation: fadeIn 0.5s ease;
}

/* File Upload */
.file-upload {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: var(--color-light);
    border: 2px dashed #cbd5e0;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-label:hover {
    border-color: var(--color-primary);
    background: #edf2f7;
}

.file-name {
    margin-top: 5px;
    font-size: 0.9rem;
    color: var(--color-gray);
}

/* Select Styling */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%232A4D7A' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Checkbox Styling */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.checkbox-group label {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Success/Error Messages */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: none;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0;
}

.progress {
    height: 100%;
    background: var(--color-primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* Password Strength */
.password-strength {
    margin-top: 5px;
    font-size: 0.85rem;
}

.strength-meter {
    display: flex;
    gap: 3px;
    margin-top: 5px;
}

.strength-segment {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
}

.strength-segment.active {
    background: var(--color-primary);
}

.strength-segment.strong {
    background: #38a169;
}

/* Code Input */
.code-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    background: var(--color-light);
    transition: var(--transition);
}

.code-input:focus {
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 77, 122, 0.1);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Countdown Timer */
.countdown-timer {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-primary);
    background: var(--color-light);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    display: inline-block;
    margin: 10px 0;
}