/* public/assets/css/components.css */

/* Sidebar Brand & Header Components */
.sidebar-header {
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: var(--glass-border);
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--corp-white);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, rgba(16, 68, 102, 0.6), rgba(0, 191, 255, 0.2));
  border: 1px solid rgba(0, 191, 255, 0.3);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 0 12px var(--corp-cyan-glow);
  transition: all var(--transition-fast);
}

.brand-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 2px rgba(0, 191, 255, 0.5));
}

/* Sidebar Collapsed Mode Adjustments */
.app-sidebar.collapsed .brand-text {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 1.25rem 0.5rem;
}

.app-sidebar.collapsed .tenant-switcher-container,
.app-sidebar.collapsed .nav-item span {
  display: none !important;
}

/* Topbar Brand Preview Badge */
.topbar-brand-preview {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: rgba(16, 68, 102, 0.35);
  border: 1px solid rgba(208, 236, 251, 0.15);
  border-radius: 20px;
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
}

.topbar-logo-img {
  height: 20px;
  width: auto;
  max-width: 50px;
  object-fit: contain;
}

/* Navigation Menu Items */
.nav-group {
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  color: var(--corp-text-muted);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.nav-item:hover {
  color: var(--corp-ice);
  background: var(--glass-bg-hover);
}

.nav-item.active {
  color: var(--corp-cyan);
  background: var(--glass-bg-active);
  border-left: 3px solid var(--corp-cyan);
  box-shadow: inset 0 0 12px rgba(0, 191, 255, 0.1);
}

/* Tenant / Despacho Switcher */
.tenant-switcher-container {
  padding: 0.75rem 1rem;
  border-bottom: var(--glass-border);
}

.tenant-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 68, 102, 0.35);
  border: 1px solid rgba(208, 236, 251, 0.15);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  color: var(--corp-ice);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tenant-btn:hover {
  border-color: var(--corp-cyan);
  background: rgba(16, 68, 102, 0.55);
}

.tenant-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.tenant-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--corp-white);
}

.tenant-role {
  font-size: 11px;
  color: var(--corp-cyan);
}

.tenant-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0.75rem;
  right: 0.75rem;
  background: rgba(12, 30, 43, 0.98);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(0, 191, 255, 0.35);
  border-radius: 8px;
  padding: 0.6rem;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.hidden {
  display: none !important;
}

/* Topbar Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.success {
  background: var(--status-success-bg);
  color: var(--status-success);
  border: 1px solid rgba(0, 230, 118, 0.3);
}

.status-badge.warning {
  background: var(--status-warning-bg);
  color: var(--status-warning);
  border: 1px solid rgba(255, 179, 0, 0.3);
}

.status-badge.danger {
  background: var(--status-danger-bg);
  color: var(--status-danger);
  border: 1px solid rgba(255, 82, 82, 0.3);
}

.status-badge.info {
  background: var(--status-info-bg);
  color: var(--status-info);
  border: 1px solid rgba(0, 191, 255, 0.3);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* Glass Datatable & Responsive Table Container */
.table-responsive {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 191, 255, 0.45) rgba(12, 30, 43, 0.5);
  border-radius: 10px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(208, 236, 251, 0.1);
  background: rgba(12, 30, 43, 0.25);
}

.table-responsive::-webkit-scrollbar {
  height: 7px;
  width: 7px;
}
.table-responsive::-webkit-scrollbar-track {
  background: rgba(12, 30, 43, 0.6);
  border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(0, 191, 255, 0.4);
  border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--corp-cyan);
}

.table-glass {
  width: 100%;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
}

.table-glass th {
  background: rgba(16, 68, 102, 0.75);
  color: var(--corp-ice);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: var(--glass-border);
  white-space: nowrap;
}

.table-glass td {
  padding: 0.65rem 0.75rem;
  background: rgba(12, 30, 43, 0.35);
  border-bottom: 1px solid rgba(208, 236, 251, 0.06);
  color: #D2E4F0;
  vertical-align: middle;
  font-size: 12.5px;
}

.table-glass tr:last-child td {
  border-bottom: none;
}

.table-glass tr:hover td {
  background: rgba(0, 191, 255, 0.08);
}

/* Specific Table Column Sizing & Wrapping */
.table-glass .cell-radicado {
  white-space: nowrap;
  min-width: 155px;
  max-width: 185px;
}
.table-glass .cell-despacho {
  min-width: 135px;
  max-width: 195px;
}
.table-glass .cell-sujetos {
  min-width: 125px;
  max-width: 175px;
}
.table-glass .cell-etapa {
  white-space: nowrap;
  min-width: 95px;
}
.table-glass .cell-actuacion {
  min-width: 130px;
  max-width: 185px;
}
.table-glass .cell-status {
  white-space: nowrap;
  min-width: 95px;
}
.table-glass .cell-actions {
  white-space: nowrap;
  min-width: 145px;
  text-align: right;
  position: sticky;
  right: 0;
  z-index: 2;
}

.table-glass th.cell-actions {
  background: rgba(16, 68, 102, 0.98);
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.35);
}

.table-glass td.cell-actions {
  background: rgba(12, 30, 43, 0.95);
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.35);
}

.table-glass tr:hover td.cell-actions {
  background: rgba(16, 52, 78, 0.98);
}

