/* ——— Variables panel ——— */
.admin-body {
  --admin-font: "Plus Jakarta Sans", system-ui, sans-serif;
  --admin-display: "Fraunces", Georgia, serif;
  --admin-bg: #eef6f7;
  --admin-surface: #ffffff;
  --admin-ink: #0c1f22;
  --admin-muted: #5a7378;
  --admin-line: rgba(13, 110, 110, 0.12);
  --admin-primary: var(--admin-brand-primary, #0d6e6e);
  --admin-accent: var(--admin-brand-accent, #f4a261);
  --admin-shadow-soft: 0 10px 32px rgba(11, 58, 61, 0.06);
  --admin-shadow-lift: 0 20px 48px rgba(11, 58, 61, 0.11);
  --admin-radius-lg: 18px;
  --admin-radius-xl: 22px;
  font-family: var(--admin-font);
  color: var(--admin-ink);
  background: var(--admin-bg);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-body .wrap {
  width: min(1220px, calc(100% - 2rem));
}
.admin-header .wrap {
  width: calc(100% - 2rem);
  max-width: none;
}

.admin-body--login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 90% 70% at 100% 0%, rgba(244, 162, 97, 0.14), transparent 50%),
    radial-gradient(ellipse 70% 60% at 0% 100%, rgba(13, 110, 110, 0.12), transparent 48%),
    var(--admin-bg);
}

/* ——— Login ——— */
.login-shell {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.05fr);
  min-height: min(100vh, 900px);
}
@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; min-height: auto; }
}

.login-brand {
  background:
    linear-gradient(155deg, var(--admin-primary-login, #0d5c5c) 0%, #0a3d40 48%, #06292c 100%);
  color: #dff6f6;
  padding: clamp(2rem, 6vw, 3.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-brand::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.12), transparent 42%);
  pointer-events: none;
}
.login-brand-inner { position: relative; z-index: 1; max-width: 380px; }
.login-brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  margin-bottom: 1.25rem;
}
.login-brand-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.82;
}
.login-brand-title {
  margin: 0.35rem 0 0.5rem;
  font-family: var(--admin-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
}
.login-brand-sub {
  margin: 0 0 1.25rem;
  opacity: 0.88;
  font-size: 1.02rem;
  line-height: 1.55;
}
.login-brand-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.login-brand-list li {
  padding: 0.45rem 0 0.45rem 1.5rem;
  position: relative;
  opacity: 0.92;
}
.login-brand-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--admin-accent-login, #f4a261);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.login-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}
.login-card {
  width: min(440px, 100%);
  background: var(--admin-surface);
  border-radius: 22px;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow:
    0 4px 24px rgba(11, 58, 61, 0.06),
    0 28px 70px rgba(11, 58, 61, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.8);
}
.login-card-head { margin-bottom: 1.25rem; }
.login-card-title {
  margin: 0;
  font-family: var(--admin-display);
  font-size: 1.55rem;
  font-weight: 700;
}
.login-card-desc {
  margin: 0.35rem 0 0;
  color: var(--admin-muted);
  font-size: 0.98rem;
}

.login-access-hint {
  margin: 0 0 1.35rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: linear-gradient(145deg, #f3fbfc, #fff);
  border: 1px solid var(--admin-line);
  font-size: 0.88rem;
  line-height: 1.55;
}
.login-access-hint dt {
  margin: 0 0 0.35rem;
  color: var(--admin-primary);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.login-access-hint dd {
  margin: 0 0 0.85rem;
  color: #3d524f;
}
.login-access-hint dd:last-child { margin-bottom: 0; }
.login-code {
  font-family: ui-monospace, monospace;
  font-size: 0.82em;
  background: rgba(13, 110, 110, 0.08);
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
  word-break: break-all;
}
.login-code--break { display: block; margin-top: 0.35rem; }
.login-creds {
  display: block;
  margin: 0.5rem 0;
  font-weight: 700;
}
.login-creds kbd {
  font-family: inherit;
  background: #e8f4f5;
  border: 1px solid #c5dfe3;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
}
.login-warn {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: #7a5a1f;
  background: #fff8e8;
  border: 1px solid #f2dfb4;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
}

.login-form { margin-top: 0.25rem; }
.login-label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  margin-top: 0.85rem;
  color: #234548;
}
.login-input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.72rem 0.85rem;
  border-radius: 12px;
  border: 1px solid #c5d9dc;
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.login-input:focus {
  outline: none;
  border-color: var(--admin-primary-login, #0d6e6e);
  box-shadow: 0 0 0 4px rgba(13, 110, 110, 0.12);
}
.login-submit {
  width: 100%;
  margin-top: 1.35rem;
  padding: 0.85rem 1rem;
  border: none;
  border-radius: 14px;
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--admin-primary-login, #0d6e6e), #085050);
  box-shadow: 0 14px 32px rgba(13, 110, 110, 0.28);
  transition: filter 0.2s, transform 0.15s;
}
.login-submit:hover { filter: brightness(1.06); }
.login-submit:active { transform: scale(0.99); }

.login-flash.flash {
  margin: 0 auto;
  max-width: min(560px, 100% - 2rem);
  margin-top: 1rem;
}
.login-public-foot {
  text-align: center;
  padding: 1rem;
  margin: 0;
  font-size: 0.92rem;
}
.login-public-foot a {
  color: var(--admin-muted);
  font-weight: 600;
}

/* ——— Cabecera panel ——— */
.admin-header {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 251, 252, 0.98) 100%);
  border-bottom: 1px solid rgba(13, 110, 110, 0.14);
  box-shadow: 0 10px 30px rgba(11, 58, 61, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.68rem 0;
}
.admin-workbar-wrap {
  border-top: 1px solid rgba(13, 110, 110, 0.08);
  background: linear-gradient(180deg, rgba(13, 110, 110, 0.04), rgba(13, 110, 110, 0.015));
}
.admin-workbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.5rem 0 0.6rem;
}
.admin-workbar-left {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.admin-workbar-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--admin-muted);
}
.admin-workbar-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
}
.admin-workbar-chip.is-active {
  background: rgba(13, 110, 110, 0.16);
  color: var(--admin-primary);
  border-color: rgba(13, 110, 110, 0.3);
}
.admin-workbar-date {
  font-size: 0.78rem;
  color: var(--admin-muted);
  font-variant-numeric: tabular-nums;
}
.admin-workbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.admin-quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
  border: 1px solid rgba(13, 110, 110, 0.2);
  color: #234548;
  background: #fff;
}
.admin-quick-action:hover {
  text-decoration: none;
  background: rgba(13, 110, 110, 0.08);
}
.admin-quick-action--accent {
  background: rgba(244, 162, 97, 0.18);
  border-color: rgba(244, 162, 97, 0.38);
  color: #7a4310;
}
.admin-quick-action--accent:hover {
  background: rgba(244, 162, 97, 0.28);
}
.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
  min-height: 44px;
}
.admin-brand:hover { text-decoration: none; color: inherit; }
.admin-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--admin-primary), #063032);
  color: #fff;
  box-shadow: 0 10px 26px rgba(13, 110, 110, 0.28);
}
.admin-brand-text { display: flex; flex-direction: column; gap: 0.08rem; }
.admin-brand-name {
  font-family: var(--admin-display);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1.15;
}
.admin-brand-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--admin-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.admin-user-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #e8f4f5;
  color: #234548;
  border: 1px solid var(--admin-line);
}

