:root {
  --bg-page: #f5f7fb;
  --bg-surface: #ffffff;
  --bg-muted: #f7f9fc;
  --bg-avatar: #eef2f9;
  --bg-note: #fdf8ee;
  --border: #e4e9f2;
  --border-subtle: #eef1f6;
  --text-primary: #16202e;
  --text-body: #2b3648;
  --text-secondary: #566076;
  --text-muted: #8a93a6;
  --text-faint: #a3abbd;
  --accent: #3b6fe0;
  --accent-hover: #2a5bc9;
  --accent-soft: rgba(59, 111, 224, 0.1);
  --brand-from: #3b6fe0;
  --brand-to: #5468ff;
  --tofu: #5468ff;
  --tofu-bg: rgba(84, 104, 255, 0.1);
  --tofu-text: #4054d6;
  --reuniones: #2f9e6b;
  --reuniones-bg: rgba(47, 158, 107, 0.12);
  --reuniones-text: #1f7a51;
  --infra: #d99a1c;
  --infra-bg: rgba(217, 154, 28, 0.13);
  --infra-text: #a9750f;
  --otro: #c7cedb;
  --otro-bg: rgba(143, 156, 179, 0.12);
  --otro-text: #566076;
  --success: #2f9e6b;
  --success-bg: rgba(47, 158, 107, 0.14);
  --success-text: #1f7a51;
  --warning: #d99a1c;
  --warning-bg: rgba(217, 154, 28, 0.14);
  --warning-text: #a9750f;
  --warning-border: rgba(217, 154, 28, 0.3);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.1);
  --note-text: #5c4a1f;
  --radius-sm: 5px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-pill: 20px;
  --shadow-card: 0 1px 3px rgba(16, 32, 46, 0.05);
  --font-sans: "Inter", system-ui, sans-serif;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --sidebar-w: 216px;
  --rail-w: 280px;
  --focus-ring: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--accent);
  --transition: 150ms ease;
}

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

html,
body {
  min-height: 100vh;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.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;
}

.hidden {
  display: none !important;
}

/* ── Shell ── */
.app-shell {
  display: flex;
  min-height: 100vh;
  color: var(--text-primary);
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 10;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px;
}

.sidebar__logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-from), var(--brand-to));
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 15px var(--font-display);
  color: #fff;
  flex-shrink: 0;
}

.sidebar__title {
  font: 700 15px var(--font-display);
  letter-spacing: -0.01em;
}

