/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
  --navy: #2a3864;
  --rosa: #d41050;
  --gris: #8c98b5;
  --rojo: #b30000;
  --gris2: #666666;
  --navy-dark: #1d2845;
  --navy-light: #3a4f8f;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --border: #e0e4ef;
  --text: #1a1f35;
  --text-2: #6b7394;
  --success: #1a7a4a;
  --warning: #c47a00;
  --nav-h: 44px;
  --tabs-h: 40px;
  --transition: 0.16s ease;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(42, 56, 100, 0.10);
  --shadow-lg: 0 8px 32px rgba(42, 56, 100, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: 'Playfair Display', Georgia, serif;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input,
textarea,
select {
  font-family: inherit;
}

a {
  color: var(--navy);
}

/* ============================================================
   TOP NAVIGATION
   ============================================================ */
#topnav {
  background: var(--navy-dark);
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  z-index: 100;
}

.tn-header {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 16px;
  gap: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tn-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}

/* ── Logo: inline SVG wordmark (white on dark nav) ── */
.tn-logo-svg {
  height: 26px;
  display: block;
}

/* Ensure all SVG paths/text in logo are white; overrides any fill from external source */
.tn-logo-svg text,
.tn-logo-svg path,
.tn-logo-svg rect,
.tn-logo-svg polygon {
  fill: #ffffff;
}

/* Legacy img fallback (forced white via filter) */
.tn-logo-img {
  height: 26px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  display: none;
  /* hidden by default; shown only if SVG is not available */
}

.tn-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.tn-sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.tn-assembly-label {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1;
  margin-bottom: 2px;
}

.tn-assembly-title {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tn-spacer {
  flex: 1;
}

/* Quorum pill */
.tn-quorum-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 600;
  transition: all var(--transition);
  flex-shrink: 0;
}

.tn-quorum-pill.no-data {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}

.tn-quorum-pill.reached {
  background: rgba(26, 122, 74, 0.25);
  color: #6ee09b;
}

.tn-quorum-pill.failed {
  background: rgba(179, 0, 0, 0.25);
  color: #ff9999;
}

.tn-quorum-pill.warn-mandatory {
  background: rgba(196, 122, 0, 0.3);
  color: #ffd080;
}

.tn-quorum-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.tn-collapse-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.45);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  transition: color var(--transition);
  flex-shrink: 0;
  line-height: 1;
}

.tn-collapse-btn:hover {
  color: rgba(255, 255, 255, 0.9);
}

.tn-tabs-bar {
  display: flex;
  align-items: stretch;
  height: var(--tabs-h);
  overflow-x: auto;
  scrollbar-width: none;
}

.tn-tabs-bar::-webkit-scrollbar {
  display: none;
}

.tn-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 14px;
  font-size: 0.8rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
  position: relative;
}

.tn-tab:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.04);
}

.tn-tab.active {
  color: #fff;
  font-weight: 500;
  border-bottom-color: var(--rosa);
  background: rgba(255, 255, 255, 0.06);
}

.tn-tab .tab-icon {
  font-size: 0.85rem;
}

.tn-badge {
  background: var(--rosa);
  color: #fff;
  font-size: 0.58rem;
  padding: 1px 4px;
  border-radius: 8px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
}

.tn-tab-sep {
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 8px 4px;
  flex-shrink: 0;
}

.tn-doc-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.38);
  text-decoration: none;
  transition: color var(--transition);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.tn-doc-link:hover {
  color: rgba(255, 255, 255, 0.75);
}

.tn-doc-link::after {
  content: '↗';
  font-size: 0.62rem;
}

#topnav.collapsed .tn-tabs-bar {
  display: none;
}

#topnav.collapsed .tn-collapse-btn {
  transform: rotate(180deg);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#main {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   PAGES
   ============================================================ */
.page {
  display: none;
  flex: 1;
}

.page.active {
  display: flex;
  flex-direction: column;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  border: none;
  transition: all var(--transition);
  line-height: 1.4;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
}

.btn-primary:hover {
  background: var(--navy-light);
}

.btn-rosa {
  background: var(--rosa);
  color: #fff;
}

.btn-rosa:hover {
  background: #b8003e;
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: rgba(42, 56, 100, 0.05);
  border-color: var(--navy);
}

.btn-danger {
  background: var(--rojo);
  color: #fff;
}

.btn-danger:hover {
  background: #8a0000;
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: none;
  padding: 4px 7px;
}

