/* ==========================================
   VARIABLES Y RESET - UNIFICADO CON DASHBOARD
   ========================================== */

:root {
    --primary: #2563eb;
    --primary-light: #dbeafe;
    --primary-dark: #1d4ed8;
    --secondary: #0ea5e9;
    --secondary-light: #cffafe;
    --success: #10b981;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #0ea5e9;
    --info-light: #cffafe;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Sora', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================
   CONTENEDOR PRINCIPAL
   ========================================== */

.login-container {
    min-height: 100vh;
    background: var(--bg-secondary);
    display: flex;
}

.login-container .row {
    width: 100%;
    min-height: 100vh;
}

/* ==========================================
   SECCIÓN DE INFORMACIÓN
   ========================================== */

.info-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 40px 50px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.info-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-bg 8s ease-in-out infinite;
}

.info-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-bg-reverse 10s ease-in-out infinite;
}

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

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

.info-content {
    max-width: 500px;
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    font-size: 70px;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    width: 100px;
    height: 100px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
    color: white;
}

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

.brand-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Description Section */
.description-section {
    text-align: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: -0.3px;
}

.section-text {
    font-size: 15px;
    opacity: 0.9;
    line-height: 1.7;
    font-weight: 300;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.4);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: inline-block;
    opacity: 0.95;
}

.feature-card h5 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 12px;
    opacity: 0.85;
    margin: 0;
    line-height: 1.4;
    font-weight: 300;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ==========================================
   SECCIÓN DE LOGIN
   ========================================== */

.login-section {
    background: var(--bg-secondary);
    padding: 40px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.login-wrapper {
    width: 100%;
    max-width: 520px;
    animation: fadeInUp 0.6s ease-out;
}

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

.login-card {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 45px 45px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}

/* ==========================================
   SECCIÓN DE CARGA DE LOGO
   ========================================== */

.logo-upload-section {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.logo-upload-container {
    width: 100%;
    max-width: 280px;
}

.logo-file-input {
    display: none;
}

.logo-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.logo-preview {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(14, 165, 233, 0.08) 100%);
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.logo-preview:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(14, 165, 233, 0.12) 100%);
    border-color: var(--primary);
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.logo-placeholder i {
    font-size: 36px;
    opacity: 0.6;
}

.logo-placeholder span {
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.logo-upload-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.logo-upload-hint i {
    font-size: 14px;
}

.logo-file-name {
    text-align: center;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 8px;
    word-break: break-word;
    max-height: 40px;
    overflow-y: auto;
}

.logo-upload-label:hover .logo-preview {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(14, 165, 233, 0.12) 100%);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ==========================================
/* ==========================================
   TABS NAVIGATION
   ========================================== */

.form-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    background: var(--bg-tertiary);
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 35px;
}

.form-tabs .nav-link {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: 10px;
    padding: 10px 16px;
    transition: var(--transition);
    font-size: 14px;
}

.form-tabs .nav-link:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.form-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: var(--shadow-md);
}

/* Login Header */
.login-header {
    margin-bottom: 35px;
    text-align: center;
}

.login-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    box-shadow: var(--shadow-md);
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* ==========================================
   FORMULARIO
   ========================================== */

.form-group {
    position: relative;
    margin-bottom: 20px;
}

/* Layout de dos columnas para registro */
.register-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 12px;
}

.register-form .form-group-half {
    margin-bottom: 0;
}

/* Optimización de inputs en formulario de registro */
.register-form .form-control,
.register-form .form-select {
    font-size: 13px;
    padding: 11px 15px;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 10px;
    display: block;
}

.form-control,
.form-select {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-primary);
    font-weight: 500;
    color: var(--text-primary);
    font-family: 'Sora', sans-serif;
    width: 100%;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-tertiary);
    font-weight: 400;
}

/* Password Input Group */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group .form-control {
    flex: 1;
    padding-right: 45px;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    padding: 5px 8px;
    z-index: 10;
}

.btn-toggle-password:hover {
    color: var(--primary);
}

/* Validación */
.invalid-feedback {
    display: none;
    color: var(--danger);
    font-size: 12px;
    margin-top: 5px;
}

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

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ==========================================
   CHECKBOX Y LINKS
   ========================================== */

.remember-check {
    margin-bottom: 25px !important;
}

.register-terms-wrapper {
    margin-bottom: 25px !important;
    margin-top: 20px !important;
}

