/* Estilos generales */
body {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}
/* Fondo con logo */
.login-body {
    background: url('../images/logo_login.png') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}
/* Encabezado */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #9d1345; /* Mantiene el color original */
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000; /* Asegura que esté por encima de otros elementos */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Agrega sombra para resaltar */
}

.header-left img.logo {
    height: 50px; /* Tamaño del logo */
}

.header-center {
    flex-grow: 1; /* Ocupa todo el espacio disponible entre el logo y el usuario */
    display: flex;
    justify-content: center; /* Centra el menú horizontalmente */
}

.header-right {
    text-align: right;
    padding-right: 30px; /* Agrega espacio del lado derecho */
    min-width: 180px; /* Evita que se achique demasiado */
}

.user-info .user-name {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
}

.user-info .user-role {
    font-size: 14px;
    color: #e0e0e0;
}

/* Menú */
nav ul.menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px; /* Espacio entre los elementos del menú */
    position: relative;
}

nav ul.menu li {
    display: inline-block; /* Asegura que los elementos del menú estén en línea */
    position: relative; /* Necesario para submenús */
}

/* Enlaces principales */
nav ul.menu li a, nav ul.menu li span {
    text-decoration: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    display: block;
    transition: background-color 0.3s ease-in-out;
    cursor: pointer;
}

nav ul.menu li a:hover, nav ul.menu li span:hover {
    background-color: #1c678a; /* Color al pasar el cursor */
}

/* Submenús */
nav ul.menu li .submenu {
    display: none; /* Los submenús están ocultos por defecto */
    position: absolute;
    top: 100%; /* Se muestra debajo del enlace principal */
    left: 0;
    background-color: #2d8db1;
    padding: 10px 0;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

nav ul.menu li .submenu li {
    margin: 0;
}

nav ul.menu li .submenu li a {
    padding: 10px 20px;
    white-space: nowrap; /* Evita que el texto se corte */
}

/* Mostrar submenús al pasar el cursor */
nav ul.menu li:hover .submenu {
    display: block;
}

/* Contenido principal */
main {
    margin-top: 0;
    padding: 0;
}

main h1 {
    color: #9d1345;
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 10px;
    text-align: center;
}

main p {
    font-size: 18px;
    color: #333;
}

/* Login Container */
.login-container {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 350px;
    max-width: 90%;
}

h2 {
    color: #9d1345;
    text-align: center;
    margin-bottom: 20px;
}
h3 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
}
label {
    display: block;
    margin-bottom: 5px;
    color: #2d8db1;
}

input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}
/* Formulario */
input[type="email"], input[type="password"], input[type="text"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
button {
    width: 100%;
    padding: 10px;
    background: #9d1345;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background: #7b0f36;
}

/* Botón principal */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #9d1345;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    transition: background-color 0.3s ease-in-out;
    text-align: center;
}

.btn:hover {
    background-color: #7b0f36;
}

/* Contenedor del botón para centrarlo */
.button-container {
    margin-top: 20px;
    text-align: center;
}

.error {
    color: #ff0000;
    background: #ffe6e6;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ff0000;
    border-radius: 5px;
}
/* Pie de página */
footer {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    color: black;
    font-size: 14px;
}
/* Estilo para los iconos de acciones */
.icono {
    width: 20px;  /* Ajuste de tamaño */
    height: 20px;
    margin: 0 5px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    vertical-align: middle;  /* Alineación con el texto */
}

/* Efecto al pasar el ratón */
.icono:hover {
    transform: scale(1.2);
}