.admin-header-tools {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.admin-nav-toggle {
  display: none;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--admin-line);
  background: var(--admin-surface);
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  color: #234548;
  transition: background 0.2s, border-color 0.2s;
}
.admin-nav-toggle:hover {
  background: rgba(13, 110, 110, 0.08);
  border-color: rgba(13, 110, 110, 0.22);
}
.admin-nav-toggle:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 2px;
}
.admin-nav-toggle-bars {
  width: 18px;
  height: 12px;
  flex-shrink: 0;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  opacity: 0.9;
}
.admin-header--nav-open .admin-nav-toggle {
  background: rgba(13, 110, 110, 0.14);
  border-color: rgba(13, 110, 110, 0.35);
}

@media (max-width: 959px) {
  .admin-nav-toggle {
    display: inline-flex;
  }
  .admin-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    top: 4.85rem;
    z-index: 60;
    margin: 0;
    border: 0;
    padding: 0;
    cursor: pointer;
    background: rgba(10, 22, 24, 0.42);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  .admin-nav-backdrop[hidden] {
    display: none !important;
  }
  .admin-header:not(.admin-header--nav-open) .admin-nav {
    display: none !important;
  }
  .admin-header--nav-open .admin-nav {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    position: fixed;
    left: 0.65rem;
    right: 0.65rem;
    top: calc(4.85rem + env(safe-area-inset-top, 0px));
    max-height: min(72vh, calc(100vh - 6rem - env(safe-area-inset-bottom, 0px)));
    overflow-y: auto;
    z-index: 70;
    width: auto !important;
    padding: 0.65rem 0.75rem 0.85rem;
    margin: 0;
    border-radius: 16px;
    background: var(--admin-surface);
    border: 1px solid var(--admin-line);
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.22);
    -webkit-overflow-scrolling: touch;
  }
  .admin-header--nav-open .admin-nav-link {
    justify-content: flex-start;
    white-space: normal;
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
  }
  .admin-header--nav-open .admin-nav-sep {
    display: block;
    width: 100%;
    height: 1px;
    margin: 0.35rem 0;
    opacity: 0.7;
  }
  .admin-workbar {
    flex-direction: column;
    align-items: stretch;
    padding-top: 0.45rem;
  }
  .admin-workbar-left {
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .admin-workbar-actions {
    width: 100%;
  }
  .admin-quick-action {
    flex: 1 1 calc(33.333% - 0.35rem);
    min-width: 130px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-nav-toggle {
    transition: none;
  }
}

body.admin-no-scroll {
  overflow: hidden;
}
@media (min-width: 960px) {
  body.admin-no-scroll {
    overflow: auto;
  }
}

.admin-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  align-items: center;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding: 0.2rem 0;
}
@media (min-width: 960px) {
  .admin-nav { width: auto; flex: 1; justify-content: flex-end; flex-wrap: wrap; overflow: visible; }
  .admin-nav-backdrop {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
  }
}
.admin-nav-sep {
  width: 1px;
  height: 1.25rem;
  background: var(--admin-line);
  margin: 0 0.15rem;
  flex-shrink: 0;
}
@media (max-width: 959px) {
  .admin-nav-sep { display: none; }
  .admin-nav-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.24rem;
    border-radius: 14px;
    padding: 0.45rem;
    width: 100%;
  }
  .admin-nav-group-label {
    padding: 0.2rem 0.3rem 0.35rem;
  }
  .admin-nav-link--group {
    width: 100%;
    justify-content: flex-start;
  }
}
.admin-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.48rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
  color: #2a4548;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}
.admin-nav-icon {
  display: inline-flex;
  width: 1.05rem;
  justify-content: center;
  font-size: 0.88em;
  opacity: 0.82;
}
.admin-nav-link:hover {
  background: rgba(13, 110, 110, 0.08);
  text-decoration: none;
  color: var(--admin-primary);
  transform: translateY(-1px);
}
.admin-nav-link:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 2px;
}
.admin-nav-link.is-active {
  background: rgba(13, 110, 110, 0.14);
  color: var(--admin-primary);
  border-color: rgba(13, 110, 110, 0.26);
  box-shadow: inset 0 0 0 1px rgba(13, 110, 110, 0.1);
}
.admin-nav-link--accent {
  background: rgba(244, 162, 97, 0.14);
  color: #5c3610;
  border-color: rgba(244, 162, 97, 0.28);
}
.admin-nav-link--accent:hover {
  background: rgba(244, 162, 97, 0.24);
  color: #3d2408;
}
.admin-nav-link--accent.is-active {
  background: rgba(244, 162, 97, 0.38);
  border-color: rgba(244, 162, 97, 0.55);
  color: #2e1806;
}
.admin-nav-link--clinical {
  font-weight: 800;
  border-color: rgba(13, 110, 110, 0.24);
  background: rgba(13, 110, 110, 0.06);
}
.admin-nav-link--clinical:hover {
  background: rgba(13, 110, 110, 0.14);
}
.admin-nav-link--ghost {
  border-color: var(--admin-line);
  background: #fff;
}
.admin-nav-link--logout {
  color: #7a2e2e;
  border-color: rgba(180, 80, 80, 0.25);
  background: #fff5f5;
}
.admin-nav-link--logout:hover {
  background: #fdecec;
  color: #5c2020;
}
.admin-nav-group {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  padding: 0.3rem;
  border-radius: 14px;
  border: 1px solid rgba(13, 110, 110, 0.14);
  background: rgba(13, 110, 110, 0.03);
  position: relative;
}
.admin-nav-group-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
  cursor: pointer;
}
.admin-nav-group-toggle:hover {
  background: rgba(13, 110, 110, 0.08);
}
.admin-nav-group-toggle:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 2px;
}
.admin-nav-group-label {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--admin-muted);
  white-space: nowrap;
}
.admin-nav-group-caret {
  font-size: 0.75rem;
  color: var(--admin-muted);
  transform: rotate(-90deg);
  transition: transform 0.2s ease;
}
.admin-nav-group.is-open .admin-nav-group-caret {
  transform: rotate(0deg);
}
.admin-nav-group-menu {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
}
.admin-nav-link--group {
  width: 100%;
  justify-content: flex-start;
  border-radius: 10px;
  padding: 0.46rem 0.62rem;
}
.admin-nav-group.is-open .admin-nav-group-menu {
  display: flex;
}
@media (min-width: 960px) {
  .admin-nav-group {
    padding: 0.2rem;
    border-radius: 12px;
  }
  .admin-nav-group-menu {
    position: absolute;
    top: calc(100% + 0.45rem);
    right: 0;
    min-width: 230px;
    z-index: 120;
    background: var(--admin-surface);
    border: 1px solid var(--admin-line);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(11, 58, 61, 0.18);
    padding: 0.35rem;
  }
}
.admin-nav-group.is-active {
  border-color: rgba(13, 110, 110, 0.24);
  background: rgba(13, 110, 110, 0.06);
}
/* Reforzamos estas reglas al final para evitar que el bloque base pise móvil */
@media (max-width: 959px) {
  .admin-nav-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.24rem;
    border-radius: 14px;
    padding: 0.45rem;
    width: 100%;
    position: static;
  }
  .admin-nav-group-toggle {
    width: 100%;
  }
  .admin-nav-group-menu {
    position: static;
    min-width: 0;
    box-shadow: none;
    border: none;
    padding: 0;
  }
  .admin-nav-link--group {
    width: 100%;
    justify-content: flex-start;
  }
}

