/* ==============================================================
   SODACROWD · PANEL ADMINISTRADOR
   --------------------------------------------------------------
   GLOBAL STYLESHEET (style.css)
   --------------------------------------------------------------
   RESPONSABILIDAD:
   - Define estilos globales del CRM (layout, cards, tablas, modales,
     formularios, agenda, gráficos y calendario).
   - Mantiene coherencia visual en todas las ventanas del panel.

   ESTRUCTURA PRINCIPAL:
   1. Reset y base layout
   2. Header / Footer
   3. Botones y acciones
   4. Layout principal (grid / cards)
   5. Tablas administrativas
   6. Formularios y filtros
   7. Modales (tabla interna / exportaciones)
   8. Agenda comercial (Flatpickr + tareas)
   9. Ajustes responsive

   CONVENCIÓN:
   - Clases reutilizables: .card, .card2, .admin-table, .btn-primary
   - Variantes visuales: .status.*, .profile-type.*
   - Componentes específicos documentados por sección

   NOTA:
   - Evitar sobrescribir reglas globales desde vistas individuales.
   - Si una ventana requiere comportamiento especial, crear clase
     específica en lugar de modificar estilos globales.
   ============================================================= */

html, body {
    height: 100%;
}

/* ===== RESET ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

body {
    background: #F2F1E2;
    color: #2c3e50;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== HEADER ===== */
.main-header {
    background: #363B51;
    color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 40px;
}

.header-right {
    display: flex;
    gap: 15px;
}