.btn-ghost:hover {
  color: var(--navy);
  background: rgba(42, 56, 100, 0.07);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.75rem;
}

.btn-xs {
  padding: 2px 7px;
  font-size: 0.7rem;
}

.btn-icon {
  padding: 4px 7px;
}

.btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.85rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(42, 56, 100, 0.1);
}

textarea.form-control {
  min-height: 72px;
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238c98b5' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.form-hint {
  font-size: 0.71rem;
  color: var(--text-2);
  margin-top: 3px;
}

.form-inline {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-2);
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(42, 56, 100, 0.025);
  cursor: default;
  user-select: none;
  white-space: nowrap;
}

thead th.sortable {
  cursor: pointer;
}

thead th.sortable:hover {
  color: var(--navy);
}

thead th.sort-asc::after {
  content: ' ▲';
  font-size: 0.6rem;
}

thead th.sort-desc::after {
  content: ' ▼';
  font-size: 0.6rem;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: rgba(42, 56, 100, 0.025);
}

td {
  padding: 8px 14px;
  font-size: 0.84rem;
  vertical-align: middle;
}

/* ============================================================
   CHIPS & BADGES
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(42, 56, 100, 0.09);
  color: var(--navy);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 500;
}

.chip-rosa {
  background: rgba(212, 16, 80, 0.1);
  color: var(--rosa);
}

.chip-success {
  background: rgba(26, 122, 74, 0.1);
  color: var(--success);
}

.chip-rojo {
  background: rgba(179, 0, 0, 0.1);
  color: var(--rojo);
}

.chip-warn {
  background: rgba(196, 122, 0, 0.1);
  color: var(--warning);
}

.chip-gris {
  background: rgba(140, 152, 181, 0.15);
  color: var(--gris2);
}

.chip-fixed {
  background: rgba(42, 56, 100, 0.07);
  color: var(--navy);
  border: 1px solid rgba(42, 56, 100, 0.12);
}

.chip-socia {
  background: rgba(212, 16, 80, 0.08);
  color: var(--rosa);
  border: 1px solid rgba(212, 16, 80, 0.15);
}

.chip-other {
  background: rgba(140, 152, 181, 0.12);
  color: var(--gris2);
}

.chip-excused {
  background: rgba(196, 122, 0, 0.06);
  color: var(--warning);
}

.role-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(42, 56, 100, 0.08);
  color: var(--navy);
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  margin: 1px;
}

.role-chip.socia {
  background: rgba(212, 16, 80, 0.08);
  color: var(--rosa);
}

/* ============================================================
   CARDS & SECTIONS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(42, 56, 100, 0.025);
}

.card-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--navy);
}

.card-body {
  padding: 18px;
}

.section-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-2);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-section {
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--navy);
}

.stat-card.a-rosa::after {
  background: var(--rosa);
}

.stat-card.a-success::after {
  background: var(--success);
}

.stat-card.a-gris::after {
  background: var(--gris);
}

.stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  color: var(--navy);
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-2);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-sub {
  font-size: 0.77rem;
  color: var(--gris2);
  margin-top: 6px;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 35, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

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

.modal {
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: 540px;
  max-width: 96vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  animation: modalIn 0.18s ease;
}

.modal-lg {
  width: 720px;
}

.modal-xl {
  width: 900px;
}

@keyframes modalIn {
  from {
    transform: scale(0.96) translateY(8px);
    opacity: 0;
  }
}

.modal-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--navy);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-2);
  cursor: pointer;
  padding: 3px 7px;
  border-radius: 4px;
  transition: background var(--transition);
}

.modal-close:hover {
  background: var(--border);
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.quorum-bar-track {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.quorum-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--success);
  transition: width 0.4s ease;
}

.quorum-bar-fill.warn {
  background: var(--warning);
}

.quorum-bar-fill.fail {
  background: var(--rojo);
}

/* ============================================================
   PARTICIPANTS
   ============================================================ */
.toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 180px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.84rem;
  background: var(--surface);
}

.search-box:focus {
  outline: none;
  border-color: var(--navy);
}

.roles-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-pick-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  transition: all var(--transition);
  user-select: none;
}

.role-pick-item:hover {
  border-color: var(--gris);
}

.role-pick-item.selected {
  background: rgba(42, 56, 100, 0.1);
  border-color: var(--navy);
  color: var(--navy);
  font-weight: 500;
}

