/* base.css - sistema de diseno compartido (admin y portal tenant) */

@font-face {
  font-family: "Inter";
  src: url("/shared/assets/fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/shared/assets/fonts/IBMPlexMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/shared/assets/fonts/IBMPlexMono-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/shared/assets/fonts/IBMPlexMono-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Fondos en capas neutras */
  --bg-canvas: #ffffff;
  --bg-subtle: #fcfcfc;
  --bg-layer-01: #fafafa;
  --bg-layer-02: #f2f2f2;
  --bg-layer-03: #e8e8e8;

  /* Bordes */
  --border-muted: #ebebeb;
  --border-strong: #d4d4d4;

  /* Texto */
  --text-primary: #171717;
  --text-secondary: #5f5f5f;
  --text-tertiary: #737373;

  /* Acento */
  --accent: #0068d6;
  --accent-hover: #0050a8;
  --accent-soft: #eef5ff;
  --accent-ring: rgba(0, 104, 214, 0.28);

  /* Estados */
  --ok: #127a3d;
  --ok-bg: #eefaf1;
  --ok-border: #c9ecd4;
  --warn: #9a5b00;
  --warn-bg: #fff8e6;
  --warn-border: #f0e0b8;
  --danger: #c0362c;
  --danger-bg: #fdf1f0;
  --danger-border: #f3d0cc;
  --switch-off: #d1d5db;
  --switch-on: #10b981;

  /* Geometria */
  --radius-card: 6px;
  --radius-control: 4px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);

  /* Tipografia */
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  /* Medidas */
  --measure: 72ch;
  --page: 1120px;
  --space: 1.25rem;

  /* Alias de la UI clasica (mantener mientras haya reglas que los usen) */
  --bg: var(--bg-layer-01);
  --panel: var(--bg-canvas);
  --panel-2: var(--bg-layer-02);
  --border: var(--border-muted);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --accent-2: var(--ok);
  --online: var(--ok);
  --radius: var(--radius-card);
}

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

html {
  background: var(--bg-layer-01);
  color: var(--text-primary);
  font-family: var(--sans);
  font-size: 13px;
  line-height: 20px;
  font-weight: 440;
  font-optical-sizing: auto;
  letter-spacing: -0.04px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-layer-01);
  color: var(--text-primary);
  font: 440 13px/20px var(--sans);
  letter-spacing: -0.04px;
}

::selection {
  background: var(--accent-soft);
  color: var(--text-primary);
}

code {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--bg-layer-02);
  border: 0.5px solid var(--border-muted);
  border-radius: 3px;
  padding: 1px 4px;
  color: var(--text-primary);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Cabecera */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  min-height: 52px;
  padding: 10px 1.25rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-canvas);
  border-bottom: 0.5px solid var(--border-muted);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
  box-shadow: 0 0 0 3px var(--bg-layer-02);
  flex: none;
}

.dot.ok {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-bg);
}

.dot.bad {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-bg);
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.meta {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 18px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

/* Tablero */

main {
  width: min(var(--page), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.loading {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

.link {
  appearance: none; background: transparent; border: 0; padding: 0;
  color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline;
  text-decoration-color: var(--border-strong); text-underline-offset: 3px;
}
.link:hover { color: var(--accent-hover); text-decoration-color: currentColor; }

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-canvas);
  border: 0.5px solid var(--border-muted);
  border-radius: var(--radius-card);
  padding: 1.1rem 1.25rem 1.15rem;
  box-shadow: var(--shadow-1);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-2);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.repo-name {
  margin: 0;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.badge {
  display: inline-flex;
  align-items: center;
  max-width: 24ch;
  padding: 2px 7px;
  background: var(--bg-layer-01);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-control);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: var(--bg-layer-01);
  border: 0.5px solid var(--border-muted);
  border-radius: var(--radius-control);
}

.advisories {
  display: grid;
  gap: 0.25rem;
}

.advisory {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.4rem 0.6rem;
  border: 0.5px solid var(--border-muted);
  border-left-width: 3px;
  border-radius: var(--radius-control);
  background: var(--bg-layer-01);
}

.advisory strong {
  font-size: 11.5px;
  line-height: 17px;
  font-weight: 600;
}

.advisory span {
  font-size: 11px;
  line-height: 16px;
  color: var(--text-tertiary);
}

.advisory.sev-alta {
  border-left-color: var(--danger);
  background: var(--danger-bg);
}

.advisory.sev-media {
  border-left-color: var(--warn);
  background: var(--warn-bg);
}

.advisory.sev-info {
  border-left-color: var(--border-muted);
}

.facts > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.facts dt {
  font-size: 11px;
  line-height: 18px;
  font-weight: 500;
  color: var(--text-tertiary);
}

.facts dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.report-link {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--accent);
  text-decoration-color: var(--border-strong);
}

/* Bloques y desplegables */

.block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 26px;
}

