/* =====================================================
   ConCora Project 360 — Shared Styles
   Fundación Concora — POC v1.0
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  --color-primary-950: #2A0809;
  --color-primary-900: #400E13;
  --color-primary-700: #6B1820;
  --color-primary-500: #963040;
  --color-primary-300: #C9717E;
  --color-primary-100: #F5E0E2;
  --color-primary-050: #FDF2F3;

  --color-secondary-700: #B02E25;
  --color-secondary-500: #CC4A41;
  --color-secondary-100: #F9E5E4;

  --color-success-700: #2A6B4A;
  --color-success-500: #3A9467;
  --color-success-100: #D4EDE1;

  --color-neutral-900: #1C1C1E;
  --color-neutral-700: #3A3A3C;
  --color-neutral-400: #8E8E93;
  --color-neutral-200: #D1D1D6;
  --color-neutral-100: #F2F2F7;
  --color-neutral-000: #FFFFFF;

  --color-danger-700: #B02E25;
  --color-danger-100: #F9E5E4;
  --color-warning-700: #D68910;
  --color-warning-100: #FEF9E7;
  --color-info-700: #1A5C8A;
  --color-info-100: #D0E8F5;

  --sidebar-width: 240px;
  --topbar-height: 56px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --radius: 8px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--color-neutral-100);
  color: var(--color-neutral-900);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

a { text-decoration: none; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
  line-height: 1;
  user-select: none;
}

/* ---------- Topbar ---------- */
.topbar {
  height: var(--topbar-height);
  background: var(--color-neutral-000);
  border-bottom: 1px solid var(--color-neutral-200);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary-900);
  text-decoration: none;
}

.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-neutral-400);
  transition: background 0.15s;
  position: relative;
}

.topbar-icon-btn:hover { background: var(--color-neutral-100); color: var(--color-neutral-700); }

.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--color-danger-700);
  border-radius: 50%;
  border: 2px solid #fff;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-primary-900);
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: 0;
  height: calc(100vh - var(--topbar-height));
  display: flex;
  flex-direction: column;
  padding: 16px 10px;
  overflow-y: auto;
  z-index: 900;
  transition: transform 0.2s ease;
}

.sidebar .logo-area {
  padding: 4px 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 12px;
}

.sidebar-logo-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.sidebar .logo-title { color: #fff; font-size: 15px; font-weight: 700; margin: 0; line-height: 1.2; }
.sidebar .logo-sub   { color: rgba(255,255,255,0.55); font-size: 11px; margin: 0; }

.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}

.sidebar .nav-link .material-symbols-outlined { font-size: 20px; flex-shrink: 0; }
.sidebar .nav-link:hover  { background: rgba(255,255,255,0.10); color: #fff; }
.sidebar .nav-link.active { background: rgba(255,255,255,0.16); color: #fff; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: 12px 12px 4px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
}

.sidebar-notif-badge {
  margin-left: auto;
  background: var(--color-danger-700);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  min-width: 18px;
  text-align: center;
}

/* ---------- Main content ---------- */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 24px;
  min-height: calc(100vh - var(--topbar-height));
}

/* ---------- Avatar / Initials ---------- */
.avatar-initials {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--color-primary-100);
  color: var(--color-primary-700);
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

/* ---------- KPI Cards ---------- */
.kpi-card {
  background: var(--color-neutral-000);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  transition: box-shadow 0.15s;
}
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-neutral-400);
  margin: 0 0 10px;
}
.kpi-value {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--color-neutral-900);
}
.kpi-delta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  margin-top: 8px;
}
.kpi-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Stat Card (small) ---------- */
.stat-card {
  background: var(--color-neutral-000);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 20px;
}

/* ---------- General Card ---------- */
.card-panel {
  background: var(--color-neutral-000);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-neutral-100);
}

/* ---------- Status Badges ---------- */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-no-iniciado    { background: var(--color-neutral-100); color: var(--color-neutral-700); }
.badge-en-preparacion { background: var(--color-info-100);    color: var(--color-info-700); }
.badge-iniciado       { background: var(--color-primary-100); color: var(--color-primary-700); }
.badge-retrasado      { background: var(--color-danger-100);  color: var(--color-danger-700); }
.badge-completado     { background: var(--color-success-100); color: var(--color-success-700); }
.badge-cerrado        { background: var(--color-neutral-100); color: var(--color-neutral-400); }
.badge-abierta        { background: var(--color-success-100); color: var(--color-success-700); }
.badge-borrador       { background: var(--color-warning-100); color: var(--color-warning-700); }
.badge-cerrada-conv   { background: var(--color-neutral-100); color: var(--color-neutral-400); }
.badge-pendiente      { background: var(--color-warning-100); color: var(--color-warning-700); }
.badge-seleccionado   { background: var(--color-success-100); color: var(--color-success-700); }
.badge-no-seleccionado{ background: var(--color-danger-100);  color: var(--color-danger-700); }