.role-pick-item.sel-socia {
  background: rgba(212, 16, 80, 0.07);
  border-color: var(--rosa);
  color: var(--rosa);
}

.role-pick-item input {
  display: none;
}

.mesa-edad-block {
  background: rgba(42, 56, 100, 0.04);
  border: 1px solid rgba(42, 56, 100, 0.12);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-top: 14px;
}

.mesa-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}

.mesa-row:last-child {
  border-bottom: none;
}

.mesa-row-label {
  color: var(--text-2);
}

.mesa-row-val {
  font-weight: 600;
  color: var(--navy);
}

/* ============================================================
   ROLES MANAGER
   ============================================================ */
.roles-manager-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.role-list-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.83rem;
  margin-bottom: 5px;
}

.role-type-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rtd-fixed {
  background: var(--navy);
}

.rtd-socia {
  background: var(--rosa);
}

.rtd-other {
  background: var(--gris);
}

.role-name {
  flex: 1;
  font-weight: 500;
}

.role-type-badge {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 600;
}

/* ============================================================
   ATTENDANCE
   ============================================================ */
.session-tabs-row {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
}

.session-tab {
  padding: 7px 16px;
  font-size: 0.81rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: var(--text-2);
  font-weight: 500;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  transition: all var(--transition);
}

.session-tab:hover {
  color: var(--navy);
}

.session-tab.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

/* Attendance section headers (socias / institutional / other groups) */
.att-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 4px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
  margin-top: 8px;
}

.att-section-header:first-child {
  margin-top: 0;
}

.attendance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.del-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.del-card:hover {
  border-color: var(--gris);
  box-shadow: var(--shadow);
}

.del-card.present {
  border-color: var(--success);
}

.del-card.partial {
  border-color: var(--warning);
}

.del-card.excused {
  border-color: var(--warning);
  background: rgba(196, 122, 0, 0.06);
}

/* Mandatory role missing (Presidencia/Secretaría not present) */
.del-card.mandatory-missing {
  border-color: var(--rojo);
  background: rgba(179, 0, 0, 0.03);
}

.del-card .del-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  transition: all var(--transition);
}

.del-card.present .del-check {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.del-card.partial .del-check {
  background: var(--warning);
  border-color: var(--warning);
  color: #fff;
}

.del-card.excused .del-check {
  background: var(--warning);
  border-color: var(--warning);
  color: #fff;
}

.del-name {
  font-weight: 600;
  font-size: 0.87rem;
  margin-bottom: 3px;
  padding-right: 24px;
}

.del-count {
  font-size: 0.74rem;
  color: var(--text-2);
}

/* Badge shown on mandatory roles that are missing */
.mandatory-badge {
  display: inline-block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--rojo);
  margin-bottom: 4px;
}

/* ============================================================
   AGENDA
   ============================================================ */
.agenda-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.agenda-list-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.agenda-list-header {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}

.agenda-list-scroll {
  overflow-y: auto;
  flex: 1;
}

.agenda-li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.agenda-li:hover {
  background: rgba(42, 56, 100, 0.03);
}

.agenda-li.active {
  background: rgba(42, 56, 100, 0.07);
  border-left: 3px solid var(--navy);
  padding-left: 11px;
}

/* Sub-points (letter-numbered 1.a, 1.b…) render indented under their parent */
.agenda-li-sub {
  padding-left: 32px;
  background: rgba(42, 56, 100, 0.015);
}

.agenda-li-sub.active {
  padding-left: 29px;
}

/* ▲▼ reorder arrows in the agenda list (reuses .int-order-controls/.btn-int-order) */
.agenda-li .int-order-controls {
  margin-right: 0;
  padding-top: 0;
}

.agenda-li .btn-int-order {
  color: var(--gris2);
}

.ali-num {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--gris);
  min-width: 22px;
}

.ali-info {
  flex: 1;
  min-width: 0;
}

.ali-title {
  font-size: 0.81rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ali-meta {
  font-size: 0.7rem;
  color: var(--text-2);
  margin-top: 1px;
}

.agenda-detail-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.detail-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 7px;
}

.detail-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.detail-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

/* Item status badges */
.status-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.sb-pending {
  background: rgba(42, 56, 100, 0.08);
  color: var(--navy);
}

.sb-active {
  background: rgba(212, 16, 80, 0.12);
  color: var(--rosa);
}

.sb-paused {
  background: rgba(230, 162, 0, 0.14);
  color: #a66a00;
}

