:root {
  /* Textura con transparencia: red de luz, halos teal; el gradiente del body se ve por las zonas alpha */
  --app-bg-ambient: url("/img/bg-ambient-glass.png");
  --bg-1: #071428;
  --bg-2: #0c2558;
  --bg-3: #3a1a52;
  --glass: rgba(255, 255, 255, 0.1);
  --glass-strong: rgba(255, 255, 255, 0.16);
  --surface-elevated: rgba(8, 22, 56, 0.55);
  --surface-inset: rgba(0, 0, 0, 0.18);
  --border-subtle: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text-light: #f4f8ff;
  --text-dark: #0f1d3d;
  --text-secondary: rgba(228, 238, 255, 0.78);
  --primary: #2563eb;
  --primary-2: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --muted: #8b9bb8;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(0, 8, 32, 0.12), 0 12px 32px rgba(0, 10, 40, 0.28);
  --shadow-employee: 0 4px 24px rgba(15, 35, 90, 0.12);
  --space-section: 1.25rem;
}

* { box-sizing: border-box; }

/* El atributo HTML hidden debe imponer display:none; clases con display (p. ej. .app-topbar) lo sobreescriben sin esto. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-light);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  /* Capas: textura ambiental → halos suaves → gradiente base (sin grano de puntos) */
  background-color: var(--bg-1);
  background-image:
    var(--app-bg-ambient),
    radial-gradient(ellipse 90% 55% at 12% 8%, rgba(37, 99, 235, 0.18), transparent 52%),
    radial-gradient(ellipse 70% 45% at 88% 18%, rgba(124, 58, 237, 0.14), transparent 48%),
    linear-gradient(155deg, var(--bg-1) 0%, var(--bg-2) 52%, var(--bg-3) 100%);
  background-size: cover, auto, auto, auto;
  background-position: center, 0 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed, fixed;
}

/* Avisos API / feedback: fijos, visibles al hacer scroll */
.app-toasts {
  position: fixed;
  z-index: 10050;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  padding: 0 1rem max(1rem, env(safe-area-inset-bottom, 0));
  max-height: 40vh;
  justify-content: flex-end;
  gap: 0.5rem;
}

.app-toast {
  pointer-events: auto;
  max-width: min(32rem, calc(100% - 0.5rem));
  margin: 0;
  padding: 0.78rem 1.05rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  font-weight: 500;
  box-shadow: 0 10px 36px rgba(0, 8, 32, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f0f6ff;
  background: rgba(6, 18, 48, 0.92);
  transform: translateY(120%) translateZ(0);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.app-toast--show {
  transform: translateY(0) translateZ(0);
  opacity: 1;
}

.app-toast--ok {
  border-color: rgba(50, 200, 120, 0.45);
  background: linear-gradient(145deg, rgba(8, 42, 32, 0.96), rgba(4, 22, 50, 0.94));
}

.app-toast--err {
  border-color: rgba(255, 100, 100, 0.45);
  background: linear-gradient(145deg, rgba(48, 12, 22, 0.95), rgba(4, 14, 44, 0.94));
}

.app-toast--info {
  border-color: rgba(100, 160, 255, 0.4);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  background: rgba(6, 16, 42, 0.72);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 6, 24, 0.2);
}

.brand-with-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.brand-logo-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 1);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.brand-logo {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.brand-titles {
  min-width: 0;
}

.brand-block h1 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.subtitle {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.profile-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.profile-avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: linear-gradient(140deg, #fff, #dce8ff);
  color: #123066;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-meta strong {
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9rem;
}

.profile-meta span {
  font-size: 0.7rem;
  opacity: 0.9;
}

.main {
  width: min(1180px, 100%);
  margin: 1.25rem auto 2.5rem;
  padding: 0 1.1rem;
}

.employee-main {
  width: min(860px, 100%);
}

.card {
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.glass-card {
  background: var(--glass);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  box-shadow: var(--shadow-card);
}

.employee-card {
  background: #f8fafc;
  color: var(--text-dark);
  border: 1px solid rgba(15, 35, 90, 0.08);
  box-shadow: var(--shadow-employee);
}

.banner {
  margin: 0 0 1rem;
  padding: 0.72rem 0.9rem;
  border-radius: 11px;
  border: 1px solid rgba(87, 164, 255, 0.6);
  background: rgba(208, 232, 255, 0.25);
  color: #d8ebff;
}

.employee-card .banner {
  color: #154688;
  background: rgba(236, 244, 255, 0.9);
}

.banner.ok {
  border-color: rgba(33, 182, 116, 0.7);
  background: rgba(210, 250, 230, 0.2);
  color: #90f3bf;
}

.employee-card .banner.ok {
  color: #1f7a50;
}

/* Botones sobre tarjeta empleado (fondo claro): secundarios legibles */
.employee-card a.button,
.employee-card .button {
  color: #fff !important;
}

.employee-card .button.secondary {
  color: #0f2744 !important;
  background: #ffffff;
  border: 1px solid #94a3b8;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.07);
}

.employee-card .button.secondary:hover {
  color: #0f172a !important;
  background: #f1f5f9;
  border-color: #64748b;
  filter: none;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

a.button,
.button {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.58rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #fff !important;
  cursor: pointer;
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
  background: linear-gradient(165deg, var(--primary) 0%, var(--primary-2) 100%);
  box-shadow: 0 1px 2px rgba(0, 8, 32, 0.2);
}

.button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 100, 255, 0.28);
}
.button:disabled,
.button.is-disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.button.secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.button.secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 2px 8px rgba(0, 8, 32, 0.15);
}
.button.primary { background: linear-gradient(138deg, var(--primary), var(--primary-2)); }
.button.danger { background: linear-gradient(138deg, #f14d4d, #cc3131); }
.top-logout { white-space: nowrap; }

/**
 * Botones / enlaces con ícono Font Awesome (fa-sharp fa-solid + Kit Pro, o fa-solid con fallback).
 * .hide-label-sm: en viewport estrecho el texto pasa a sr-only; el padre debe tener aria-label.
 */
.btn-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.btn-with-icon .btn-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
}

.btn-with-icon .btn-ico i {
  font-size: 1.05em;
  line-height: 1;
  vertical-align: -0.06em;
}

.admin-sidenav-ico-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.notif-gear-fa {
  font-size: 1.15rem;
  line-height: 1;
  display: block;
}

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

@media (max-width: 720px) {
  .btn-with-icon.hide-label-sm .btn-ico-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .btn-with-icon.hide-label-sm {
    position: relative;
  }
}

.greeting {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: #0f172a;
}

.meta {
  list-style: none;
  padding: 0.65rem 0 0;
  margin: 0.5rem 0 0;
  display: grid;
  gap: 0.35rem;
  border-top: 1px solid rgba(15, 35, 90, 0.08);
}

.meta li {
  font-size: 0.875rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  line-height: 1.4;
}
.meta .k {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-width: 4.5rem;
}

.employee-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.employee-day-info {
  text-align: right;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.12);
}

.jornada {
  margin-top: var(--space-section);
  border-top: 1px solid rgba(15, 35, 90, 0.1);
  padding-top: var(--space-section);
  background: rgba(255, 255, 255, 0.55);
  margin-left: -0.35rem;
  margin-right: -0.35rem;
  padding-left: 0.35rem;
  padding-right: 0.35rem;
  border-radius: var(--radius-sm);
}

.jornada-title {
  margin: 0;
  font-size: 1.1rem;
}

.jornada-status {
  margin: 0.28rem 0 0;
  font-weight: 600;
  color: #2f7f56;
}

.timer-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  margin: 1rem 0;
}