.register-terms {
    padding: 15px 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(14, 165, 233, 0.06) 100%);
    border-radius: 10px;
    border-left: 4px solid var(--primary);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-left: 4px solid var(--primary);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: var(--transition);
}

.register-terms:hover {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(14, 165, 233, 0.1) 100%);
    border-color: rgba(37, 99, 235, 0.25);
}

.register-terms-feedback {
    display: none;
    color: var(--danger);
    font-size: 12px;
    margin-top: 8px;
    margin-left: 0;
    padding-left: 0;
}

.register-terms.is-invalid {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(239, 68, 68, 0.06) 100%);
    border-color: var(--danger);
}

.register-terms.is-invalid ~ .register-terms-feedback {
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0;
    flex-shrink: 0;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
    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='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
}

.form-check-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
    outline: none;
}

.form-check-label {
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.6;
    flex: 1;
}

.link-forgot-password {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

.link-terms {
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

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

/* ==========================================
   BOTONES
   ========================================== */

.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    padding: 12px 24px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    color: white;
    width: 100%;
    cursor: pointer;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    transition: left 0.4s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-success.btn-submit {
    background: linear-gradient(135deg, var(--success), #059669);
}

/* ==========================================
   DIVIDER
   ========================================== */

.divider {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 25px 0;
}

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

.divider span {
    margin: 0 15px;
}

/* ==========================================
   ALERTAS
   ========================================== */

.alert {
    border: none;
    border-left: 4px solid;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
    font-size: 14px;
    animation: slideInDown 0.4s ease;
}

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

.alert-danger {
    border-left-color: var(--danger);
    background: var(--danger-light);
    color: #7f1d1d;
}

.alert-danger strong {
    font-weight: 700;
    color: #991b1b;
}

.alert-info {
    border-left-color: var(--info);
    background: var(--info-light);
    color: #0c4a6e;
}

.alert-info strong {
    color: #164e63;
    font-weight: 700;
}

.alert .btn-close {
    opacity: 0.7;
    transition: var(--transition);
}

.alert .btn-close:hover {
    opacity: 1;
}

/* ==========================================
   FOOTER
   ========================================== */

.login-footer {
    font-size: 13px;
    margin-bottom: 20px;
    text-align: center;
}

.link-help {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

/* ==========================================
   ANIMACIONES
   ========================================== */

.observe-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.observe-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   MEDIA QUERIES - RESPONSIVE DESIGN
   ========================================== */

/* EXTRA LARGE SCREENS - 1400px+ */
@media (min-width: 1400px) {
    .info-section {
        padding: 80px 60px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
    }

    .info-content {
        max-width: 550px;
        width: 100%;
    }

    .logo-icon {
        width: 120px;
        height: 120px;
        font-size: 80px;
    }

    .brand-title {
        font-size: 48px;
    }

    .section-title {
        font-size: 32px;
    }

    .login-card {
        padding: 60px 50px;
        max-width: 550px;
    }

    .login-header h2 {
        font-size: 32px;
    }

    .form-control,
    .form-select {
        padding: 14px 18px;
        font-size: 15px;
    }

    .form-label {
        font-size: 15px;
    }

    .register-form .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
        margin-bottom: 8px;
    }

    .register-form .form-group-half {
        margin-bottom: 0;
    }

    .register-form .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-bottom: 5px;
    }

    .register-form .form-group-half {
        margin-bottom: 0;
    }
}

/* LARGE SCREENS - 1200px to 1399px */
@media (min-width: 1200px) and (max-width: 1399px) {
    .info-section {
        padding: 70px 55px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
    }

    .logo-icon {
        width: 110px;
        height: 110px;
        font-size: 75px;
    }

    .brand-title {
        font-size: 46px;
    }

    .section-title {
        font-size: 30px;
    }

    .login-card {
        padding: 55px 45px;
    }

    .login-header h2 {
        font-size: 30px;
    }

    .register-form .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-bottom: 8px;
    }

    .register-form .form-group-half {
        margin-bottom: 0;
    }

    .register-form .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        margin-bottom: 5px;
    }

    .register-form .form-group-half {
        margin-bottom: 0;
    }
}