.admin-flash-wrap { padding-top: 0.35rem; }
.admin-main {
  flex: 1;
}
.admin-main-padded {
  padding-top: 1.35rem;
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
  min-height: 42vh;
}

.admin-main h1 {
  font-family: var(--admin-display);
  font-size: clamp(1.72rem, 3.2vw, 2.08rem);
  font-weight: 700;
  margin: 0 0 0.45rem;
  letter-spacing: -0.02em;
}
.admin-main > h1 + .muted,
.admin-main > h1 + p {
  margin-top: 0;
  font-size: 1.02rem;
}

/* ——— Dashboard ——— */
.admin-dashboard-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--admin-radius-xl);
  padding: clamp(1.45rem, 3.2vw, 2rem) clamp(1.35rem, 3vw, 2.15rem);
  margin-bottom: 1.75rem;
  background:
    radial-gradient(ellipse 70% 90% at 100% -10%, rgba(244, 162, 97, 0.2), transparent 55%),
    radial-gradient(ellipse 55% 80% at 0% 100%, rgba(13, 110, 110, 0.12), transparent 50%),
    linear-gradient(145deg, #dff5f5 0%, #ffffff 48%, #fffdfb 100%);
  border: 1px solid var(--admin-line);
  box-shadow: var(--admin-shadow-soft);
}
.admin-dashboard-hero::after {
  content: "";
  position: absolute;
  right: -18%;
  top: -40%;
  width: min(52%, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13, 110, 110, 0.09), transparent 68%);
  pointer-events: none;
}
.admin-dashboard-kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 0.5rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--admin-primary);
  opacity: 0.92;
}
.admin-dashboard-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0 0 0.45rem;
  font-size: clamp(1.65rem, 3.5vw, 2.05rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
}
.admin-dashboard-lead {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 54ch;
  color: var(--admin-muted);
  font-size: 1.03rem;
  line-height: 1.62;
}
.admin-day-flow {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.admin-day-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.32rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 700;
  border: 1px solid transparent;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.admin-day-chip:hover {
  transform: translateY(-1px);
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(11, 58, 61, 0.12);
}
.admin-day-chip:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 2px;
}
.admin-day-chip--pending {
  background: #fff7e9;
  color: #8a5a18;
  border-color: #f0d59b;
}
.admin-day-chip--confirmed {
  background: #e9f7ff;
  color: #1f5f8a;
  border-color: #a8d3f1;
}
.admin-day-chip--completed {
  background: #e7f8ee;
  color: #1f6e45;
  border-color: #a6dcbe;
}
.admin-day-chip--noshow {
  background: #fdecec;
  color: #8a2f2f;
  border-color: #efb3b3;
}

@keyframes admin-flash-enter {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
}
.flash-ok { background: #d9f5e3; color: #134d24; border: 1px solid #9bd4ae; }
.flash-err { background: #fde8e8; color: #6b1c1c; border: 1px solid #f0b4b4; }

.flash-dismissible {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  justify-content: space-between;
  animation: admin-flash-enter 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  .flash-dismissible {
    animation: none;
  }
}
.flash-body {
  flex: 1;
  min-width: 0;
}
.flash-dismiss {
  flex-shrink: 0;
  margin: -0.15rem -0.25rem 0 0;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity 0.15s, background 0.15s;
}
.flash-dismiss:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}
.flash-err .flash-dismiss:hover {
  background: rgba(0, 0, 0, 0.08);
}

.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
  border-radius: 14px;
  border: 1px solid var(--admin-line);
  box-shadow: 0 8px 26px rgba(11, 58, 61, 0.05);
}
.admin-table-wrap .table.admin-table {
  margin: 0;
  border-radius: 0;
  border: none;
  box-shadow: none;
}
.admin-table-wrap::after {
  content: "";
  display: block;
  height: 0;
}
.admin-table-wrap .table.admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  box-shadow: 0 1px 0 rgba(13, 110, 110, 0.12);
}
@media (max-width: 720px) {
  .admin-table-wrap {
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    border-radius: 12px;
  }
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--admin-surface);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--admin-line);
  box-shadow: 0 10px 30px rgba(11, 58, 61, 0.06);
}
.table th,
.table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid #eef5f6;
}
.table th {
  background: linear-gradient(180deg, #eff8f9, #e6f1f3);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: #3d5c62;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:nth-child(even) td { background: rgba(13, 110, 110, 0.015); }
.table tbody tr:hover td { background: #f7fcfc; }

.admin-form-max { max-width: 640px; }

#admin-contenido .form-stack.card > label:first-of-type {
  margin-top: 0;
}

.admin-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
  margin-top: 1.5rem;
}
.admin-card {
  display: block;
  padding: 1.2rem 2.35rem 1.25rem 1.35rem;
  border-radius: var(--admin-radius-lg);
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--admin-shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  position: relative;
  overflow: hidden;
}
.admin-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13, 110, 110, 0.06), transparent 55%);
  opacity: 0;
  transition: opacity 0.22s;
}
.admin-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--admin-shadow-lift);
  border-color: rgba(13, 110, 110, 0.24);
  text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
  .admin-card:hover {
    transform: none;
  }
  .admin-card:hover::after {
    transform: translateY(-50%);
  }
}
.admin-card:hover::before { opacity: 1; }
.admin-card::after {
  content: "→";
  position: absolute;
  right: 1rem;
  top: 50%;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--admin-muted);
  opacity: 0.28;
  line-height: 1;
  z-index: 2;
  transform: translateY(-50%);
  transition: opacity 0.22s ease, transform 0.22s ease, color 0.22s ease;
}
.admin-card:hover::after {
  opacity: 0.55;
  transform: translate(5px, -50%);
  color: var(--admin-primary);
}
.admin-card-accent::after {
  color: var(--admin-primary);
  opacity: 0.35;
}
.admin-card:focus-visible {
  outline: 3px solid var(--admin-accent);
  outline-offset: 3px;
  text-decoration: none;
}
.admin-card > * { position: relative; z-index: 1; }
.admin-card-kicker {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--admin-muted);
  margin-bottom: 0.35rem;
}
.admin-card-title { font-size: 1.16rem; font-weight: 800; display: block; line-height: 1.24; letter-spacing: -0.01em; }
.admin-card-meta { display: block; margin-top: 0.45rem; font-size: 0.89rem; color: var(--admin-muted); line-height: 1.48; }