.timer-ring {
  width: min(280px, 86vw);
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, #ffffff 59%, transparent 60%),
    conic-gradient(from 10deg, #1c62f7, #6dc9ff, #9c6bff, #1c62f7);
  box-shadow: 0 12px 30px rgba(40, 94, 198, 0.22);
}

.jornada-counter {
  margin: 0;
  font-family: "Consolas", "Cascadia Code", ui-monospace, monospace;
  font-size: clamp(1.65rem, 4.4vw, 2.9rem);
  color: #14468c;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.jornada-counter.counter-paused { color: #5c6a7e; }
.jornada-timer-label { color: #415c88; font-weight: 600; }

.jornada-timer-panel {
  padding: 0.35rem 0 0.15rem;
}

.jornada-actions-panel {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  background: #ffffff;
  border: 1px solid rgba(15, 35, 90, 0.1);
  border-radius: var(--radius-sm);
  box-shadow: 0 1px 3px rgba(15, 35, 90, 0.06);
}

.jornada-actions-title {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.jornada-actions {
  display: grid;
  gap: 0.65rem;
}

.employee-card .jornada-actions .action-main {
  width: 100%;
}

.employee-card .jornada-actions-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.employee-card .jornada-actions-secondary:has(> :only-child) {
  grid-template-columns: 1fr;
}

.employee-card .jornada-actions-secondary .action-main {
  width: 100%;
  min-height: 2.65rem;
  font-size: 0.92rem;
}

.employee-card .jornada-note {
  margin: 0.65rem 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
}

.employee-card .jornada-timeoff-row {
  margin-top: 0.65rem;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(15, 35, 90, 0.12);
}

.employee-card .jornada-timeoff-row .button {
  width: 100%;
}

.action-main { min-height: 2.75rem; font-size: 1rem; }
.action-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
.action-menu-btn { width: 100%; }

.actions { margin-top: 0.9rem; }
.muted { color: rgba(236, 245, 255, 0.84); }
.employee-card .muted { color: #5b6b85; }

.admin-main { width: min(1280px, 100%); }

.admin-h2,
.admin-h3 {
  margin: 0 0 0.85rem;
  color: #f2f8ff;
  letter-spacing: -0.02em;
}

.admin-h2 {
  font-size: 1.15rem;
  font-weight: 700;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
}

.admin-h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-top: 1.25rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-filters label,
.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.86rem;
  color: #e8f3ff;
}

.admin-form { display: flex; flex-direction: column; gap: 0.7rem; }
.admin-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.admin-checkbox-label input { width: auto; }
.admin-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  align-items: flex-end;
}

.admin-filter-emp { min-width: 15rem; flex: 1 1 16rem; }

.admin-form textarea,
.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="number"],
.admin-form input[type="date"],
.admin-form input[type="time"],
.admin-filters input[type="number"],
.admin-filters input[type="email"],
.admin-filters input[type="text"],
.admin-filters select,
.admin-form select {
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.52rem 0.65rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-form textarea:focus,
.admin-form input:focus,
.admin-filters input:focus,
.admin-filters select:focus,
.admin-form select:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.admin-filters input::placeholder {
  color: rgba(226, 236, 255, 0.85);
}

/* Listas desplegables legibles (fondo + texto en <option>; el OS a veces ignora parte del estilo) */
.admin-main select {
  color-scheme: dark;
  background-color: rgba(18, 32, 62, 0.98);
  color: #f3f7ff;
}

.admin-main select option {
  background-color: #142544;
  color: #f5f8ff;
}

.admin-form input::placeholder,
.admin-form textarea::placeholder { color: rgba(226, 236, 255, 0.85); }

.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.12);
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 760px;
  font-size: 0.84rem;
  background: rgba(255, 255, 255, 0.06);
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.55rem 0.7rem;
  vertical-align: middle;
  text-align: left;
}

.admin-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

.admin-table tbody tr:hover td {
  background: rgba(100, 150, 255, 0.08);
}

.admin-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(12, 28, 62, 0.95);
  color: rgba(240, 248, 255, 0.95);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-strong);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-schedule-ok {
  font-size: 0.82rem;
  color: #a7f3d0;
}

.admin-schedule-warn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fde68a;
}

.admin-schedule-warn-icon {
  font-size: 1rem;
  line-height: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  border: 1px solid transparent;
}

.status-working { background: rgba(37, 196, 111, 0.2); border-color: rgba(37, 196, 111, 0.35); }
.status-finished { background: rgba(203, 213, 229, 0.25); border-color: rgba(203, 213, 229, 0.42); }
.status-on_lunch { background: rgba(255, 174, 54, 0.24); border-color: rgba(255, 174, 54, 0.4); }
.status-incomplete,
.status-pending_review,
.status-auto_closed { background: rgba(255, 112, 112, 0.22); border-color: rgba(255, 112, 112, 0.44); }