/* DESKTOP - 992px to 1199px */
@media (min-width: 992px) and (max-width: 1199px) {
    .info-section {
        padding: 60px 45px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
    }

    .info-content {
        max-width: 450px;
        width: 100%;
    }

    .logo-icon {
        width: 95px;
        height: 95px;
        font-size: 65px;
    }

    .brand-title {
        font-size: 40px;
    }

    .section-title {
        font-size: 26px;
    }

    .section-text {
        font-size: 14px;
    }

    .feature-card {
        padding: 18px;
    }

    .feature-icon {
        font-size: 28px;
    }

    .feature-card h5 {
        font-size: 14px;
    }

    .feature-card p {
        font-size: 11px;
    }

    .login-card {
        padding: 45px 35px;
    }

    .login-icon {
        width: 75px;
        height: 75px;
        font-size: 38px;
    }

    .login-header h2 {
        font-size: 26px;
    }

    .form-tabs {
        gap: 8px;
    }

    .form-tabs .nav-link {
        padding: 9px 14px;
        font-size: 13px;
    }

    .register-form .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        margin-bottom: 8px;
    }

    .register-form .form-group-half {
        margin-bottom: 0;
    }

    .register-form .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        margin-bottom: 5px;
    }

    .register-form .form-group-half {
        margin-bottom: 0;
    }
}