.admin-card-accent {
  border-color: rgba(13, 110, 110, 0.28);
  background: linear-gradient(145deg, #e4f7f7, #ffffff);
}

.admin-today {
  margin-top: 2rem;
  padding: 1.35rem 1.45rem;
  border-radius: var(--admin-radius-lg);
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  box-shadow: var(--admin-shadow-soft);
}
.admin-today h2 {
  margin-top: 0;
  font-size: 1.12rem;
  font-family: var(--admin-display);
}
.admin-today-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.admin-today-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.35rem 1rem;
  padding: 0.6rem 0.65rem;
  margin: 0 -0.65rem;
  border-radius: 12px;
  border-bottom: 1px solid #eef5f6;
  align-items: baseline;
  transition: background 0.18s ease;
}
.admin-today-list li:hover {
  background: rgba(13, 110, 110, 0.045);
}
.admin-today-list li:last-child {
  border-bottom: none;
}
.admin-today-list li .muted { grid-column: 2 / -1; }
.admin-today-time { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--admin-primary); }
.admin-today-who { font-weight: 700; }

.is-hidden { display: none !important; }

/* Botones en páginas admin (reutilizan .btn de main) */
.admin-main .btn-primary {
  box-shadow: 0 10px 26px rgba(13, 110, 110, 0.22);
}
.admin-main .btn.btn-loading {
  cursor: wait;
  opacity: 0.82;
  filter: saturate(0.92);
}

/* ——— Agenda (resto sin cambios sustanciales) ——— */
.agenda-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  box-shadow: 0 8px 26px rgba(11, 58, 61, 0.05);
}
.agenda-toolbar-field select {
  display: block;
  margin-top: 0.35rem;
  min-width: 240px;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid #c5d9dc;
  font: inherit;
  background: #fff;
}
.agenda-week-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.agenda-toolbar-meta { font-size: 0.92rem; font-weight: 600; color: #3d5c62; }
.agenda-clear-filter {
  border-color: rgba(244, 162, 97, 0.42) !important;
  background: rgba(244, 162, 97, 0.14) !important;
  color: #7a4310 !important;
}
.agenda-toolbar-hint {
  margin: 0 0 1rem;
  padding: 0 0.15rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--admin-muted);
  max-width: 70ch;
}
.agenda-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin: 0 0 1rem;
}
.agenda-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #48656c;
}
.agenda-legend-dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: #89a2a8;
}
.agenda-legend-dot--scheduled { background: #4f7c88; }
.agenda-legend-dot--confirmed { background: #0d6e6e; }
.agenda-legend-dot--completed { background: #0b8e52; }
.agenda-legend-dot--noshow { background: #ba3b3b; }
.agenda-legend-dot--cancelled { background: #8a7b68; }
.agenda-legend-dot--block { background: #7455a7; }

.agenda-shell {
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--admin-line);
  box-shadow: 0 12px 36px rgba(11, 58, 61, 0.06);
  background: #fff;
}
.agenda-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.agenda-inner {
  display: grid;
  grid-template-columns: 52px repeat(6, minmax(96px, 1fr));
  grid-template-rows: auto 1fr;
  min-width: 720px;
}
.agenda-corner {
  grid-column: 1;
  grid-row: 1;
  border-bottom: 1px solid #e2eef0;
}
.agenda-headers {
  grid-column: 2 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid #e2eef0;
  background: linear-gradient(180deg, #fafdfd, #fff);
}
.agenda-head-cell {
  text-align: center;
  padding: 0.65rem 0.35rem;
  border-left: 1px solid #eef5f6;
}
.agenda-dow { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #4a6d73; }
.agenda-dom { display: block; font-size: 1.35rem; font-weight: 800; font-family: var(--admin-display); line-height: 1.1; }
.agenda-month { display: block; font-size: 0.78rem; text-transform: lowercase; color: var(--admin-muted); }
.agenda-head-count {
  display: inline-block;
  margin-top: 0.28rem;
  padding: 0.14rem 0.42rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #3d5c62;
  background: rgba(13, 110, 110, 0.08);
}
.agenda-head-count[data-agenda-count='0'] {
  opacity: 0.65;
}

.agenda-time-col {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  border-right: 1px solid #e2eef0;
  background: #fafdfd;
}
.agenda-time-label {
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(-0.5em);
  font-size: 0.72rem;
  font-weight: 700;
  color: #6d898f;
  text-align: right;
  padding-right: 6px;
  font-variant-numeric: tabular-nums;
}

.agenda-days {
  grid-column: 2 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.agenda-day-col { border-left: 1px solid #eef5f6; }
.agenda-day-inner {
  position: relative;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(13px * 4 - 1px),
    rgba(13, 110, 110, 0.05) calc(13px * 4 - 1px),
    rgba(13, 110, 110, 0.05) calc(13px * 4)
  );
}
.agenda-slots { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; }
.agenda-slot {
  flex: 0 0 auto;
  height: 13px;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.agenda-slot:hover { background: rgba(13, 110, 110, 0.07); }

.agenda-events {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.agenda-event {
  position: absolute;
  left: 4px;
  right: 4px;
  border-radius: 12px;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 26px rgba(11, 58, 61, 0.12);
  border-left: 4px solid #0d6e6e;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.agenda-event-main {
  all: unset;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  padding: 6px 8px 4px;
}
.agenda-event-meta {
  font-size: 0.68rem;
  font-weight: 700;
  color: #577176;
}
.agenda-event-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(13, 110, 110, 0.08);
  border-top: 1px solid rgba(13, 110, 110, 0.12);
}
.agenda-mini-action {
  border: 0;
  background: rgba(255, 255, 255, 0.95);
  color: #174148;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 3px 4px;
  cursor: pointer;
}
.agenda-mini-action:hover {
  background: rgba(13, 110, 110, 0.12);
}
.agenda-event.is-compact .agenda-event-actions {
  display: none;
}
.agenda-event-time {
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #0d3a3d;
}
.agenda-event-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #14242a;
  line-height: 1.25;
}
.agenda-event.is-block {
  background: repeating-linear-gradient(-45deg, #fff, #fff 6px, #f2fafb 6px, #f2fafb 12px);
  border-left-style: dashed;
}
.agenda-event.is-cancelled { opacity: 0.5; }
.agenda-event.is-confirmed { border-left-color: #0d6e6e !important; }
.agenda-event.is-completed { border-left-color: #0b8e52 !important; }
.agenda-event.is-no-show { border-left-color: #ba3b3b !important; }
.agenda-event.is-scheduled { border-left-color: #4f7c88 !important; }
.agenda-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #e36f2f;
  z-index: 3;
  box-shadow: 0 0 0 1px rgba(227, 111, 47, 0.15);
}

.agenda-dialog {
  border: none;
  border-radius: 18px;
  padding: 0;
  max-width: min(480px, 94vw);
  box-shadow: 0 28px 70px rgba(11, 58, 61, 0.28);
}
.agenda-dialog::backdrop { background: rgba(11, 31, 34, 0.45); }
.agenda-dialog-inner { padding: 1.25rem 1.35rem 1.35rem; }
.agenda-dialog-inner h2 { margin: 0 0 1rem; font-size: 1.25rem; font-family: var(--admin-display); }
.agenda-dialog-inner label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-top: 0.75rem;
}
.agenda-dialog-inner input,
.agenda-dialog-inner select,
.agenda-dialog-inner textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid #c5d9dc;
  font: inherit;
}
.agenda-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

/* ——— Pie panel ——— */
.admin-footer {
  margin-top: auto;
  border-top: 1px solid var(--admin-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), var(--admin-bg));
  padding: 1rem 0;
  font-size: 0.78rem;
  color: var(--admin-muted);
}
.admin-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  justify-content: space-between;
}
.admin-footer-item {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.admin-footer-item:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 0.65rem;
  border-radius: 50%;
  background: rgba(13, 110, 110, 0.28);
  vertical-align: middle;
}
@media (max-width: 520px) {
  .admin-footer-item:not(:last-child)::after {
    display: none;
  }
}
.admin-footer-muted { font-weight: 600; opacity: 0.88; }

/* ——— Dashboard métricas ——— */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  margin-bottom: 1.85rem;
}
@media (max-width: 900px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 440px) {
  .admin-stats { grid-template-columns: 1fr; }
}
.admin-stats .admin-stat-card:nth-child(1) {
  --stat-accent: var(--admin-primary);
}
.admin-stats .admin-stat-card:nth-child(2) {
  --stat-accent: #1f8a8a;
}
.admin-stats .admin-stat-card:nth-child(3) {
  --stat-accent: #237893;
}
.admin-stats .admin-stat-card:nth-child(4) {
  --stat-accent: var(--admin-accent);
}

.admin-stat-card {
  position: relative;
  overflow: hidden;
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-lg);
  padding: 1.15rem 1.2rem 1.15rem 1.35rem;
  box-shadow: var(--admin-shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.admin-stat-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--admin-radius-lg) 0 0 var(--admin-radius-lg);
  background: linear-gradient(180deg, var(--stat-accent, var(--admin-primary)), rgba(13, 110, 110, 0.55));
}
.admin-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--admin-shadow-lift);
  border-color: rgba(13, 110, 110, 0.2);
}
@media (prefers-reduced-motion: reduce) {
  .admin-stat-card:hover {
    transform: none;
  }
}
.admin-stat-value {
  font-family: var(--admin-display);
  font-size: 2.05rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--admin-primary);
}
.admin-stat-label {
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--admin-ink);
}
.admin-stat-hint {
  font-size: 0.72rem;
  color: var(--admin-muted);
  font-weight: 600;
}

/* ——— Cabeceras de página ——— */
.admin-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem 1.2rem;
  border-radius: var(--admin-radius-lg);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--admin-line);
  box-shadow: 0 3px 18px rgba(11, 58, 61, 0.045);
}
.admin-page-head--compact {
  margin-bottom: 1.15rem;
  padding: 0.85rem 1rem 1rem;
}
.admin-page-head-text { flex: 1; min-width: 200px; }
.admin-page-head .admin-page-head-text h1 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.5rem, 2.8vw, 1.85rem);
}
.admin-page-lead {
  margin: 0.5rem 0 0;
  color: var(--admin-muted);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 62ch;
}
.admin-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-breadcrumb {
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  letter-spacing: 0.02em;
}
.admin-breadcrumb a {
  color: var(--admin-primary);
  text-decoration: none;
}
.admin-breadcrumb a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.admin-breadcrumb > span:last-child:not(.admin-bc-sep) {
  color: var(--admin-ink);
  font-weight: 800;
  opacity: 0.88;
}
.admin-bc-sep {
  display: inline-block;
  width: 0.38rem;
  height: 0.38rem;
  margin: 0 0.42rem;
  border-right: 2px solid var(--admin-muted);
  border-bottom: 2px solid var(--admin-muted);
  transform: rotate(-45deg) translateY(-0.06rem);
  opacity: 0.65;
  font-size: 0;
  overflow: hidden;
  vertical-align: middle;
}

