:root {
  --rco-navy: #0f2a4c;
  --rco-navy-dark: #0a1d36;
  --rco-teal: #1c93a8;
  --rco-teal-light: #4fb8c9;
  --rco-gray: #8a95a1;
  --rco-bg-light: #f4f8fa;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1c2a3a;
  background-color: #ffffff;
}

/* Los navegadores no heredan la tipografia del body en controles de
   formulario (button, input, select, textarea) por defecto -- sin esto
   se renderizan con la fuente del sistema, no Poppins. */
button, input, select, textarea {
  font-family: inherit;
}

/* --- Navbar --- */
.navbar-rco {
  background-color: #ffffff;
  box-shadow: 0 2px 12px rgba(15, 42, 76, 0.08);
}
.navbar-rco .navbar-brand img { height: 42px; }
.navbar-rco .nav-link {
  color: var(--rco-navy);
  font-weight: 500;
  margin-left: 0.5rem;
}
.navbar-rco .nav-link:hover { color: var(--rco-teal); }
.btn-rco-primary {
  background-color: var(--rco-teal);
  border-color: var(--rco-teal);
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 1.6rem;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.btn-rco-primary:hover {
  background-color: var(--rco-navy);
  border-color: var(--rco-navy);
  color: #fff;
}
.btn-rco-outline {
  border: 2px solid var(--rco-navy);
  color: var(--rco-navy);
  font-weight: 600;
  padding: 0.55rem 1.5rem;
  border-radius: 8px;
  background: transparent;
}
.btn-rco-outline:hover {
  background-color: var(--rco-navy);
  color: #fff;
}

/* --- Hero --- */
.hero-rco {
  background: linear-gradient(135deg, var(--rco-navy) 0%, var(--rco-navy-dark) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 5rem 0 6rem;
}
.hero-rco::after {
  content: '';
  position: absolute;
  right: -10%;
  top: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(28,147,168,0.35) 0%, rgba(28,147,168,0) 70%);
  animation: rcoFloat 8s ease-in-out infinite;
}
.hero-rco::before {
  content: '';
  position: absolute;
  left: -15%;
  bottom: -30%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79,184,201,0.14) 0%, rgba(79,184,201,0) 70%);
  animation: rcoFloat 9s ease-in-out infinite reverse;
}
.hero-rco h1 {
  font-weight: 700;
  font-size: 2.75rem;
  line-height: 1.15;
}
.hero-rco .text-teal { color: var(--rco-teal-light); }
.hero-rco p.lead {
  color: #c9d6e2;
  font-size: 1.15rem;
}
.badge-free {
  background-color: var(--rco-teal);
  color: #fff;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

/* --- Secciones --- */
.section-title {
  font-weight: 700;
  color: var(--rco-navy);
}
.section-subtitle { color: var(--rco-gray); }

.feature-card {
  border: none;
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  height: 100%;
  background: var(--rco-bg-light);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(15, 42, 76, 0.12);
}
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background-color: var(--rco-teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

/* --- Pricing --- */
.pricing-card {
  border: 1px solid #e3e9ee;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  height: 100%;
  background: #fff;
  transition: all 0.15s ease;
}
.pricing-card.featured {
  border: 2px solid var(--rco-teal);
  box-shadow: 0 12px 32px rgba(28, 147, 168, 0.18);
  position: relative;
}
.pricing-card .price {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--rco-navy);
}
.pricing-card .price small {
  font-size: 1rem;
  font-weight: 400;
  color: var(--rco-gray);
}
.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--rco-teal);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* --- Form (registro) --- */
.card-registro {
  border: none;
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(15, 42, 76, 0.12);
}
.form-label { font-weight: 600; color: var(--rco-navy); font-size: 0.92rem; }
.form-control, .form-select {
  border-radius: 8px;
  border: 1.5px solid #dde4ea;
  padding: 0.65rem 0.9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--rco-teal);
  box-shadow: 0 0 0 0.2rem rgba(28, 147, 168, 0.15);
}
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #dde4ea;
}
.step-dot.active { background: var(--rco-teal); width: 28px; border-radius: 6px; }