.sb-done {
  background: rgba(26, 122, 74, 0.12);
  color: var(--success);
}

.sb-voted-pass {
  background: rgba(26, 122, 74, 0.12);
  color: var(--success);
}

.sb-voted-fail {
  background: rgba(179, 0, 0, 0.1);
  color: var(--rojo);
}

.status-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ============================================================
   TIME TRACKING
   ============================================================ */
.time-tracking-section {
  background: rgba(42, 56, 100, 0.025);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 16px;
}

.time-tracking-section .section-title {
  border-bottom: none;
  margin-bottom: 8px;
  padding-bottom: 0;
}

.time-total {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--navy);
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
}

.time-segments {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.time-segment-row {
  font-size: 0.83rem;
  color: var(--text-2);
}

.time-segment-row.open {
  color: var(--rosa);
  font-weight: 600;
}

/* ============================================================
   VOTING
   ============================================================ */
.voting-panel {
  background: rgba(42, 56, 100, 0.03);
  border: 1px solid rgba(42, 56, 100, 0.13);
  border-radius: var(--radius);
  padding: 16px;
}

.vote-panel-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

/* Repeatable vote card in the agenda-item modal (one per votación) */
.vote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.vote-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.vt-assentimiento {
  background: #e8f5e9;
  color: var(--success);
}

.vt-unanimidad {
  background: #e3f2fd;
  color: #1565c0;
}

.vt-formal {
  background: rgba(212, 16, 80, 0.08);
  color: var(--rosa);
}

/* Available votes capacity bar */
.vote-capacity-bar {
  margin-bottom: 12px;
}

.vote-capacity-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-2);
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 4px;
}

.vote-capacity-track {
  height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.vote-capacity-fill {
  height: 100%;
  background: var(--navy);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.vote-opts-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.vote-opt-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: all var(--transition);
}

.vote-opt-row.flash {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(42, 56, 100, 0.15);
}

.vote-key-badge {
  width: 22px;
  height: 22px;
  background: var(--navy);
  color: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.vote-opt-name {
  flex: 1;
  font-size: 0.86rem;
  font-weight: 500;
}

.vote-opt-count {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--navy);
  min-width: 28px;
  text-align: right;
}

.vote-opt-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.vote-opt-bar-fill {
  height: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.vote-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-2);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.vote-active-banner {
  background: var(--rosa);
  color: #fff;
  padding: 7px 12px;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.78;
  }
}

.vote-result-panel {
  padding: 12px 14px;
  border-radius: 6px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
}

.vote-result-panel.passed {
  background: #e8f5e9;
  color: var(--success);
  border: 1px solid rgba(26, 122, 74, 0.2);
}

.vote-result-panel.failed {
  background: #ffebee;
  color: var(--rojo);
  border: 1px solid rgba(179, 0, 0, 0.2);
}

/* Manual result section */
.manual-result-section {
  background: rgba(196, 122, 0, 0.04);
  border: 1px solid rgba(196, 122, 0, 0.2);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
}

.manual-result-section .vote-opts-grid {
  margin-bottom: 8px;
}

.manual-vote-input {
  width: 72px;
  padding: 4px 8px;
  font-size: 0.84rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: right;
  background: var(--surface);
}

.manual-vote-input:focus {
  outline: none;
  border-color: var(--warning);
  box-shadow: 0 0 0 2px rgba(196, 122, 0, 0.15);
}

.manual-result-totals {
  font-size: 0.76rem;
  color: var(--text-2);
  padding: 6px 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom: 2px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: monospace;
}

.live-dot {
  width: 7px;
  height: 7px;
  background: var(--rosa);
  border-radius: 50%;
  animation: blink 1s infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.15;
  }
}

/* ============================================================
   INTERVENTIONS (fast-access redesign + priority model)
   ============================================================ */
.int-role-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 0 14px;
}

.int-role-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(42, 56, 100, 0.07);
  color: var(--navy);
  border: 1px solid rgba(42, 56, 100, 0.14);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.int-role-btn:hover {
  background: var(--navy);
  color: #fff;
}

.int-role-btn.socia-role {
  background: rgba(212, 16, 80, 0.07);
  color: var(--rosa);
  border-color: rgba(212, 16, 80, 0.18);
}

.int-role-btn.socia-role:hover {
  background: var(--rosa);
  color: #fff;
}