.admin-inline-code {
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
  background: rgba(13, 110, 110, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
}

.admin-empty-panel,
.admin-empty-state {
  padding: 1.75rem 1.5rem;
  border-radius: 16px;
  border: 1px dashed rgba(13, 110, 110, 0.28);
  background: rgba(255, 255, 255, 0.85);
  color: #3d524f;
  line-height: 1.6;
}
.admin-empty-state--inline {
  margin-top: 0.35rem;
}
.admin-empty-state--inline p {
  margin: 0 0 0.85rem;
}
.admin-empty-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.admin-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-today-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.admin-today-head h2 {
  margin: 0;
  font-size: 1.12rem;
  font-family: var(--admin-display);
}

.admin-table-action {
  font-weight: 800;
  color: var(--admin-primary);
  text-decoration: none;
}
.admin-table-action:hover { text-decoration: underline; }

.admin-panel-card {
  border-radius: 16px !important;
  border: 1px solid var(--admin-line) !important;
  box-shadow: var(--admin-shadow-soft);
}
.admin-subheading {
  margin: 0 0 0.8rem;
  font-family: var(--admin-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}
.admin-input {
  border-radius: 12px !important;
  min-height: 42px;
  background: #fff;
  border: 1px solid #c8dde0 !important;
  box-shadow: inset 0 1px 1px rgba(11, 58, 61, 0.02);
  border-color: #c5d9dc !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-input:focus {
  outline: none;
  border-color: var(--admin-primary) !important;
  box-shadow: 0 0 0 3px rgba(13, 110, 110, 0.12);
}
.admin-input-color {
  height: 44px;
  padding: 4px !important;
  cursor: pointer;
}

.admin-danger-zone {
  margin-top: 1rem;
  border-color: #ecc4c4 !important;
  background: #fffbfb !important;
}
.admin-danger-zone-title {
  margin: 0 0 0.35rem;
  font-weight: 800;
  font-size: 0.88rem;
  color: #7a2e2e;
}
.admin-btn-danger-outline {
  color: #8b2b2b !important;
  border-color: #ecc4c4 !important;
  margin-top: 0.5rem;
}
.admin-btn-danger-solid {
  background: linear-gradient(135deg, #c43c3c, #8f2424) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 10px 26px rgba(140, 40, 40, 0.3);
}
.admin-btn-danger-solid:hover {
  filter: brightness(1.06);
}

.admin-confirm-dialog {
  padding: 0;
  border: none;
  border-radius: 18px;
  max-width: min(440px, calc(100vw - 2rem));
  background: var(--admin-surface);
  color: var(--admin-ink);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.28);
}
.admin-confirm-dialog::backdrop {
  background: rgba(10, 22, 24, 0.48);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.admin-confirm-inner {
  padding: 1.35rem 1.45rem 1.45rem;
}
.admin-confirm-title {
  margin: 0 0 0.5rem;
  font-family: var(--admin-display);
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.admin-confirm-message {
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--admin-muted);
}
.admin-confirm-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-settings-form fieldset {
  border-radius: 14px;
  border-color: var(--admin-line);
  background: rgba(255, 255, 255, 0.65);
}
.admin-settings-form legend {
  font-family: var(--admin-display);
  font-weight: 700;
}
.admin-settings-form input:not([type="checkbox"]):not([type="color"]),
.admin-settings-form textarea,
.admin-settings-form select {
  border-radius: 12px;
  border-color: #c5d9dc;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-settings-form input:focus,
.admin-settings-form textarea:focus,
.admin-settings-form select:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 110, 0.1);
}

.admin-ai-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 880px) {
  .admin-ai-grid { grid-template-columns: 1fr; }
}
.admin-ai-panel .admin-subheading {
  margin: 0 0 0.35rem;
}
.admin-ai-intro {
  margin: 0 0 0.85rem;
  line-height: 1.55;
}
.admin-ai-panel .admin-field-label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  margin: 0 0 0.35rem;
  color: var(--admin-ink);
}
.admin-ai-panel .admin-field-label:not(:first-of-type) {
  margin-top: 0.85rem;
}
.admin-ai-panel .admin-input {
  width: 100%;
}
.admin-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.85rem;
}
.admin-ai-status {
  margin: 0.75rem 0 0;
  min-height: 1.35rem;
  line-height: 1.45;
}
.admin-ai-status--ok {
  color: #1d6b45;
  font-weight: 600;
}
.admin-ai-status--err {
  color: #9b2c2c;
  font-weight: 600;
}

