/* Variables de Marca - Synexia */
:root {
    --primary: #6c5ce7;
    --primary-light: #f3f0ff;
    --secondary: #a29bfe;
    --bg-body: #f8f9fe;
    --bg-card: #ffffff;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --border-color: #edf2f7;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #ff7675;
    --sidebar-width: 260px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* Layout Principal */
.app-wrapper {
    display: flex;
    width: 100%;
}

.main-content {
    flex-grow: 1;
    padding: 2rem;
    margin-left: var(--sidebar-width); /* Ajuste para el sidebar fijo */
    transition: all 0.3s;
}

/* Componentes Comunes */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.btn-primary:hover {
    background: var(--secondary);
    transform: translateY(-1px);
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #e3faf3; color: var(--success); }
.badge-warning { background: #fff4e6; color: var(--warning); }

/* Tablas Modernas */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

body, html {
    height: 100%;
    overflow: hidden;
    background-color: #f0f2f5;
}

.login-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Secciﾃｳn Visual (Solo PC) */
.login-visual {
    flex: 1.2;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    color: white;
    padding: 40px;
}

.visual-content {
    z-index: 2;
    text-align: center;
}

.logo-icon { font-size: 5rem; margin-bottom: 20px; }
.visual-content h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 10px; }
.visual-content p { font-size: 1.2rem; opacity: 0.9; max-width: 400px; }

/* Efecto de fondo orgﾃ｡nico */
.blob-shape {
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(80px);
    top: -100px;
    right: -100px;
}

/* Secciﾃｳn Formulario */
.login-form-section {
    flex: 1;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.form-box {
    width: 100%;
    max-width: 400px;
}

.mobile-logo {
    display: none;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

h2 { font-size: 2rem; color: var(--text-main); margin-bottom: 8px; }
.subtitle { color: var(--text-muted); margin-bottom: 30px; }

/* Inputs */
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; color: var(--text-main); }

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: 0.3s;
    font-size: 1rem;
}

.input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-options {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 30px;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.btn-login:hover { background: #5649c1; transform: translateY(-2px); }

/* RESPONSIVIDAD Mﾃ天IL */
@media (max-width: 900px) {
    .login-visual { display: none; }
    .mobile-logo { display: flex; }
    .login-form-section { background: #f8f9fe; }
    .form-box {
        background: white;
        padding: 30px;
        border-radius: 20px;
        box-shadow: var(--shadow);
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important; /* El sidebar debe esconderse o ser colapsable */
        padding: 1rem;
    }
    
    table {
        display: block;
        overflow-x: auto; /* Permite scroll horizontal en tablas largas */
    }
    
    .stats-grid {
        grid-template-columns: 1fr; /* Una columna en móvil */
    }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: 0.2s;
}

.btn-icon:hover {
    transform: scale(1.1);
}

.modal label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    color: var(--text-muted);
}
/* Ajustes para el calendario en móvil */
#calendar {
    max-width: 100%;
    margin: 0 auto;
}

.fc .fc-toolbar-title {
    font-size: 1.2rem !important; /* Ajuste para que el título no se desborde en celular */
}

@media (max-width: 600px) {
    .fc-header-toolbar {
        flex-direction: column;
        gap: 10px;
    }
}
/* Asegura que el cuerpo permita scroll si el contenido es largo */
body, html {
    height: auto; /* Cambia de 100% o 100vh a auto */
    min-height: 100%;
    overflow-y: auto; /* Fuerza la aparición de la barra cuando sea necesario */
    margin: 0;
    padding: 0;
}

/* El contenedor que envuelve tus vistas (perfil, agenda, etc) */
.content-wrapper {
    padding: 2rem;
    min-height: calc(100vh - 60px); /* Resta la altura de tu header si tienes uno */
    overflow-y: visible; /* Permite que el contenido fluya hacia abajo */
}

/* Personalizar la barra de scroll para que sea fina y profesional */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1; /* Color gris suave */
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.perfil-container {
    display: flex;
    flex-wrap: wrap; /* Si la pantalla es pequeña o el contenido es mucho, lo manda abajo */
    gap: 20px;
    align-items: flex-start;
}