.int-role-btn.fixed-role {
  background: rgba(42, 56, 100, 0.05);
  color: var(--navy);
  border-color: rgba(42, 56, 100, 0.2);
  border-style: dashed;
}

.int-role-btn.fixed-role:hover {
  background: var(--navy);
  color: #fff;
  border-style: solid;
}

.int-role-btn.other-role {
  background: rgba(140, 152, 181, 0.12);
  color: var(--gris2);
  border-color: rgba(140, 152, 181, 0.2);
}

.int-role-btn.other-role:hover {
  background: var(--gris2);
  color: #fff;
}

/* Absent roles are visually dimmed */
.int-role-btn.absent-role {
  opacity: 0.55;
}

.int-role-btn.absent-role:hover {
  opacity: 1;
}

/* Intervention list items */
.interventions-list {
  margin-top: 6px;
}

.int-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 5px;
  background: var(--surface);
  transition: all var(--transition);
  position: relative;
}

.int-item.dragging {
  opacity: 0.45;
  box-shadow: var(--shadow-lg);
}

.int-item.drag-over {
  border-color: var(--navy);
  border-style: dashed;
}

.int-item.withdrawn {
  opacity: 0.5;
  background: rgba(0, 0, 0, 0.025);
}

.int-item.withdrawn .int-role-name {
  text-decoration: line-through;
}

.int-order-controls {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-right: 4px;
  padding-top: 2px;
}

.btn-int-order {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--border);
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.btn-int-order:hover:not(:disabled) {
  color: var(--navy);
}

.btn-int-order:disabled {
  opacity: 0.3;
  cursor: default;
}

.int-pos {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--gris);
  min-width: 15px;
  flex-shrink: 0;
  margin-top: 5px;
}

/* Priority badge — numeric, colored by priority level */
.int-priority-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(42, 56, 100, 0.12);
  color: var(--navy);
}

/* Priority 1 (aclaracion) = green, 2 (info) = blue, 3 (alusiones) = orange, 4 (intervencion) = navy, 5 (chiste) = gray */
.int-priority-badge:has(+ .int-role-name) {}

/* fallback handled via data */

.int-body {
  flex: 1;
  min-width: 0;
}

.int-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

.int-role-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--navy);
}

.int-speaker-name {
  font-size: 0.76rem;
  color: var(--text-2);
}

.int-type-badge {
  font-size: 0.67rem;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}

/* New priority-based intervention type badges */
.itb-aclaracion {
  background: rgba(26, 122, 74, 0.12);
  color: var(--success);
}

.itb-info {
  background: rgba(42, 56, 100, 0.1);
  color: var(--navy);
}

.itb-alusiones {
  background: rgba(196, 122, 0, 0.12);
  color: var(--warning);
}

.itb-intervencion {
  background: rgba(212, 16, 80, 0.1);
  color: var(--rosa);
}

.itb-chiste {
  background: rgba(140, 152, 181, 0.15);
  color: var(--gris2);
}

/* Inline editor fields */
.int-editor {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px;
  align-items: center;
  margin-top: 4px;
}

.int-editor select,
.int-editor input {
  padding: 3px 7px;
  font-size: 0.76rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}

.int-editor select:focus,
.int-editor input:focus {
  outline: none;
  border-color: var(--navy);
}

.int-notes-field {
  width: 100%;
  padding: 3px 7px;
  font-size: 0.76rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  margin-top: 4px;
  resize: none;
  min-height: 0;
  height: 28px;
  transition: height var(--transition);
}

.int-notes-field:focus {
  outline: none;
  border-color: var(--navy);
  height: 56px;
}

.int-controls {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
  align-items: flex-start;
  padding-top: 1px;
  flex-direction: column;
}

/* ── Collapsed intervention row (compact) ── */
.int-item.int-collapsed {
  padding: 5px 10px;
  cursor: pointer;
  align-items: center;
}

.int-item.int-collapsed .int-top {
  margin-bottom: 0;
}

.int-item.int-collapsed .int-handle {
  margin-top: 0;
}

.int-item.int-collapsed .int-pos {
  margin-top: 0;
}

.int-controls-collapsed {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  align-items: center;
}