/* ——— Búsqueda en listados ——— */
.admin-toolbar-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  align-content: center;
  margin-bottom: 1.35rem;
  padding: 0.95rem 1.05rem;
  border-radius: var(--admin-radius-lg);
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  box-shadow: var(--admin-shadow-soft);
}
.admin-toolbar-search::after {
  content: "Atajo de teclado: / para ir al buscador.";
  flex: 1 0 100%;
  margin: 0.15rem 0 0;
  padding-left: 0.2rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--admin-muted);
  line-height: 1.35;
}
.admin-opbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.admin-opchip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #c7dde0;
  background: #f5fbfc;
  color: #22535a;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}
.admin-opchip:hover {
  border-color: #9fc4c9;
  background: #ecf7f8;
}
@media (max-width: 640px) {
  .admin-toolbar-search::after {
    display: none;
  }
}
.admin-search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  border: 1px solid #c5d9dc;
  font: inherit;
  font-size: 0.95rem;
}
.admin-search-input:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 110, 0.12);
}
.admin-search-submit { flex-shrink: 0; }

.admin-theme-toggle {
  flex-shrink: 0;
  border: 1px solid var(--admin-line);
  background: #fff;
  border-radius: 999px;
  padding: 0.38rem 0.85rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  color: #234548;
  transition: background 0.2s, border-color 0.2s;
}
.admin-theme-toggle:hover {
  background: rgba(13, 110, 110, 0.08);
  border-color: rgba(13, 110, 110, 0.22);
}
.admin-theme-toggle:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 2px;
}
@media (max-width: 520px) {
  .admin-theme-toggle .admin-theme-toggle-label { font-size: 0; }
  .admin-theme-toggle .admin-theme-toggle-label::before {
    font-size: 0.78rem;
    content: '🌙';
  }
}