.table-glass .cell-details {
  max-width: 260px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.btn-group-glass {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

/* Mobile Toggle Button */
.sidebar-mobile-toggle {
  display: none;
  background: rgba(16, 68, 102, 0.4);
  border: 1px solid rgba(208, 236, 251, 0.2);
  color: var(--corp-ice);
  padding: 0.45rem;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.sidebar-mobile-toggle:hover {
  background: rgba(16, 68, 102, 0.7);
  border-color: var(--corp-cyan);
  color: var(--corp-cyan);
}

@media (max-width: 768px) {
  .sidebar-mobile-toggle {
    display: inline-flex;
  }
}

/* Glass Buttons & Form Inputs */
.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  border: 1px solid rgba(208, 236, 251, 0.2);
  background: rgba(16, 68, 102, 0.45);
  color: var(--corp-ice);
}

.btn-glass.primary {
  background: linear-gradient(135deg, #0095D9, #00BFFF);
  color: #061520;
  border-color: rgba(0, 191, 255, 0.6);
  box-shadow: 0 2px 10px rgba(0, 191, 255, 0.25);
}

.btn-glass.primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 14px rgba(0, 191, 255, 0.4);
}

.btn-glass.secondary:hover {
  border-color: var(--corp-cyan);
  color: var(--corp-white);
  background: rgba(16, 68, 102, 0.7);
}

.btn-glass.xs {
  padding: 0.3rem 0.65rem;
  font-size: 11.5px;
  border-radius: 6px;
}

.input-glass,
.select-glass {
  background: rgba(12, 30, 43, 0.75);
  border: 1px solid rgba(208, 236, 251, 0.2);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  color: var(--corp-white);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition-fast);
}

.input-glass:focus,
.select-glass:focus {
  border-color: var(--corp-cyan);
  box-shadow: 0 0 0 2px rgba(0, 191, 255, 0.15);
}

/* ==========================================================================
   Accessibility utilities (WCAG 2.1 AA support)
   ========================================================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  background: var(--corp-navy);
  color: var(--corp-white);
  padding: 0.75rem 1.1rem;
  border-radius: 0 0 8px 0;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
  outline: 2px solid var(--corp-cyan);
  outline-offset: 2px;
}

*:focus-visible {
  outline: 2px solid var(--corp-cyan);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Layout shell: login & topbar (migrated from inline styles)
   ========================================================================== */
.login-hero { text-align: center; margin-bottom: 2rem; }
.login-brand-badge {
  margin: 0 auto 1.25rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: rgba(16, 68, 102, 0.4);
  border: 1px solid rgba(0, 191, 255, 0.35);
  border-radius: 16px;
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  box-shadow: 0 0 20px rgba(0, 191, 255, 0.25);
  padding: 8px;
}
.login-logo { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 4px var(--corp-cyan)); }
.login-title { font-size: 26px; font-weight: 700; color: var(--corp-white); letter-spacing: -0.03em; margin: 0; }
.login-subtitle { color: var(--corp-text-muted); font-size: 13px; margin-top: 0.35rem; margin-bottom: 0; }
.login-error {
  background: var(--status-danger-bg);
  border: 1px solid var(--status-danger);
  color: var(--status-danger);
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 1.5rem;
}
.login-submit { width: 100%; margin-top: 1rem; padding: 0.75rem; }
.login-footer { margin-top: 2rem; text-align: center; font-size: 12px; color: var(--corp-text-muted); }