/* Contador de registros */
.result-count {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Ajustes de tabla */
.result-table {
    font-size: 14px; /* Reducir tamaño de fuente */
}

/* Resaltar fila al pasar el ratón */
.resaltable:hover {
    background-color: #f0f0f0;
}

/* Ajustar tamaño de iconos */
.icono {
    width: 18px;
    height: 18px;
    margin: 0 5px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.icono:hover {
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-wrap: wrap; /* Permite que los elementos se apilen en pantallas más pequeñas */
        text-align: center;
    }

    .header-center {
        margin-top: 10px; /* Agrega espacio entre el menú y los demás elementos */
    }

    nav ul.menu {
        flex-direction: column; /* Apila los elementos del menú verticalmente */
        gap: 10px;
    }

    nav ul.menu li .submenu {
        position: static; /* Submenús se posicionan como parte del flujo */
        box-shadow: none;
    }
}

@media (max-width: 480px) {
    .header-left img.logo {
        height: 40px; /* Reduce el tamaño del logo */
    }

    .user-info .user-name {
        font-size: 14px; /* Reduce el tamaño del nombre del usuario */
    }

    .user-info .user-role {
        font-size: 12px; /* Reduce el tamaño del rol */
    }

    nav ul.menu li a {
        padding: 8px 15px; /* Ajusta el espacio de los enlaces del menú */
    }

    nav ul.menu li .submenu li a {
        padding: 8px 10px; /* Ajusta el padding de los submenús en pantallas pequeñas */
    }
}

form {
    max-width: 600px;
    margin: auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

form div {
    margin-bottom: 15px;
}

form label {
    display: block;
    margin-bottom: 5px;
    color: #2d8db1;
}

form input, form textarea, form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

form button {
    width: 100%;
    padding: 10px;
    background-color: #9d1345;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

form button:hover {
    background-color: #7b0f36;
}

/* Estilo del formulario de búsqueda */
.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas */
    gap: 10px;
    max-width: 800px;
    margin: 0 auto 20px;
}

.search-form .form-row {
    display: flex;
    flex-direction: column;
}

.search-form button {
    grid-column: span 2; /* Botón ocupa ambas columnas */
    align-self: center;
    width: 150px;
}

/* Tabla de resultados */
.result-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px auto;
}

.result-table th, .result-table td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
}

.result-table th {
    background-color: #9d1345;
    color: #fff;
}