/* ---------- Buttons ---------- */
.btn-brand {
  background: var(--color-secondary-700);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
  line-height: 1.4;
  text-decoration: none;
}
.btn-brand:hover { background: var(--color-primary-700); color: #fff; box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--color-neutral-700);
  border: 1px solid var(--color-neutral-200);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
  line-height: 1.4;
}
.btn-outline:hover { background: var(--color-neutral-100); border-color: var(--color-neutral-400); color: var(--color-neutral-900); }

.btn-danger-outline {
  background: transparent;
  color: var(--color-danger-700);
  border: 1px solid var(--color-danger-700);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
  text-decoration: none;
}
.btn-danger-outline:hover { background: var(--color-danger-100); }

.btn-danger {
  background: var(--color-danger-700);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.btn-danger:hover { background: #8e1310; }

.btn-icon {
  width: 34px; height: 34px;
  border: none;
  background: transparent;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--color-neutral-400);
  transition: background 0.12s, color 0.12s;
}
.btn-icon:hover { background: var(--color-neutral-100); color: var(--color-neutral-700); }

/* ---------- Data Table ---------- */
.table-wrapper { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}
.data-table thead th {
  background: var(--color-neutral-100);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-neutral-400);
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-neutral-200);
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.data-table thead th:first-child { border-radius: 0; }
.data-table tbody tr {
  border-bottom: 1px solid var(--color-neutral-100);
  transition: background 0.1s;
}
.data-table tbody tr:hover { background: var(--color-primary-050); }
.data-table tbody td {
  padding: 11px 16px;
  font-size: 13.5px;
  color: var(--color-neutral-700);
  vertical-align: middle;
}
.data-table td.col-id {
  font-size: 12px;
  color: var(--color-neutral-400);
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
}
.data-table td.col-name { font-weight: 600; color: var(--color-neutral-900); }
.data-table .actions-col { width: 80px; text-align: center; }

/* ---------- Filter Bar ---------- */
.filter-bar {
  background: var(--color-neutral-000);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.filter-search-wrap { position: relative; }
.filter-search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--color-neutral-400);
  font-size: 18px;
  pointer-events: none;
}
.filter-input {
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  width: 230px;
  transition: border 0.15s, box-shadow 0.15s;
  background: var(--color-neutral-000);
  color: var(--color-neutral-900);
}
.filter-input:focus {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 2px rgba(150,48,64,0.12);
}
.filter-select {
  padding: 8px 30px 8px 12px;
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  appearance: none;
  background: var(--color-neutral-000) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath stroke='%238E8E93' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e") no-repeat right 8px center / 16px;
  cursor: pointer;
  transition: border 0.15s, box-shadow 0.15s;
  color: var(--color-neutral-900);
}
.filter-select:focus {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 2px rgba(150,48,64,0.12);
}

.filter-clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-secondary-700);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.12s;
  font-family: inherit;
}
.filter-clear-btn:hover { background: var(--color-secondary-100); }

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--color-neutral-100);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-primary-100);
  color: var(--color-primary-700);
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  animation: scaleIn 0.15s ease;
}
.filter-chip button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-primary-500);
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}
@keyframes scaleIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- Pagination ---------- */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--color-neutral-100);
  font-size: 12.5px;
  color: var(--color-neutral-400);
}
.pagination-controls { display: flex; gap: 4px; align-items: center; }
.page-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--color-neutral-200);
  border-radius: 6px;
  background: var(--color-neutral-000);
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.1s;
  color: var(--color-neutral-700);
  font-family: inherit;
}
.page-btn:hover { background: var(--color-neutral-100); }
.page-btn.active { background: var(--color-secondary-700); color: #fff; border-color: var(--color-secondary-700); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Page Header ---------- */
.page-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-neutral-900);
  margin: 0;
}
.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-primary-900);
  margin: 0;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb-custom {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-neutral-400);
  margin-bottom: 4px;
}
.breadcrumb-custom a { color: var(--color-secondary-700); font-weight: 500; }
.breadcrumb-custom a:hover { text-decoration: underline; }
.breadcrumb-custom .sep { color: var(--color-neutral-200); }