.main-error { width: min(680px, 100%); }
.error-page { color: #f3f8ff; }
.error-code { margin: 0; font-size: 2.2rem; }
.error-title { margin: 0.4rem 0 1rem; }
.error-path code { color: #fff; }

#schedWeekTable input[type="time"] { min-width: 6.1rem; }
#schedWeekTable select { min-width: 7.5rem; }

@media (max-width: 900px) {
  .profile-meta strong { max-width: 6.5rem; }
  .employee-head { flex-direction: column; }
  .employee-day-info { text-align: left; }
}

.dash-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}
.dash-filter-row label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.86rem;
  color: #e8f3ff;
}
.dash-filter-row input[type="date"] {
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.52rem 0.65rem;
  font-size: 0.875rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-filter-row input[type="date"]:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}
.dash-preset-btns { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.dash-export-row { margin-top: 0.65rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }

.dash-page {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dash-page > .card,
.dash-page > .dash-panel {
  margin: 0;
}

.dash-panel-hint {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.84rem;
  line-height: 1.45;
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin-top: 0;
}

.dash-kpi-grid-compact {
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.55rem;
}

.dash-kpi-inline {
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  border-left: 3px solid rgba(37, 99, 235, 0.5);
  padding: 0.75rem 0.85rem;
  box-shadow: none;
}
.dash-kpi {
  margin: 0;
  padding: 1rem 1.1rem;
  border-left: 3px solid rgba(37, 99, 235, 0.65);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.dash-kpi-wide { grid-column: span 2; }
.dash-kpi-title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.dash-kpi-value {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.15;
}
.dash-kpi-sub {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--text-secondary);
}

.dash-compliance-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 1.1fr) minmax(0, 2fr);
  gap: 1rem;
  align-items: stretch;
  margin-top: 0.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid var(--border-subtle);
}

.dash-compliance-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding-right: 0.75rem;
  border-right: 1px solid var(--border-subtle);
}

.dash-compliance-score-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
}

.dash-compliance-score {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
}

.dash-compliance-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.dash-metric-tile {
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
}

.dash-metric-label {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.dash-metric-value {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
}

.dash-metric-hint {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
}

.dash-light {
  display: block;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
}
.dash-light-green { color: #5ee9a4; }
.dash-light-yellow { color: #fcd34d; }
.dash-light-red { color: #fca5a5; }

.dash-charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.85rem;
  margin-top: 0;
}
.dash-chart-card {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-subtle);
}
.dash-chart-full-inner {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}
.dash-chart-full { margin-top: 0.85rem; padding: 0.85rem 1rem; }

.dash-missing-table .dash-num-col {
  text-align: center;
  white-space: nowrap;
}

.dash-emp-cell strong {
  font-weight: 600;
  color: #f4f8ff;
}

.dash-miss-badge {
  display: inline-flex;
  min-width: 1.5rem;
  justify-content: center;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  background: rgba(220, 80, 80, 0.22);
  border: 1px solid rgba(252, 165, 165, 0.35);
  color: #fecaca;
}

.dash-missing-dates-cell {
  min-width: 14rem;
  max-width: 28rem;
}

.dash-date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.dash-date-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.3;
  color: #e8f0ff;
  background: rgba(220, 100, 60, 0.2);
  border: 1px solid rgba(251, 191, 36, 0.35);
  white-space: nowrap;
}

.dash-date-chip:hover {
  background: rgba(220, 100, 60, 0.32);
}

.dash-date-count {
  font-size: 0.72rem;
  margin-left: 0.15rem;
}

.dash-date-empty {
  font-size: 0.82rem;
}
.dash-canvas-wrap { position: relative; height: 240px; max-width: 100%; }
.dash-canvas-tall { height: 280px; }

@media (max-width: 900px) {
  .dash-compliance-layout {
    grid-template-columns: 1fr;
  }
  .dash-compliance-hero {
    padding-right: 0;
    padding-bottom: 0.85rem;
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  .dash-compliance-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .dash-kpi-wide { grid-column: span 1; }
  .app-topbar { flex-wrap: wrap; }
  .topbar-right { width: 100%; justify-content: space-between; }
  .button,
  a.button { width: 100%; }
  .topbar-right .button,
  .topbar-app-links .button { width: auto; }
  .app-topbar .topbar-app-links a.button { padding: 0.4rem 0.65rem; font-size: 0.8rem; }
  .action-menu { grid-template-columns: 1fr; }
  .main { padding: 0 0.6rem; }
  .card { padding: 0.85rem; }
  .timer-ring { width: min(220px, 80vw); }
  .admin-filter-emp { min-width: 100%; }
  .topbar-right-compact .profile-badge { max-width: min(100%, 10rem); }
  .topbar-right-compact .profile-meta { display: none; }
  .app-topbar-admin .brand-titles h1 { font-size: 1.05rem; }
  .app-topbar-admin .brand-logo { width: 34px; height: 34px; }
  .app-topbar-employee .brand-titles h1 { font-size: 1.05rem; }
  .app-topbar-employee .brand-logo { width: 34px; height: 34px; }
  .app-topbar-employee .topbar-app-links a.button { padding: 0.35rem 0.55rem; font-size: 0.75rem; }
  .app-topbar-employee .top-logout { padding: 0.35rem 0.6rem; font-size: 0.75rem; }
}

/* Navegación de app (Inicio / Dashboard / Admin) y panel admin en columnas */
.topbar-app-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.app-topbar-employee .topbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-end;
  max-width: 100%;
  min-width: 0;
}

.app-topbar-employee .topbar-right .topbar-app-links {
  order: 0;
}

.app-topbar-admin {
  flex-wrap: wrap;
  align-items: center;
  row-gap: 0.4rem;
}

.app-topbar-admin .topbar-app-links {
  flex: 1 1 auto;
  justify-content: center;
}

.app-topbar-admin .brand-block {
  flex: 0 1 auto;
}

.app-topbar-admin .topbar-right-compact {
  flex: 0 0 auto;
  margin-left: auto;
}

@media (min-width: 900px) {
  .app-topbar-admin .topbar-app-links {
    justify-content: flex-end;
  }
  .app-topbar-admin {
    flex-wrap: nowrap;
  }
}

#chapter-ops,
#section-wd,
#section-ot,
#section-timeoff,
#chapter-staff,
#section-users,
#section-sched,
#chapter-company,
#section-company,
#detailSec {
  scroll-margin-top: 4.5rem;
}

