/* Professional Auth Pages - Full Screen Layout */

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font consistency with home page */
:root {
    --font-family-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family-serif: 'Playfair Display', Georgia, serif;
}

html, body {
    height: 100%;
    overflow: hidden;
}

/* Main container - Full viewport */
.auth-page {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    font-family: var(--font-family-sans);
}

/* Top Header Bar with Logo - Reduced height */
.auth-header-bar {
    width: 100%;
    height: 55px;
    background: #002c4e; /* Same as main site header */
    border-bottom: 1px solid #002035;
    display: flex;
    align-items: center;
    padding: 0 40px;
    box-shadow: 0 4px 6px rgba(0, 44, 78, 0.15);
    position: relative;
    z-index: 10;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo img {
    height: 40px;
    width: auto;
    /* Removed filter to show original logo colors */
}

.header-logo h1 {
    display: none;
}

.header-back {
    margin-left: auto;
}

.header-back a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 13px;
    font-family: var(--font-family-sans);
}

.header-back a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Main Content Area - Adjusted for smaller header */
.auth-main {
    flex: 1;
    display: flex;
    width: 100%;
    height: calc(100vh - 55px);
    overflow: hidden;
}

/* Left Panel - Form Area (60%) */
.auth-form-section {
    width: 60%;
    background: #ffffff; /* White background */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

/* Reduced padding for more content space */
.form-container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 30px 40px; /* Reduced side padding */
    background: transparent; /* Remove white box */
}

/* Form Title - Smaller size */
.form-header {
    margin-bottom: 20px;
}

.form-title {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    line-height: 1.2;
    font-family: var(--font-family-sans);
}

.form-subtitle {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
    font-family: var(--font-family-sans);
}

/* Social Login Section - Smaller buttons */
.social-section {
    margin-bottom: 16px;
}

.social-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    font-family: var(--font-family-sans);
}

.social-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.social-btn i {
    font-size: 14px;
}

.social-btn span {
    display: none;
}

@media (min-width: 480px) {
    .social-btn {
        padding: 9px 12px;
    }
    .social-btn span {
        display: inline;
        font-size: 12px;
    }
}

