/* wwwroot/css/auth.css */

/* ============ VARIABLES ============ */
:root {
    --primary: #0052CC;
    --primary-dark: #0043a4;
    --primary-light: #4c9aff;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
}

/* ============ GLOBAL ============ */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============ UTILIDADES ============ */
.medical-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
}

.medical-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* ============ ANIMACIONES ============ */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

.animate-pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============ COMPONENTES ============ */
.btn-primary {
    background-color: var(--primary);
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    transform: scale(1);
    box-shadow: 0 10px 15px -3px rgba(0, 82, 204, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

    .btn-primary:hover {
        background-color: #1d4ed8;
        transform: scale(1.02);
        box-shadow: 0 20px 25px -5px rgba(0, 82, 204, 0.3);
    }

    .btn-primary:active {
        transform: scale(0.98);
    }

.btn-secondary {
    background-color: white;
    border: 2px solid var(--gray-200);
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

    .btn-secondary:hover {
        background-color: var(--gray-50);
        border-color: var(--gray-300);
    }

.input-field {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

    .input-field:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.1);
        background-color: white;
    }

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 0.875rem;
    color: var(--gray-400);
    transition: color 0.3s ease;
}

.input-group:focus-within .input-icon {
    color: var(--primary);
}

/* ============ ROLE CARDS ============ */
.role-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    background: white;
    border: 2px solid transparent;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

@media (min-width: 640px) {
    .role-card {
        width: 16rem;
    }
}

.role-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-color: var(--primary-light);
}

.role-icon {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
}

    .role-icon.doctor {
        background-color: #eff6ff;
        color: #2563eb;
    }

    .role-icon.patient {
        background-color: #ecfdf5;
        color: #059669;
    }

.role-card:hover .role-icon.doctor {
    background-color: #2563eb;
    color: white;
    transform: scale(1.1);
}

.role-card:hover .role-icon.patient {
    background-color: #059669;
    color: white;
    transform: scale(1.1);
}

.role-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.role-description {
    font-size: 0.875rem;
    color: var(--gray-500);
    text-align: center;
}

.role-arrow {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.role-card:hover .role-arrow {
    opacity: 1;
}

/* ============ CLINIC CARDS ============ */
.clinic-card {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 1rem;
}

    .clinic-card:hover {
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        border-color: var(--primary-light);
    }

.clinic-icon {
    padding: 0.75rem;
    border-radius: 0.75rem;
    margin-right: 1.25rem;
    transition: all 0.3s ease;
}

    .clinic-icon.primary {
        background-color: #dbeafe;
        color: #2563eb;
    }

    .clinic-icon.default {
        background-color: var(--gray-100);
        color: var(--gray-500);
    }

.clinic-card:hover .clinic-icon {
    background-color: var(--primary);
    color: white;
}

.clinic-info {
    flex: 1;
}

.clinic-name {
    font-weight: 700;
    color: var(--gray-800);
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clinic-badge {
    font-size: 0.625rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.1em;
    background-color: #dbeafe;
    color: #1e40af;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.clinic-address {
    display: flex;
    align-items: center;
    margin-top: 0.25rem;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.clinic-chevron {
    color: var(--gray-300);
    transition: all 0.3s ease;
}

.clinic-card:hover .clinic-chevron {
    color: var(--primary);
    transform: translateX(0.25rem);
}

/* ============ LOADING OVERLAY ============ */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .loading-overlay.hidden {
        display: none;
    }

.loading-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-spinner {
    width: 4rem;
    height: 4rem;
    border: 4px solid #dbeafe;
    border-top-color: var(--primary);
    border-radius: 9999px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============ NOTIFICATION TOAST ============ */
.notification-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    transform: translateX(0);
    transition: transform 0.5s ease;
}

    .notification-toast.translate-x-full {
        transform: translateX(200%);
    }

.notification-content {
    background: white;
    border-left-width: 4px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    max-width: 28rem;
    display: flex;
    align-items: center;
}

    .notification-content.success {
        border-left-color: var(--success);
    }

    .notification-content.error {
        border-left-color: var(--danger);
    }

.notification-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
}

    .notification-icon.success {
        color: var(--success);
    }

    .notification-icon.error {
        color: var(--danger);
    }

/* ============ SECURITY BADGE ============ */
.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid var(--gray-100);
    background-color: rgba(248, 250, 252, 0.5);
    font-size: 0.75rem;
    color: var(--gray-500);
}

.security-item {
    display: flex;
    align-items: center;
}

.security-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: #10b981;
    border-radius: 9999px;
    margin-right: 0.5rem;
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============ DASHBOARD ============ */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    color: white;
    box-shadow: 0 20px 25px -5px rgba(0, 82, 204, 0.3);
}

.stat-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--gray-100);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

    .stat-card:hover {
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    }

.dashboard-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--gray-100);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

    .dashboard-card:hover {
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    }

.dashboard-icon {
    width: 3rem;
    height: 3rem;
    background-color: #eff6ff;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.dashboard-card:hover .dashboard-icon {
    background-color: var(--primary);
    color: white;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 640px) {
    .btn-primary, .btn-secondary {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }

    .role-card {
        padding: 1.5rem;
    }

    .clinic-card {
        padding: 1rem;
    }

    .welcome-banner {
        padding: 1.5rem;
    }
}