.admin-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 0.9rem 2rem;
  gap: 0.6rem;
}

@media (min-width: 900px) {
  .admin-page {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    align-items: start;
  }
  .admin-sidenav {
    position: sticky;
    top: 3.75rem;
  }
  .admin-main-col {
    min-width: 0;
  }
}

.admin-sidenav {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 0.85rem 0.7rem;
  font-size: 0.86rem;
  max-height: none;
  box-shadow: var(--shadow-card);
}

@media (max-width: 899px) {
  .admin-sidenav {
    order: -1;
  }
  .admin-sidenav-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.2rem 0.5rem;
  }
  .admin-sidenav-list > li { flex: 0 0 auto; }
  .admin-sidenav-divider {
    flex: 1 1 100%;
    margin: 0.35rem 0;
  }
  .admin-sidenav-list li li { display: block; }
  .admin-sidenav .admin-sidenav-list ul {
    display: block;
    margin: 0.1rem 0 0.15rem 0.6rem;
  }
  .admin-sidenav-title { width: 100%; margin-bottom: 0.35rem; }
}

.admin-sidenav-title {
  font-weight: 700;
  margin: 0 0 0.4rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.admin-sidenav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.admin-sidenav-divider {
  list-style: none;
  margin: 0.45rem 0;
  padding: 0;
  height: 0;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  align-self: stretch;
}
.admin-sidenav-list ul { list-style: none; margin: 0.15rem 0 0.4rem 0.45rem; padding: 0; }
.admin-sidenav a {
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  padding: 0.35rem 0.55rem 0.35rem 0.7rem;
  border-radius: 8px;
  border-left: 3px solid transparent;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.admin-sidenav a:hover {
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.admin-sidenav a[aria-current="page"] {
  font-weight: 600;
  color: #fff;
  background: rgba(37, 99, 235, 0.32);
  border-left-color: rgba(96, 165, 250, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(96, 165, 250, 0.28),
    0 2px 10px rgba(37, 99, 235, 0.18);
}
.admin-sidenav li:has(> a[aria-current="page"]) .admin-sidenav-group,
.admin-sidenav-group.is-active-group {
  color: rgba(191, 219, 254, 0.95);
}
.admin-sidenav .admin-sidenav-group {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0.4rem 0 0.1rem;
  transition: color 0.15s ease;
}
.admin-main-col {
  width: 100%;
  margin: 0;
  padding: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.admin-screen[hidden] {
  display: none !important;
}

.admin-screen-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-screen-lead {
  margin: 0.25rem 0 0.85rem;
}

.admin-sidenav-screens {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-jornada-alerts {
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
}

.admin-h3-flush {
  margin-top: 0;
}

.admin-jornada-alerts-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-jornada-alerts-list[hidden] {
  display: none !important;
}

.admin-jornada-alert-link {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.88rem;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
  cursor: pointer;
}

.admin-jornada-alert-link:hover {
  background: rgba(251, 191, 36, 0.18);
}

.admin-jornada-panel[hidden],
.admin-empresa-panel[hidden],
.admin-personal-panel[hidden],
.admin-config-panel[hidden] {
  display: none !important;
}

.admin-main-col > .card.glass-card,
.admin-main-col > section.card {
  padding: 1.15rem 1.25rem;
}

.admin-main-col > .banner {
  margin: 0;
  flex: 0 0 auto;
}

.admin-chapter {
  margin: 0;
  padding: 0.15rem 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(200, 218, 255, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding-bottom: 0.4rem;
  flex: 0 0 auto;
}

.admin-domains-panel {
  margin-top: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(6, 22, 58, 0.45);
  border: 1px solid rgba(120, 170, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.admin-domains-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e8f3ff;
  margin: 0 0 0.5rem;
}

.admin-domains-hint {
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(220, 232, 255, 0.82);
}

.admin-domains-hint code {
  font-size: 0.85em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
}

.admin-domains-textarea {
  display: block;
  width: 100%;
  min-height: 7rem;
  margin: 0;
  font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
  font-size: 0.88rem;
  line-height: 1.45;
  color: #f0f6ff;
  border: 1px solid rgba(100, 150, 255, 0.35);
  background: rgba(4, 14, 40, 0.75);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  resize: vertical;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.admin-domains-textarea::placeholder {
  color: rgba(180, 200, 240, 0.55);
}

.admin-domains-textarea:focus {
  outline: none;
  border-color: rgba(130, 180, 255, 0.65);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 2px rgba(60, 120, 255, 0.25);
}

.admin-domains-panel .actions {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.admin-company-info {
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 0 0 0.5rem;
}

/* ——— Pantalla inicio de sesión / registro (invitado) ——— */
body.guest-mode {
  background-color: #040d28;
  background-image:
    var(--app-bg-ambient),
    radial-gradient(ellipse 100% 70% at 50% -8%, rgba(50, 88, 160, 0.35), transparent 55%),
    linear-gradient(160deg, #040d28 0%, #0a1f4d 48%, #0f2a5c 100%);
  background-size: cover, auto, auto;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed;
  background-position: center, 0 0, 0 0;
}

#appMain.employee-main.auth-landing {
  max-width: 30rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.1rem 2.5rem;
  min-height: calc(100vh - 0.5rem);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.guest-auth-card {
  max-width: 30rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 1.65rem;
  border-radius: 1.25rem;
  background: rgba(8, 20, 50, 0.62);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px) saturate(1.1);
  -webkit-backdrop-filter: blur(20px) saturate(1.1);
}

.guest-auth-hero {
  text-align: center;
  margin-bottom: 1.1rem;
}

.guest-landing-cta {
  text-align: center;
  margin: -0.4rem 0 1.15rem;
  font-size: 0.8rem;
}
.guest-landing-cta a {
  color: rgba(220, 230, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.guest-landing-cta a:hover {
  color: #fff;
}

/* Selector Google Workspace / cuenta personal */
.guest-auth-mode {
  border: none;
  margin: 0 0 1.15rem;
  padding: 0;
  min-width: 0;
}

.guest-auth-mode-legend {
  text-align: center;
  width: 100%;
  display: table;
  float: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(220, 230, 255, 0.95);
  margin: 0 0 0.65rem;
  padding: 0;
  line-height: 1.35;
}

.guest-auth-mode-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  clear: both;
  width: 100%;
}

.guest-auth-mode-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
}

.guest-auth-mode-row:has(:checked) {
  border-color: rgba(100, 180, 195, 0.55);
  background: rgba(8, 28, 60, 0.55);
  box-shadow: 0 0 0 1px rgba(69, 160, 138, 0.2);
}

.guest-auth-mode-row input[type="radio"] {
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  accent-color: #45a08a;
  width: 1rem;
  height: 1rem;
}

.guest-auth-mode-txt {
  min-width: 0;
  flex: 1;
}

.guest-auth-mode-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f7fbff;
  line-height: 1.3;
  margin: 0;
}

.guest-auth-mode-hint {
  display: block;
  font-size: 0.74rem;
  line-height: 1.4;
  color: rgba(200, 215, 255, 0.86);
  margin: 0.2rem 0 0;
  font-weight: 500;
}

.guest-auth-hint {
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(225, 235, 255, 0.92);
  margin: 0 0 0.9rem;
  text-align: center;
}

.guest-auth-panel[hidden] {
  display: none !important;
}

@supports not selector(:has(*)) {
  .guest-auth-mode-row input[type="radio"]:focus + .guest-auth-mode-txt {
    outline: 1px solid rgba(100, 180, 195, 0.5);
  }
}

.guest-auth-logo-wrap {
  width: 3.4rem;
  height: 3.4rem;
  margin: 0 auto 0.65rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.guest-auth-img-logo {
  width: 2.15rem;
  height: 2.15rem;
  object-fit: contain;
  display: block;
}

.guest-auth-name {
  margin: 0.35rem 0 0.2rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
}

.guest-auth-tagline {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(240, 246, 255, 0.9);
  letter-spacing: 0.02em;
}

.guest-auth-block {
  margin: 0;
}

.guest-auth-choices {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.guest-auth-choices > li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0;
  text-align: left;
}

.guest-step-num {
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #0a1a40;
  background: rgba(255, 255, 255, 0.92);
  line-height: 1;
  margin-top: 0.05rem;
}

.guest-step-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #f7fbff;
  line-height: 1.3;
  margin: 0 0 0.2rem;
}

.guest-step-txt {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(230, 238, 255, 0.92);
}

.guest-auth-google-cta {
  display: block;
  width: 100%;
  margin: 0 0 0.35rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(200, 215, 255, 0.75);
}

.guest-reg-after-note {
  margin: 0.4rem 0 0.15rem;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(220, 230, 255, 0.9);
}

.guest-auth-h2 {
  margin: 0 0 0.55rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: #f7fbff;
  line-height: 1.35;
}

.guest-auth-text {
  margin: 0 0 1.05rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(235, 242, 255, 0.95);
}

.button.button-google {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff !important;
  background: #45a08a !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: filter 0.15s ease, transform 0.12s ease;
}

.button.button-google:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.button-google-ico {
  display: flex;
  align-items: center;
  line-height: 0;
  color: #fff;
  opacity: 0.95;
}

.guest-auth-sep {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.45rem 0 1.35rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  text-transform: lowercase;
}

.guest-auth-sep::before,
.guest-auth-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28) 20%, rgba(255, 255, 255, 0.28) 80%, transparent);
}

.guest-auth-sep-txt {
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.guest-reg-form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.1rem;
}

.guest-reg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem 1rem;
  align-items: start;
}

@media (max-width: 34rem) {
  .guest-reg-grid {
    grid-template-columns: 1fr;
  }
}

.guest-reg-stack {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.guest-reg-label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(248, 250, 255, 0.95);
  margin: 0;
}

.guest-reg-full {
  width: 100%;
}

.guest-reg-label input[type="text"],
.guest-reg-label input[type="email"] {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: #0f1728;
  background: #e9ecf2;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.guest-reg-label input::placeholder {
  color: #5c6476;
}

.guest-reg-label input:hover {
  border-color: rgba(0, 0, 0, 0.14);
}

.guest-reg-label input:focus {
  outline: none;
  border-color: #45a08a;
  box-shadow: 0 0 0 3px rgba(69, 160, 138, 0.2);
  background: #f2f4f7;
}

.field-hint {
  margin: 0;
  font-size: 0.7rem;
  line-height: 1.4;
  color: rgba(230, 236, 255, 0.8);
  font-weight: 400;
}

.field-hint-below {
  margin: -0.1rem 0 0.15rem;
}

.guest-form-msg {
  margin: 0.15rem 0 0;
  padding: 0.65rem 0.8rem;
  font-size: 0.86rem;
  line-height: 1.4;
  border-radius: 10px;
  border: 1px solid transparent;
}
.guest-form-msg.is-ok {
  color: #b6f0d0;
  background: rgba(50, 130, 95, 0.2);
  border-color: rgba(100, 200, 150, 0.35);
}
.guest-form-msg.is-err {
  color: #ffccd0;
  background: rgba(150, 40, 50, 0.2);
  border-color: rgba(220, 80, 90, 0.4);
}

.button-empresa {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff !important;
  background: rgba(8, 22, 52, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.button-empresa:hover {
  background: rgba(20, 40, 80, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  transform: translateY(-1px);
}

/* —— Notificaciones de jornada (Web Push) —— */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.jornada-notif {
  margin: 0.75rem 0 0;
  padding: 0.6rem 1rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 16, 42, 0.35);
}

.employee-card .jornada-notif {
  background: #eef2f7;
  border: 1px solid rgba(15, 35, 90, 0.1);
}

.employee-card .jornada-notif-toolbar-hint {
  color: #334155;
}

.employee-card .jornada-subtitle {
  color: #0f2744;
}

.employee-card .jornada-notif-settings {
  border-top-color: rgba(15, 35, 90, 0.1);
}

.employee-card .notif-gear-btn {
  border-color: rgba(15, 35, 90, 0.15);
  background: #ffffff;
  color: #1e3a5f;
}

.employee-card .notif-gear-btn:hover {
  background: #f1f5f9;
  border-color: rgba(37, 99, 235, 0.35);
}

.employee-card .notif-gear-btn[aria-expanded="true"] {
  background: rgba(37, 99, 235, 0.1);
  border-color: rgba(37, 99, 235, 0.4);
}

.employee-card .notif-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.employee-card .notif-actions .button {
  flex: 1 1 auto;
  min-width: min(100%, 12rem);
}

.employee-card .notif-toggles,
.employee-card .notif-line {
  color: #334155;
}

.employee-card .notif-line input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.employee-card .notif-intro {
  color: #5b6b85;
}

.employee-card .notif-status {
  color: #475569;
}

.employee-card .notif-status.is-ok {
  color: #1f7a50;
}

.employee-card .notif-status.is-warn {
  color: #b45309;
}

.employee-card .notif-status.is-muted {
  color: #64748b;
}

.employee-card .notif-mins input[type="number"] {
  border: 1px solid #94a3b8;
  background: #ffffff;
  color: #0f2744;
}

.employee-card .notif-mins input[type="number"]:focus {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 1px;
  border-color: rgba(37, 99, 235, 0.5);
}

.employee-card .jornada-notif-toolbar-hint .btn-ico i {
  color: #2563eb;
}

.jornada-notif-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  min-height: 2.25rem;
}

.jornada-notif-toolbar-hint {
  margin-right: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(230, 240, 255, 0.88);
}

.notif-gear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.45rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(10, 24, 58, 0.5);
  color: rgba(220, 235, 255, 0.95);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.notif-gear-btn:hover {
  background: rgba(20, 40, 80, 0.55);
  border-color: rgba(255, 255, 255, 0.28);
}

.notif-gear-btn[aria-expanded="true"] {
  background: rgba(30, 60, 120, 0.4);
  border-color: rgba(120, 180, 255, 0.35);
}

.jornada-notif-settings {
  margin-top: 0.5rem;
  padding-top: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.notif-config-title {
  margin-top: 0;
}

.jornada-subtitle {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(248, 250, 255, 0.95);
}

.notif-intro {
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0 0 0.5rem;
}

.notif-status {
  font-size: 0.78rem;
  margin: 0 0 0.6rem;
  min-height: 1.1em;
}

.notif-status.is-ok {
  color: #a7f3d0;
}

.notif-status.is-warn {
  color: #fbbf77;
}

.notif-status.is-muted {
  color: rgba(200, 212, 228, 0.72);
}

.notif-toggles {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: rgba(230, 240, 255, 0.9);
}

.notif-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.notif-mins input {
  max-width: 3.5rem;
  margin: 0 0.25rem;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 20, 50, 0.5);
  color: inherit;
}

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

/* Super panel (plataforma) */
.super-kpi .super-kpi-grid,
#superKpi .super-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.75rem;
}

.super-kpi-tile {
  background: rgba(8, 22, 52, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  min-width: 0;
}

.super-kpi-lbl {
  font-size: 0.75rem;
  color: rgba(200, 210, 240, 0.85);
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.super-kpi-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f0f4ff;
  line-height: 1.2;
  word-break: break-word;
}

#superChartsSec .super-chart-box {
  min-width: 0;
  padding: 0.5rem 0.25rem;
}

#superChartsSec .super-chart-box h4 {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(220, 230, 255, 0.9);
}

#superChartsSec .super-chart-canvas {
  position: relative;
  min-height: 12rem;
}

#superChartsSec .super-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
  margin-top: 0.75rem;
}

@media (max-width: 52rem) {
  #superChartsSec .super-charts-row {
    grid-template-columns: 1fr;
  }
}

#superTableSec .super-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}

#superKpi .super-settings-form {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#superKpi .super-set-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

#superKpi .super-settings-form input[type="number"] {
  max-width: 6rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(12, 24, 55, 0.6);
  color: #e8eefc;
}