.social-btn.google i { color: #4285f4; }
.social-btn.facebook i { color: #1877f2; }
.social-btn.linkedin i { color: #0077b5; }
.social-btn.apple i { color: #000; }

/* Divider - Reduced margin */
.form-divider {
    display: flex;
    align-items: center;
    margin: 16px 0;
    gap: 12px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.form-divider span {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    font-family: var(--font-family-sans);
}

/* Form Styles - Reduced spacing */
.auth-form {
    width: 100%;
}

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

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 5px;
    font-family: var(--font-family-sans);
}

.form-label .required {
    color: #ef4444;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb; /* Lighter border */
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    background: #f9fafb; /* Light gray background */
    font-family: var(--font-family-sans);
    -webkit-appearance: none; /* Remove default styling */
    -moz-appearance: none;
    appearance: none;
}

/* Custom arrow for select */
.form-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

/* Password input wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    z-index: 1;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: #374151;
}

.form-textarea {
    min-height: 70px;
    resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #60a5fa; /* Light blue border */
    background: #eff6ff; /* Very light blue background */
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.form-input::placeholder,
.form-select::placeholder,
.form-textarea::placeholder {
    color: #9ca3af;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: #cbd5e1;
    background: #ffffff;
}

.form-input.error,
.form-select.error {
    border-color: #ef4444;
}

.form-error {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
    display: none;
    font-family: var(--font-family-sans);
}

.form-error.show {
    display: block;
}

/* Two column layout for some fields */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Checkbox - Smaller spacing */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 14px 0;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #003b5a;
}

.form-checkbox label {
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    line-height: 1.4;
    font-family: var(--font-family-sans);
}

.form-checkbox a {
    color: #003b5a;
    text-decoration: none;
    font-weight: 500;
}

.form-checkbox a:hover {
    text-decoration: underline;
}

/* Form Actions - Smaller buttons */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-family-sans);
}

.btn-primary {
    background: #003b5a;
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: #0076c7;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 59, 90, 0.2);
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    min-width: 100px;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

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

/* Right Panel - Progress Info (40%) - Reduced padding */
.auth-progress-section {
    width: 40%;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    flex-direction: column;
    padding: 35px 40px;
    border-left: 1px solid #e5e7eb;
    overflow-y: auto;
}

/* Right Panel - Info Section (40%) - Para registro-docente */
.auth-info-section {
    width: 40%;
    background: linear-gradient(135deg, #003b5a 0%, #0076c7 100%);
    display: flex;
    flex-direction: column;
    padding: 40px;
    overflow-y: hidden; /* Prevent scrollbar */
    color: white;
}

.info-container {
    max-width: 400px;
    width: 100%;
    margin: 0 auto; /* Center the container */
}

.info-container h3 {
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
    font-family: var(--font-family-sans);
    text-align: center;
}

.benefit-list {
    margin-bottom: 25px;
}

.benefit-item {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    align-items: flex-start;
}

.benefit-item i {
    font-size: 18px;
    color: #60a5fa;
    margin-top: 2px;
    flex-shrink: 0;
}

.benefit-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 3px;
    font-family: var(--font-family-sans);
}

.benefit-item p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
    font-family: var(--font-family-sans);
}

.testimonial {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border-left: 3px solid #60a5fa;
}

.testimonial blockquote {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin-bottom: 8px;
    font-style: italic;
    font-family: var(--font-family-sans);
}

.testimonial cite {
    font-size: 12px;
    color: #60a5fa;
    font-style: normal;
    font-weight: 500;
    font-family: var(--font-family-sans);
}

/* Progress Indicator - Para registro-docente (en zona derecha) */
.auth-info-section .progress-indicator {
    display: flex;
    flex-direction: row; /* Horizontal layout */
    justify-content: space-between; /* Even distribution */
    align-items: flex-start; /* Align to top for consistent vertical position */
    margin-bottom: 30px;
    padding: 20px 0;
    background: transparent; /* Remove background frame */
    position: relative;
    width: 100%;
}

.auth-info-section .progress-indicator .progress-step {
    display: flex;
    flex-direction: column; /* Stack number and label vertically */
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
    flex: 1; /* Allow even distribution */
}

/* Horizontal connecting lines between circles */
.auth-info-section .progress-indicator .progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px; /* Center of circle */
    left: calc(50% + 22px); /* Start from right edge of circle (center + radius) */
    width: calc(100% - 44px); /* Full width minus the circle diameter */
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

/* Style active and completed lines */
.auth-info-section .progress-indicator .progress-step.active:not(:last-child)::after {
    background: rgba(255, 255, 255, 0.6);
}

.auth-info-section .progress-indicator .progress-step.completed:not(:last-child)::after {
    background: white;
}

/* Completed step number style */
.auth-info-section .progress-indicator .progress-step.completed .step-number {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

/* Force remove any vertical lines */
.auth-info-section .progress-indicator .progress-step::before,
.auth-info-section .progress-indicator .progress-step.active::before,
.auth-info-section .progress-indicator .progress-step.completed::before {
    display: none !important;
    content: none !important;
}

.auth-info-section .progress-indicator .step-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.auth-info-section .progress-indicator .progress-step.active .step-number {
    background: white;
    border-color: white;
    color: #003b5a;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.25);
    font-weight: 700;
}

.progress-indicator .progress-step.completed .step-number {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.auth-info-section .progress-indicator .step-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-align: center;
    white-space: normal; /* Allow wrapping */
    width: 100%; /* Full width of container */
    line-height: 1.3;
    min-height: 32px; /* Consistent height for alignment */
}

.auth-info-section .progress-indicator .progress-step.active .step-label {
    color: white;
    font-weight: 600;
}

.progress-indicator .progress-step.completed .step-label {
    color: #22c55e;
}

/* Progress Steps - Smaller spacing */
.progress-container {
    max-width: 400px;
    width: 100%;
}

.progress-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 20px;
    font-family: var(--font-family-sans);
}

.progress-steps {
    margin-bottom: 25px;
}

.progress-step {
    display: flex;
    align-items: flex-start;
    position: relative;
    margin-bottom: 20px;
}

.progress-step:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 36px;
    width: 2px;
    height: calc(100% - 8px);
    background: #d1d5db;
}

.progress-step.completed:not(:last-child)::before {
    background: #22c55e;
}

.step-indicator {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #9ca3af;
    flex-shrink: 0;
    margin-right: 14px;
    position: relative;
    z-index: 1;
}