.int-notes-preview {
  font-size: 0.72rem;
  color: var(--text-2);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* ── Expanded intervention (editing) ── */
.int-item.int-expanded {
  border-color: var(--navy);
  border-width: 1.5px;
  box-shadow: 0 0 0 2px rgba(42, 56, 100, 0.07);
}

/* Finalize (confirm) button */
.btn-int-finalize {
  background: rgba(26, 122, 74, 0.1);
  border: 1px solid rgba(26, 122, 74, 0.3);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--success);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-int-finalize:hover {
  background: var(--success);
  color: #fff;
}

/* Alusiones quick-insert button */
.btn-alusiones {
  background: rgba(196, 122, 0, 0.1);
  border: 1px solid rgba(196, 122, 0, 0.25);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--warning);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-alusiones:hover {
  background: var(--warning);
  color: #fff;
}

/* Withdrawn toggle button */
.btn-withdrawn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.68rem;
  color: var(--text-2);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-withdrawn:hover {
  border-color: var(--rojo);
  color: var(--rojo);
}

.btn-withdrawn.is-withdrawn {
  background: rgba(179, 0, 0, 0.08);
  border-color: rgba(179, 0, 0, 0.3);
  color: var(--rojo);
}

.btn-withdrawn.is-withdrawn:hover {
  background: rgba(179, 0, 0, 0.15);
}

/* Alusiones / Insert inline prompt row */
.alusiones-prompt-row,
.insert-prompt-row {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 6px;
  margin-bottom: 5px;
  animation: fadeIn 0.14s ease;
}

.alusiones-prompt-row {
  background: rgba(196, 122, 0, 0.06);
  border: 1px solid rgba(196, 122, 0, 0.22);
}

.insert-prompt-row {
  background: var(--surface);
  border: 1px solid var(--navy);
  box-shadow: 0 4px 12px rgba(42, 56, 100, 0.1);
  padding: 10px 14px;
}

.int-insert-row {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 12px;
  margin: -6px 0;
  opacity: 0;
  transition: opacity var(--transition);
  position: relative;
  z-index: 10;
}

.int-insert-row::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: var(--navy);
  opacity: 0.15;
  border-radius: 1px;
}

.int-insert-row:hover {
  opacity: 1;
}

.int-insert-btn {
  background: var(--surface);
  border: 1.5px solid var(--navy);
  color: var(--navy);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(42, 56, 100, 0.15);
  transition: all var(--transition);
  position: relative;
  z-index: 1;
  /* Keep above the line */
}

.int-insert-btn:hover {
  background: var(--navy);
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(42, 56, 100, 0.25);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.int-type-section-label {
  font-size: 0.68rem;
  color: var(--text-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 10px;
  margin-bottom: 6px;
}

/* ============================================================
   GLOSSARY
   ============================================================ */
.glossary-grid {
  display: grid;
  gap: 12px;
}

.glossary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.glossary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(42, 56, 100, 0.025);
}

.gl-vote-type {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
}

.gl-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 10px;
}

.glb-simple {
  background: rgba(42, 56, 100, 0.1);
  color: var(--navy);
}

.glb-absolute {
  background: rgba(212, 16, 80, 0.1);
  color: var(--rosa);
}

.glb-qualified {
  background: rgba(179, 0, 0, 0.1);
  color: var(--rojo);
}

.glb-unanimity {
  background: rgba(26, 122, 74, 0.1);
  color: var(--success);
}

.glossary-card-body {
  padding: 12px 16px;
  font-size: 0.83rem;
  line-height: 1.6;
}

.gl-ref {
  font-size: 0.73rem;
  color: var(--text-2);
  margin-top: 6px;
  font-style: italic;
}

/* ============================================================
   CONFIG
   ============================================================ */
.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.config-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.config-card h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--navy);
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border);
}

.config-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.config-val {
  font-weight: 600;
  color: var(--navy);
}

.config-link {
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}

.config-link:hover {
  color: var(--rosa);
}

#changelog-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#changelog-list .glossary-card {
  flex-shrink: 0;
}

.changelog-version-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--navy);
  background: rgba(42, 56, 100, 0.08);
  padding: 2px 8px;
  border-radius: 10px;
}

.changelog-date {
  font-size: 0.72rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   EMPTY STATES & MISC
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-2);
}

.empty-state-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  opacity: 0.4;
}

.empty-state h3 {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 0.82rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-2);
  margin-bottom: 4px;
}