/* Feedback flotante (app autenticada) */
.feedback-fab-wrap {
  position: fixed;
  z-index: 9000;
  right: 1rem;
  bottom: 1rem;
  pointer-events: none;
}
.feedback-fab-wrap .feedback-fab {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  border-radius: 999px;
  opacity: 0.92;
}
.feedback-fab-wrap .feedback-fab:hover {
  opacity: 1;
}
.feedback-fab-text {
  font-weight: 600;
}
@media (max-width: 520px) {
  .feedback-fab-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .feedback-fab-wrap .feedback-fab {
    padding: 0.55rem;
    border-radius: 50%;
  }
}
.feedback-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9001;
  background: rgba(4, 12, 32, 0.65);
  backdrop-filter: blur(2px);
}
.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 9002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}
.feedback-modal-card {
  pointer-events: auto;
  width: 100%;
  max-width: 26rem;
  max-height: min(90vh, 32rem);
  overflow: auto;
  margin: 0;
}
.feedback-modal-hint {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
}
.feedback-modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.feedback-field-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e8f0ff;
}
.feedback-select,
.feedback-textarea {
  font: inherit;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(8, 20, 48, 0.65);
  color: #f0f6ff;
}
.feedback-textarea {
  resize: vertical;
  min-height: 7rem;
}
.feedback-modal-actions {
  margin: 0.25rem 0 0;
  justify-content: flex-end;
}