.block h3:not(.title-sm),
.block-head h3:not(.title-sm) {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.block ul {
  margin: 0;
  padding: 0.5rem 0.65rem 0.5rem 1.4rem;
  background: var(--bg-layer-01);
  border: 0.5px solid var(--border-muted);
  border-radius: var(--radius-control);
  font-size: 12px;
  line-height: 18px;
  color: var(--text-secondary);
}

.block li {
  margin: 2px 0;
  overflow-wrap: anywhere;
}

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

.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 16px;
  padding: 0 5px;
  background: var(--bg-layer-02);
  border: 0.5px solid var(--border-muted);
  border-radius: var(--radius-control);
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Acciones de tarjeta */

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.actions-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1 1 100%;
}

.actions-primary .btn {
  flex: 1;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  background: var(--bg-layer-02);
  border: 0.5px solid var(--border-muted);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}

.status[data-state="running"] {
  background: var(--accent-soft);
  border-color: var(--accent-ring);
  color: var(--accent);
}

.status[data-state="finished"] {
  background: var(--ok-bg);
  border-color: var(--ok-border);
  color: var(--ok);
}

.status[data-state="failed"],
.status[data-state="error"],
.status[data-state="timeout"],
.status[data-state="aborted"] {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.status[data-state="info"],
.status[data-state="cancelling"],
.status[data-state="cancelled"] {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn);
}

.progress {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 16px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.progress.hidden {
  display: none;
}

.spinner {
  width: 11px;
  height: 11px;
  display: inline-block;
  border: 1.5px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner.is-done,
.spinner.is-failed,
.spinner.is-cancelled {
  animation: none;
}

.spinner.is-done {
  border-color: var(--ok);
}

.spinner.is-failed {
  border-color: var(--danger);
}

.spinner.is-cancelled {
  border-color: var(--warn);
}

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

/* Actualizaciones */

.updates-block {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-layer-01);
  border: 0.5px solid var(--border-muted);
  border-radius: var(--radius-control);
}

.updates-body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.update-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 2px 0;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.update-row input {
  accent-color: var(--accent);
  margin: 0;
}

.update-row.unlockable {
  color: var(--ok);
}

dialog {
  background: var(--bg-canvas);
  color: var(--text-primary);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-card);
  padding: 1.15rem 1.25rem 1.25rem;
  box-shadow: var(--shadow-2);
}

dialog::backdrop {
  background: rgba(23, 23, 23, 0.32);
}

dialog h2 {
  margin: 0 0 0.35rem;
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

dialog p {
  margin: 0.5rem 0 0;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-secondary);
}

dialog :is(input[type="checkbox"], input[type="radio"]) {
  display: inline-block;
  width: auto;
  min-height: 0;
  margin: 0 0.4rem 0 0;
  padding: 0;
  accent-color: var(--accent);
  box-shadow: none;
}

.detail-note {
  grid-column: 1 / -1;
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  z-index: 30;
  padding: 6px 10px;
  background: var(--bg-canvas);
  color: var(--text-primary);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-2);
  text-decoration: none;
  transition: top 120ms ease;
}

.skip-link:focus-visible {
  top: 0.75rem;
}

.hidden {
  display: none !important;
}

.progress.hidden,
.updates-body.hidden {
  display: none !important;
}

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

  .health-dot.is-checking {
    animation: none;
  }
}

.detail {
  display: grid;
  gap: 1rem;
  width: min(var(--page), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.5rem 0 2.5rem;
}

.detail-back {
  display: inline-flex;
  margin-bottom: 0.5rem;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-secondary);
  text-decoration: none;
}

.detail-back:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

.detail-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  align-items: start;
  margin: 0 0 1.25rem;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-top: 0;
}

.detail-head h1 {
  margin: 0;
  font-size: 28px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.detail-head p {
  margin: 0;
}

.detail-nav {
  display: flex;
  gap: 4px;
  border-bottom: 0.5px solid var(--border-muted);
  margin-bottom: 20px;
}

.detail-nav a,
.detail-nav button {
  padding: 8px 12px;
  color: var(--muted);
  text-decoration: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.detail-nav a:hover,
.detail-nav button:hover {
  color: var(--text);
}

.detail-nav a.active,
.detail-nav button.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.detail-body {
  display: grid;
  gap: 16px;
}

.card-title {
  min-width: 0;
}

.repo-url {
  display: block;
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  word-break: break-all;
}

.repo-url:hover {
  color: var(--accent);
}

.detail-link {
  flex: none;
}

.detail-link.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.status-text {
  font-size: 12px;
}

.updates-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.health-dot {
  width: 20px;
  height: 20px;
  border-radius: calc(var(--radius) + 4px);
  flex: none;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  background: color-mix(in srgb, currentColor 50%, transparent);
  box-shadow: none;
}

.health-dot::before {
  content: '?';
}

.health-dot.is-on {
  color: var(--ok);
  background: color-mix(in srgb, currentColor 50%, transparent);
  box-shadow: none;
}

.health-dot.is-on::before {
  content: '✓';
}

.health-dot.is-off {
  color: var(--danger);
  background: color-mix(in srgb, currentColor 50%, transparent);
  box-shadow: none;
}

.health-dot.is-off::before {
  content: '×';
}

.health-dot.is-checking {
  color: var(--muted);
  background: color-mix(in srgb, currentColor 50%, transparent);
  box-shadow: none;
  animation: none;
}

.health-dot.is-checking::before {
  content: '…';
}

.repo-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
  min-width: 0;
}

.repo-meta .repo-url {
  margin-top: 0;
}

.repo-meta .status-text {
  font-size: 11px;
  white-space: nowrap;
}

.status-action {
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.status-action:hover {
  text-decoration: underline;
}

.block-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.updates-refresh {
  padding: 2px 8px;
  font-size: 11px;
}

.updates-meta {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 10.5px;
}

.install-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 0.5px solid var(--border-muted);
  border-radius: var(--radius-card);
  background: var(--bg-layer-01);
}

.install-card h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.install-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.install-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.busy.is-done .busy-text {
  color: var(--ok);
}

.busy.is-failed .busy-text {
  color: var(--danger);
}

.busy .busy-text {
  white-space: nowrap;
}

.install-meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
}