.btn-header {
    background: #2f3448;
    color: #ffffff;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;

    transition: transform 0.18s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-header:hover {
    background: #363B51;
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}

.btn-header:active {
    transform: translateY(2px) scale(0.95);
}


.btn-primary {
    background: #363B51;
    color: #fff;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary-mini {
    background: #363B51;
    color: #fff;
    padding: 6px 12px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 400;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-danger {
    background: #a83232;
    color: #fff;
    padding: 8px 14px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;

    transition: transform 0.18s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-danger:hover {
    background: #8e2b2b;
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}

.btn-danger:active {
    transform: translateY(2px) scale(0.95);
}

.btn-primary:hover {
    background: #2f3448;
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 10px 20px rgba(0,0,0,0.22);
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-primary-mini:hover {
    background: #2f3448;
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 8px 16px rgba(0,0,0,0.22);
}

.btn-primary-mini:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* ===== EFECTO CLICK BOTONES (PRESS EFFECT) ===== */
.btn-primary:active,
.btn-primary-mini:active {
    transform: translateY(2px) scale(0.97);
    box-shadow: 0 3px 8px rgba(0,0,0,0.18);
}

/* ===== MICRO REBOTE AL SOLTAR CLICK (UX estilo Notion / Linear) ===== */
@keyframes btnRebound {
    0%   { transform: translateY(2px) scale(0.97); }
    50%  { transform: translateY(-2px) scale(1.03); }
    100% { transform: translateY(0) scale(1); }
}


.btn-primary:active,
.btn-primary-mini:active {
    animation: btnRebound 0.22s ease;
}

/* ======================================================
   SISTEMA INTERACTIVO GLOBAL PARA BOTONES
   ------------------------------------------------------
   Clase reutilizable para aplicar micro‑interacciones
   (hover + press) a cualquier botón del CRM.
   Uso recomendado en HTML:
   class="btn-primary btn-interactive"
   ====================================================== */

.btn-interactive {
    transition:
        transform 0.18s cubic-bezier(.34,1.56,.64,1),
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.btn-interactive:hover {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 6px 14px rgba(0,0,0,0.18);
}


.btn-interactive:active {
    transform: translateY(2px) scale(0.94);
}

/* ======================================================
   BOTONES INTERACTIVOS CRM (APLICACIÓN AUTOMÁTICA)
   ------------------------------------------------------
   Aplica micro‑interacciones a botones ya existentes
   del panel sin necesidad de añadir clases nuevas.
   Incluye:
   - btn-danger
   - link-action
   - agenda-complete-btn
   - cal-nav
   ====================================================== */

.btn-danger,
.link-action,
.agenda-complete-btn,
.cal-nav {
    transition:
        transform 0.18s cubic-bezier(.34,1.56,.64,1),
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.btn-danger:hover,
.link-action:hover,
.agenda-complete-btn:hover,
.cal-nav:hover {
    transform: translateY(-2px) scale(1.06);
}

.btn-danger:active,
.link-action:active,
.agenda-complete-btn:active,
.cal-nav:active {
    transform: translateY(2px) scale(0.92);
}

.btn-logout {
    background: #a83232;
}

.btn-logout:hover {
    background: #c0392b;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    padding: 40px;
    max-width: 1200px;
    margin: auto;
    width: 100%;
}

.page-title {
    font-size: 28px;
    margin-bottom: 5px;
    color: #363B51;
}

.page-subtitle {
    color: #6b7280;
    margin-bottom: 30px;
}

/* ===== ADMIN GRID (panel principal) ===== */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Limitar explícitamente a 4 columnas en pantallas grandes */
@media (min-width: 1280px) {
    .menu-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== ICONOS PANEL ===== */
.menu-icon {
    color: #363B51; /* mismo azul que header/footer */
    display: flex;
    align-items: center;
    justify-content: center;
}
.menu-icon svg {
    width: 42px;
    height: 42px;
    stroke: currentColor;
    fill: none;
}
.menu-card {
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.menu-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
    color: #363B51;
}

.menu-desc {
    font-size: 14px;
    color: #6b7280;
}

/* ===== GENERIC CONTAINER ===== */
.admin-container {
    max-width: 1200px;
    margin: auto;
}

/* ===== GENERIC CARD ===== */
.card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    margin-top: 25px;
    transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.18s ease;
}

.card2 {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    margin-top: 25px;
    transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.18s ease;
}

/* ======================================================
   MICRO‑INTERACCIÓN TARJETAS (UX estilo SaaS moderno)
   ------------------------------------------------------
   Hace que las cards del CRM reaccionen al pasar el ratón
   generando una sensación más dinámica en paneles,
   métricas y listados.
   ====================================================== */

.card:hover,
.card2:hover {
    transform: translateY(-4px) scale(1.015);
    box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}

/* ===== DATE RANGE ===== */
.date-range {
    background: #f7f6f2;
    padding: 12px 16px;
    border-left: 4px solid #E9C068;
    margin-bottom: 25px;
    font-size: 14px;
}

/* ===== CARDS (users / investments) ===== */
.user-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.user-card p {
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 14px;
}

/* ===== TABLES ===== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
    table-layout: auto;
}

.admin-table th,
.admin-table td {
    white-space: normal;
    word-break: break-word;
}

.admin-table th {
    background: #363B51;
    color: #fff;
    text-align: left;
    padding: 10px;
}

.admin-table thead th {
    background: #363B51;
    color: #ffffff;
    font-weight: 700;
}

.admin-table td {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}



.admin-table tr:hover td {
    background: #f1f5f9;
}


/* ===== PROFILE TYPE (Perfiles asociados) ===== */
.profile-type {
    margin-top: 4px;
    font-size: 0.6em; /* mitad aprox del tamaño normal */
    font-weight: 700;
    letter-spacing: 0.5px;
}

.profile-type-exp {
    color: #1e8449; /* verde */
}

.profile-type-basic {
    color: #1e8449; /* verde (mismo tono, se puede diferenciar luego) */
}

.profile-type-none {
    color: #c0392b; /* rojo */
}

/* ===== LINKS / BACK ===== */
.back-link {
    display: inline-block;
    margin-top: 25px;
    text-decoration: none;
    color: #1f78d1;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}

/* ===== FOOTER ===== */
.main-footer {
    background: #363B51;
    color: #cbd5e1;
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.main-footer .version {
    font-size: 12px;
    color: #94a3b8;
}

.admin-actions {
    margin-top: 35px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Enlaces de acción (teléfono / email) */
.link-action {
    display: inline-block;
    padding: 3px 8px;
    margin-left: 4px;
    border-radius: 4px;
    background-color: #F2F1E2;
    color: #363B51;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    transition: transform 0.18s ease, background 0.15s ease;
}

.link-action:hover {
    background-color: #BAD4CA;
    color: #363B51;
    transform: scale(1.04);
}

.link-action:active {
    transform: scale(0.92);
}


select,
input[type="text"],
input[type="number"],
input[type="datetime-local"],
input[type="password"],
input[type="email"],
textarea,
.flatpickr-input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
    width: 100%;
    max-width: 420px;
    background-color: #ffffff;
    color: #2c3e50;
}

textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

select:focus,
input:focus,
textarea:focus,
.flatpickr-input:focus {
    outline: none;
    border-color: #363B51;
    box-shadow: 0 0 0 2px rgba(54,59,81,0.15);
}

.login-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: #ffffff;
    padding: 32px 28px;
    border-radius: 14px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    text-align: center;
}

.login-box h1 {
    font-size: 26px;
    margin-bottom: 20px;
    color: #363B51;
}

.login-logo {
    max-width: 180px;
    margin: 0 auto 25px auto;
    display: block;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form label {
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.login-form input {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

.login-form input:focus {
    outline: none;
    border-color: #1f78d1;
}

.login-form button {
    margin-top: 10px;
    padding: 12px;
    border-radius: 6px;
    border: none;
    background: #363B51;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.login-form button:hover {
    background: #2f3448;
}

.login-help {
    margin-top: 16px;
    font-size: 13px;
    text-align: center;
}

.login-help a {
    color: #1f78d1;
    text-decoration: none;
    font-weight: 600;
}

.login-help a:hover {
    text-decoration: underline;
}

.login-logo-big {
    width: 320px;
    max-width: 90%;
    margin: 20px auto 30px;
    display: block;
}

.header-login {
    background-color: #363B51;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 2px;
}
.grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    align-items: stretch;
}

.grid-2x2 .card .card2 {
    margin-top: 0;
}

.grid-3x2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    align-items: stretch;
    padding-left: 15px;
    padding-right: 15px;
}

.grid-3x2 .card {
    margin-top: 0;
}

.grid-3x3 .card {
    margin-top: 0;
}

.grid-3x3 .card2 {
    margin-top: 0;
}

.card canvas {
    max-height: 240px;
}

.card {
    overflow: visible;
}

.card2 canvas {
    max-height: 100px;
}

.card2 {
    overflow: visible;
}

@media (max-width: 900px) {
    .grid-2x2 {
        grid-template-columns: 1fr;
    }
    .grid-3x2 {
        grid-template-columns: 1fr;
    }
}

/* ===== GRÁFICOS QUESITO (Objetivo vs Invertido) ===== */
.pie-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    align-items: center;
    justify-items: center;
}

.pie-chart-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
}

.pie-chart-wrapper canvas {
    width: 100% !important;
    height: 100% !important;
}

.pie-chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.pie-chart-center .amount {
    font-size: 15px;
    font-weight: 700;
    color: #363B51;
}

.pie-chart-center .label {
    font-size: 11px;
    color: #6b7280;
}

/* ===== ÚLTIMAS INVERSIONES ===== */
.admin-table.compact td,
.admin-table.compact th {
    padding: 8px;
    font-size: 12px;
}

.admin-table.compact tr:hover td {
    background: #eef2f7;
}

/* ===== COLORES DE PROYECTOS (texto) ===== */
.project-color-1 { color: #2563eb; }
.project-color-2 { color: #16a34a; }
.project-color-3 { color: #d97706; }
.project-color-4 { color: #7c3aed; }

/* ===== GRÁFICO 15 DÍAS ===== */
.chart-wrapper-15d {
    width: 100%;
    height: 260px;
    position: relative;
}

.chart-wrapper-15d canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ===== AJUSTES RESPONSIVE PARA GRÁFICOS ===== */
@media (max-width: 768px) {
    .pie-charts-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pie-chart-wrapper {
        width: 150px;
        height: 150px;
    }

    .chart-wrapper-15d {
        height: 220px;
    }
}

.menu-icon,
.menu-icon svg,
.link-action svg,
.btn-primary svg,
.btn-header svg {
    color: #363B51;
    stroke: currentColor;
    fill: none;
}

.status {
    font-weight: 700;
}

.status.pending {
    color: #d97706; /* ámbar */
}

.status.error {
    color: #dc2626; /* rojo */
}

.status.abort {
    color: #6b7280; /* gris oscuro */
}

.error-message {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== TABLAS RESPONSIVE (SCROLL HORIZONTAL) ===== */
/* Este bloque ha sido eliminado según instrucciones */

/* Columna de mensajes largos (errores, info extensa) */
.admin-table td.error-message {
    max-width: 260px;
    white-space: normal;
    word-break: break-word;
}
/* ===== FORMULARIO SEGUIMIENTO COMERCIAL ===== */
.form-seguimiento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: flex-start;
}

.form-seguimiento .form-group {
    display: flex;
    flex-direction: column;
}

.form-seguimiento .form-group.notes {
    grid-column: 1 / -1;
}

.form-seguimiento .form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

/* ===== AGENDA COMERCIAL ===== */
.agenda-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    margin-top: 25px;
}

.agenda-calendar {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.calendar-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #363B51;
    text-transform: capitalize;
}

.cal-nav {
    background: #f1f5f9;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    color: #363B51;
    transition: transform 0.18s ease, background 0.15s ease;
}

.cal-nav:hover {
    background: #e5e7eb;
    transform: scale(1.12);
}

.cal-nav:active {
    transform: scale(0.9);
}

.agenda-day {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.agenda-day h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #363B51;
}

.agenda-item {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.agenda-item:hover {
    background: #f1f5f9;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.agenda-item.completed {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.agenda-item-header {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 12px;
    align-items: center;
    font-size: 14px;
}

.agenda-time {
    font-weight: 700;
    color: #363B51;
}

.agenda-action {
    font-weight: 600;
    color: #1f2937;
}

.agenda-status {
    font-weight: 700;
    font-size: 12px;
}

.agenda-status.pending {
    color: #d97706;
}

.agenda-status.completed {
    color: #16a34a;
}

.agenda-complete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #16a34a;
    font-size: 16px;

    transition: transform 0.18s ease;
}

.agenda-complete-btn:hover {
    transform: scale(1.25);
}

.agenda-complete-btn:active {
    transform: scale(0.85);
}

.agenda-item-notes {
    margin-top: 6px;
    font-size: 13px;
    color: #4b5563;
}

.agenda-item-notes strong {
    color: #374151;
}

/* ===== NOTA AGENDA TAREA (UNA LÍNEA) ===== */
.agenda-item-notes input {
    width: 100%;
    height: 38px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 13px;
    background-color: #ffffff;
    color: #2c3e50;
}

/* ===== CALENDARIO AGENDA (FLATPICKR INLINE) ===== */
.flatpickr-calendar.inline {
    box-shadow: none;
    border-radius: 10px;
    width: 100%;
}

.agenda-calendar .flatpickr-calendar.inline {
    margin: 0 auto;
}

.agenda-calendar {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flatpickr-day.completed {
    background: #dcfce7;
    color: #166534;
    border-radius: 6px;
}

.flatpickr-day.pending.completed {
    background: #fee2e2;
    color: #991b1b;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
}

/* ===== FLATPICKR THEME PANEL ===== */
.flatpickr-calendar {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

.flatpickr-months {
    background: #363B51;
    border-radius: 12px 12px 0 0;
}

.flatpickr-months .flatpickr-month,
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #ffffff;
    fill: #ffffff;
}

/* Asegurar visibilidad de flechas del calendario */
.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    stroke: #ffffff;
    fill: #ffffff;
}

.flatpickr-current-month,
.flatpickr-current-month .cur-month,
.flatpickr-current-month .cur-year,
.flatpickr-monthDropdown-months,
.flatpickr-monthDropdown-months option {
    color: #ffffff !important;
}

.flatpickr-weekdays {
    background: #363B51;
}

.flatpickr-weekday {
    color: #ffffff;
    font-weight: 600;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #363B51;
    border-color: #363B51;
    color: #ffffff;
}

.flatpickr-day:hover {
    background: #e5e7eb;
}

.flatpickr-time input {
    font-weight: 600;
}

/* ===== FILA HOVER TIPO EXPORTACIONES ===== */
.fila-hover {
    transition: background 0.2s ease;
}

.fila-hover:hover {
    background: #f1f5f9;
    cursor: pointer;
}

/* ===== POPUP VISTA TABLA (EXPORT EXCEL) ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 1100px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 12px;
}

.modal-content {
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.modal-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
}
/* ===== FILTROS COMUNES (users_utm, new_users, etc.) ===== */
.filters-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

.filter-small {
    width: 120px;
}

.filter-medium {
    width: 180px;
}

.filter-daterange {
    width: 240px;
}

.search-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-top: 20px;
}

/* ===== FIX VISIBILIDAD CALENDARIO FLATPICKR (GLOBAL) ===== */
.flatpickr-months .flatpickr-month,
.flatpickr-current-month,
.flatpickr-current-month span.cur-month,
.flatpickr-current-month input.cur-year {
    color: #ffffff !important;
}

.flatpickr-monthDropdown-months {
    color: #ffffff !important;
    background-color: transparent !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    fill: #ffffff !important;
}

.flatpickr-prev-month,
.flatpickr-next-month {
    color: #ffffff !important;
}

.tarea-linea-top {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 14px;
}

.tarea-linea-top .hora {
    font-weight: 600;
    min-width: 50px;
}

.tarea-linea-bottom {
    margin: 4px 0 8px 0;
    font-size: 13px;
    color: #555;
}

.tarea-separador {
    border: none;
    border-top: 1px solid #eee;
    margin: 10px 0;
}

.agenda-calendar,
.agenda-tareas,
.flatpickr-calendar {
    font-family: inherit;
    font-size: 14px;
}

.flatpickr-day,
.flatpickr-weekday {
    font-family: var(--main-font, inherit);
}
.css
/* ===== AJUSTES DETALLE INVERSOR (CENTRALIZADOS) ===== */

/* Input descripción tarea en línea */
.input-descripcion-tarea {
    flex: 0 0 60%;
}

/* Línea descripción + input + botón */
.descripcion-linea {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Separador más sutil en agenda derecha */
.tarea-separador-suave {
    border: none;
    border-top: 1px solid #f1f1f1;
    margin: 14px 0;
}

/* Días completados mantienen número visible */
.flatpickr-day.completed {
    color: #166534 !important;
}


/* ===============================
   AGENDA · CALENDARIO (FLATPICKR)
   =============================== */

/* Encabezados Lun, Mar, etc */
.flatpickr-weekday {
    color: #ffffff;
    font-weight: 600;
}

/* Día normal seleccionado */
.flatpickr-day.selected {
    background: #363B51;
    border-color: #363B51;
    border-radius: 6px;
    color: #ffffff;
}

/* Día con TODAS las tareas completadas */
.flatpickr-day.completed {
    background: #dcfce7;
    color: #166534;
    border-radius: 6px;
}

/* Día con ALGUNA tarea pendiente */
.flatpickr-day.pending {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 6px;
}

/* Día seleccionado + completado */
.flatpickr-day.selected.completed {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #ffffff !important;
}

/* Día seleccionado + pendiente */
.flatpickr-day.selected.pending {
    background: #991b1b !important;
    border-color: #991b1b !important;
    color: #ffffff !important;
}

/* Día actual */
.flatpickr-day.today {
    font-weight: 700;
    border-color: #4c6daf;
}

/* Flechas mes */
.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    fill: #ffffff;
}

.textarea-wide {
    width: 100%;       /* ocupa todo el espacio disponible */
    max-width: 730px;  /* ancho máximo deseado */
    min-width: 200px;  /* opcional: ancho mínimo si quieres que no se haga demasiado pequeño */
    box-sizing: border-box; /* incluye padding y borde en el ancho */
}

.calendar-title {
    font-weight: 600;
    font-size: 16px;
    text-transform: capitalize;
    margin: 0 10px; /* 10px a izquierda y derecha */
}

.cal-prev {
    margin-right: 10px;
}

.cal-next {
    margin-left: 10px;
}