/* Super panel — feedback */
#superFeedbackSec .super-fb-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: flex-end;
  margin-bottom: 0.75rem;
}
#superFeedbackSec .super-fb-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.82rem;
}
#superFeedbackSec .super-fb-filters select,
#superFeedbackSec .super-fb-filters input[type="text"] {
  min-width: 8rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(12, 24, 55, 0.6);
  color: #e8eefc;
}
#superFeedbackSec .super-fb-detail {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(120, 170, 255, 0.22);
  background: rgba(6, 22, 58, 0.45);
}
#superFeedbackSec .super-fb-detail h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}
#superFeedbackSec .super-fb-detail-meta {
  font-size: 0.82rem;
  margin: 0 0 0.6rem;
  color: rgba(200, 218, 255, 0.88);
}
#superFeedbackSec .super-fb-detail-msg {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0 0 0.75rem;
}
#superFeedbackSec .super-fb-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: flex-end;
}
#superFeedbackSec .super-fb-detail-actions label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8rem;
}
#superFeedbackSec .super-fb-detail-actions select {
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(12, 24, 55, 0.6);
  color: #e8eefc;
}
#superFeedbackSec .super-fb-row {
  cursor: pointer;
}
#superFeedbackSec .super-fb-row.is-selected {
  outline: 2px solid rgba(108, 157, 255, 0.55);
}