.topbar-left { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.topbar-brand-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.65rem;
  background: rgba(16, 68, 102, 0.35);
  border: 1px solid rgba(208, 236, 251, 0.15);
  border-radius: 8px;
  backdrop-filter: var(--glass-blur-sm);
  -webkit-backdrop-filter: var(--glass-blur-sm);
  flex-shrink: 0;
}
.topbar-logo-img { height: 18px; width: auto; max-width: 50px; object-fit: contain; filter: drop-shadow(0 0 2px var(--corp-cyan)); }
.topbar-firm { font-size: 12px; font-weight: 600; color: var(--corp-ice); }
.topbar-sep { font-size: 13px; color: var(--corp-text-muted); }
.topbar-breadcrumb { font-size: 14px; font-weight: 600; color: var(--corp-white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-role-label { color: var(--corp-cyan); }

/* Page headings & tables */
.panel-pad-lg { padding: 1.5rem; }
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.page-title { font-size: 20px; font-weight: 700; color: var(--corp-white); }
.page-subtitle { color: var(--corp-text-muted); font-size: 13px; }
.table-empty { text-align: center; color: var(--corp-text-muted); }

/* Sidebar */
.sidebar-brand { text-decoration: none; }
.icon-btn-ghost { background: none; border: none; color: var(--corp-text-muted); cursor: pointer; }
.tenant-switcher-container { position: relative; }
.nav-group { flex: 1; }
.dropdown-title { font-size: 11px; font-weight: 700; color: var(--corp-cyan); padding: 0.25rem 0.5rem; text-transform: uppercase; }
.dropdown-current { padding: 0.4rem 0.5rem; font-size: 12px; color: var(--corp-white); background: rgba(0, 191, 255, 0.1); border-radius: 4px; margin-bottom: 0.4rem; }
.dropdown-id { font-size: 10px; color: var(--corp-text-muted); }
.dropdown-section { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 0.4rem; }
.dropdown-link { display: block; padding: 0.35rem 0.5rem; font-size: 11px; color: var(--corp-ice); text-decoration: none; border-radius: 4px; }
.dropdown-link:hover { background: rgba(255, 255, 255, 0.05); }

/* Footer */
.footer-sep { margin: 0 0.5rem; }
.footer-accent { color: var(--corp-cyan); }

/* Utility layer (reduces inline styles) */
.text-cyan { color: var(--corp-cyan); }
.text-muted-sm { color: var(--corp-text-muted); font-size: 12px; }
.text-cyan-sm { color: var(--corp-cyan); font-size: 12px; }
.btn-link { text-decoration: none; font-size: 13px; }
.card-link { text-decoration: none; display: block; }
.text-none { text-decoration: none; }
.head-actions { display: flex; gap: 0.75rem; align-items: center; }
.page-head-wrap { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.kpi-head { display: flex; justify-content: space-between; align-items: center; }
.kpi-value { font-size: 28px; font-weight: 700; color: var(--corp-white); margin: 0.5rem 0; }
.kpi-value-cyan { font-size: 28px; font-weight: 700; color: var(--corp-cyan); margin: 0.5rem 0; }
.kpi-value-ice { font-size: 28px; font-weight: 700; color: var(--corp-ice); margin: 0.5rem 0; }
.badge-sm { font-size: 11px; }
.section-title { font-size: 16px; font-weight: 600; color: var(--corp-white); margin-bottom: 1rem; }

/* Action card component */
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.priority-badge { font-size: 11px; font-weight: 600; color: var(--corp-cyan); background: rgba(0, 212, 255, 0.1); padding: 0.15rem 0.4rem; border-radius: 3px; }
.card-title { font-size: 14px; font-weight: 700; color: var(--corp-white); margin: 0 0 0.25rem 0; }
.card-desc { font-size: 12px; color: var(--corp-text-muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: 11px; font-family: monospace; color: var(--corp-ice); background: rgba(0, 0, 0, 0.2); padding: 0.4rem 0.6rem; border-radius: 4px; }
.card-parties { color: var(--corp-text-muted); margin-top: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; font-size: 11px; color: var(--corp-text-muted); }
.date-label { display: block; font-size: 9px; text-transform: uppercase; }
.date-label-cyan { color: var(--corp-cyan); }
.date-label-danger { color: #ef4444; }
.text-danger-soft { color: #f87171; }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 0.5rem; margin-top: 0.25rem; }
.select-card { font-size: 11px; padding: 0.2rem 0.4rem; background: rgba(15, 23, 42, 0.8); }
.btn-card-draft { font-size: 10px; padding: 0.25rem 0.5rem; display: inline-flex; align-items: center; gap: 0.35rem; }

/* Expedientes index */
.mb-2 { margin-bottom: 1.5rem; }
.page-title-lg { font-size: 22px; font-weight: 700; color: var(--corp-white); margin: 0; }
.page-subtitle-tight { color: var(--corp-text-muted); font-size: 13px; margin: 0.25rem 0 0 0; }
.panel-pad-md { padding: 1.25rem; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; align-items: end; }
.filter-label { display: block; font-size: 11px; font-weight: 600; color: var(--corp-cyan); text-transform: uppercase; margin-bottom: 0.4rem; }
.filter-label-muted { display: block; font-size: 11px; font-weight: 600; color: var(--corp-text-muted); text-transform: uppercase; margin-bottom: 0.4rem; }
.w-full { width: 100%; }
.btn-row { display: flex; gap: 0.5rem; }
.flex-1 { flex: 1; }

/* Table rows (expedientes) */
.icon-lg { width: 48px; height: 48px; fill: var(--corp-text-muted); opacity: 0.5; }
.empty-state-content { text-align: center; padding: 3rem 1rem; }
.empty-title { font-weight: 600; color: var(--corp-white); margin-top: 0.5rem; }
.empty-subtitle { font-size: 13px; color: var(--corp-text-muted); }
.radicado-formatted { font-weight: 600; color: var(--corp-white); font-family: monospace; font-size: 12px; }
.radicado-raw { font-size: 10.5px; color: var(--corp-text-muted); }
.despacho-name { font-weight: 500; color: var(--corp-ice); font-size: 11.5px; line-height: 1.3; }
.despacho-meta { font-size: 10.5px; color: var(--corp-text-muted); margin-top: 2px; }
.cell-font { font-size: 11.5px; }
.sujeto-item { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sujeto-item.ddo { margin-top: 2px; }
.sujeto-dte { color: var(--corp-cyan); font-weight: 600; }
.sujeto-ddo { color: var(--corp-text-muted); font-weight: 600; }
.etapa-pill { font-size: 10.5px; background: rgba(0, 191, 255, 0.12); border: 1px solid rgba(0, 191, 255, 0.25); color: var(--corp-cyan); padding: 0.15rem 0.5rem; border-radius: 12px; font-weight: 500; }
.actuacion-title { color: var(--corp-white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.actuacion-date { font-size: 10.5px; color: var(--corp-text-muted); margin-top: 2px; }
.status-badge-cell { font-size: 10.5px; padding: 0.2rem 0.5rem; }
.pagination-wrapper-glass { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 12px; color: var(--corp-text-muted); }
.pagination-controls { display: flex; gap: 0.5rem; align-items: center; }

/* SVG icon helpers */
.risk-icon { vertical-align: -1px; margin-right: 3px; }
.icon-inline { flex-shrink: 0; }

/* Sidebar footer / logout */
.sidebar-footer { padding: 0.75rem; border-top: var(--glass-border); }
.nav-danger { color: #ff80a0; }
.tenant-dropdown.hidden { display: none; }

/* Agenda */
.view-toggle-group { background: rgba(15, 23, 42, 0.6); padding: 0.25rem; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.1); display: flex; gap: 0.25rem; }
.btn-toggle { font-size: 12px; padding: 0.4rem 0.8rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.btn-inline-icon { display: inline-flex; align-items: center; gap: 0.4rem; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.metric-card { padding: 1rem; }
.metric-red { border-left: 4px solid #ef4444; }
.metric-orange { border-left: 4px solid #f97316; }
.metric-yellow { border-left: 4px solid #eab308; }
.metric-cyan { border-left: 4px solid var(--corp-cyan); }
.metric-green { border-left: 4px solid #10b981; }
.metric-label { font-size: 11px; font-weight: 600; text-transform: uppercase; }
.metric-label-red { color: #f87171; }
.metric-label-orange { color: #fb923c; }
.metric-label-yellow { color: #fde047; }
.metric-label-cyan { color: var(--corp-cyan); }
.metric-label-green { color: #34d399; }
.metric-value { font-size: 28px; font-weight: 800; color: var(--corp-white); margin-top: 0.25rem; }
.metric-sub { font-size: 11px; color: var(--corp-text-muted); }
.kanban-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; align-items: start; }
.kanban-col-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.kanban-col-title { font-size: 14px; font-weight: 700; color: var(--corp-white); margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.kanban-count { background: rgba(255, 255, 255, 0.1); color: var(--corp-white); font-size: 11px; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 12px; }
.kanban-cards-container { display: flex; flex-direction: column; }
.kanban-empty { text-align: center; color: var(--corp-text-muted); font-size: 12px; padding: 2rem 0; font-style: italic; }
.section-title-lg { font-size: 16px; font-weight: 700; color: var(--corp-white); margin-bottom: 1.5rem; }
.timeline-empty { text-align: center; color: var(--corp-text-muted); padding: 3rem 0; }
.timeline { position: relative; padding-left: 2rem; border-left: 2px solid var(--corp-cyan); }
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-dot { position: absolute; left: -2.4rem; top: 0.2rem; width: 12px; height: 12px; border-radius: 50%; background: var(--corp-cyan); border: 2px solid var(--corp-navy); }
.timeline-card { padding: 1rem; background: rgba(255, 255, 255, 0.03); }
.timeline-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; }
.timeline-date { font-size: 11px; font-weight: 700; color: var(--corp-cyan); }
.badge-xs { font-size: 10px; }
.text-muted-xs { font-size: 12px; color: var(--corp-text-muted); margin: 0; }

/* Term calculator modal */
.calc-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 9999; display: flex; justify-content: center; align-items: center; padding: 1rem; }
.calc-panel { width: 100%; max-width: 600px; padding: 1.5rem; background: rgba(15, 23, 42, 0.95); border: 1px solid var(--corp-cyan); }
.calc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.calc-title { font-size: 16px; font-weight: 700; color: var(--corp-white); margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.calc-close { padding: 0.2rem 0.5rem; font-size: 16px; line-height: 1; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.calc-grid-lg { margin-bottom: 1.5rem; }
.calc-label { display: block; font-size: 11px; font-weight: 600; color: var(--corp-cyan); margin-bottom: 0.25rem; }
.calc-submit { width: 100%; margin-bottom: 1rem; }
.calc-results { display: none; background: rgba(0,0,0,0.3); padding: 1rem; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); font-size: 12px; }
.calc-deadline { font-size: 14px; font-weight: 700; color: var(--corp-cyan); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
.calc-firmness { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; color: var(--corp-text-muted); margin-bottom: 0.5rem; }
.calc-explanation-title { font-weight: 600; color: var(--corp-white); margin-top: 0.5rem; margin-bottom: 0.25rem; }
.calc-explanation-list { margin: 0; padding-left: 1.2rem; color: var(--corp-ice); }
.text-danger { color: #f87171; }
.calc-error { color: #ef4444; }

/* Copilot workspace */
.copilot-head { padding: 1.25rem 1.5rem; }
.title-flex { display: flex; align-items: center; gap: 0.5rem; }
.copilot-sub { margin: 0.25rem 0 0 0; color: var(--corp-cyan); font-size: 13px; }
.head-actions-wrap { flex-wrap: wrap; }
.min-w-240 { min-width: 240px; }
.split-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 1.5rem; min-height: 580px; }
.col-panel { display: flex; flex-direction: column; padding: 1.25rem; }
.cuaderno-tabs { display: flex; border-bottom: 1px solid rgba(208, 236, 251, 0.15); padding-bottom: 0.75rem; margin-bottom: 1rem; gap: 0.5rem; flex-wrap: wrap; }
.doc-viewer { flex: 1; background: rgba(12, 30, 43, 0.75); border-radius: 8px; padding: 1.25rem; font-size: 0.92rem; line-height: 1.7; color: var(--corp-ice); overflow-y: auto; max-height: 500px; border: 1px solid rgba(208, 236, 251, 0.12); }
.doc-head { border-bottom: 2px solid var(--corp-cyan); padding-bottom: 0.75rem; margin-bottom: 1rem; }
.doc-despacho { font-weight: 700; color: var(--corp-white); }
.text-muted-082 { font-size: 0.82rem; color: var(--corp-text-muted); }
.p-strong { color: var(--corp-white); margin-bottom: 0.5rem; }
.text-muted { color: var(--corp-text-muted); }
.section-divider { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 0.75rem; }
.section-divider-lg { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 0.75rem; margin-top: 1rem; }
.doc-h4 { font-size: 13px; font-weight: 700; color: var(--corp-cyan); margin: 0 0 0.75rem 0; }
.stack-075 { display: flex; flex-direction: column; gap: 0.75rem; }
.stack-05 { display: flex; flex-direction: column; gap: 0.5rem; }
.act-item { background: rgba(16, 68, 102, 0.35); border-left: 3px solid var(--corp-cyan); padding: 0.75rem; border-radius: 4px; }
.act-head { display: flex; justify-content: space-between; font-size: 11px; color: var(--corp-text-muted); margin-bottom: 0.2rem; }
.act-title { font-weight: 600; color: var(--corp-white); }
.text-ice-sm { font-size: 12px; color: var(--corp-ice); }
.act-meta { font-size: 10px; color: var(--corp-text-muted); margin-top: 0.25rem; }
.anexo-item { background: rgba(0, 191, 255, 0.08); border: 1px solid rgba(0, 191, 255, 0.2); padding: 0.5rem 0.75rem; border-radius: 6px; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.anexo-name-wrap { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.anexo-name { font-size: 11px; color: var(--corp-white); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anexo-size { font-size: 10px; color: var(--corp-text-muted); }
.anexo-actions { display: flex; gap: 0.35rem; align-items: center; flex-shrink: 0; }
.btn-xs-tight { font-size: 10px; padding: 0.2rem 0.45rem; }
.panel-head { border-bottom: 1px solid rgba(208, 236, 251, 0.15); padding-bottom: 0.75rem; margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; }
.panel-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--corp-white); }
.chat-messages { flex: 1; overflow-y: auto; max-height: 400px; padding-right: 0.5rem; display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; }
.chat-bubble { background: rgba(16, 68, 102, 0.45); border: 1px solid rgba(0, 191, 255, 0.3); padding: 1rem; border-radius: 10px; align-self: flex-start; max-width: 90%; }
.chat-author { font-size: 0.8rem; font-weight: 700; color: var(--corp-cyan); margin-bottom: 0.3rem; }
.chat-text { font-size: 0.92rem; color: var(--corp-white); }
.quick-prompts { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.drawer { display: none; position: fixed; right: 0; top: 0; width: 420px; max-width: 90vw; height: 100vh; background: rgba(12, 30, 43, 0.96); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); border-left: 1px solid rgba(0, 191, 255, 0.3); box-shadow: -5px 0 25px rgba(0,0,0,0.5); z-index: 9999; padding: 1.5rem; overflow-y: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid rgba(208, 236, 251, 0.15); padding-bottom: 1rem; margin-bottom: 1rem; }
.drawer-title { margin: 0; color: var(--corp-white); }
.text-cyan-bold { font-weight: 700; color: var(--corp-cyan); }
.text-white { color: var(--corp-white); }
.text-muted-082-mt { font-size: 0.82rem; color: var(--corp-text-muted); margin-top: 0.25rem; }
.citation-text { font-size: 0.88rem; margin-top: 0.5rem; color: var(--corp-ice); }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(12, 30, 43, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); z-index: 10000; align-items: center; justify-content: center; }
.modal-panel-lg { width: 700px; max-width: 92vw; padding: 1.5rem; border: 1px solid rgba(0, 191, 255, 0.35); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; border-bottom: 1px solid rgba(208, 236, 251, 0.15); padding-bottom: 0.75rem; }
.modal-label { font-weight: 600; font-size: 0.85rem; color: var(--corp-ice); display: block; margin-bottom: 0.4rem; }
.memorial-textarea { width: 100%; height: 260px; font-family: monospace; font-size: 0.85rem; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }

/* Copilot JS-generated markup */
.chat-msg-body { font-size: 0.92rem; color: var(--corp-white); white-space: pre-wrap; }
.chat-attributions { margin-top: 0.5rem; font-size: 0.8rem; color: var(--corp-ice); }
.pdf-modal { display: none; position: fixed; inset: 0; background: rgba(6, 16, 24, 0.88); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); z-index: 20000; align-items: center; justify-content: center; padding: 1.5rem; }
.pdf-modal-panel { background: #0d2232; border: 1px solid #00bfff; border-radius: 12px; width: 100%; max-width: 1100px; height: 90vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 16px 48px rgba(0,0,0,0.7); }
.pdf-modal-head { padding: 0.85rem 1.25rem; background: #102a3e; border-bottom: 1px solid rgba(0,191,255,0.25); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.pdf-modal-title-wrap { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.pdf-icon { font-size: 18px; }
.pdf-modal-title { font-size: 13px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-modal-actions { display: flex; gap: 0.5rem; align-items: center; flex-shrink: 0; }
.pdf-btn { font-size: 11px; padding: 0.3rem 0.6rem; }
.pdf-modal-body { flex: 1; position: relative; background: #1a1a1a; }
.pdf-modal-loader { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; background: #0c1e2b; color: #00bfff; z-index: 10; }
.pdf-spinner { width: 36px; height: 36px; border: 3px solid rgba(0,191,255,0.2); border-top-color: #00bfff; border-radius: 50%; animation: spin 0.8s linear infinite; }
.pdf-loader-text { font-size: 12px; font-weight: 500; }
.pdf-modal-iframe { width: 100%; height: 100%; border: none; }
.chat-msg-head { font-size: 0.8rem; font-weight: bold; margin-bottom: 0.3rem; }
.text-error { color: #ff80a0; }

/* Configuration page */
.cfg-title { font-size: 1.6rem; font-weight: 700; color: var(--corp-white); margin-bottom: 0.25rem; }
.cfg-sub { font-size: 0.9rem; color: var(--corp-text-muted); }
.text-semibold-white { font-weight: 600; color: var(--corp-white); }
.status-toast { display: none; padding: 0.85rem 1.2rem; border-radius: 8px; margin-bottom: 1.25rem; font-size: 0.9rem; border: 1px solid transparent; }
.cfg-tabs { display: flex; gap: 0.5rem; border-bottom: 1px solid rgba(208, 236, 251, 0.15); padding-bottom: 0.5rem; margin-bottom: 1.5rem; }
.card-heading { font-size: 1.15rem; font-weight: 600; color: var(--corp-cyan); margin-bottom: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.col-span-full { grid-column: 1 / -1; }
.nowrap { white-space: nowrap; }
.logo-preview-box { padding: 1rem; background: rgba(12, 30, 43, 0.7); border: 1px dashed rgba(0, 191, 255, 0.3); border-radius: 8px; display: flex; align-items: center; gap: 1rem; }
.logo-preview-img { height: 40px; width: auto; object-fit: contain; }
.logo-preview-title { font-size: 0.85rem; font-weight: 600; color: var(--corp-ice); margin: 0; }
.logo-preview-sub { font-size: 0.75rem; color: var(--corp-text-muted); margin: 0; }
.hint-text { font-size: 0.75rem; color: var(--corp-text-muted); }
.hint-text-block { font-size: 0.75rem; color: var(--corp-text-muted); display: block; margin-top: 0.35rem; }
.diag-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.diag-card { padding: 1rem; border-left: 3px solid var(--corp-cyan); }
.diag-label { font-size: 0.75rem; color: var(--corp-text-muted); text-transform: uppercase; }
.diag-value { font-size: 1.2rem; font-weight: 700; color: var(--corp-white); margin-top: 0.2rem; }
.diag-value-tenant { font-size: 1.1rem; font-weight: 600; color: var(--corp-ice); margin-top: 0.2rem; word-break: break-all; }
.cfg-subheading { font-size: 0.95rem; font-weight: 600; color: var(--corp-ice); margin-bottom: 0.75rem; }
.ext-grid { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.ext-name { font-weight: 600; }
.cfg-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 1.5rem; }
.cfg-btn-link { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.cfg-submit { padding: 0.65rem 1.8rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem; }

/* Consolidated: config tabs & forms (moved from view-local <style>) */
.config-tab-btn { background: transparent; border: none; color: var(--corp-text-muted); padding: 0.6rem 1rem; font-size: 0.88rem; font-weight: 600; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; transition: all 0.2s ease; }
.config-tab-btn:hover { color: var(--corp-ice); background: rgba(208, 236, 251, 0.08); }
.config-tab-btn.active { color: var(--corp-cyan); background: rgba(16, 68, 102, 0.6); border: 1px solid rgba(0, 191, 255, 0.3); }
.config-tab-content { display: none; }
.config-tab-content.active { display: block; }
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-label { font-size: 0.82rem; font-weight: 600; color: var(--corp-ice); }
/* Login layout (moved from view-local <style>) */
.login-wrapper { display: flex; align-items: center; justify-content: center; min-height: 100vh; width: 100vw; background: radial-gradient(circle at 50% 30%, rgba(16, 68, 102, 0.45) 0%, transparent 70%), var(--corp-dark); }
.login-card { width: 100%; max-width: 420px; padding: 2.5rem; }

/* Global spinner keyframes (was only defined inline in copilot) */
@keyframes spin { to { transform: rotate(360deg); } }

/* Document action buttons (expedientes/show.php) */
.doc-btn-sm { font-size: 10px; padding: 0.25rem 0.55rem; display: flex; align-items: center; gap: 0.25rem; }
.doc-btn-xs { font-size: 11px; padding: 0.25rem 0.55rem; }

/* Visibility/state helpers (replaces inline JS style writes) */
.status-toast.is-visible { display: block; }
.toast-success { background: rgba(0, 191, 255, 0.2); border-color: rgba(0, 191, 255, 0.5); color: #D0ECFB; }
.toast-error { background: rgba(255, 99, 132, 0.2); border-color: rgba(255, 99, 132, 0.5); color: #ff80a0; }
.calc-results.is-visible { display: block; }
#citation-drawer.is-open { display: block; }
#memorial-modal.is-open { display: flex; }

/* Copilot chat bubbles (was inline cssText in copilot view) */
.chat-bubble-user { background: rgba(0, 191, 255, 0.15); border: 1px solid rgba(0, 191, 255, 0.35); color: var(--corp-white); padding: 0.8rem 1rem; border-radius: 10px; align-self: flex-end; max-width: 85%; font-size: 0.92rem; }
.chat-bubble-ai { background: rgba(16, 68, 102, 0.5); border: 1px solid rgba(0, 191, 255, 0.3); padding: 1rem; border-radius: 10px; align-self: flex-start; max-width: 90%; }
.chat-bubble-fallback { background: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.4); padding: 1rem; border-radius: 10px; align-self: flex-start; max-width: 90%; }
.chat-bubble-error { background: rgba(239, 68, 68, 0.15); border: 1px solid #f87171; padding: 0.8rem; border-radius: 8px; color: #ff80a0; font-size: 0.9rem; }

/* App result / confirmation modal (sync outcome, delete confirmation) */
.modal-overlay.is-open { display: flex; }
.app-result-panel { width: 560px; max-width: 92vw; padding: 1.5rem; border: 1px solid rgba(0, 191, 255, 0.35); }
.app-result-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.app-result-icon { font-size: 1.4rem; line-height: 1; }
.app-result-title { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--corp-white); }
.app-result-message { margin: 0 0 0.75rem; font-size: 0.92rem; line-height: 1.5; color: var(--corp-ice); }
.app-result-list { margin: 0 0 0.75rem; padding-left: 1.1rem; font-size: 0.85rem; color: var(--corp-text-muted); }
.app-result-list li { margin-bottom: 0.2rem; }
.app-result-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.5rem; }
.app-result-panel[data-variant="success"] { border-color: rgba(52, 211, 153, 0.45); }
.app-result-panel[data-variant="warning"] { border-color: rgba(251, 191, 36, 0.5); }
.app-result-panel[data-variant="error"] { border-color: rgba(255, 99, 132, 0.5); }
.is-hidden { display: none !important; }

/* Sync provenance pill in the expedientes datatable */
.sync-pill-stack { margin-top: 0.35rem; }

/* Danger button variant */
.btn-glass.danger { border-color: rgba(255, 99, 132, 0.5); color: #ff80a0; }
.btn-glass.danger:hover { background: rgba(255, 99, 132, 0.15); }

/* Copilot "next step" suggestion card */
.next-step-card { border-left: 3px solid var(--corp-cyan); }
.next-step-term { margin-top: 0.5rem; font-size: 0.85rem; color: var(--corp-ice); }
.next-step-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.next-step-note { margin-top: 0.5rem; font-size: 0.75rem; color: var(--corp-text-muted); }
.next-step-confirm { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; margin-top: 0.6rem; }
.next-step-label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.75rem; color: var(--corp-text-muted); }
.next-step-days { width: 5.5rem; }


/* Auto-migrated utility classes from expedientes/show.php */
.u4d1aab5c { position: fixed; inset: 0; background: rgba(12, 30, 43, 0.75); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); z-index: 10000; display: flex; justify-content: flex-end; }
.u737e3cb3 { width: 780px; max-width: 100vw; height: 100vh; overflow-y: auto; padding: 1.5rem; border-left: 1px solid rgba(0, 191, 255, 0.2); box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5); }
.uec11539d { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 1rem; gap: 0.75rem; }
.u06394740 { min-width: 0; overflow: hidden; }
.ubf7c7a7d { display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.4rem; flex-wrap: wrap; }
.u872d73a6 { font-size: 11px; background: rgba(0, 191, 255, 0.15); border: 1px solid rgba(0, 191, 255, 0.3); color: var(--corp-cyan); }
.u4211a7b7 { font-size: 19px; font-weight: 700; color: var(--corp-white); font-family: monospace; margin: 0.25rem 0; word-break: break-all; }
.uf1481d69 { color: var(--corp-ice); font-size: 13px; margin: 0; font-weight: 500; }
.u85775bed { font-size: 18px; line-height: 1; flex-shrink: 0; padding: 0.3rem 0.6rem; }
.uc9862675 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; font-size: 12px; }
.u756cf3c0 { padding: 0.75rem; }
.udcf70c3e { color: var(--corp-cyan); font-weight: 600; font-size: 11px; text-transform: uppercase; display: block; margin-bottom: 0.2rem; }
.u0c8089e2 { color: var(--corp-white); font-size: 12px; line-height: 1.4; display: block; }
.u7612cd6c { color: var(--corp-text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; display: block; margin-bottom: 0.2rem; }
.u99438016 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.5rem; margin-bottom: 1.25rem; font-size: 11px; }
.u89e418dd { padding: 0.5rem 0.75rem; }
.uee5fda44 { color: var(--corp-text-muted); display: block; }
.u00ea9f3d { color: var(--corp-cyan); font-size: 13px; }
.ue7a0756a { color: var(--corp-white); font-size: 13px; }
.u2fbf1fff { color: var(--corp-white); font-size: 12px; }
.u4ca65a02 { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 0.5rem; }
.u6e2da476 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.ubf7bccd3 { font-size: 14px; font-weight: 600; color: var(--corp-cyan); margin: 0; }
.ue85405b1 { padding: 2rem; text-align: center; }
.u758ef9f3 { color: var(--corp-text-muted); font-size: 13px; margin: 0; }
.u9a034763 { display: flex; flex-direction: column; gap: 0.85rem; }
.u84da7ad2 { padding: 1rem; border-left: 3px solid var(--corp-cyan); }
.u965ede54 { display: flex; justify-content: space-between; align-items: flex-start; font-size: 11px; color: var(--corp-text-muted); margin-bottom: 0.4rem; gap: 0.5rem; flex-wrap: wrap; }
.u269109b7 { font-weight: 600; color: var(--corp-cyan); }
.u70cdfab5 { margin: 0 0.3rem; }
.uafcd7ed5 { display: flex; gap: 0.5rem; align-items: center; }
.u05017181 { color: var(--corp-ice); font-weight: 500; }
.ub8676152 { color: var(--corp-text-muted); font-size: 10px; }
.ud08ddec5 { font-size: 13px; font-weight: 700; color: var(--corp-white); margin: 0 0 0.4rem 0; line-height: 1.4; }
.u73005730 { font-size: 12px; color: var(--corp-ice); margin: 0 0 0.5rem 0; line-height: 1.45; background: rgba(0, 0, 0, 0.2); padding: 0.5rem 0.75rem; border-radius: 6px; }
.u9f040acf { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.4rem; font-size: 11px; }
.u13598469 { font-size: 10px; background: rgba(0, 191, 255, 0.12); color: var(--corp-cyan); border: 1px solid rgba(0, 191, 255, 0.25); }
.ufd81fdd6 { margin-top: 0.75rem; padding-top: 0.6rem; border-top: 1px dashed rgba(0, 191, 255, 0.25); }
.u16c38536 { font-size: 11px; font-weight: 600; color: var(--corp-cyan); margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.35rem; }
.u1d07f17f { display: flex; flex-direction: column; gap: 0.4rem; }
.u60cff968 { display: flex; justify-content: space-between; align-items: center; background: rgba(0, 191, 255, 0.08); padding: 0.5rem 0.75rem; border-radius: 6px; border: 1px solid rgba(0, 191, 255, 0.2); gap: 0.5rem; flex-wrap: wrap; }
.u53eab3a0 { display: flex; align-items: center; gap: 0.5rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u267f6d50 { font-size: 14px; }
.u3558672d { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.uaeb9fc97 { font-size: 11px; color: var(--corp-white); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc49f02e1 { font-size: 10px; color: var(--corp-text-muted); }
.ue81d9538 { display: flex; gap: 0.35rem; align-items: center; flex-shrink: 0; }
.u515e6ea2 { margin-top: 0.6rem; padding: 0.5rem 0.75rem; background: rgba(0, 191, 255, 0.08); border-radius: 6px; border: 1px solid rgba(0, 191, 255, 0.2); display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.u1ed50ab5 { display: flex; align-items: center; gap: 0.4rem; }
.uce7b2d69 { font-size: 11px; color: var(--corp-cyan); font-weight: 500; }
.uf26709fa { display: flex; gap: 0.35rem; align-items: center; }
.u224b51a7 { display: none; }
.ud4ba58a6 { font-size: 14px; font-weight: 600; color: var(--corp-cyan); margin-bottom: 1rem; }
.u84df9acd { display: flex; flex-direction: column; gap: 0.75rem; }
.u85f866c8 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; }
.u85421a2c { font-size: 10px; background: rgba(0, 191, 255, 0.15); color: var(--corp-cyan); }
.uf889a467 { font-size: 11px; color: var(--corp-text-muted); }
.u0f6e0d8a { padding: 1rem; border-left: 3px solid rgba(255, 255, 255, 0.2); }
.u6c3a33c6 { font-size: 10px; background: rgba(255, 255, 255, 0.1); color: var(--corp-ice); }
.u04f65d97 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; }
.ub306b098 { color: var(--corp-white); font-size: 13px; display: block; margin-bottom: 0.25rem; }
.ud8d6f7a6 { padding: 1rem; }
.uab18f9ce { color: var(--corp-text-muted); font-size: 12px; margin-top: 0.25rem; }
.u948e6d6e { display: flex; justify-content: space-between; align-items: center; }
.u5d76595a { font-size: 10px; }
.uc2baf7fc { color: var(--corp-text-muted); font-size: 12px; margin: 0.5rem 0 0 0; }
.u2da54c8a { padding: 1.5rem; text-align: center; }
.uf9c8c57d { padding: 0.75rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.u21e49f44 { color: var(--corp-white); font-size: 12px; display: block; word-break: break-all; }
.u29cb39a5 { font-size: 10px; color: var(--corp-text-muted); display: block; margin-top: 0.2rem; }
.udb00f7b2 { display: flex; gap: 0.4rem; flex-shrink: 0; align-items: center; }
.u6e23d89a { margin-top: 1.5rem; padding: 1rem; }
.u670e919c { font-size: 12px; font-weight: 600; color: var(--corp-cyan); margin: 0 0 0.75rem 0; }
.u447668bb { margin-bottom: 0.75rem; width: 100%; }
.u199b6f0e { width: 100%; }
.u2eb7eca1 { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.08); display: flex; justify-content: space-between; align-items: center; }

/* Casos (pre-radicación): intake console, drawer and sub-resources */
.caso-textarea { min-height: 84px; resize: vertical; }
.caso-form-error { font-size: 12px; color: #ff80a0; margin: 0; }
.caso-form-hint { font-size: 11px; color: var(--corp-text-muted); max-width: 62%; line-height: 1.45; }
.caso-link-note { font-size: 11.5px; color: var(--corp-text-muted); margin: 0.5rem 0 0.75rem; line-height: 1.5; }
.caso-drawer-backdrop { position: fixed; inset: 0; background: rgba(12, 30, 43, 0.75); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); z-index: 10000; display: flex; justify-content: flex-end; }
.caso-drawer { width: 760px; max-width: 100vw; height: 100vh; overflow-y: auto; padding: 1.5rem; border-left: 1px solid rgba(0, 191, 255, 0.2); box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5); }
.caso-drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.caso-drawer-title { font-size: 18px; font-weight: 700; color: var(--corp-white); margin: 0.35rem 0 0 0; }
.caso-drawer-sub { font-size: 12px; color: var(--corp-text-muted); margin: 0.2rem 0 0 0; }
.caso-badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.caso-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.caso-fact { padding: 0.75rem; }
.caso-fact-label { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--corp-text-muted); margin-bottom: 0.25rem; }
.caso-fact-value { font-size: 12px; color: var(--corp-white); word-break: break-word; }
.caso-block { margin-bottom: 1.25rem; }
.caso-block-title { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--corp-cyan); margin: 0 0 0.5rem 0; }
.caso-text { font-size: 12.5px; color: var(--corp-ice); line-height: 1.55; white-space: pre-wrap; margin: 0; }
.caso-empty { font-size: 11.5px; color: var(--corp-text-muted); margin: 0 0 0.75rem; }
.caso-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.75rem; }
.caso-list-item { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0.75rem; background: rgba(0, 191, 255, 0.07); border: 1px solid rgba(0, 191, 255, 0.18); border-radius: 6px; }
.caso-list-main { min-width: 0; }
.caso-list-title { display: block; font-size: 12px; color: var(--corp-white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caso-list-meta { font-size: 10.5px; color: var(--corp-text-muted); }
.caso-form-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.5rem; align-items: end; }
.table-casos .radicado-formatted { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Agenda: expediente selector (feeds the chronology timeline) */
.agenda-expediente-filter { display: flex; flex-direction: column; gap: 0.25rem; }
.agenda-expediente-filter .select-glass { min-width: 240px; }

/* Theme toggle (claro/oscuro) — botón sol/luna del topbar */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--glass-bg-card);
  border: var(--glass-border);
  color: var(--corp-ice);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.theme-toggle:hover {
  color: var(--corp-cyan);
  border-color: var(--corp-border-hover);
  background: var(--glass-bg-hover);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--corp-cyan);
  outline-offset: 2px;
}
.theme-toggle .theme-icon { display: block; }
.theme-toggle .theme-icon-moon { display: none; }
[data-theme="light"] .theme-toggle .theme-icon-sun { display: none; }
[data-theme="light"] .theme-toggle .theme-icon-moon { display: block; }

/* Tareas (M6): tablero "Mi trabajo", tarjetas y ficha */
.tarea-column { display: flex; flex-direction: column; }
.tarea-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.tarea-dot-pendiente { background: var(--corp-cyan); }
.tarea-dot-en_curso { background: #f97316; }
.tarea-dot-en_revision { background: #eab308; }
.tarea-dot-completada { background: #10b981; }

.tarea-card { padding: 0.85rem; display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; background: var(--glass-bg-card); border-left: 3px solid transparent; }
.tarea-card.is-vencida { border-left-color: #ef4444; }
.tarea-card-head { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.tarea-prio { font-size: 10px; font-weight: 700; letter-spacing: 0.03em; padding: 0.15rem 0.45rem; border-radius: 10px; color: #FFFFFF; background: #475569; }
.tarea-prio-alta { background: #b91c1c; }
.tarea-prio-media { background: #a16207; }
.tarea-prio-baja { background: #166534; }
.tarea-cat { font-size: 10.5px; color: var(--corp-text-muted); }
.tarea-origen { font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; padding: 0.1rem 0.35rem; border-radius: 8px; border: 1px solid var(--corp-border-hover); color: var(--corp-cyan); }
.tarea-card-title { font-size: 13.5px; font-weight: 700; color: var(--corp-white); margin: 0; line-height: 1.35; }
.tarea-card-desc { font-size: 11.5px; color: var(--corp-text-muted); margin: 0; line-height: 1.45; }
.tarea-card-meta { display: flex; flex-direction: column; gap: 0.2rem; font-size: 11px; color: var(--corp-text-muted); }
.tarea-meta-item strong { color: var(--corp-ice); font-weight: 600; }
.tarea-fecha-vencida { color: #ff9c9c; font-weight: 700; }
[data-theme="light"] .tarea-fecha-vencida { color: #b91c1c; }
.tarea-card-actions { display: flex; justify-content: flex-end; }

.tarea-drawer-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--corp-cyan); margin: 0 0 0.25rem; }
[data-theme="light"] .tarea-drawer-kicker { color: #006F9E; }
.tarea-section-title { font-size: 13px; font-weight: 700; color: var(--corp-white); margin: 1.5rem 0 0.6rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--corp-border); }
.tarea-actions-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tarea-inline-form { display: flex; flex-direction: column; gap: 0.45rem; align-items: flex-start; }
.tarea-inline-form .input-glass { width: 100%; }
.tarea-alert { font-size: 12px; font-weight: 600; color: #ffb4b4; background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35); border-radius: 6px; padding: 0.5rem 0.75rem; margin: 0.75rem 0 0; }
[data-theme="light"] .tarea-alert { color: #b91c1c; background: rgba(239, 68, 68, 0.08); }

.tarea-timeline { position: relative; padding-left: 1.25rem; border-left: 2px solid var(--corp-border-hover); display: flex; flex-direction: column; gap: 0.85rem; }
.tarea-timeline-item { position: relative; }
.tarea-timeline-dot { position: absolute; left: -1.6rem; top: 0.25rem; width: 9px; height: 9px; border-radius: 50%; background: var(--corp-cyan); }
.tarea-timeline-head { margin: 0; font-size: 12px; color: var(--corp-white); }
.tarea-timeline-comment { margin: 0.15rem 0 0; font-size: 11.5px; color: var(--corp-ice); }
.tarea-timeline-meta { margin: 0.1rem 0 0; font-size: 10.5px; color: var(--corp-text-muted); }

