/* ============================================
   RESET Y ESTILOS GLOBALES
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f3f8 0%, #e8e5f0 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ============================================
   HEADER Y LOGO
   ============================================ */

.header {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f9f7fc 0%, #f0ebf8 100%);
}

.logo-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b8b8b8 0%, #999999 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.logo-text {
    font-size: 48px;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
    font-family: 'Playfair Display', serif;
}

/* ============================================
   SECCIÓN DE BIENVENIDA
   ============================================ */

.welcome-section {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #fafaf8 0%, #f5f0f8 100%);
}

.welcome-title {
    font-size: 48px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
    letter-spacing: -1px;
}

.welcome-subtitle {
    font-size: 32px;
    font-weight: 600;
    background: linear-gradient(135deg, #9b7fbf 0%, #b8a5d1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
}

.illustration-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.illustration {
    max-width: 400px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
}

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

.login-section {
    padding: 50px 20px;
    text-align: center;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

.section-subtitle {
    font-size: 16px;
    color: #999;
    margin-bottom: 40px;
}

/* ============================================
   CONTENEDOR DE OPCIONES
   ============================================ */

.options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .options-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================
   TARJETAS DE OPCIONES
   ============================================ */

.option-card {
    padding: 30px;
    border-radius: 15px;
    background: white;
    border: 3px dashed;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.option-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.patient-card {
    border-color:#ccc;/* #ff9500;*/
}

.register-card {
    border-color: #ccc;/*#9b7fbf;*/
}

.option-number {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
}

.patient-card .option-number {
    background: #ccc;/*#ff9500;*/
}

.register-card .option-number {
    background: #ccc;/*#9b7fbf;*/
}

.option-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    margin-top: 10px;
}

.option-description {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

/* ============================================
   FORMULARIO DE LOGIN
   ============================================ */

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

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon {
    font-size: 16px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.form-input:focus {
    outline: none;
    border-color:#ccc; /*#ff9500;*/
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.1);
}

.form-input::placeholder {
    color: #ccc;
}

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

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login {
    background: #1a1a1a;
    color: white;
    margin-bottom: 15px;
}

.btn-login:hover {
    background: #333;
    box-shadow: 0 4px 15px rgba(26, 26, 26, 0.3);
    transform: translateY(-2px);
}

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

.btn-register {
    background: linear-gradient(135deg, #cccddd/*#9b7fbf*/ 0%, #808080/*#b8a5d1*/ 100%);
    color: white;
}

.btn-register:hover {
    box-shadow: 0 4px 15px rgba(155, 127, 191, 0.3);
    transform: translateY(-2px);
}

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

.btn-icon {
    font-size: 18px;
}

/* ============================================
   ENLACES
   ============================================ */

.forgot-password {
    display: inline-block;
    font-size: 12px;
    color: #999;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.forgot-password:hover {
    color: #ff9500;
    border-bottom-color: #ff9500;
}

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

.footer {
    background: linear-gradient(135deg, #f5f3f8 0%, #e8e5f0 100%);
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
}

.footer p {
    font-size: 13px;
    color: #999;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .welcome-title {
        font-size: 32px;
    }

    .welcome-subtitle {
        font-size: 24px;
    }

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

    .logo-circle {
        width: 140px;
        height: 140px;
    }

    .logo-text {
        font-size: 40px;
    }

    .header {
        padding: 30px 20px;
    }

    .login-section {
        padding: 30px 20px;
    }

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

@media (max-width: 480px) {
    .welcome-title {
        font-size: 24px;
    }

    .welcome-subtitle {
        font-size: 18px;
    }

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

    .option-card {
        padding: 20px;
    }
}

/* ============================================
   ANIMACIONES Y TRANSICIONES
   ============================================ */

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 149, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 149, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 149, 0, 0);
    }
}

.btn-login:active {
    animation: pulse 0.6s ease-out;
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible para navegación por teclado */
.form-input:focus-visible,
.btn:focus-visible {
    outline: 2px solid #808080/*#ff9500*/;
    outline-offset: 2px;
}


/* ============================================
   ESTILOS DE ALERTAS (ÉXITO, ERROR, CUIDADO)
   ============================================ */

.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: 90%;
}

.alert {
    padding: 15px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border-left: 5px solid;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.alert-content {
    flex-grow: 1;
}

.alert-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
    display: block;
}

.alert-message {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
	color:#ef4444; 
}

.alert-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-close:hover {
    color: #333;
}

/* --- Alerta de Éxito --- */
.alert-success {
    background-color: #f0fdf4;
    border-left-color: #22c55e;
}

.alert-success .alert-icon {
    color: #22c55e;
}

.alert-success .alert-title {
    color: #166534;
}

/* --- Alerta de Error --- */
.alert-error {
    background-color: #fef2f2 !important;
    border-left-color: #ef4444;
	
}

.alert-error .alert-icon {
    color: #ef4444;
}

.alert-error .alert-title {
    color: #991b1b;
}



/* --- Alerta de Cuidado (Advertencia) --- */
.alert-warning {
    background-color: #fffbeb;
    border-left-color: #f59e0b;
}

.alert-warning .alert-icon {
    color: #f59e0b;
}

.alert-warning .alert-title {
    color: #92400e;
}

/* --- Barra de Progreso (Opcional) --- */
.alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(0, 0, 0, 0.05);
}

.alert-progress-bar {
    height: 100%;
    width: 100%;
    transition: width linear;
}

.alert-success .alert-progress-bar { background-color: #22c55e; }
.alert-error .alert-progress-bar { background-color: #ef4444; }
.alert-warning .alert-progress-bar { background-color: #f59e0b; }

/* --- Animación de Salida --- */
.alert.fade-out {
    animation: fadeOut 0.4s forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}