/* --- Footer --- */
footer.footer-rco {
  background-color: var(--rco-navy-dark);
  color: #a9b8c7;
  padding: 2.5rem 0;
}
footer.footer-rco a { color: #d7e2ea; text-decoration: none; }
footer.footer-rco a:hover { color: var(--rco-teal-light); }

/* ======================================================
   --- Portal v2: sidebar, tarjetas y animaciones ---
   ====================================================== */

@keyframes rcoPopIn { 0% { opacity: 0; transform: translateY(10px) scale(.98); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes rcoPulseDot { 0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,122,.45); } 50% { box-shadow: 0 0 0 7px rgba(22,163,122,0); } }
@keyframes rcoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes rcoFadeRow { 0% { opacity: 0; transform: translateY(4px); } 100% { opacity: 1; transform: translateY(0); } }

.app-shell { min-height: 100vh; display: flex; }
.app-main { flex: 1; min-width: 0; padding: 32px 40px 60px; position: relative; }
.app-main-mesh {
  position: absolute; top: -40px; right: 0; width: 520px; height: 360px; pointer-events: none; z-index: 0;
  background: radial-gradient(circle at 70% 30%, rgba(28,147,168,.16) 0%, rgba(28,147,168,0) 65%),
              radial-gradient(circle at 40% 70%, rgba(15,42,76,.10) 0%, rgba(15,42,76,0) 60%);
}
.app-main-content { position: relative; z-index: 1; }

.sidebar-rco {
  width: 252px; flex: 0 0 252px; box-sizing: border-box;
  background: linear-gradient(190deg, var(--rco-navy) 0%, var(--rco-navy-dark) 100%);
  display: flex; flex-direction: column; padding: 28px 18px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand {
  display: block; background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 24px;
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
}
.sidebar-brand img { width: 100%; height: auto; display: block; }

.sidebar-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  color: #aebdd0; font-weight: 500; font-size: 14px; text-decoration: none; transition: background .15s ease, color .15s ease;
}
.sidebar-nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav-item.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.sidebar-nav-item.active svg { stroke: var(--rco-teal-light); }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.1); margin: 14px 4px; }

.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.07); }
.sidebar-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--rco-teal-light); flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 13px;
}
.sidebar-user-info { min-width: 0; flex: 1; }
.sidebar-user-name { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: #8fa2b8; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  color: #aebdd0; transition: background .15s ease, color .15s ease;
}
.sidebar-logout:hover { background: rgba(255,255,255,.1); color: #fff; }

.topbar-rco { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; }
.topbar-greeting { margin: 0; font-size: 26px; font-weight: 800; color: var(--rco-navy); }
.topbar-sub { margin: 4px 0 0; color: var(--rco-gray); font-size: 14.5px; }
.plan-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--rco-navy) 0%, var(--rco-navy-dark) 100%); color: #fff;
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.plan-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rco-teal-light); }

.stat-card {
  background: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 10px 30px rgba(15,42,76,.06);
  transition: transform .18s ease, box-shadow .18s ease; animation: rcoPopIn .4s ease both;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(15,42,76,.12); }
