/* =========================================
   UI V2 FIXES
   Ajustes adicionales para FastAPI v2
   ========================================= */

/* Empty state small (para listas vacías inline) */
.empty-state-small {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    padding: var(--space-3);
    text-align: center;
    font-style: italic;
    list-style: none;
}

/* Clickable header para tareas completadas */
.clickable {
    cursor: pointer;
    user-select: none;
}

.clickable:hover {
    color: var(--primary);
}

/* -----------------------------------------
   LOGO STYLES
   ----------------------------------------- */

/* Logo en el header/nav */
.nav-logo {
    display: flex;
    align-items: center;
    margin-right: var(--space-5);
    text-decoration: none;
}

.nav-logo img {
    height: 36px;
    width: auto;
}

/* Logo en login */
.auth-logo {
    display: block;
    width: 120px;
    max-width: 120px;
    height: auto;
    margin: 0 auto var(--space-4);
}

/* Responsive logo adjustments */
@media (max-width: 768px) {
    .nav-logo img {
        height: 28px;
    }

    .auth-logo {
        width: 120px;
    }
}

/* -----------------------------------------
   CHECKBOX TAREAS (Dashboard)
   ----------------------------------------- */

.tarea-checkbox-form {
    display: inline-flex;
    align-items: center;
    margin-right: var(--space-2);
}

.tarea-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.tarea-item {
    display: flex;
    align-items: flex-start;
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border);
}

.tarea-item:last-child {
    border-bottom: none;
}

.tarea-content {
    flex: 1;
}

.tarea-main {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
}

.tarea-descripcion {
    font-weight: 500;
}

.tarea-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: var(--font-size-xs);
    border-radius: var(--radius);
    font-weight: 600;
}

.tarea-badge.vencida {
    background-color: var(--danger);
    color: white;
}

.tarea-meta {
    display: flex;
    gap: var(--space-3);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.tarea-fecha {
    font-weight: 500;
}

.tarea-cliente {
    color: var(--text-muted);
}

/* Tarea vencida styling */
.tarea-item.tarea-vencida .tarea-descripcion {
    color: var(--danger);
}

/* -----------------------------------------
   TAREA ACTIONS (Caso detalle)
   ----------------------------------------- */

.tarea-actions {
    display: flex;
    gap: var(--space-1);
    margin-top: var(--space-2);
}

.tarea-actions form {
    margin: 0;
}

/* -----------------------------------------
   TIMELINE EDIT BUTTON
   ----------------------------------------- */

.timeline-meta {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

/* -----------------------------------------
   DESCRIPCION CELL (Lista casos)
   ----------------------------------------- */

.descripcion-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* -----------------------------------------
   SORTABLE TABLES
   ----------------------------------------- */

.sortable-table th.sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable-table th.sortable a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.sortable-table th.sortable a:hover {
    color: var(--primary);
}

.sortable-table th.sortable.sorted {
    color: var(--primary);
}

.sortable-table th.sortable .sort-icon {
    font-size: 10px;
    opacity: 0.8;
}

/* -----------------------------------------
   FILTER BAR (Normativa/Jurisprudencia)
   ----------------------------------------- */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
}

.filter-label {
    font-weight: 500;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.filter-chip {
    display: inline-block;
    padding: 4px 12px;
    font-size: var(--font-size-sm);
    border-radius: 20px;
    background: var(--bg-secondary);
    color: var(--text);
    text-decoration: none;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.filter-chip:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* -----------------------------------------
   OBSERVACIONES TEXT
   ----------------------------------------- */

.observaciones-text {
    color: var(--primary);
    font-style: italic;
}

/* -----------------------------------------
   FORM ROW (Two columns)
   ----------------------------------------- */

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-help {
    display: block;
    margin-top: var(--space-1);
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}