.progress-step.active .step-indicator {
    background: #003b5a;
    border-color: #003b5a;
    color: white;
    box-shadow: 0 0 0 3px rgba(0, 59, 90, 0.1);
}

.progress-step.completed .step-indicator {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.progress-step.completed .step-indicator::after {
    content: '✓';
    position: absolute;
    font-size: 18px;
}

.progress-step.completed .step-indicator span {
    display: none;
}

.step-content {
    flex: 1;
    padding-top: 6px;
}

.step-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    font-family: var(--font-family-sans);
}

.progress-step.active .step-title {
    color: #003b5a;
}

.progress-step.completed .step-title {
    color: #22c55e;
}

.step-description {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
    font-family: var(--font-family-sans);
}

/* Current Step Info Box - Smaller */
.step-info-box {
    background: white;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.info-box-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 10px;
    font-family: var(--font-family-sans);
}

.info-box-content {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    font-family: var(--font-family-sans);
}

.info-box-content ul {
    margin-top: 10px;
    margin-left: 18px;
}

.info-box-content li {
    margin-bottom: 6px;
}

/* Terms and Help Links - Smaller */
.progress-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #d1d5db;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
    padding: 6px 8px;
    border-radius: 6px;
    font-family: var(--font-family-sans);
}

.footer-link:hover {
    color: #003b5a;
    background: rgba(0, 59, 90, 0.05);
}

.footer-link i {
    font-size: 14px;
    width: 18px;
}

/* Login Link and Auth Footer - Smaller */
.login-link,
.auth-footer {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    color: #374151; /* Darker color for better visibility */
    font-family: var(--font-family-sans);
}

.login-link a,
.auth-footer a {
    color: #003b5a;
    text-decoration: none;
    font-weight: 500;
}

.login-link a:hover,
.auth-footer a:hover {
    text-decoration: underline;
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin-left: -9px;
    margin-top: -9px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

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

/* Alert Messages - Smaller */
.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-family-sans);
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-info strong {
    display: block;
    margin-bottom: 2px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-form-section {
        width: 55%;
    }
    
    .auth-progress-section {
        width: 45%;
        padding: 30px 25px;
    }
    
    .form-container {
        padding: 25px 40px;
    }
}

@media (max-width: 768px) {
    .auth-main {
        flex-direction: column;
    }
    
    .auth-form-section {
        width: 100%;
        order: 2;
    }
    
    .auth-progress-section {
        width: 100%;
        order: 1;
        padding: 20px;
        min-height: auto;
        border-left: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    /* Hide the info section on mobile for registration */
    .auth-info-section {
        display: none !important;
    }
    
    /* Make form take full width when info section is hidden */
    .auth-form-section {
        width: 100% !important;
    }
    
    .form-container {
        padding: 20px 15px;
        max-width: 100%;
    }
    
    .progress-container {
        max-width: 100%;
    }
    
    .progress-steps {
        display: flex;
        justify-content: space-between;
        margin-bottom: 15px;
    }
    
    .progress-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 0;
    }
    
    .progress-step:not(:last-child)::before {
        display: none;
    }
    
    .step-indicator {
        margin-right: 0;
        margin-bottom: 6px;
    }
    
    .step-content {
        padding-top: 0;
    }
    
    .step-description {
        display: none;
    }
    
    .step-info-box {
        display: none;
    }
    
    .progress-footer {
        display: none;
    }
    
    .social-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .auth-header-bar {
        padding: 0 15px;
        height: 50px;
    }
    
    .header-logo img {
        height: 28px;
    }
    
    .form-title {
        font-size: 22px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .social-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auth-page {
        background: #1f2937;
    }
    
    .auth-form-section {
        background: #111827;
    }
    
    .form-title {
        color: #f3f4f6;
    }
    
    .form-subtitle {
        color: #9ca3af;
    }
    
    .form-label {
        color: #d1d5db;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        background: #1f2937;
        border-color: #374151;
        color: #f3f4f6;
    }
    
    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
        border-color: #0076c7;
        background: #374151;
    }
    
    .social-btn {
        background: #1f2937;
        border-color: #374151;
        color: #d1d5db;
    }
    
    .auth-progress-section {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        border-left-color: #374151;
    }
    
    .step-info-box {
        background: #1f2937;
    }
    
    .info-box-title {
        color: #f3f4f6;
    }
    
    .progress-title {
        color: #f3f4f6;
    }
}