.result-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Dashboard */
.dashboard {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

/* Tarjetas de información */
.card {
    width: 250px;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: white !important; /* Asegura que el texto sea blanco */
    text-decoration: none; /* Quita subrayado de los enlaces */
}

/* Colores de tarjetas */
.total { background-color: #2d8db1; }  /* Azul */
.vencidos { background-color: #9d1345; }  /* Rojo Oscuro */
.verde { background-color: #28a745; }  /* Verde */
.amarillo { background-color: #ffc107; }  /* Amarillo */
.rojo { background-color: #dc3545; }  /* Rojo */
.admin { background-color: #092845; }  /* Rojo */

/* Gráfico de Tarta */
#graficoCasos {
    max-width: 500px;
    height: 400px;
    margin: auto;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
        align-items: center;
    }
}

/* Estilo para filas clickeables */
.resaltable {
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.resaltable:hover {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

#calendario {
    max-width: 900px;
    margin: 20px auto;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.task-details {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.leccion-card {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: left;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.leccion-card h3 {
    color: #2d8db1;
    margin-bottom: 10px;
}

.leccion-card p {
    margin: 5px 0;
}

.leccion-card ul {
    margin-top: 5px;
}

.leccion-card ul li a {
    color: #9d1345;
    text-decoration: underline;
}

.avance-barra-container {
    background-color: #e0e0e0;
    width: 100%;
    height: 20px;
    border-radius: 4px;
    overflow: hidden;
}

.avance-barra-fill {
    height: 100%;
    border-radius: 4px;
    opacity: 0.8;
}

 .fila-evento {
        border: 1px solid #ccc;
        padding: 10px;
        border-radius: 6px;
        margin-bottom: 12px;
        background: #f8f9fa;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        position: relative;
    }

    .fila-evento textarea,
    .fila-evento select,
    .fila-evento input {
        min-width: 140px;
        flex: 1;
    }

    .fila-evento .drag-handle {
        cursor: grab;
        position: absolute;
        left: -20px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: bold;
        color: #666;
    }

    .fila-evento button {
        background-color: #dc3545;
        color: white;
        border: none;
        padding: 4px 10px;
        cursor: pointer;
    }

    .fila-evento button:hover {
        background-color: #c82333;
    }

    .sortable-container {
        display: flex;
        flex-direction: column;
    }

.dashboard-container {
            display: flex;
            flex-direction: column;
            gap: 20px;
            width: 100%;
            padding: 20px;
        }

        /* Cuadro superior */
        .dashboard-header {
            background-color: #008080;
            color: white;
            text-align: center;
            padding: 15px;
            font-size: 20px;
            font-weight: bold;
            border-radius: 8px;
        }

        /* Fila de cuadros pequeños */
        .stats-boxes {
            display: flex;
            justify-content: space-around;
            flex-wrap: wrap;
            gap: 15px;
        }

        .stat-box {
            flex: 1;
            padding: 15px;
            border-radius: 8px;
            text-align: center;
            font-size: 18px;
            font-weight: bold;
            color: white;
            min-width: 150px;
        }

        .vencidos { background-color: #9d1345; }
        .por-vencer { background-color: #dc3545; }
        .atencion { background-color: #ffc107; color: black; }
        .con-tiempo { background-color: #28a745; }
        .cerrados { background-color: #11b02f; }

        /* Contenedor gráfico */
        .chart-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        .chart-container h3 {
            margin-bottom: 10px;
            font-size: 18px;
        }

        /* Tabla de eventos propios */
        .result-table {
            width: 100%;
            border-collapse: collapse;
        }

        .result-table th, .result-table td {
            padding: 10px;
            border: 1px solid #ddd;
            text-align: center;
        }
        
/*para el bloque de obligaciones*/
.fila-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.fila-form input,
.fila-form select {
    flex: 1;
    min-width: 120px;
}

.form-encabezado {
    border: 2px solid #2d8db1;
    padding: 15px;
    border-radius: 10px;
    background: #f4faff;
    margin-bottom: 20px;
}

.fila-obligacion {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
    position: relative;
}

.fila-obligacion textarea,
.fila-obligacion input {
    flex: 1;
    min-width: 180px;
}

.fila-obligacion button {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: #dc3545;
    color: white;
    border: none;
    font-size: 14px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 0;
    padding: 0;
}
.filtros-form-linea {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 15px;
}

.filtros-form-linea input[type="text"] {
    width: 180px;
    padding: 5px;
    font-size: 14px;
}

.filtros-form-linea button {
    padding: 5px 10px;
    font-size: 15px;
    cursor: pointer;
}
.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}
.filtros-grid {
    max-width: 900px;
    margin: 0 auto 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filtros-grid .fila {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.filtros-grid label {
    font-weight: bold;
    color: #2d8db1;
    margin-bottom: 4px;
    display: block;
}

.filtros-grid select,
.filtros-grid input[type="date"] {
    padding: 6px;
    width: 100%;
    min-width: 150px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.filtros-grid .fila > div {
    flex: 1;
    min-width: 180px;
}

/* 🔁 Responsive para pantallas pequeñas */
@media (max-width: 768px) {
    .filtros-grid .fila {
        flex-direction: column;
    }

    .filtros-grid .fila > div {
        width: 100%;
    }
}
.tab-buttons {
            display: flex;
            gap: 10px;
            margin: 20px auto;
            justify-content: center;
        }
        .tab-buttons button {
            padding: 10px 20px;
            cursor: pointer;
            border: none;
            background-color: #2d8db1;
            color: white;
            border-radius: 5px;
        }
        .tab-buttons button.active {
            background-color: #1b5c75;
        }
        .tab-content {
            display: none;
        }
        .tab-content.active {
            display: block;
        }

/* Modern Dashboard Modal System - CSS Custom Properties */
:root {
  --modal-backdrop: rgba(15, 23, 42, 0.8);
  --modal-bg: #ffffff;
  --modal-border-radius: 24px;
  --modal-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --card-bg: linear-gradient(145deg, #ffffff, #f8fafc);
  --card-border: rgba(148, 163, 184, 0.2);
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --primary-gradient: linear-gradient(135deg, #3b82f6, #1d4ed8);
  --success-gradient: linear-gradient(135deg, #10b981, #059669);
  --warning-gradient: linear-gradient(135deg, #f59e0b, #d97706);
  --danger-gradient: linear-gradient(135deg, #ef4444, #dc2626);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
}

/* Innovative Modal System */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-backdrop);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: modalFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 2rem;
}

.modal-content {
  background: var(--modal-bg);
  margin: 0 auto;
  border-radius: var(--modal-border-radius);
  width: 100%;
  max-width: 1400px;
  max-height: calc(100vh - 4rem);
  overflow: hidden;
  box-shadow: var(--modal-shadow);
  animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header {
  background: var(--primary-gradient);
  color: white;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.modal-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.close {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal-body {
  padding: 2rem;
  max-height: calc(100vh - 12rem);
  overflow-y: auto;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

.cases-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  animation: cardsSlideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.case-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.case-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.case-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.case-card:hover::before {
  transform: scaleX(1);
}

.case-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(148, 163, 184, 0.1);
}

.case-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.case-status {
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border: 2px solid rgba(255,255,255,0.2);
}

.case-status.vencido {
  background: var(--danger-gradient);
  color: white;
}

.case-status.alerta {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
}

.case-status.riesgo, .case-status.por-vencer {
  background: var(--warning-gradient);
  color: white;
}

.case-status.tiempo, .case-status.en-tiempo {
  background: var(--success-gradient);
  color: white;
}

.case-status.cerrado {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.case-body {
  margin-bottom: 1.5rem;
}

.case-body p {
  margin: 0.75rem 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.case-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: rgba(148, 163, 184, 0.2);
  border-radius: 50px;
  margin: 1rem 0;
  overflow: hidden;
  position: relative;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: progressShimmer 2s infinite;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8, #3b82f6);
  background-size: 200% 100%;
  border-radius: 50px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  animation: progressGradient 3s ease-in-out infinite;
  position: relative;
}

.case-advances {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.case-advances h5 {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.advance-item {
  background: linear-gradient(145deg, #f8fafc, #ffffff);
  padding: 1rem;
  margin: 0.75rem 0;
  border-radius: 12px;
  border-left: 4px solid var(--primary-gradient);
  position: relative;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.advance-item:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.advance-item small {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.advance-item p {
  margin: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.advance-percentage {
  position: absolute;
  right: 1rem;
  top: 1rem;
  background: var(--primary-gradient);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.case-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn-primary, .btn-secondary {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -3px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
  color: var(--text-primary);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.btn-secondary:hover {
  background: linear-gradient(145deg, #e2e8f0, #cbd5e1);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.loading, .error, .no-cases {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  font-size: 1.125rem;
  font-weight: 500;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading::before {
  content: '';
  width: 3rem;
  height: 3rem;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.error {
  color: #ef4444;
  background: linear-gradient(145deg, #fef2f2, #ffffff);
  border-radius: 16px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.no-cases {
  background: linear-gradient(145deg, #f8fafc, #ffffff);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Modern Animations */
@keyframes modalFadeIn {
  from { 
    opacity: 0;
  }
  to { 
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from { 
    opacity: 0;
    transform: translateY(-2rem) scale(0.95);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardsSlideUp {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progressShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes progressGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design - Mobile First */
@media (max-width: 640px) {
  .modal {
    padding: 1rem;
  }
  
  .modal-content {
    max-height: calc(100vh - 2rem);
    border-radius: 16px;
  }
  
  .modal-header {
    padding: 1.5rem;
  }
  
  .modal-header h3 {
    font-size: 1.5rem;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .cases-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .case-card {
    padding: 1rem;
  }
  
  .case-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .cases-container {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

@media (min-width: 1024px) {
  .cases-container {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  }
  
  .modal-content {
    max-width: 1200px;
  }
}

@media (min-width: 1280px) {
  .cases-container {
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  }
  
  .modal-content {
    max-width: 1400px;
  }
}

/* Enhanced Clickable Stats */
.clickable-stat {
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.clickable-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.clickable-stat:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.clickable-stat:hover::before {
  left: 100%;
}

.clickable-stat:active {
  transform: translateY(-2px) scale(1.02);
}

/* Professional Pagination System - Override global button styles */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0;
  padding: 16px;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
}

.pagination-controls > span {
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
  padding: 4px 0;
}

.pagination-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 40px;
  width: auto !important;
  padding: 0 12px !important;
  margin: 0 !important;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pagination-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pagination-btn.active {
  background: linear-gradient(135deg, #9d1345, #7b0f36);
  border-color: #9d1345;
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(157, 19, 69, 0.3);
}

.pagination-btn.active:hover {
  background: linear-gradient(135deg, #7b0f36, #9d1345);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px rgba(157, 19, 69, 0.4);
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 8px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
}

/* Mobile responsive pagination */
@media (max-width: 640px) {
  .pagination-controls {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }
  
  .pagination-controls > span {
    font-size: 13px;
  }
  
  .pagination-buttons {
    width: 100%;
    justify-content: center;
    overflow-x: auto;
  }
  
  .pagination-btn {
    height: 32px;
    min-width: 36px;
    padding: 0 10px !important;
    font-size: 13px;
  }
  
  .pagination-ellipsis {
    height: 32px;
    padding: 0 6px;
  }
}

@media (max-width: 480px) {
  .pagination-btn {
    height: 30px;
    min-width: 32px;
    padding: 0 8px !important;
    font-size: 12px;
    border-radius: 6px;
  }
}

/* ========================================
   Reusable Components - Card Grid & Filter Bar
   ======================================== */

/* Page Container */
.app-page,
.reportes-page {
    max-width: 1400px;
    margin: 0 auto;
}

.app-page h1,
.reportes-page h1 {
    margin-top: 0;
    margin-bottom: 20px;
}

/* Filter Bar - Single Line Compact Design */
.filter-bar,
.filters-panel {
    background: white;
    border-radius: 8px;
    padding: 16px 20px 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-bar__form,
.filters-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-bar__fields,
.filters-grid {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(128px, 1fr) minmax(128px, 1fr) max-content;
    grid-template-areas:
        "sistema prioridad estado actions"
        "search  search    search  search";
    gap: 8px 12px;
    align-items: end;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-field--sistema {
    grid-area: sistema;
}

.filter-field--prioridad {
    grid-area: prioridad;
}

.filter-field--estado {
    grid-area: estado;
}

.filter-field--search {
    grid-area: search;
}

.filter-field label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
}

.filter-field select,
.filter-field input[type="text"] {
    height: 36px;
    line-height: 1.2;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: white;
    box-sizing: border-box;
}

.filter-field select:focus,
.filter-field input[type="text"]:focus {
    outline: none;
    border-color: var(--secondary-color, #1c678a);
}

.filter-bar__actions,
.filters-actions {
    grid-area: actions;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-self: end;
}

/* Buttons */
.btn {
    padding: 9px 18px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-color, #9d1345);
    color: white;
}

.btn-primary:hover {
    background-color: #7a0f36;
}

.btn-secondary {
    background-color: var(--primary-color, #9d1345);
    color: white;
}

.btn-secondary:hover {
    background-color: #7a0f36;
}

/* Ensure filter bar buttons use primary color - override gradients */
.filter-bar .btn-primary,
.filter-bar .btn-secondary {
    background: var(--primary-color, #9d1345) !important;
    background-image: none !important;
    color: white !important;
    opacity: 1 !important;
    box-shadow: 0 2px 4px rgba(157, 19, 69, 0.3) !important;
}

.filter-bar .btn-primary:hover,
.filter-bar .btn-secondary:hover {
    background: #7a0f36 !important;
    background-image: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(157, 19, 69, 0.4) !important;
}

.btn-text {
    background-color: transparent;
    color: #666;
    padding: 9px 14px;
}

.btn-text:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Active Filters Chips */
.filter-bar__chips,
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.active-filters-label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background-color: #f0f0f0;
    border-radius: 16px;
    font-size: 12px;
    color: #333;
}

.filter-chip strong {
    font-weight: 600;
}

.filter-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #666;
    color: white;
    text-decoration: none;
    font-size: 12px;
    line-height: 1;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    padding: 0;
}

.filter-chip-remove:hover {
    background-color: var(--primary-color, #9d1345);
}

/* Results Header */
.results-header {
    margin-bottom: 16px;
}

.results-count {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Card Grid - Reusable */
.card-grid,
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

@media (min-width: 1280px) {
    .card-grid,
    .report-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1279px) {
    .card-grid,
    .report-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .card-grid,
    .report-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Component - Reusable */
.card,
.report-card {
    background: white;
    border-radius: 10px;
    border-left: 4px solid #ccc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card:hover,
.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card Status Colors */
.card--status-overdue,
.report-card.card--status-overdue {
    border-left-color: #e53935;
    background-color: #fdecea;
}

.card--status-critical,
.report-card.card--status-critical {
    border-left-color: #ff0000;
    background-color: #ffebee;
}

.card--status-warning,
.report-card.card--status-warning {
    border-left-color: #f6c026;
    background-color: #fff8e1;
}

.card--status-ok,
.report-card.card--status-ok {
    border-left-color: #2e7d32;
    background-color: #e8f5e9;
}

.card--status-completed,
.report-card.card--status-completed {
    border-left-color: #9e9e9e;
    background-color: #f5f5f5;
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1c678a;
    text-decoration: none;
    transition: color 0.2s;
}

.card-title:hover {
    color: #154d6b;
    text-decoration: underline;
}

.status-chip {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card Body */
.card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-description {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #666;
}

.meta-label {
    font-weight: 500;
    color: #333;
}

.priority-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-alta {
    background-color: #ffebee;
    color: #c62828;
}

.priority-media {
    background-color: #fff8e1;
    color: #f57f17;
}

.priority-baja {
    background-color: #e8f5e9;
    color: #2e7d32;
}

/* Card Assignees */
.card-assignees {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #1c678a;
    color: white;
    font-size: 11px;
    font-weight: 600;
    cursor: default;
}

.avatar-more {
    background-color: #666;
}

/* Card Footer */
.card-footer {
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Task Progress Meter - Renamed to avoid collision with global .progress-bar */
.task-progress-meter {
    flex: 1;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.task-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.task-progress-fill.has-progress {
    min-width: 6px;
}

.progress-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    min-width: 45px;
    text-align: right;
}

/* Gestionar Page - Extended Filters */
.gestionar-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) max-content;
    grid-template-areas:
        "sistema prioridad estado usuario estado-tarea ."
        "fecha-desde fecha-hasta search search search actions";
    gap: 12px 16px;
    align-items: end;
    width: 100%;
}

.gestionar-filters > * {
    min-width: 0;
}

.gestionar-filters select,
.gestionar-filters input {
    width: 100%;
}

.gestionar-filters .filter-field--sistema {
    grid-area: sistema;
}

.gestionar-filters .filter-field--prioridad {
    grid-area: prioridad;
}

.gestionar-filters .filter-field--estado {
    grid-area: estado;
}

.gestionar-filters .filter-field--usuario {
    grid-area: usuario;
}

.gestionar-filters .filter-field--search {
    grid-area: search;
}

.gestionar-filters .filter-field--estado-tarea {
    grid-area: estado-tarea;
}

.gestionar-filters .filter-field--fecha-desde {
    grid-area: fecha-desde;
}

.gestionar-filters .filter-field--fecha-hasta {
    grid-area: fecha-hasta;
}

.gestionar-filters .filters-actions {
    grid-area: actions;
    justify-self: end;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

/* Tasks Table - Modern Design */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tasks-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    table-layout: fixed;
    overflow: visible;
}

.tasks-table thead {
    background-color: #f5f5f5;
}

.tasks-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    border-bottom: 2px solid #e0e0e0;
}

.tasks-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    word-wrap: break-word;
}

.tasks-table tbody tr {
    position: relative;
}

.tasks-table tbody tr:hover {
    background-color: rgba(157, 19, 69, 0.05) !important;
}

.tasks-table tbody tr.menu-open {
    z-index: 1000;
}

/* Description Cell with Clamp */
.desc-cell {
    position: relative;
}

.desc-cell .cell-text {
    overflow: hidden;
    word-break: break-word;
}

.desc-cell .cell-text.clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.desc-cell .cell-text.expanded {
    -webkit-line-clamp: unset;
    max-height: none;
}

.desc-cell .toggle-desc {
    background: none;
    border: 0;
    color: #1c678a;
    cursor: pointer;
    padding: 4px 0 0 0;
    font-size: 13px;
    text-decoration: underline;
}

.desc-cell .toggle-desc:hover {
    color: #9d1345;
}

/* Sticky Actions Column */
.actions-cell {
    position: sticky;
    right: 0;
    background: #fff;
    z-index: 10;
    white-space: nowrap;
    box-shadow: -6px 0 6px -6px rgba(0, 0, 0, 0.1);
}

.actions-cell .actions {
    display: flex;
    align-items: center;
    gap: 2px;
    position: relative;
}

.actions-cell .kebab {
    background: none;
    border: 0;
    cursor: pointer;
    padding: 6px;
    font-size: 18px;
    color: #666;
    transition: color 0.2s;
}

.actions-cell .kebab:hover {
    color: #9d1345;
}

.actions-cell .actions-menu {
    position: absolute;
    right: 0;
    top: 100%;
    display: none;
    min-width: 160px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    margin-top: 4px;
}

.actions-cell .actions.open .actions-menu {
    display: block;
}

.actions-cell .actions-menu a {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.actions-cell .actions-menu a:hover {
    background-color: #f5f5f5;
}

.actions-cell .actions-menu a:first-child {
    border-radius: 6px 6px 0 0;
}

.actions-cell .actions-menu a:last-child {
    border-radius: 0 0 6px 6px;
}

.priority-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.priority-alta {
    background-color: #ffebee;
    color: #c62828;
}

.priority-media {
    background-color: #fff8e1;
    color: #f57f17;
}

.priority-baja {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-ok {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-warning {
    background-color: #fff8e1;
    color: #f57f17;
}

.status-critical {
    background-color: #ffebee;
    color: #c62828;
}

.status-overdue {
    background-color: #fdecea;
    color: #b71c1c;
}

.status-completed {
    background-color: #f5f5f5;
    color: #666;
}

.actions-cell {
    white-space: nowrap;
}

.btn-icon {
    display: inline-block;
    padding: 4px;
    margin: 0;
    text-decoration: none;
    font-size: 16px;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.2);
}


.results-header {
    margin: 20px 0 10px;
}

.result-count {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Responsive - Mobile Card Layout */
@media (max-width: 768px) {
    .gestionar-filters {
        grid-template-columns: 1fr;
        grid-template-areas:
            "sistema"
            "prioridad"
            "estado"
            "usuario"
            "search"
            "estado-tarea"
            "fecha-desde"
            "fecha-hasta"
            "actions";
    }
    
    .gestionar-filters .filters-actions {
        justify-self: stretch;
    }
    
    /* Convert table to cards on mobile */
    .tasks-table,
    .tasks-table thead,
    .tasks-table tbody,
    .tasks-table tr,
    .tasks-table th,
    .tasks-table td {
        display: block;
    }
    
    .tasks-table thead {
        display: none;
    }
    
    .tasks-table tr {
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        border-radius: 8px;
        overflow: visible;
        background: #fff;
    }
    
    .tasks-table td {
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 8px;
        padding: 12px 16px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .tasks-table td:last-child {
        border-bottom: none;
    }
    
    .tasks-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        font-size: 13px;
    }
    
    .actions-cell {
        position: static;
        box-shadow: none;
        background: #f5f5f5;
    }
    
    .actions-cell .actions {
        justify-content: flex-start;
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.empty-state h3 {
    margin: 16px 0 8px;
    color: #333;
    font-size: 20px;
}

.empty-state p {
    color: #666;
    margin-bottom: 24px;
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .filter-bar,
    .filters-panel {
        padding: 14px 16px;
    }
    
    .filter-bar__fields,
    .filters-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "sistema"
            "prioridad"
            "estado"
            "search"
            "actions";
        gap: 12px;
    }
    
    .filter-bar__actions,
    .filters-actions {
        justify-self: stretch;
    }
    
    .btn {
        flex: 1;
        justify-content: center;
    }
    
    .card,
    .report-card {
        padding: 14px;
    }
    
    .card-title {
        font-size: 15px;
    }
    
    .meta-row {
        flex-direction: column;
        gap: 6px;
    }
}

/* Modern Professional Modal */
.task-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.task-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.task-modal__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: backdrop-filter 0.3s ease;
}

.task-modal__container {
    position: relative;
    width: 95%;
    max-width: 1100px;
    height: 90vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.task-modal.is-open .task-modal__container {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.task-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.task-modal__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1c678a;
    letter-spacing: -0.02em;
}

.task-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.task-modal__close:hover {
    background: rgba(157, 19, 69, 0.1);
    color: #9d1345;
    transform: rotate(90deg);
}

.task-modal__close:active {
    transform: rotate(90deg) scale(0.95);
}

.task-modal__body {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.task-modal__iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .task-modal__container {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
    }
    
    .task-modal__header {
        padding: 16px 20px;
    }
    
    .task-modal__title {
        font-size: 18px;
    }
}