/* —— Admin: calendario permisos / vacaciones —— */
.timeoff-cal-wrap {
  margin-top: 0.65rem;
  width: 100%;
  min-width: 0;
}

.timeoff-cal-msg {
  margin: 0 0 0.5rem;
  font-size: 0.86rem;
}

.timeoff-cal-heading {
  margin: 0 0 0.55rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(232, 240, 255, 0.92);
}

.timeoff-cal-host {
  width: 100%;
  min-width: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 22, 58, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.timeoff-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.28rem;
  width: 100%;
  min-width: min(100%, 280px);
}

.timeoff-cal-weekday {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: rgba(180, 200, 255, 0.85);
  padding: 0.2rem 0 0.35rem;
}

.timeoff-cal-cell {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  min-height: 3.1rem;
  padding: 0.22rem 0.2rem 0.28rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.15rem;
  color: rgba(240, 248, 255, 0.92);
}

.timeoff-cal-cell--pad {
  border-color: transparent;
  background: transparent;
  min-height: 3.1rem;
  pointer-events: none;
}

.timeoff-cal-daybtn {
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.timeoff-cal-daybtn:hover:not(:disabled) {
  border-color: rgba(120, 170, 255, 0.45);
  background: rgba(100, 140, 255, 0.12);
}

.timeoff-cal-daybtn:focus-visible {
  outline: 2px solid rgba(120, 170, 255, 0.75);
  outline-offset: 1px;
}

.timeoff-cal-daybtn--today {
  border-color: rgba(130, 180, 255, 0.55);
  background: linear-gradient(145deg, rgba(40, 90, 200, 0.28), rgba(120, 60, 180, 0.2));
  box-shadow: 0 0 0 1px rgba(165, 120, 255, 0.25);
}

.timeoff-cal-daynum {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.1;
}

.timeoff-cal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem;
  align-items: center;
  margin-top: auto;
  min-height: 0.85rem;
}

.timeoff-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.05rem;
  padding: 0.08rem 0.28rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.timeoff-badge--vac {
  background: rgba(56, 189, 248, 0.35);
  color: #e0f4ff;
}

.timeoff-badge--perm {
  background: rgba(251, 191, 36, 0.28);
  color: #fff7e0;
}

.timeoff-badge--mx {
  background: rgba(167, 139, 250, 0.35);
  color: #f3e8ff;
}

.timeoff-day-modal-card {
  max-width: min(26rem, calc(100vw - 1.5rem));
}

.timeoff-day-modal-body {
  font-size: 0.88rem;
  line-height: 1.45;
}

.timeoff-detail-block {
  margin: 0 0 1rem;
}

.timeoff-detail-block:last-child {
  margin-bottom: 0;
}

.timeoff-detail-h {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(180, 205, 255, 0.95);
}

.timeoff-detail-list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  list-style: disc;
}

.timeoff-detail-list li {
  margin: 0.35rem 0;
}

.timeoff-detail-name {
  display: block;
  font-weight: 600;
  color: #f0f6ff;
}

.timeoff-detail-meta {
  display: block;
  font-size: 0.8rem;
  color: rgba(180, 200, 230, 0.85);
  word-break: break-word;
}

.timeoff-detail-note {
  display: block;
  font-size: 0.78rem;
  color: rgba(160, 185, 220, 0.88);
  margin-top: 0.15rem;
}

.timeoff-detail-empty {
  margin: 0;
  font-size: 0.84rem;
}

@media (max-width: 520px) {
  .timeoff-cal-weekday {
    font-size: 0.58rem;
    padding-left: 0.05rem;
    padding-right: 0.05rem;
  }

  .timeoff-cal-cell,
  .timeoff-cal-cell--pad {
    min-height: 2.65rem;
  }

  .timeoff-cal-daynum {
    font-size: 0.74rem;
  }

  .timeoff-badge {
    font-size: 0.56rem;
    padding: 0.06rem 0.22rem;
  }

  .timeoff-cal-grid {
    gap: 0.18rem;
  }
}

/* —— Admin: jornadas, periodo y personal —— */
.admin-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.35rem;
}

.admin-h2-flush {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.admin-export-csv {
  flex-shrink: 0;
  white-space: nowrap;
}

.admin-period-label {
  margin: 0 0 0.85rem;
  font-size: 0.84rem;
}

.admin-period-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.admin-period-btn.is-active {
  background: rgba(37, 99, 235, 0.35);
  border-color: rgba(96, 165, 250, 0.55);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.25);
}

.admin-filters-row-secondary {
  margin-top: 0.15rem;
}

.admin-filter-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: #e8f3ff;
  padding-bottom: 0.35rem;
}

.admin-filter-check input {
  width: auto;
  margin: 0;
}

.admin-staff-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-subtle);
}