/* ——— Modo oscuro ——— */
html[data-admin-theme='dark'] {
  color-scheme: dark;
}
html[data-admin-theme='dark'] body.admin-body {
  --admin-bg: #0d1315;
  --admin-surface: #161e21;
  --admin-ink: #e8f3f4;
  --admin-muted: #95afb4;
  --admin-line: rgba(255, 255, 255, 0.09);
}
html[data-admin-theme='dark'] .admin-header {
  background: linear-gradient(180deg, rgba(22, 30, 33, 0.92) 0%, rgba(18, 24, 27, 0.95) 100%);
  border-bottom-color: var(--admin-line);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
html[data-admin-theme='dark'] .admin-nav-group-menu {
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.48);
}
html[data-admin-theme='dark'] .admin-workbar-wrap {
  border-top-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(127, 212, 212, 0.08), rgba(127, 212, 212, 0.02));
}
html[data-admin-theme='dark'] .admin-workbar-chip {
  background: rgba(255, 255, 255, 0.08);
  color: var(--admin-muted);
  border-color: var(--admin-line);
}
html[data-admin-theme='dark'] .admin-workbar-chip.is-active {
  background: rgba(13, 110, 110, 0.34);
  color: #dff9f9;
  border-color: rgba(127, 212, 212, 0.35);
}
html[data-admin-theme='dark'] .admin-quick-action {
  background: rgba(255, 255, 255, 0.06);
  color: #d0e5e7;
  border-color: rgba(127, 212, 212, 0.22);
}
html[data-admin-theme='dark'] .admin-quick-action:hover {
  background: rgba(255, 255, 255, 0.11);
}
html[data-admin-theme='dark'] .admin-quick-action--accent {
  background: rgba(244, 162, 97, 0.22);
  border-color: rgba(244, 162, 97, 0.4);
  color: #ffe1c5;
}
html[data-admin-theme='dark'] .admin-brand-tag { color: var(--admin-muted); }
html[data-admin-theme='dark'] .admin-user-pill {
  background: rgba(255, 255, 255, 0.06);
  color: var(--admin-ink);
  border-color: var(--admin-line);
}
html[data-admin-theme='dark'] .admin-theme-toggle {
  background: rgba(255, 255, 255, 0.06);
  color: var(--admin-ink);
  border-color: var(--admin-line);
}
html[data-admin-theme='dark'] .admin-nav-toggle {
  background: rgba(255, 255, 255, 0.06);
  color: var(--admin-ink);
  border-color: var(--admin-line);
}
html[data-admin-theme='dark'] .admin-header--nav-open .admin-nav {
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.45);
}
html[data-admin-theme='dark'] .admin-nav-backdrop {
  background: rgba(0, 0, 0, 0.58);
}
html[data-admin-theme='dark'] .admin-table-wrap {
  border-color: var(--admin-line);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.25);
}
html[data-admin-theme='dark'] .admin-nav-link {
  color: #c5dcde;
}
html[data-admin-theme='dark'] .admin-nav-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
html[data-admin-theme='dark'] .admin-nav-link.is-active {
  background: rgba(13, 110, 110, 0.35);
  color: #dff9f9;
  border-color: rgba(13, 110, 110, 0.45);
  box-shadow: inset 0 0 0 1px rgba(127, 212, 212, 0.12);
}
html[data-admin-theme='dark'] .admin-nav-icon {
  opacity: 0.9;
}
html[data-admin-theme='dark'] .admin-nav-link--accent {
  background: rgba(244, 162, 97, 0.14);
  color: #ffd9b8;
  border-color: rgba(244, 162, 97, 0.35);
}
html[data-admin-theme='dark'] .admin-nav-link--accent.is-active {
  background: rgba(244, 162, 97, 0.28);
  color: #fff2e6;
}
html[data-admin-theme='dark'] .admin-nav-link--clinical {
  background: rgba(13, 110, 110, 0.24);
  border-color: rgba(127, 212, 212, 0.3);
  color: #dff9f9;
}
html[data-admin-theme='dark'] .admin-nav-link--ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--admin-line);
}
html[data-admin-theme='dark'] .admin-nav-group {
  border-color: rgba(127, 212, 212, 0.2);
  background: rgba(127, 212, 212, 0.06);
}
html[data-admin-theme='dark'] .admin-nav-group-label {
  color: #9fb8bc;
}
html[data-admin-theme='dark'] .admin-nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}
html[data-admin-theme='dark'] .admin-nav-sep {
  background: var(--admin-line);
}
html[data-admin-theme='dark'] .flash-ok {
  background: rgba(34, 120, 70, 0.35);
  color: #d9f5e3;
  border-color: rgba(72, 180, 110, 0.45);
}
html[data-admin-theme='dark'] .flash-err {
  background: rgba(140, 40, 40, 0.35);
  color: #fde8e8;
  border-color: rgba(220, 100, 100, 0.45);
}
html[data-admin-theme='dark'] .admin-dashboard-hero {
  background:
    radial-gradient(ellipse 70% 90% at 100% -10%, rgba(244, 162, 97, 0.14), transparent 52%),
    radial-gradient(ellipse 55% 80% at 0% 100%, rgba(13, 110, 110, 0.2), transparent 48%),
    linear-gradient(145deg, #152528 0%, #161e21 52%, #1a1816 100%);
  border-color: var(--admin-line);
}
html[data-admin-theme='dark'] .admin-dashboard-hero::after {
  background: radial-gradient(circle, rgba(127, 212, 212, 0.07), transparent 68%);
}
html[data-admin-theme='dark'] .admin-dashboard-kicker {
  color: #8fd9d9;
  opacity: 1;
}
html[data-admin-theme='dark'] .admin-day-chip--pending {
  background: rgba(244, 162, 97, 0.16);
  color: #ffd4a9;
  border-color: rgba(244, 162, 97, 0.35);
}
html[data-admin-theme='dark'] .admin-day-chip--confirmed {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.32);
}
html[data-admin-theme='dark'] .admin-day-chip--completed {
  background: rgba(34, 197, 94, 0.17);
  color: #bbf7d0;
  border-color: rgba(74, 222, 128, 0.34);
}
html[data-admin-theme='dark'] .admin-day-chip--noshow {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
}
html[data-admin-theme='dark'] .admin-page-head {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--admin-line);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}
html[data-admin-theme='dark'] .admin-bc-sep {
  border-right-color: rgba(255, 255, 255, 0.35);
  border-bottom-color: rgba(255, 255, 255, 0.35);
}
html[data-admin-theme='dark'] .admin-footer-item:not(:last-child)::after {
  background: rgba(255, 255, 255, 0.22);
}
html[data-admin-theme='dark'] .admin-today-list li:hover {
  background: rgba(255, 255, 255, 0.05);
}
html[data-admin-theme='dark'] .admin-stat-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}
html[data-admin-theme='dark'] .admin-stat-card,
html[data-admin-theme='dark'] .admin-card,
html[data-admin-theme='dark'] .admin-toolbar-search {
  background: var(--admin-surface);
  border-color: var(--admin-line);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.25);
}
html[data-admin-theme='dark'] .admin-stat-value { color: #7fd4d4; }
html[data-admin-theme='dark'] .table {
  background: var(--admin-surface);
  border-color: var(--admin-line);
}
html[data-admin-theme='dark'] .table th {
  background: linear-gradient(180deg, #1e2a2e, #1a2428);
  color: #b8d4d8;
}
html[data-admin-theme='dark'] .table td {
  border-bottom-color: rgba(255, 255, 255, 0.06);
  color: var(--admin-ink);
}
html[data-admin-theme='dark'] .table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.04);
}
html[data-admin-theme='dark'] .table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}
html[data-admin-theme='dark'] .admin-table-wrap .table.admin-table thead th {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
}
html[data-admin-theme='dark'] .admin-confirm-dialog {
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.55);
}
html[data-admin-theme='dark'] .admin-confirm-dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
}
html[data-admin-theme='dark'] .admin-page-head {
  border-bottom-color: var(--admin-line);
}
html[data-admin-theme='dark'] .admin-empty-panel,
html[data-admin-theme='dark'] .admin-empty-state {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--admin-muted);
}
html[data-admin-theme='dark'] .admin-search-input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--admin-ink);
}
html[data-admin-theme='dark'] .admin-inline-code {
  background: rgba(255, 255, 255, 0.08);
  color: #c5e8ea;
}
html[data-admin-theme='dark'] .admin-panel-card,
html[data-admin-theme='dark'] .card {
  background: var(--admin-surface) !important;
  border-color: var(--admin-line) !important;
  color: var(--admin-ink);
}
html[data-admin-theme='dark'] .admin-input,
html[data-admin-theme='dark'] .admin-settings-form input:not([type="checkbox"]):not([type="color"]),
html[data-admin-theme='dark'] .admin-settings-form textarea,
html[data-admin-theme='dark'] .admin-settings-form select {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: var(--admin-ink);
}
html[data-admin-theme='dark'] .admin-danger-zone {
  background: rgba(80, 30, 30, 0.25) !important;
  border-color: rgba(220, 120, 120, 0.35) !important;
}
html[data-admin-theme='dark'] .admin-settings-form fieldset {
  background: rgba(255, 255, 255, 0.03);
}
html[data-admin-theme='dark'] .admin-today {
  background: var(--admin-surface);
  border-color: var(--admin-line);
}
html[data-admin-theme='dark'] .admin-footer {
  background: linear-gradient(180deg, #12181b, #0d1315);
  border-top-color: var(--admin-line);
}
html[data-admin-theme='dark'] .agenda-shell {
  border-color: var(--admin-line);
  background: var(--admin-surface);
}
html[data-admin-theme='dark'] .agenda-head-cell,
html[data-admin-theme='dark'] .agenda-corner,
html[data-admin-theme='dark'] .agenda-time-col {
  border-color: rgba(255, 255, 255, 0.07);
}
html[data-admin-theme='dark'] .agenda-clear-filter {
  border-color: rgba(244, 162, 97, 0.35) !important;
  background: rgba(244, 162, 97, 0.18) !important;
  color: #ffd7b5 !important;
}
html[data-admin-theme='dark'] .agenda-head-count {
  color: #b8d4d8;
  background: rgba(127, 212, 212, 0.12);
}
html[data-admin-theme='dark'] .agenda-legend-item {
  color: #9eb8be;
}
html[data-admin-theme='dark'] .agenda-headers {
  background: linear-gradient(180deg, #1a2226, var(--admin-surface));
}
html[data-admin-theme='dark'] .agenda-day-inner {
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent calc(13px * 4 - 1px),
    rgba(255, 255, 255, 0.03) calc(13px * 4 - 1px),
    rgba(255, 255, 255, 0.03) calc(13px * 4)
  );
}
html[data-admin-theme='dark'] .agenda-event {
  background: rgba(30, 42, 46, 0.96);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}
html[data-admin-theme='dark'] .agenda-event-meta {
  color: #9eb8be;
}
html[data-admin-theme='dark'] .agenda-event-actions {
  background: rgba(127, 212, 212, 0.1);
  border-top-color: rgba(127, 212, 212, 0.2);
}
html[data-admin-theme='dark'] .agenda-mini-action {
  background: rgba(10, 16, 19, 0.75);
  color: #cde4e8;
}
html[data-admin-theme='dark'] .agenda-mini-action:hover {
  background: rgba(127, 212, 212, 0.18);
}
html[data-admin-theme='dark'] .agenda-dialog-inner textarea,
html[data-admin-theme='dark'] .agenda-dialog-inner input,
html[data-admin-theme='dark'] .agenda-dialog-inner select {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--admin-ink);
}
html[data-admin-theme='dark'] .agenda-toolbar {
  background: var(--admin-surface);
  border-color: var(--admin-line);
}