.install-refresh {
  padding: 2px 8px;
  font-size: 11px;
}

.install-card h3 {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.install-facts {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
    background: #ffffff;
    border: 0.5px solid var(--border-muted);
    border-radius: var(--radius-control);
}

.install-note {
  padding-left: 10px;
  border-left: 2px solid var(--warn-border);
}

.install-note h3 {
  color: var(--warn);
}

.install-note ul {
  margin: 4px 0 0;
  padding-left: 16px;
  font-size: 12px;
  line-height: 20px;
}

.install-table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
  font-size: 12px;
  gap: 0.35rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: #ffffff;
  border: 0.5px solid var(--border-muted);
  border-radius: var(--radius-control);
}

.install-table th {
  padding: 6px 8px;
  text-align: left;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 0.5px solid var(--border-muted);
}

.install-table td {
  padding: 6px 8px;
  vertical-align: top;
  border-bottom: 0.5px solid var(--border-muted);
}

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

.install-table td .btn {
  margin: 0;
  white-space: nowrap;
}

.install-plugin {
  display: grid;
  gap: 2px;
}

.install-release {
  font-size: 10px;
}

.install-update-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--ok);
  font-weight: 700;
}

.install-switch {
  position: relative;
  width: 35px;
  height: 18px;
  border-radius: 30px;
  background: var(--switch-off);
  transition: background 180ms ease;
}

.install-switch.is-on {
  background: var(--switch-on);
}

.install-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--shadow-1);
  transition: transform 180ms ease;
}

.install-switch.is-on .install-switch-knob {
  transform: translateX(17px);
}

.install-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.reports-list {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  background: #ffffff;
  border: 0.5px solid var(--border-muted);
  border-radius: var(--radius-control);
}

.report-meta {
  display: grid;
  gap: 2px;
}

.report-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--border-muted);
}

.report-item:last-child {
  border-bottom: 0;
}

@media (max-width: 640px) {
  .top {
    padding: 8px 1rem;
    min-height: 0;
  }

  .brand h1 {
    font-size: 18px;
    line-height: 24px;
  }

  .actions {
    gap: 0.35rem;
  }

  .meta {
    flex: 1 1 100%;
  }

  main {
    width: calc(100% - 2rem);
    padding: 1rem 0 2rem;
  }

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

  .card {
    padding: 0.95rem 1rem 1rem;
  }
}

/* Menu de cuenta (componente compartido; el avatar usa las iniciales) */

.account-wrap {
  position: relative;
}

.account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: var(--bg-layer-02);
  color: var(--text-secondary);
  border: 0.5px solid var(--border-strong);
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.account-btn:hover {
  background: var(--bg-layer-03);
  color: var(--text-primary);
}

.account-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  display: grid;
  gap: 2px;
  min-width: 200px;
  padding: 6px;
  background: var(--bg-canvas);
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-2);
}

.account-pop .account-info {
  display: grid;
  gap: 1px;
  padding: 4px 6px 6px;
  border-bottom: 0.5px solid var(--border-muted);
  margin-bottom: 4px;
}

.account-pop .account-info strong {
  font-size: 12px;
  line-height: 18px;
  overflow-wrap: anywhere;
}

.account-pop .account-info span {
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 16px;
  color: var(--text-tertiary);
  overflow-wrap: anywhere;
}

.account-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 6px 8px;
  background: transparent;
  color: var(--text-primary);
  border: 0;
  border-radius: var(--radius-control);
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 18px;
  text-align: left;
  cursor: pointer;
}

.account-item:hover {
  background: var(--bg-layer-01);
}

.account-item.danger {
  color: var(--danger);
}

.account-item.danger:hover {
  background: var(--danger-bg);
}