.sidebar__org {
  font: 400 10.5px var(--font-mono);
  color: var(--text-muted);
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__nav-label {
  font: 600 10px var(--font-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 0 8px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: 500 13px var(--font-sans);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background var(--transition), color var(--transition);
}

.nav-item:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.nav-item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.nav-item svg {
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--warning);
  color: #fff;
  font: 700 10px var(--font-sans);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

.sidebar__footer {
  margin-top: auto;
  padding: 12px 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 11px var(--font-sans);
  color: var(--text-muted);
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
}

.sync-dot.is-live {
  background: var(--success);
  animation: gt-pulse 2s infinite;
}

@keyframes gt-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

/* ── Main column ── */
.main-column {
  flex: 1;
  padding: 28px 32px 40px;
  min-width: 0;
  max-width: 840px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.page-header__title {
  font: 700 22px var(--font-display);
  letter-spacing: -0.01em;
}

.page-header__subtitle {
  font: 400 12.5px var(--font-sans);
  color: var(--text-muted);
  margin-top: 3px;
  max-width: 480px;
}

.controls {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.controls select,
.controls input[type="date"] {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--radius);
  font: 500 13px var(--font-sans);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font: 600 13px var(--font-sans);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

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

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Status ── */
.status-panel {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.status-panel--error {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius-lg);
}

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Hermes hero ── */
.hermes-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.hermes-hero__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hermes-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 12px var(--font-sans);
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 11px;
  border-radius: var(--radius-pill);
}

.hermes-hero__meta {
  font: 500 12px var(--font-mono);
  color: var(--text-muted);
}

.hermes-hero__body {
  display: flex;
  gap: 26px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.hermes-hero__score {
  flex: none;
  text-align: center;
}

.hermes-hero__score-value {
  font: 700 52px/1 var(--font-display);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hermes-hero__score-label {
  font: 600 10px var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.hermes-hero__text {
  flex: 1;
  min-width: 280px;
  font: 400 15.5px/1.7 var(--font-sans);
  color: var(--text-body);
  margin: 0;
}

.hermes-hero__text b {
  font-weight: 600;
  color: var(--text-primary);
}

.hermes-hero__stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.mini-stat {
  flex: 1;
  min-width: 110px;
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.mini-stat__label {
  font: 600 11px var(--font-sans);
  color: var(--text-muted);
}

.mini-stat__value {
  font: 700 20px var(--font-display);
  color: var(--text-primary);
  margin-top: 2px;
}

.mini-stat__value--accent {
  color: var(--accent);
}

.mini-stat__value--warn {
  color: var(--warning-text);
}

.hermes-hero--empty {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 24px;
}

/* ── Badges ── */
.badge {
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  font: 600 12px var(--font-sans);
  display: inline-block;
  margin-left: auto;
}

.badge-ok {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid rgba(47, 158, 107, 0.3);
}

.badge-warn {
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}

.badge-bad {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

/* ── Feed ── */
.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.feed-header__label {
  font: 600 13.5px var(--font-sans);
}

.feed-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  font: 500 11px var(--font-sans);
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: transparent;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.filter-chip:hover {
  color: var(--text-secondary);
  border-color: #cfd6e3;
}

.filter-chip.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}

.feed-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px 18px;
}

.feed-row {
  display: flex;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition);
}

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

.feed-row:hover {
  background: var(--bg-muted);
  margin: 0 -10px;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: var(--radius);
}

.feed-row img {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  flex: none;
  background: var(--bg-avatar);
}

.feed-row__body {
  min-width: 0;
  flex: 1;
}

.feed-row__message {
  font: 400 13.5px/1.45 var(--font-sans);
  color: var(--text-primary);
}

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

.feed-row__repo {
  font: 500 11px var(--font-mono);
  color: var(--text-muted);
}

.feed-row__sha {
  font: 500 11px var(--font-mono);
  color: var(--accent);
}

.feed-row__author {
  font: 400 11px var(--font-sans);
  color: var(--text-muted);
  margin-left: auto;
}

.commit-dominio {
  font: 500 10px var(--font-sans);
  padding: 1px 7px;
  border-radius: var(--radius-sm);
}

.dom-tofu {
  background: var(--tofu-bg);
  color: var(--tofu-text);
}

.dom-reuniones {
  background: var(--reuniones-bg);
  color: var(--reuniones-text);
}

.dom-infra {
  background: var(--infra-bg);
  color: var(--infra-text);
}

.dom-otro {
  background: var(--otro-bg);
  color: var(--otro-text);
}

.no-commits {
  padding: 24px 8px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Right rail ── */
.rail {
  width: var(--rail-w);
  flex: none;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.rail-section__label {
  font: 600 11px var(--font-sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.dist-bar {
  display: flex;
  height: 9px;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--border-subtle);
}

.dist-bar__seg {
  height: 100%;
  min-width: 0;
}

.dist-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dist-legend__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 12.5px var(--font-sans);
  color: var(--text-body);
}

.dist-legend__dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
  flex-shrink: 0;
}

.dist-legend__count {
  margin-left: auto;
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 12px;
}

.rail-team {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rail-member {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rail-member img {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  background: var(--bg-avatar);
  flex-shrink: 0;
}

.rail-member__info {
  flex: 1;
  min-width: 0;
}

.rail-member__name {
  font: 600 12.5px var(--font-sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-member__role {
  font: 400 11px var(--font-sans);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-member__role--tofu {
  color: var(--accent);
}

.rail-member__role--reuniones {
  color: var(--reuniones-text);
}

.rail-member__role--infra {
  color: var(--infra-text);
}

.rail-member__role--otro {
  color: var(--text-secondary);
}

.rail-member__count {
  font: 600 12px var(--font-mono);
  color: var(--text-muted);
}

.rail-note {
  background: var(--bg-note);
  border: 1px solid var(--warning-border);
  border-radius: 11px;
  padding: 14px;
}

.rail-note__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 600 10px var(--font-sans);
  color: var(--warning-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 7px;
}

.rail-note__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
}

.rail-note__text {
  font: 400 12.5px/1.55 var(--font-sans);
  color: var(--note-text);
}

.rail-note--empty {
  background: var(--bg-muted);
  border-color: var(--border);
}

.rail-note--empty .rail-note__label {
  color: var(--text-muted);
}

.rail-note--empty .rail-note__dot {
  background: var(--text-faint);
}

.rail-note--empty .rail-note__text {
  color: var(--text-muted);
}

/* ── Hermes list (Informes view) ── */
.hermes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hermes-list--expanded {
  max-height: 640px;
  overflow-y: auto;
  padding-right: 4px;
}

.hermes-footer {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}

.hermes-box {
  padding: 16px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.hermes-box--empty {
  text-align: center;
  color: var(--text-muted);
}

.hermes-box__meta {
  font: 500 12px var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 8px;
}

.hermes-box__text {
  font: 400 14px/1.65 var(--font-sans);
  color: var(--text-body);
}

/* ── Evaluation ── */
.eval-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.eval-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.eval-card__header .badge {
  margin-left: 0;
}

.eval-card__recommendation {
  color: var(--text-body);
  font: 400 15px/1.7 var(--font-sans);
}

.eval-card__meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12.5px;
  color: var(--text-secondary);
}

.eval-card__meta-item strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Personas / Equipo view ── */
.personas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.persona-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition);
}

.persona-card:hover {
  border-color: #cfd6e3;
}

.persona-card--inactive {
  opacity: 0.75;
}

.persona-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.persona-header img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--bg-avatar);
  flex-shrink: 0;
}

.persona-header__name {
  font-weight: 600;
  font-size: 14px;
}

.persona-header__login {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.persona-header__domain {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.persona-header__count {
  margin-left: auto;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius);
  font: 600 12px var(--font-mono);
  color: var(--text-secondary);
}

.filter-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-page);
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font: 500 11px var(--font-sans);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.filter-btn:hover {
  color: var(--text-secondary);
}

.filter-btn.active {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

.commits-list {
  padding: 8px 16px 16px;
  max-height: 360px;
  overflow-y: auto;
}

.commit-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
}

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

.commit-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  align-items: center;
}

.commit-repo {
  font: 500 11px var(--font-mono);
  color: var(--text-muted);
}

.commit-sha {
  font: 500 11px var(--font-mono);
  color: var(--accent);
}

.commit-fecha {
  font-size: 12px;
  color: var(--text-muted);
}

.commit-message {
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}

/* ── Meta ── */
.meta-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.meta-card__text {
  font: 400 16px/1.65 var(--font-sans);
  color: var(--text-body);
  margin-bottom: 16px;
}

.meta-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.meta-card__updated {
  font-size: 12px;
  color: var(--text-muted);
}

.meta-edit {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meta-edit textarea,
.notas-form textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  resize: vertical;
}

.meta-edit__row,
.notas-form__row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.meta-edit select,
.notas-form select {
  flex: 1;
  min-width: 180px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font: 500 13px var(--font-sans);
}

/* ── Notas ── */
.notas-form {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.notas-form textarea {
  margin-bottom: 12px;
}

.hermes-wake-status {
  margin: 12px 0 0;
  font: 500 12px/1.4 var(--font-sans);
  color: var(--text-muted);
  min-height: 1.2em;
}

.hermes-wake-status[data-state="ok"] {
  color: var(--accent);
}

.hermes-wake-status[data-state="throttled"],
.hermes-wake-status[data-state="skipped"] {
  color: var(--text-secondary);
}

.hermes-wake-status[data-state="error"] {
  color: #c45c5c;
}

.notas-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nota-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
}

.nota-item--processed {
  opacity: 0.7;
}

.nota-item__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.nota-item__author {
  font-weight: 600;
  font-size: 13px;
}

.nota-item__date {
  font-size: 12px;
  color: var(--text-muted);
}

.nota-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.nota-badge--pending {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.nota-badge--done {
  background: var(--success-bg);
  color: var(--success-text);
}

.nota-item__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-body);
}

.nota-item__reply {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.nota-item__reply-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--success);
  margin-bottom: 6px;
}

.nota-item__reply-text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.nota-item__reply--empty {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.notas-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .rail {
    display: none;
  }

  .main-column {
    max-width: none;
  }
}

@media (max-width: 768px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 16px;
  }

  .sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .sidebar__nav-label {
    width: 100%;
  }

  .nav-item {
    width: auto;
    flex: 1 1 auto;
  }

  .sidebar__footer {
    margin-top: 0;
  }

  .main-column {
    padding: 20px 16px 32px;
    max-width: none;
  }

  .personas-grid {
    grid-template-columns: 1fr;
  }

  .hermes-hero__score-value {
    font-size: 40px;
  }

  .controls {
    width: 100%;
  }

  .controls select,
  .controls input[type="date"],
  .btn-primary {
    flex: 1;
    min-width: 0;
  }
}