.mt-8 {
  margin-top: 8px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.mb-12 {
  margin-bottom: 12px;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.gap-8 {
  gap: 8px;
}

.gap-10 {
  gap: 10px;
}

.text-sm {
  font-size: 0.82rem;
}

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

.text-danger {
  color: var(--rojo);
}

.text-success {
  color: var(--success);
}

.fw-600 {
  font-weight: 600;
}

.att-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}

.att-present {
  background: var(--success);
}

.att-absent {
  background: var(--border);
}

.att-excused {
  background: var(--warning);
}

.conflict-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(179, 0, 0, 0.08);
  color: var(--rojo);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 600;
}

/* ============================================================
   TOASTS
   ============================================================ */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast {
  background: var(--text);
  color: #fff;
  padding: 9px 14px;
  border-radius: 7px;
  font-size: 0.81rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: tIn 0.22s ease, tOut 0.28s ease 2.5s forwards;
  max-width: 300px;
}

.toast.success {
  background: var(--success);
}

.toast.error {
  background: var(--rojo);
}

.toast.warning {
  background: var(--warning);
}

@keyframes tIn {
  from {
    transform: translateX(16px);
    opacity: 0;
  }
}

@keyframes tOut {
  to {
    transform: translateX(16px);
    opacity: 0;
  }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gris);
}

/* ============================================================
   RECUENTO RÁPIDO
   ============================================================ */

.rc-grid {
  display: grid;
  grid-template-columns: repeat(var(--rc-cols, 4), 1fr);
  gap: 6px;
  margin-top: 4px;
}

.rc-cell {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 7px 8px 6px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.rc-cell:not(.rc-cell-empty):hover {
  box-shadow: var(--shadow);
}

.rc-cell-active {
  border-color: rgba(42, 56, 100, 0.3);
}

.rc-cell-done {
  border-color: var(--success);
  background: rgba(26, 122, 74, 0.03);
}

.rc-cell-empty {
  background: rgba(42, 56, 100, 0.015);
  border: 1px dashed var(--border);
  min-height: 40px;
}

/* Header: name + total on same line */
.rc-cell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 5px;
}

.rc-cell-name {
  font-weight: 600;
  font-size: 0.73rem;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.rc-cell-total {
  font-size: 0.62rem;
  color: var(--text-2);
  font-weight: 500;
  flex-shrink: 0;
  background: rgba(42, 56, 100, 0.06);
  padding: 1px 5px;
  border-radius: 8px;
}

.rc-cell-total.rc-cell-full {
  color: #fff;
  background: var(--success);
  font-weight: 700;
}

/* Compact vote row: all 3 categories inline */
.rc-vote-compact {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.rc-vote-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Colored dot indicators */
.rc-dot {
  font-size: 0.64rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  line-height: 1;
}

.rc-dot-favor {
  color: var(--success);
  background: rgba(26, 122, 74, 0.1);
}

.rc-dot-contra {
  color: var(--rojo);
  background: rgba(179, 0, 0, 0.08);
}

.rc-dot-abstencion {
  color: var(--warning);
  background: rgba(196, 122, 0, 0.1);
}

/* Vote buttons — compact */
.rc-vote-btns {
  display: flex;
  gap: 2px;
}

.rc-vote-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-2);
  flex-shrink: 0;
  padding: 0;
}

.rc-vote-btn:hover {
  border-color: var(--gris);
  color: var(--text);
}

.rc-vote-btn.rc-favor.rc-btn-active {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.rc-vote-btn.rc-contra.rc-btn-active {
  background: var(--rojo);
  border-color: var(--rojo);
  color: #fff;
}

.rc-vote-btn.rc-abstencion.rc-btn-active {
  background: var(--warning);
  border-color: var(--warning);
  color: #fff;
}

.rc-vote-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

/* Results bar — compact pills */
.rc-results-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.rc-result-item {
  flex: 1;
  min-width: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  position: relative;
  overflow: hidden;
}

.rc-result-count {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--navy);
  line-height: 1;
}

.rc-result-of {
  font-size: 0.85rem;
  color: var(--text-2);
  font-weight: 400;
}

.rc-result-label {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-2);
  margin-top: 2px;
}

.rc-result-favor::before {
  content: '';
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 3px;
  background: var(--success);
}

.rc-result-contra::before {
  content: '';
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 3px;
  background: var(--rojo);
}

.rc-result-abstencion::before {
  content: '';
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 3px;
  background: var(--warning);
}

.rc-result-total::before {
  content: '';
  position: absolute;
  inset-block: 0;
  left: 0;
  width: 3px;
  background: var(--navy);
}

/* Editor cells */
.rc-editor-cell {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 6px;
}

.rc-editor-cell select {
  width: 100%;
}