.admin-staff-tab {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.45rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.admin-staff-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.admin-staff-tab.is-active {
  color: #fff;
  background: rgba(37, 99, 235, 0.32);
  border-color: rgba(96, 165, 250, 0.4);
}

.admin-staff-panel[hidden] {
  display: none !important;
}

.org-main-panel[hidden] {
  display: none !important;
}

.org-catalog-list-panel[hidden] {
  display: none !important;
}

.org-catalog-toolbar {
  margin-bottom: 0.75rem;
}

.org-catalog-menu-wrap {
  position: relative;
}

.org-catalog-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 20;
  min-width: 12rem;
  padding: 0.35rem;
  border-radius: var(--radius-sm);
  background: var(--surface-elevated, #1e293b);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.org-catalog-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.84rem;
  color: var(--text-primary, #fff);
  background: transparent;
  cursor: pointer;
}

.org-catalog-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.org-catalog-forms {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.org-catalog-forms[hidden] {
  display: none !important;
}

.org-catalog-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex-shrink: 0;
}

.admin-timeoff-balance-out {
  margin-top: 0.4rem;
}

.admin-section-lead {
  margin: 0 0 1rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.admin-section-status {
  margin: 0.65rem 0 0;
  font-size: 0.84rem;
}

.admin-panel-toolbar,
.admin-org-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.admin-subpanel {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(6, 22, 58, 0.45);
  border: 1px solid rgba(120, 170, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.admin-subpanel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-subpanel-title {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #e8f3ff;
  letter-spacing: 0.01em;
}

.admin-subpanel-actions {
  margin: 0.15rem 0 0;
}

.admin-chart-panel,
.org-chart-mount {
  position: relative;
  min-height: 280px;
  max-height: min(70vh, 520px);
  overflow: auto;
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 0.75rem;
  margin: 0 0 1rem;
  width: 100%;
  min-width: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 22, 58, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.org-chart-canvas {
  display: inline-block;
  min-width: 100%;
  min-height: 100%;
  padding: 0.5rem 1rem 1.5rem;
  box-sizing: border-box;
}

.org-catalog-lists {
  margin-bottom: 1rem;
}

.org-catalog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.org-catalog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: rgba(6, 22, 58, 0.45);
  border: 1px solid rgba(120, 170, 255, 0.22);
  font-size: 0.84rem;
}

.org-catalog-item .button {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

.org-catalog-item-meta {
  color: rgba(180, 200, 230, 0.88);
  font-size: 0.76rem;
}

.org-pos-level-hint {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
}

.org-chart-hint {
  margin-top: -0.35rem;
  margin-bottom: 0.65rem;
}

.rbac-roles-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.75rem;
  margin: 0 0 1.15rem;
}

.rbac-role-card {
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: rgba(6, 22, 58, 0.5);
  border: 1px solid rgba(120, 170, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 0.84rem;
  line-height: 1.45;
}

.rbac-role-card strong {
  display: block;
  font-size: 0.92rem;
  color: #f0f6ff;
  margin-bottom: 0.2rem;
}

.rbac-role-card code {
  font-size: 0.78rem;
  padding: 0.12em 0.4em;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  color: rgba(191, 219, 254, 0.95);
}

.rbac-role-card .muted {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.4;
  word-break: break-word;
}

.rbac-role-card .rbac-role-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.76rem;
  color: rgba(180, 200, 230, 0.88);
}

.rbac-effective-out {
  margin: 0;
  min-height: 3.5rem;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(220, 232, 255, 0.9);
}

.rbac-effective-out:empty::before {
  content: "Selecciona un empleado para ver sus permisos efectivos.";
  color: rgba(180, 200, 230, 0.75);
  font-style: italic;
}

.org-chart-root {
  position: relative;
  min-width: max(100%, min-content);
  min-height: min-content;
  width: max-content;
  margin: 0 auto;
}

.org-chart-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.org-chart-tree {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.org-chart-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-chart-children {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 0.5rem;
}

.org-chart-card {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  min-width: 160px;
  max-width: 220px;
  padding: 0.65rem 0.85rem;
  background: rgba(8, 28, 68, 0.82);
  border: 1px solid rgba(96, 165, 250, 0.4);
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 8, 32, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.org-chart-card:hover,
.org-chart-card:focus-visible {
  border-color: rgba(147, 197, 253, 0.85);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
  outline: none;
}

.org-chart-card.org-chart-card-selected {
  border-color: rgba(250, 204, 21, 0.9);
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.35);
}

.org-chart-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  overflow: hidden;
  flex-shrink: 0;
}

.org-chart-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.org-chart-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.org-chart-card-body strong {
  font-size: 0.85rem;
  line-height: 1.2;
}

.org-chart-pos {
  font-size: 0.72rem;
  color: rgba(191, 219, 254, 0.95);
}

.org-chart-dept {
  font-size: 0.68rem;
  color: rgba(148, 163, 184, 0.95);
}

.org-chart-level-tag {
  font-size: 0.65rem;
  color: rgba(191, 219, 254, 0.75);
}

.org-chart-line {
  fill: none;
  stroke: rgba(96, 165, 250, 0.55);
  stroke-width: 2;
}

@media (max-width: 720px) {
  .admin-subpanel-grid {
    grid-template-columns: 1fr;
  }
  .admin-panel-toolbar {
    width: 100%;
    justify-content: stretch;
  }
  .admin-panel-toolbar .button {
    flex: 1 1 auto;
  }
}

.admin-reg-detail {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-reg-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-reg-meta {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(220, 232, 255, 0.92);
}

.admin-reg-compare-wrap {
  margin-bottom: 1rem;
}

.admin-reg-diff-table td.is-changed {
  color: #fde68a;
  font-weight: 600;
}

.admin-reg-diff-table td.is-missing {
  color: rgba(248, 113, 113, 0.95);
  font-style: italic;
}

.admin-reg-summary .admin-reg-dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(8rem, 11rem) 1fr;
  gap: 0.35rem 0.75rem;
  font-size: 0.86rem;
}

.admin-reg-summary .admin-reg-dl dt {
  margin: 0;
  color: rgba(180, 200, 230, 0.9);
}

.admin-reg-summary .admin-reg-dl dd {
  margin: 0;
  color: #f0f6ff;
}

.admin-reg-employee-note {
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(6, 22, 58, 0.55);
  border-left: 3px solid rgba(96, 165, 250, 0.55);
}

.admin-reg-feedback {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.admin-reg-feedback.is-ok {
  background: rgba(22, 101, 52, 0.35);
  border: 1px solid rgba(74, 222, 128, 0.45);
  color: #dcfce7;
}

.admin-reg-feedback.is-warn {
  background: rgba(120, 53, 15, 0.35);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fef3c7;
}

.admin-reg-resolved {
  margin-bottom: 1rem;
}

@media (max-width: 720px) {
  .admin-reg-compare {
    grid-template-columns: 1fr;
  }
  .admin-section-head {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-export-csv {
    width: 100%;
  }
}