/* TABLET LANDSCAPE - 768px to 991px */
@media (min-width: 768px) and (max-width: 991px) {
    .login-container {
        min-height: auto;
    }

    .login-container .row {
        min-height: auto;
    }

    .info-section {
        padding: 50px 35px;
        min-height: 500px;
    }

    .info-content {
        max-width: 100%;
    }

    .logo-section {
        margin-bottom: 30px;
    }

    .logo-icon {
        width: 85px;
        height: 85px;
        font-size: 55px;
        margin-bottom: 15px;
    }

    .brand-title {
        font-size: 36px;
        margin-bottom: 8px;
    }

    .brand-subtitle {
        font-size: 14px;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .section-text {
        font-size: 13px;
        line-height: 1.6;
    }

    .description-section {
        margin-bottom: 25px;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 25px;
    }

    .feature-card {
        padding: 16px;
    }

    .feature-icon {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .feature-card h5 {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .feature-card p {
        font-size: 11px;
    }

    .stats-section {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding-top: 25px;
    }

    .stat-number {
        font-size: 24px;
        margin-bottom: 3px;
    }

    .stat-label {
        font-size: 11px;
    }

    .login-section {
        padding: 35px 20px;
        min-height: auto;
    }

    .login-card {
        padding: 40px 35px;
        border-radius: 18px;
    }

    .form-tabs {
        gap: 8px;
        margin-bottom: 30px;
    }

    .form-tabs .nav-link {
        padding: 8px 12px;
        font-size: 12px;
    }

    .login-header {
        margin-bottom: 30px;
    }

    .login-icon {
        width: 70px;
        height: 70px;
        font-size: 35px;
        margin-bottom: 15px;
    }

    .login-header h2 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .login-header p {
        font-size: 13px;
    }

    .form-label {
        font-size: 13px;
    }

    .form-control,
    .form-select {
        padding: 11px 14px;
        font-size: 13px;
    }

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

    .register-form .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 5px;
    }

    .register-form .form-group-half {
        margin-bottom: 0;
    }

    .btn-submit {
        padding: 11px 20px;
        font-size: 14px;
    }

    .remember-check {
        margin-bottom: 20px !important;
    }

    .login-footer {
        font-size: 12px;
    }
}

/* TABLET PORTRAIT - 600px to 767px */
@media (min-width: 600px) and (max-width: 767px) {
    .login-container {
        flex-direction: column;
        min-height: auto;
    }

    .login-container .row {
        min-height: auto;
        flex-direction: column;
    }

    .info-section {
        padding: 40px 25px;
        min-height: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .logo-preview {
        width: 100px;
        height: 100px;
    }

    .logo-placeholder i {
        font-size: 28px;
    }

    .logo-placeholder span {
        font-size: 11px;
    }

    .logo-upload-hint {
        font-size: 12px;
    }

    .register-form .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .register-terms {
        margin-bottom: 18px !important;
        margin-top: 18px !important;
        padding: 13px 14px;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(14, 165, 233, 0.06) 100%);
        border-radius: 8px;
        border: 1px solid rgba(37, 99, 235, 0.15);
        border-left: 4px solid var(--primary);
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }

    .info-section::before {
        width: 300px;
        height: 300px;
        top: -30%;
        right: -30%;
    }

    .info-section::after {
        width: 250px;
        height: 250px;
        bottom: -20%;
        left: -20%;
    }

    .info-content {
        width: 100%;
        max-width: 100%;
    }

    .logo-section {
        margin-bottom: 25px;
    }

    .logo-icon {
        width: 75px;
        height: 75px;
        font-size: 45px;
    }

    .brand-title {
        font-size: 32px;
        margin-bottom: 7px;
    }

    .brand-subtitle {
        font-size: 13px;
    }

    .description-section {
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .section-text {
        font-size: 13px;
        line-height: 1.6;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }

    .feature-card {
        padding: 15px;
    }

    .feature-icon {
        font-size: 26px;
    }

    .feature-card h5 {
        font-size: 13px;
    }

    .feature-card p {
        font-size: 11px;
    }

    .stats-section {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 12px;
        padding-top: 20px;
    }

    .stat-number {
        font-size: 22px;
    }

    .stat-label {
        font-size: 10px;
    }

    .login-section {
        padding: 30px 15px;
        min-height: auto;
        background: var(--bg-secondary);
    }

    .login-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .login-card {
        padding: 35px 28px;
        border-radius: 16px;
    }

    .form-tabs {
        gap: 6px;
        margin-bottom: 25px;
    }

    .form-tabs .nav-link {
        padding: 8px 10px;
        font-size: 12px;
    }

    .login-header {
        margin-bottom: 25px;
    }

    .login-icon {
        width: 65px;
        height: 65px;
        font-size: 32px;
        margin-bottom: 15px;
    }

    .login-header h2 {
        font-size: 22px;
    }

    .login-header p {
        font-size: 12px;
    }

    .form-label {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .form-control,
    .form-select {
        padding: 10px 12px;
        font-size: 13px;
    }

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

    .register-form .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 11px;
        margin-bottom: 5px;
    }

    .register-form .form-group-half {
        margin-bottom: 0;
    }

    .register-terms {
        margin-bottom: 18px !important;
        margin-top: 15px !important;
        padding: 13px 14px;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(14, 165, 233, 0.06) 100%);
        border-radius: 8px;
        border: 1px solid rgba(37, 99, 235, 0.15);
        border-left: 4px solid var(--primary);
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }

    .btn-toggle-password {
        right: 10px;
        font-size: 14px;
    }

    .btn-submit {
        padding: 10px 18px;
        font-size: 13px;
    }

    .remember-check {
        margin-bottom: 18px !important;
    }

    .login-footer {
        font-size: 11px;
        margin-top: 3px;
    }

    .alert {
        padding: 12px;
        margin-bottom: 20px;
        font-size: 13px;
    }

    .invalid-feedback {
        font-size: 11px;
    }

    .form-check-label {
        font-size: 13px;
    }

    .link-forgot-password {
        font-size: 12px;
    }
}

/* MOBILE LANDSCAPE - 480px to 599px */
@media (min-width: 480px) and (max-width: 599px) {
    .login-container {
        flex-direction: column;
        min-height: auto;
    }

    .login-container .row {
        min-height: auto;
        flex-direction: column;
    }

    .info-section {
        padding: 35px 20px;
        min-height: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .logo-preview {
        width: 90px;
        height: 90px;
    }

    .logo-placeholder i {
        font-size: 24px;
    }

    .logo-placeholder span {
        font-size: 10px;
    }

    .logo-upload-hint {
        font-size: 11px;
    }

    .logo-upload-container {
        max-width: 240px;
    }

    .register-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 5px;
    }

    .register-terms {
        margin-bottom: 16px !important;
        margin-top: 15px !important;
        padding: 12px 13px;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(14, 165, 233, 0.06) 100%);
        border-radius: 8px;
        border: 1px solid rgba(37, 99, 235, 0.15);
        border-left: 4px solid var(--primary);
        display: flex;
        align-items: flex-start;
        gap: 12px;
    }

    .info-section::before {
        width: 250px;
        height: 250px;
        top: -40%;
        right: -40%;
    }

    .info-section::after {
        width: 200px;
        height: 200px;
        bottom: -30%;
        left: -30%;
    }

    .logo-section {
        margin-bottom: 20px;
    }

    .logo-icon {
        width: 65px;
        height: 65px;
        font-size: 40px;
    }

    .brand-title {
        font-size: 28px;
        margin-bottom: 6px;
    }

    .brand-subtitle {
        font-size: 12px;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .section-text {
        font-size: 12px;
        line-height: 1.5;
    }

    .description-section {
        margin-bottom: 18px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 18px;
    }

    .feature-card {
        padding: 12px;
        border-radius: 12px;
    }

    .feature-icon {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .feature-card h5 {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .feature-card p {
        font-size: 10px;
    }

    .stats-section {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 10px;
        padding-top: 18px;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-label {
        font-size: 9px;
    }

    .login-section {
        padding: 25px 12px;
    }

    .login-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .login-card {
        padding: 30px 22px;
        border-radius: 15px;
    }

    .form-tabs {
        gap: 5px;
        margin-bottom: 20px;
    }

    .form-tabs .nav-link {
        padding: 7px 8px;
        font-size: 11px;
        border-radius: 8px;
    }

    .login-header {
        margin-bottom: 20px;
    }

    .login-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
        margin-bottom: 12px;
    }

    .login-header h2 {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .login-header p {
        font-size: 11px;
    }

    .form-label {
        font-size: 12px;
        margin-bottom: 7px;
    }

    .form-control,
    .form-select {
        padding: 9px 11px;
        font-size: 12px;
    }

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

    .register-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 5px;
    }

    .register-terms {
        margin-bottom: 16px !important;
        margin-top: 15px !important;
        padding: 11px 12px;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(14, 165, 233, 0.06) 100%);
        border-radius: 8px;
        border: 1px solid rgba(37, 99, 235, 0.15);
        border-left: 4px solid var(--primary);
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }

    .btn-toggle-password {
        right: 8px;
        font-size: 13px;
        padding: 4px 6px;
    }

    .btn-submit {
        padding: 9px 16px;
        font-size: 12px;
    }

    .remember-check {
        margin-bottom: 15px !important;
    }

    .form-check-input {
        width: 16px;
        height: 16px;
    }

    .form-check-label {
        font-size: 12px;
        margin-left: 6px;
    }

    .link-forgot-password {
        font-size: 11px;
    }

    .alert {
        padding: 10px;
        margin-bottom: 15px;
        font-size: 12px;
    }

    .invalid-feedback {
        font-size: 10px;
    }

    .login-footer {
        font-size: 10px;
    }
}

/* MOBILE - Hasta 479px */
@media (max-width: 479px) {
    .login-container {
        flex-direction: column;
        min-height: auto;
        background: var(--bg-secondary);
    }

    .login-container .row {
        min-height: auto;
        flex-direction: column;
    }

    .info-section {
        padding: 30px 18px;
        min-height: auto;
        justify-content: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .logo-preview {
        width: 80px;
        height: 80px;
    }

    .logo-placeholder i {
        font-size: 20px;
    }

    .logo-placeholder span {
        font-size: 10px;
    }

    .logo-upload-hint {
        font-size: 11px;
    }

    .logo-upload-container {
        max-width: 220px;
    }

    .logo-upload-section {
        margin-bottom: 25px;
    }

    .info-section::before {
        width: 200px;
        height: 200px;
        top: -50%;
        right: -50%;
    }

    .info-section::after {
        width: 150px;
        height: 150px;
        bottom: -40%;
        left: -40%;
    }

    .info-content {
        width: 100%;
        max-width: 100%;
    }

    .logo-section {
        margin-bottom: 18px;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 36px;
        margin-bottom: 12px;
        border-radius: 15px;
    }

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

    .brand-title {
        font-size: 26px;
        margin-bottom: 6px;
        letter-spacing: -0.3px;
    }

    .brand-subtitle {
        font-size: 11px;
        opacity: 0.95;
    }

    .description-section {
        margin-bottom: 15px;
    }

    .section-title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .section-text {
        font-size: 12px;
        line-height: 1.5;
        opacity: 0.95;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 15px;
    }

    .feature-card {
        padding: 12px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.1);
    }

    .feature-icon {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .feature-card h5 {
        font-size: 12px;
        margin-bottom: 4px;
        font-weight: 600;
    }

    .feature-card p {
        font-size: 10px;
        opacity: 0.85;
    }

    .stats-section {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .stat-number {
        font-size: 18px;
        margin-bottom: 3px;
    }

    .stat-label {
        font-size: 8px;
        letter-spacing: 0.3px;
    }

    .login-section {
        padding: 20px 12px;
        background: var(--bg-secondary);
    }

    .login-wrapper {
        width: 100%;
        max-width: 100%;
        animation: none;
    }

    .login-card {
        padding: 25px 20px;
        border-radius: 14px;
        box-shadow: var(--shadow-md);
    }

    .form-tabs {
        gap: 5px;
        padding: 4px;
        margin-bottom: 20px;
        border-radius: 10px;
    }

    .form-tabs .nav-link {
        padding: 6px 8px;
        font-size: 10px;
        border-radius: 7px;
        font-weight: 500;
    }

    .form-tabs .nav-link i {
        margin-right: 3px;
    }

    .login-header {
        margin-bottom: 18px;
    }

    .login-icon {
        width: 55px;
        height: 55px;
        font-size: 28px;
        margin-bottom: 12px;
        border-radius: 12px;
    }

    .login-header h2 {
        font-size: 20px;
        margin-bottom: 5px;
        font-weight: 700;
    }

    .login-header p {
        font-size: 11px;
        color: var(--text-secondary);
    }

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

    .register-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 5px;
    }

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

    .form-label {
        font-size: 12px;
        margin-bottom: 7px;
        font-weight: 600;
    }

    .form-label i {
        margin-right: 4px;
    }

    .form-control,
    .form-select {
        padding: 9px 11px;
        font-size: 12px;
        border-radius: 8px;
        border-width: 2px;
    }

    .form-control:focus,
    .form-select:focus {
        transform: none;
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
    }

    .form-control::placeholder {
        color: var(--text-tertiary);
    }

    .password-input-group .form-control {
        padding-right: 40px;
    }

    .btn-toggle-password {
        right: 8px;
        font-size: 13px;
        padding: 3px 6px;
    }

    .text-end {
        text-align: right !important;
    }

    .text-end a {
        font-size: 11px;
    }

    .remember-check {
        margin-bottom: 15px !important;
    }

    .register-terms {
        margin-bottom: 15px !important;
        margin-top: 15px !important;
        padding: 11px 12px;
        background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(14, 165, 233, 0.06) 100%);
        border-radius: 8px;
        border: 1px solid rgba(37, 99, 235, 0.15);
        border-left: 4px solid var(--primary);
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }

    .form-check-input {
        width: 16px;
        height: 16px;
        border-radius: 4px;
    }

    .form-check-label {
        font-size: 12px;
        margin-left: 6px;
    }

    .link-forgot-password {
        font-size: 11px;
    }

    .btn-submit {
        padding: 10px 16px;
        font-size: 12px;
        font-weight: 700;
        border-radius: 8px;
        width: 100%;
        margin-top: 5px;
    }

    .btn-submit .btn-text {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-submit i {
        margin-right: 6px;
        font-size: 12px;
    }

    .spinner-border-sm {
        width: 14px;
        height: 14px;
        border-width: 2px;
    }

    .alert {
        padding: 12px;
        margin-bottom: 15px;
        font-size: 12px;
        border-radius: 8px;
    }

    .alert i {
        margin-right: 8px;
    }

    .alert-info {
        border-left-width: 3px;
    }

    .alert-info .d-flex {
        gap: 8px;
    }

    .alert-info i {
        margin-top: 2px;
        font-size: 14px;
    }

    .invalid-feedback {
        font-size: 10px;
        margin-top: 3px;
    }

    .login-footer {
        font-size: 10px;
        margin-top: 15px;
    }

    .login-footer a {
        white-space: nowrap;
    }

    .text-muted {
        font-size: 9px;
    }

    small {
        font-size: 10px;
    }

    /* Optimizaciones para touch */
    button, a, input[type="checkbox"] {
        min-height: 44px;
        min-width: 44px;
    }

    .form-control {
        min-height: 44px;
    }
}

/* ULTRA SMALL PHONES - Menos de 360px */
@media (max-width: 359px) {
    .login-card {
        padding: 20px 15px;
    }

    .brand-title {
        font-size: 24px;
    }

    .section-title {
        font-size: 15px;
    }

    .logo-icon {
        width: 55px;
        height: 55px;
        font-size: 32px;
    }

    .form-tabs .nav-link {
        padding: 6px 6px;
        font-size: 9px;
    }

    .form-tabs .nav-link i {
        display: none;
    }

    .login-header h2 {
        font-size: 18px;
    }

    .form-control,
    .form-select {
        padding: 8px 10px;
        font-size: 11px;
    }

    .btn-submit {
        padding: 9px 14px;
        font-size: 11px;
    }
}

/* PRINT STYLES */
@media print {
    .login-container {
        background: white;
    }

    .info-section {
        display: none;
    }

    .login-section {
        padding: 0;
    }

    .login-card {
        box-shadow: none;
        border: none;
        padding: 0;
    }

    .btn-submit {
        display: none;
    }
}