/* ---------- Kanban ---------- */
.kanban-wrapper {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
}
.kanban-col {
  flex: 0 0 272px;
  width: 272px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-neutral-200);
}
.kanban-col-header {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.kanban-col-header .col-count {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(0,0,0,0.12);
}
.kanban-cards {
  flex: 1;
  min-height: 280px;
  background: rgba(0,0,0,0.025);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kanban-card {
  background: var(--color-neutral-000);
  border: 1px solid var(--color-neutral-200);
  border-radius: 8px;
  padding: 12px 13px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: box-shadow 0.15s, transform 0.15s, opacity 0.15s;
  user-select: none;
}
.kanban-card:hover  { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card:active { cursor: grabbing; opacity: 0.85; }
.kanban-card.retrasado-card { border-left: 3px solid var(--color-danger-700); background: #fffafa; }
.kanban-card.sortable-ghost { opacity: 0.4; background: var(--color-primary-100); }
.kanban-card.sortable-chosen { box-shadow: var(--shadow-md); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.card-id   { font-size: 11px; color: var(--color-neutral-400); font-weight: 500; }
.card-name { font-size: 13.5px; font-weight: 600; color: var(--color-neutral-900); margin: 4px 0 3px; line-height: 1.3; }
.card-ally { font-size: 12px; color: var(--color-neutral-400); }
.card-date { font-size: 11.5px; color: var(--color-neutral-400); margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }

/* ---------- Kanban Column Colors ---------- */
.col-no-iniciado    .kanban-col-header { background: #E8E8ED; color: var(--color-neutral-700); }
.col-en-preparacion .kanban-col-header { background: var(--color-info-100); color: var(--color-info-700); }
.col-iniciado       .kanban-col-header { background: var(--color-primary-100); color: var(--color-primary-700); }
.col-retrasado      .kanban-col-header { background: var(--color-danger-100); color: var(--color-danger-700); }
.col-completado     .kanban-col-header { background: var(--color-success-100); color: var(--color-success-700); }
.col-cerrado        .kanban-col-header { background: #E8E8ED; color: var(--color-neutral-400); }

/* ---------- View Toggle ---------- */
.view-toggle {
  display: flex;
  border: 1px solid var(--color-neutral-200);
  border-radius: 8px;
  overflow: hidden;
  background: var(--color-neutral-000);
}
.view-toggle-btn {
  padding: 7px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-neutral-400);
  display: flex; align-items: center; gap: 5px;
  transition: background 0.12s, color 0.12s;
  font-family: inherit;
}
.view-toggle-btn.active { background: var(--color-primary-900); color: #fff; }
.view-toggle-btn:hover:not(.active) { background: var(--color-neutral-100); color: var(--color-neutral-700); }

/* ---------- Bulk Action Bar ---------- */
.bulk-action-bar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--color-primary-100);
  border-bottom: 1px solid var(--color-primary-300);
  animation: slideDown 0.2s ease;
}
.bulk-action-bar.visible { display: flex; }
@keyframes slideDown { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ---------- Toast Notifications ---------- */
.toast-container-custom {
  position: fixed;
  top: 68px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast-item {
  padding: 12px 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  min-width: 290px;
  max-width: 380px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.14);
  animation: slideInRight 0.3s ease;
  pointer-events: all;
  border-left: 3px solid transparent;
}
@keyframes slideInRight { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast-success { background: var(--color-success-100); color: var(--color-success-700); border-color: var(--color-success-700); }
.toast-error   { background: var(--color-danger-100);  color: var(--color-danger-700);  border-color: var(--color-danger-700); }
.toast-warning { background: var(--color-warning-100); color: var(--color-warning-700); border-color: var(--color-warning-700); }
.toast-info    { background: var(--color-info-100);    color: var(--color-info-700);    border-color: var(--color-info-700); }
.toast-close-btn { background: none; border: none; cursor: pointer; color: inherit; line-height: 1; padding: 0; margin-left: auto; opacity: 0.7; }
.toast-close-btn:hover { opacity: 1; }

/* ---------- Confirmation Modal ---------- */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--color-neutral-000);
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalSlideUp 0.2s ease;
  overflow: hidden;
}
@keyframes modalSlideUp { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--color-neutral-100);
}
.modal-title { font-size: 16px; font-weight: 600; color: var(--color-neutral-900); margin: 0; }
.modal-body { padding: 20px 22px; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--color-neutral-100);
  background: var(--color-neutral-100);
}

/* ---------- Detail Columns ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.detail-meta-card { background: var(--color-neutral-000); border: 1px solid var(--color-neutral-200); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; }
.detail-meta-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--color-neutral-100); font-size: 13.5px; }
.detail-meta-row:last-child { border-bottom: none; }
.meta-label { color: var(--color-neutral-400); font-weight: 500; }
.meta-value { color: var(--color-neutral-900); font-weight: 600; text-align: right; }

/* ---------- Portal Aliado Topbar ---------- */
.ally-topbar {
  background: var(--color-primary-900);
  height: var(--topbar-height);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.ally-topbar .brand { color: #fff; font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.ally-nav-link {
  color: rgba(255,255,255,0.78);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
  text-decoration: none;
}
.ally-nav-link:hover, .ally-nav-link.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ---------- Welcome Banner (Portal) ---------- */
.welcome-banner {
  background: linear-gradient(135deg, var(--color-primary-900) 0%, var(--color-primary-700) 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.welcome-banner::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

/* ---------- Empty State ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--color-neutral-400);
  text-align: center;
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 14px; margin: 4px 0 0; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-neutral-100); }
::-webkit-scrollbar-thumb { background: var(--color-neutral-200); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-neutral-400); }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.2); }
  .main-content { margin-left: 0; }
  .detail-layout { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .main-content { padding: 12px; }
  .filter-input { width: 100%; }
}