.stat-card-icon { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.stat-card-value { font-size: 34px; font-weight: 800; margin-top: 6px; color: var(--rco-navy); }
.stat-card-value small { font-size: 16px; font-weight: 600; color: var(--rco-gray); }
.stat-card-bar { height: 6px; border-radius: 999px; background: var(--rco-bg-light); margin-top: 16px; overflow: hidden; }
.stat-card-bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--rco-teal) 0%, var(--rco-teal-light) 100%); }
.stat-card-note { margin-top: 16px; font-size: 12.5px; color: var(--rco-gray); }
.stat-card-live { display: flex; align-items: center; gap: 6px; margin-top: 16px; font-size: 12.5px; color: #16a37a; font-weight: 600; }
.stat-card-live-dot { width: 7px; height: 7px; border-radius: 50%; background: #16a37a; animation: rcoPulseDot 1.8s infinite; }

.banner-danger {
  background: linear-gradient(135deg, #c0392b 0%, #a8311f 100%); border-radius: 18px; padding: 18px 22px;
  display: flex; align-items: center; gap: 14px; color: #fff; margin-bottom: 26px; box-shadow: 0 10px 28px rgba(192,57,43,.25);
}
.banner-danger-icon { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.banner-danger-cta { background: #fff; color: #c0392b; font-weight: 700; font-size: 12.5px; padding: 9px 16px; border-radius: 999px; white-space: nowrap; text-decoration: none; }

.checador-card { background: linear-gradient(135deg, var(--rco-navy) 0%, var(--rco-navy-dark) 100%); border-radius: 22px; padding: 26px; color: #fff; position: relative; overflow: hidden; }
.checador-card-blob { position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(79,184,201,.35) 0%, rgba(79,184,201,0) 70%); top: -80px; right: -60px; animation: rcoFloat 6s ease-in-out infinite; }
.checador-card-body { position: relative; }
.checador-card-live { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 12px; font-weight: 700; letter-spacing: .05em; color: var(--rco-teal-light); text-transform: uppercase; }
.checador-card-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a37a; animation: rcoPulseDot 1.8s infinite; }
.checador-link-row { display: flex; gap: 8px; margin-bottom: 8px; }
.checador-link-url { flex: 1; background: rgba(255,255,255,.1); border-radius: 12px; padding: 11px 14px; font-size: 12.5px; color: #dbe5ee; font-family: monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checador-link-copy { background: var(--rco-teal); border: none; color: #fff; font-weight: 700; font-size: 12.5px; padding: 0 18px; border-radius: 12px; cursor: pointer; transition: background .15s ease; }
.checador-link-copy:hover { background: var(--rco-teal-light); }
.checador-link-open { display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.1); border-radius: 12px; padding: 0 14px; color: #fff; text-decoration: none; font-size: 12.5px; font-weight: 600; }
.checador-link-qr { display: flex; align-items: center; justify-content: center; appearance: none; -webkit-appearance: none; background: rgba(255,255,255,.1); border: none; border-radius: 12px; padding: 0 14px; color: #fff; cursor: pointer; font-size: 12.5px; font-weight: 600; transition: background .15s ease; }
.checador-link-qr:hover { background: rgba(255,255,255,.18); }

.activity-card { background: #fff; border-radius: 22px; padding: 24px; box-shadow: 0 10px 30px rgba(15,42,76,.06); }
.activity-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--rco-bg-light); animation: rcoFadeRow .25s ease both; }
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }
.activity-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; font-weight: 700; font-size: 12px; }
.activity-name { font-size: 13.5px; font-weight: 600; color: var(--rco-navy); }
.activity-detail { font-size: 12px; color: var(--rco-gray); }
.activity-time { font-size: 12px; color: var(--rco-gray); white-space: nowrap; }

/* --- Generic panel / table / pill kit (Empleados, Horarios, etc.) --- */
.panel-card { background: #fff; border-radius: 20px; box-shadow: 0 10px 30px rgba(15,42,76,.06); overflow: hidden; }
.panel-card-pad { padding: 24px; }

.btn-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 700; text-decoration: none; border: none; cursor: pointer; transition: all .15s ease; white-space: nowrap;
}
.btn-pill-outline { background: #fff; color: var(--rco-navy); border: 1.5px solid var(--rco-border, #e6edf2); }
.btn-pill-outline:hover { border-color: var(--rco-teal); color: var(--rco-teal); }
.btn-pill-primary { background: var(--rco-teal); color: #fff; box-shadow: 0 10px 24px rgba(28,147,168,.3); }
.btn-pill-primary:hover { background: var(--rco-navy); color: #fff; }

.table-modern { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-modern thead th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--rco-gray);
  font-weight: 700; padding: 14px 16px; background: #fbfcfd; border-bottom: 1px solid #eef2f5;
}
.table-modern tbody td { padding: 14px 16px; font-size: 13.5px; border-top: 1px solid #eef2f5; vertical-align: middle; }
.table-modern tbody tr { transition: background .12s ease; }
.table-modern tbody tr:hover td { background: #f7fafb; }

.avatar-chip {
  width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11.5px; flex: 0 0 auto;
}
.status-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.status-chip-on { background: rgba(22,163,122,.12); color: #16a37a; }
.status-chip-off { background: rgba(100,116,139,.12); color: var(--rco-gray); }
.status-chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.btn-ghost-sm {
  background: transparent; border: 1.5px solid #e6edf2; color: var(--rco-navy); font-size: 12px; font-weight: 600;
  padding: 7px 13px; border-radius: 10px; cursor: pointer; transition: all .15s ease;
}
.btn-ghost-sm:hover { border-color: var(--rco-teal); color: var(--rco-teal); }
.btn-ghost-sm.danger:hover { border-color: #c0392b; color: #c0392b; }

.select-chip {
  border: 1.5px solid #e6edf2; border-radius: 10px; padding: 7px 10px; font-size: 12.5px; color: var(--rco-navy);
  background: #fbfcfd; font-weight: 500;
}
.select-chip:focus { border-color: var(--rco-teal); outline: none; }

/* --- Auth pages (login, registro, recuperar, restablecer) --- */
.auth-body {
  min-height: 100vh; margin: 0; position: relative; overflow-x: hidden;
  background: var(--rco-bg-light);
}
.auth-mesh {
  position: absolute; top: -120px; left: 50%; transform: translateX(-50%); width: 900px; height: 500px;
  pointer-events: none; z-index: 0;
  background: radial-gradient(circle at 30% 30%, rgba(28,147,168,.12) 0%, rgba(28,147,168,0) 60%),
              radial-gradient(circle at 70% 60%, rgba(15,42,76,.08) 0%, rgba(15,42,76,0) 60%);
}
.auth-topbar { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 1.5rem clamp(1rem, 5vw, 3rem); }
.auth-topbar img { height: 38px; }
.auth-wrap { position: relative; z-index: 1; display: flex; justify-content: center; padding: 1rem 1rem 4rem; }
.auth-card { animation: rcoPopIn .4s ease both; }
.badge-pill { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; color: #fff; }

.filter-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.filter-field label { display: block; font-size: 12px; font-weight: 600; color: var(--rco-navy); margin-bottom: 5px; }

/* --- Landing page: scroll-reveal --- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* --- Ayuda --- */
.ayuda-search-wrap { position: relative; max-width: 480px; }
.ayuda-search-wrap svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--rco-gray); pointer-events: none; }
.ayuda-search { width: 100%; padding: 13px 16px 13px 44px; border-radius: 14px; border: 1px solid #e3e9ee; font-size: 14px; font-family: inherit; background: #fff; }
.ayuda-search:focus { outline: none; border-color: var(--rco-teal); box-shadow: 0 0 0 3px rgba(28,147,168,.12); }
.ayuda-jump { display: flex; gap: 8px; margin: 16px 0 22px; flex-wrap: wrap; }
.ayuda-jump a { background: #fff; border: 1px solid #e3e9ee; border-radius: 12px; padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--rco-navy); text-decoration: none; transition: all .15s ease; }
.ayuda-jump a:hover { border-color: var(--rco-teal); color: var(--rco-teal); }
.ayuda-section-title { display: flex; align-items: center; gap: 10px; color: var(--rco-navy); font-size: 15px; font-weight: 700; margin: 36px 0 14px; scroll-margin-top: 90px; }
.ayuda-section-title svg { color: var(--rco-teal); flex: 0 0 auto; }
.ayuda-item { border-bottom: 1px solid #eef2f5; padding: 14px 4px; }
.ayuda-item:last-child { border-bottom: none; }
.ayuda-item summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--rco-navy); list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ayuda-item summary::-webkit-details-marker { display: none; }
.ayuda-item summary::after { content: '+'; font-size: 20px; line-height: 1; color: var(--rco-teal); font-weight: 400; flex: 0 0 auto; transition: transform .15s ease; }
.ayuda-item[open] summary::after { transform: rotate(45deg); }
.ayuda-item-body { padding: 10px 0 0; font-size: 13.5px; color: #51606f; line-height: 1.65; }
.ayuda-item-body ol, .ayuda-item-body ul { padding-left: 20px; margin: 8px 0; }
.ayuda-item-body li { margin-bottom: 4px; }
.ayuda-item-body code { background: #f1f5f8; padding: 1px 6px; border-radius: 5px; font-size: 12.5px; color: var(--rco-navy); }
.ayuda-glosario-term { font-weight: 700; color: var(--rco-navy); font-size: 14px; }
.ayuda-hidden { display: none !important; }
.ayuda-empty { text-align: center; color: var(--rco-gray); padding: 40px 0; font-size: 13.5px; }
