/**
 * UNIFYTECH - Auth Pages (Login, Registro, Recuperar)
 * Estilo corporativo que coincide con admin e index
 */

/* Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f8fafc;
    color: #1b1b1b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }

/* Page Layout */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 2rem;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

/* Logo */
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo img {
    height: 80px;
}

/* Card */
.auth-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Header */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1b1b1b;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.auth-subtitle {
    color: #6b6b6b;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Form */
.auth-form .form-group {
    margin-bottom: 1.25rem;
}

.auth-form .form-label {
    display: block;
    color: #1b1b1b;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.auth-form .form-input,
.auth-form .form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #1b1b1b;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: auto;
}

.auth-form .form-input:focus,
.auth-form .form-select:focus {
    outline: none;
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-form .form-input::placeholder {
    color: #a0a0a0;
}

.auth-form .form-select option {
    background: #ffffff;
    color: #1b1b1b;
}

/* Form Options (remember + forgot) */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b6b6b;
    cursor: pointer;
}

.remember-me input {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
}

.forgot-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Button */
.auth-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #2563eb;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.auth-btn svg {
    width: 20px;
    height: 20px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #999;
    font-size: 0.875rem;
}

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

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #6b6b6b;
    font-size: 0.95rem;
}

.auth-footer a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

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

/* Alerts */
.auth-alert {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

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

.auth-alert.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

/* Back link */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b6b6b;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.auth-back:hover {
    color: #1b1b1b;
}

.auth-back svg {
    width: 18px;
    height: 18px;
}

/* Form row (2 columns) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #6b6b6b;
    line-height: 1.5;
}

.form-checkbox input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #2563eb;
    flex-shrink: 0;
    cursor: pointer;
}

.form-checkbox a {
    color: #2563eb;
    text-decoration: none;
}

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

/* Optional label */
.optional {
    color: #999;
    font-weight: 400;
}

/* Info section (expandable) */
.info-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.info-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2563eb;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    margin-bottom: 1rem;
    background: none;
    border: none;
    padding: 0;
}

.info-toggle svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.info-toggle.open svg {
    transform: rotate(90deg);
}

.info-fields {
    display: none;
}

.info-fields.show {
    display: block;
}

/* Responsive */
@media (max-width: 640px) {
    .auth-page {
        padding: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
}