/* ——— Landings SEO ——— */
.admin-page-lead--tight {
  margin-top: 0.35rem;
  max-width: 52rem;
}
.admin-landings-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1.35rem;
}
.admin-landings-toolbar::after {
  content: "Atajo de teclado: / para enfocar el campo de búsqueda.";
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--admin-muted);
  line-height: 1.35;
  padding-left: 0.1rem;
}
@media (max-width: 640px) {
  .admin-landings-toolbar::after {
    display: none;
  }
}
.admin-landings-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}
.admin-landings-filter-kind {
  min-width: 10.5rem;
  max-width: 100%;
}
.admin-table--landings .admin-landing-title {
  display: block;
  font-weight: 700;
}
.admin-table--landings .admin-landing-teaser {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.86rem;
  line-height: 1.45;
  font-weight: 400;
}
.admin-table-num,
.admin-table-date {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.admin-action-sep {
  opacity: 0.45;
  margin: 0 0.15rem;
}
.admin-table-actions {
  white-space: nowrap;
}
.admin-inline-form {
  display: inline;
  margin: 0;
}
.admin-inline-form .admin-table-action {
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.admin-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.admin-badge--ok {
  background: #d9f5e3;
  color: #134d24;
  border: 1px solid #9bd4ae;
}
.admin-badge--off {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
}
.admin-code-tight {
  font-size: 0.82rem;
  word-break: break-all;
}
.admin-pill--muted {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(13, 110, 110, 0.07);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: capitalize;
}

.admin-landing-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
  max-width: 1040px;
}
@media (min-width: 920px) {
  .admin-landing-layout {
    grid-template-columns: 1fr minmax(260px, 300px);
  }
}
.admin-landing-main {
  min-width: 0;
}
.admin-landing-card-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 800;
}
.admin-landing-card .admin-landing-card-title:first-child {
  margin-top: -0.15rem;
}
.admin-hint {
  margin: 0.5rem 0 0;
  font-size: 0.86rem;
  color: var(--admin-muted);
}
.admin-landing-url-preview-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.admin-landing-url-preview {
  word-break: break-all;
  font-size: 0.82rem;
}
.admin-copy-url-btn {
  font-size: 0.82rem;
  padding: 0.35rem 0.65rem;
}
.admin-landing-inline-fields {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
}
@media (min-width: 560px) {
  .admin-landing-inline-fields {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
  .admin-landing-publish {
    grid-column: 1 / -1;
  }
}
.admin-label-hint {
  font-weight: 500;
  opacity: 0.72;
  font-size: 0.82em;
}
.admin-char-meter {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--admin-muted);
}
.admin-char-meter--warn {
  color: #b45309;
  font-weight: 700;
}
.admin-landing-snippet {
  margin: 0.65rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(13, 110, 110, 0.06);
  border: 1px solid var(--admin-line);
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-x: auto;
  max-height: 280px;
}
.admin-sidebar-sep {
  border: none;
  border-top: 1px solid var(--admin-line);
  margin: 1.25rem 0;
}
.admin-danger-zone--compact .admin-danger-zone-title {
  margin-bottom: 0.45rem;
}

.admin-page-url-preview-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.45rem;
}
.admin-page-url-preview {
  word-break: break-all;
  font-size: 0.82rem;
}

html[data-admin-theme='dark'] .admin-badge--ok {
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
}
html[data-admin-theme='dark'] .admin-badge--off {
  background: rgba(255, 255, 255, 0.06);
  color: var(--admin-muted);
  border-color: var(--admin-line);
}
html[data-admin-theme='dark'] .admin-landing-snippet {
  background: rgba(255, 255, 255, 0.05);
}

/* Fichas profesionales y pacientes */
.admin-profile-layout {
  display: grid;
  gap: 1.2rem;
  align-items: start;
}
@media (min-width: 980px) {
  .admin-profile-layout {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 290px);
  }
}
.admin-profile-main {
  min-width: 0;
}
.admin-profile-card {
  margin-bottom: 1rem;
}
.admin-profile-card-title {
  margin: 0 0 0.9rem;
  font-size: 1.05rem;
  font-weight: 800;
}
.admin-profile-inline-grid {
  display: grid;
  gap: 0.8rem;
}
@media (min-width: 640px) {
  .admin-profile-inline-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.admin-profile-sidebar {
  position: sticky;
  top: 5.4rem;
}
.admin-profile-photo-wrap {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--admin-line);
  background: #eef6f7;
}
.admin-profile-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
html[data-admin-theme='dark'] .admin-profile-photo-wrap {
  background: rgba(255, 255, 255, 0.06);
}

/* Tablas de perfiles */
.admin-table--profiles .admin-person-cell {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 220px;
}
.admin-table--profiles .admin-person-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--admin-line);
  background: #eef6f7;
  flex-shrink: 0;
}
.admin-table--profiles .admin-inline-contact {
  font-weight: 700;
}
.admin-table--profiles td {
  vertical-align: top;
}
.admin-table--profiles tbody tr:hover {
  background: #f7fbfc;
}
.admin-followup-inline-form {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(180px, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}
.admin-followup-inline-form .admin-input {
  min-height: 38px;
}
.admin-color-dot {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 4px;
  margin-right: 0.35rem;
  vertical-align: middle;
  border: 1px solid rgba(0,0,0,0.08);
}
html[data-admin-theme='dark'] .admin-table--profiles .admin-person-avatar {
  background: rgba(255,255,255,0.06);
}
html[data-admin-theme='dark'] .admin-ai-status--ok {
  color: #86efac;
}
html[data-admin-theme='dark'] .admin-opchip {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: #cce3e7;
}
html[data-admin-theme='dark'] .admin-opchip:hover {
  background: rgba(127,212,212,0.12);
}
html[data-admin-theme='dark'] .admin-table--profiles tbody tr:hover {
  background: rgba(255,255,255,0.03);
}
html[data-admin-theme='dark'] .admin-ai-status--err {
  color: #fca5a5;
}
