: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: #081a47;
  --bg-2: #0a2f70;
  --bg-3: #4a1f62;
  --glass: rgba(255, 255, 255, 0.16);
  --glass-strong: rgba(255, 255, 255, 0.24);
  --text-light: #f7fbff;
  --text-dark: #0d1b3f;
  --primary: #1e64ff;
  --primary-2: #0e49d6;
  --danger: #d83b3b;
  --success: #1bb96b;
  --warning: #f1a23c;
  --muted: #6f7f9f;
  --radius: 16px;
}

* { 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;
  /* Capas: arriba → abajo. Grano → PNG con alpha (atmósfera) → gradientes. */
  background-color: var(--bg-1);
  background-image:
    radial-gradient(circle at 30% 60%, rgba(255, 255, 255, 0.1) 1.6px, transparent 2px),
    radial-gradient(circle at 78% 40%, rgba(255, 255, 255, 0.1) 1.4px, transparent 2px),
    var(--app-bg-ambient),
    radial-gradient(circle at 15% 20%, rgba(66, 122, 255, 0.25), transparent 36%),
    radial-gradient(circle at 84% 32%, rgba(165, 86, 255, 0.22), transparent 32%),
    linear-gradient(132deg, var(--bg-1), var(--bg-2) 48%, var(--bg-3));
  background-size:
    180px 180px,
    220px 220px,
    cover,
    auto,
    auto,
    auto;
  background-position:
    0 0,
    0 0,
    center,
    0 0,
    0 0,
    0 0;
  background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, 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.9rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
  background: rgba(4, 19, 56, 0.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.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, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.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.2rem 0 0;
  font-size: 0.8rem;
  color: rgba(240, 246, 255, 0.92);
}

.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: 1rem auto 2rem;
  padding: 0 0.9rem;
}

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

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

.glass-card {
  background: var(--glass);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px rgba(1, 10, 35, 0.32);
}

.employee-card {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-dark);
}

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

a.button,
.button {
  border: 0;
  border-radius: 11px;
  padding: 0.62rem 1rem;
  font-size: 0.92rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #fff !important;
  cursor: pointer;
  transition: transform .14s ease, filter .14s ease;
  background: linear-gradient(138deg, var(--primary), var(--primary-2));
}

.button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.button:disabled,
.button.is-disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.button.secondary { background: linear-gradient(138deg, #4b617f, #384e6e); }
.button.primary { background: linear-gradient(138deg, var(--primary), var(--primary-2)); }
.button.danger { background: linear-gradient(138deg, #f14d4d, #cc3131); }
.top-logout { white-space: nowrap; }

.greeting {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.meta {
  list-style: none;
  padding: 0;
  margin: 0.7rem 0 0;
  display: grid;
  gap: 0.2rem;
}

.meta li { font-size: 0.92rem; }
.meta .k { color: var(--muted); margin-right: 0.3rem; }

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

.employee-day-info {
  text-align: right;
}

.jornada {
  margin-top: 1rem;
  border-top: 1px solid rgba(36, 59, 96, 0.15);
  padding-top: 0.9rem;
}

.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-actions {
  display: grid;
  gap: 0.65rem;
}

.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.75rem;
  color: #f2f8ff;
}

.admin-h3 { font-size: 0.98rem; margin-top: 1.1rem; }

.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-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 select,
.admin-form select {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 9px;
  padding: 0.48rem 0.55rem;
  font-size: 0.92rem;
}

/* 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: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 0.86rem;
  background: rgba(255, 255, 255, 0.12);
}

.admin-table th,
.admin-table td {
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.45rem 0.55rem;
  vertical-align: top;
}

.admin-table thead th {
  background: rgba(236, 245, 255, 0.17);
  color: #f3f8ff;
  font-weight: 700;
}

.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 rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 9px;
  padding: 0.48rem 0.55rem;
  font-size: 0.92rem;
}
.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-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}
.dash-kpi {
  margin: 0;
  padding: 0.85rem 1rem;
}
.dash-kpi-wide { grid-column: span 2; }
.dash-kpi-title {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(240, 248, 255, 0.92);
}
.dash-kpi-value {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: #fff;
}
.dash-kpi-sub { margin: 0.35rem 0 0; font-size: 0.78rem; line-height: 1.35; }

.dash-light { margin-left: 0.45rem; font-size: 0.85rem; 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.85rem;
}
.dash-chart-card { margin: 0; padding: 0.85rem 1rem; }
.dash-chart-full { margin-top: 0.85rem; padding: 0.85rem 1rem; }
.dash-canvas-wrap { position: relative; height: 240px; max-width: 100%; }
.dash-canvas-tall { height: 280px; }

@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-reports,
#chapter-requests,
#section-ot,
#chapter-company,
#section-company,
#chapter-staff,
#section-users,
#section-sched,
#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: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 0.7rem 0.65rem;
  font-size: 0.86rem;
  max-height: none;
}

@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-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-list ul { list-style: none; margin: 0.15rem 0 0.4rem 0.45rem; padding: 0; }
.admin-sidenav a {
  color: #d8e8ff;
  text-decoration: none;
  display: inline-block;
  padding: 0.1rem 0;
}
.admin-sidenav a:hover { text-decoration: underline; color: #fff; }
.admin-sidenav a[aria-current="page"] { font-weight: 700; }
.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;
}
.admin-main-col {
  width: 100%;
  margin: 0;
  padding: 0;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.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:
    radial-gradient(circle at 30% 60%, rgba(255, 255, 255, 0.1) 1.6px, transparent 2px),
    radial-gradient(circle at 78% 40%, rgba(255, 255, 255, 0.1) 1.4px, transparent 2px),
    var(--app-bg-ambient),
    radial-gradient(ellipse 100% 80% at 50% -5%, rgba(50, 88, 160, 0.4), transparent 50%),
    radial-gradient(ellipse 90% 60% at 50% 20%, rgba(20, 45, 100, 0.35), transparent 55%),
    linear-gradient(160deg, #040d28 0%, #0a1f4d 42%, #0f2a5c 100%);
  background-size:
    180px 180px,
    220px 220px,
    cover,
    auto,
    auto,
    auto;
  background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed, fixed, fixed, fixed;
  background-position:
    0 0,
    0 0,
    center,
    0 0,
    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.4rem 1.45rem 1.55rem;
  border-radius: 1.5rem;
  background: rgba(10, 24, 58, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 48px rgba(0, 6, 24, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

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

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

/* 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;
}
