/*
  BinkBee Dashboard & Check-in – Optimized Stylesheet
  Extraído de main.css para uso específico en dashboard.html y checkin.html
*/

:root {
  --blue: #61bff7;
  --blue-dk: #3aabf0;
  --yellow: #ffd90c;
  --black: #1e1e1f;
  --grey: #f0f5f7;
  --white: #ffffff;
  --border: #e4eaee;
  --muted: #7a8fa6;
  --text: #1e1e1f;

  --sidebar-w: 240px;
  --top-h: 58px;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .07), 0 1px 2px rgba(0, 0, 0, .04);
}

/* RESET & TOKENS */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Varela', sans-serif;
  background: var(--grey);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── TOPBAR ──────────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  z-index: 200;
  height: var(--top-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 18px;
}

.topbar-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 18px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: .58rem;
  letter-spacing: .07em;
  font-weight: 600;
  transition: color .15s, background .15s;
  cursor: pointer;
  border: none;
  background: none;
  font-family: 'Varela', sans-serif;
}

.nav-item i {
  font-size: 1.05rem;
}

.nav-item:hover {
  color: var(--blue-dk);
}

.nav-item.active {
  color: var(--blue-dk);
}

.nav-crear {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 7px 22px;
  border-radius: 50px;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: none;
  font-family: 'Varela', sans-serif;
  color: var(--white);
  background: linear-gradient(135deg, #61bff7 0%, #4db8f5 50%, #73c8f8 100%);
  box-shadow: 0 4px 16px rgba(97, 191, 247, 0.4), 0 0 20px rgba(97, 191, 247, 0.2);
  transition: all 0.3s ease-out;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.nav-crear i {
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-crear span {
  transition: opacity 0.3s ease-out;
}

.nav-crear:hover {
  background: linear-gradient(135deg, #4db8f5 0%, #3daef3 50%, #61bff7 100%);
  box-shadow: 0 6px 24px rgba(97, 191, 247, 0.5), 0 0 30px rgba(97, 191, 247, 0.3);
  transform: scale(1.03) translateY(-1px);
}

.nav-crear:hover i {
  transform: rotate(90deg);
}

.nav-crear:hover span {
  opacity: 0.95;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.1rem;
  position: relative;
  display: flex;
  align-items: center;
}

.notif-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  background: var(--blue);
  color: var(--white);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.topbar-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.35rem;
  cursor: pointer;
  color: var(--black);
  margin-right: 8px;
  flex-shrink: 0;
}

/* ─── SIDEBAR ──────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 150;
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  height: var(--top-h);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  background: var(--white);
  transition: background 0.15s;
  flex-shrink: 0;
}

.sidebar-user:hover {
  background: var(--grey);
}

.sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 700;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-uname {
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-urole {
  font-size: .68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-chevron {
  color: var(--muted);
  font-size: .7rem;
  flex-shrink: 0;
  transition: transform .2s;
}

/* User dropdown menu */
.sidebar-user {
  position: relative;
}

.sidebar-user-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  display: none;
  flex-direction: column;
  padding: 6px 0;
  z-index: 160;
}

.sidebar-user.is-open .sidebar-user-menu {
  display: flex;
}

.sidebar-user.is-open .sidebar-chevron {
  transform: rotate(180deg);
}

.sidebar-user-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--muted);
  font-size: .8rem;
  transition: background .12s, color .12s;
}

.sidebar-user-menu a:hover {
  background: var(--grey);
  color: var(--blue);
}

.sidebar-user-menu a i {
  font-size: .95rem;
  width: 18px;
}

.menu-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 16px;
}

.sidebar-section {
  padding: 14px 0 4px;
}

.sidebar-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 6px;
  font-size: .58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.sidebar-section-label i {
  font-size: .75rem;
  cursor: pointer;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  text-decoration: none;
  color: var(--muted);
  font-size: .8rem;
  transition: background .12s, color .12s;
  position: relative;
}

.sidebar-link i.icon {
  font-size: .95rem;
  width: 18px;
  flex-shrink: 0;
}

.sidebar-section.plan-general .sidebar-link i.icon {
  color: var(--blue);
}

.sidebar-link:hover {
  background: var(--grey);
  color: var(--blue);
}

.sidebar-link.active {
  color: var(--blue);
  background: #e8f6fe;
  font-weight: 700;
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 3px;
  background: var(--blue);
  border-radius: 0 3px 3px 0;
}

.sidebar-link .lock-icon {
  margin-left: auto;
  font-size: .7rem;
  color: #c8d5de;
}

.sidebar-link.locked {
  color: #c0cdd8;
  pointer-events: none;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 12px 14px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--border);
}

.btn-patrocinio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #e8b910;
  color: var(--white);
  border: none;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 10px;
  font-family: 'Varela', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 3px 10px rgba(232, 185, 16, 0.3);
}

.btn-patrocinio img {
  width: 24px;
  height: 24px;
}

.btn-patrocinio:hover {
  transform: translateY(-2px);
  background: #d4a50f;
  box-shadow: 0 5px 15px rgba(232, 185, 16, 0.45);
}

.btn-premium {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #61bff7;
  color: var(--white);
  border: none;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 10px;
  font-family: 'Varela', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 3px 10px rgba(97, 191, 247, 0.3);
}

.btn-premium img {
  width: 24px;
  height: 24px;
}

.btn-premium:hover {
  transform: translateY(-2px);
  background: #4aaeea;
  box-shadow: 0 5px 15px rgba(97, 191, 247, 0.45);
}

.collapse-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: .7rem;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  padding: 6px 0 2px;
  width: 100%;
  transition: color 0.2s;
}

.collapse-link:hover {
  color: var(--blue);
}

/* Sidebar colapsado */
body.sidebar-collapsed .sidebar {
  width: 72px;
}

body.sidebar-collapsed .topbar {
  left: 72px;
}

body.sidebar-collapsed .main {
  margin-left: 72px;
}

body.sidebar-collapsed .sidebar-user-info,
body.sidebar-collapsed .sidebar-chevron,
body.sidebar-collapsed .sidebar-section-label,
body.sidebar-collapsed .sidebar-link span,
body.sidebar-collapsed .btn-patrocinio span,
body.sidebar-collapsed .btn-premium span,
body.sidebar-collapsed .collapse-link span {
  display: none;
}

body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  font-size: 0;
}

body.sidebar-collapsed .sidebar-user {
  justify-content: center;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 30, 31, .38);
  z-index: 140;
}

.overlay.open {
  display: block;
}

/* ─── MAIN ─────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  margin-top: var(--top-h);
  padding: 22px 26px 36px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  color: var(--muted);
  margin-bottom: 5px;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--blue);
}

.breadcrumb .sep {
  font-size: .6rem;
}

.page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
}

.page-title {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 3px;
}

.page-sub {
  font-size: .78rem;
  color: var(--muted);
}

.page-actions {
  display: flex;
  gap: 8px;
  padding-top: 6px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: .75rem;
  color: var(--text);
  cursor: pointer;
  font-family: 'Varela', sans-serif;
  transition: border-color .15s, color .15s;
}

.action-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ─── AI BOX ───────────────────────────────────────────── */
.ai-box {
  margin-bottom: 20px;
  position: relative;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(29, 161, 242, 0.25);
  transition: all 0.3s ease-in-out;
}

.ai-box.is-open {
  border-radius: 24px;
}

.ai-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(135deg, #1da1f2 0%, #0d8ce8 50%, #3ab4f7 100%);
  border-radius: 50px;
  transition: all 0.3s ease-in-out;
}

.ai-box.is-open .ai-header {
  border-radius: 24px 24px 0 0;
}

.ai-header:hover {
  background: linear-gradient(135deg, #0d8ce8 0%, #0a7cd4 50%, #1da1f2 100%);
}

.ai-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-avatar img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.ai-header-content {
  flex: 1;
  min-width: 0;
}

.ai-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 2px;
}

.ai-sub {
  font-size: .71rem;
  color: rgba(255, 255, 255, .85);
  line-height: 1.3;
}

.ai-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, .9);
  font-size: 1.15rem;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease-in-out;
  flex-shrink: 0;
}

.ai-box.is-open .ai-toggle {
  transform: rotate(180deg);
}

.ai-body-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease-in-out;
}

.ai-box.is-open .ai-body-wrapper {
  grid-template-rows: 1fr;
}

.ai-body {
  min-height: 0;
  overflow: hidden;
}

.ai-box.is-open .ai-body {
  background: var(--white);
  border-radius: 0 0 24px 24px;
  border: 1px solid #e5e7eb;
  border-top: none;
}

.ai-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.ai-box.is-open .ai-chat {
  padding: 16px;
}

.ai-message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ai-message.user {
  flex-direction: row-reverse;
}

.ai-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-message-avatar img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.ai-message-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: .8rem;
  line-height: 1.4;
  max-width: 70%;
}

.ai-message.bot .ai-message-bubble {
  background: #f3f4f6;
  color: #374151;
}

.ai-message.user .ai-message-bubble {
  background: linear-gradient(135deg, #1da1f2 0%, #0d8ce8 100%);
  color: var(--white);
}

.ai-input-container {
  padding: 12px 16px;
  border-top: 1px solid #e5e7eb;
}

.ai-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid #d1d5db;
  border-radius: 50px;
  padding: 4px 4px 4px 16px;
}

.ai-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Varela', sans-serif;
  font-size: .82rem;
  outline: none;
  color: var(--black);
  padding: 6px 0;
}

.ai-input::placeholder {
  color: var(--muted);
}

.ai-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1da1f2 0%, #0d8ce8 100%);
  border: none;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ai-send-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 8px rgba(29, 161, 242, 0.4);
}

.ai-send-btn i {
  font-size: .9rem;
}

.ai-suggestions {
  padding: 12px 16px 16px;
}

.ai-suggestions-label {
  font-size: .65rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .05em;
  margin-bottom: 8px;
}

.ai-suggestions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ai-suggestion-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Varela', sans-serif;
}

.ai-suggestion-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ai-suggestion-btn i {
  font-size: 1.1rem;
  color: #1da1f2;
}

.ai-suggestion-btn span {
  font-size: .7rem;
  color: #374151;
  text-align: center;
  line-height: 1.2;
}

.ai-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
}

.ai-typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
  animation: typing-bounce 1.4s infinite;
}

.ai-typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-bounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }

  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* ─── METRIC CARDS ─────────────────────────────────────── */
.metrics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 13px;
  margin-bottom: 22px;
}

.mcard {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 15px 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.mcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.mcard-icon {
  font-size: 1rem;
}

.mcard-delta {
  font-size: .63rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 1px;
  color: #22c55e;
}

.mcard-label {
  font-size: .62rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 1px;
}

.mcard-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.mcard-sub {
  font-size: .6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: 1px;
}

.mcard-spark {
  margin-top: 10px;
  height: 28px;
}

.mcard-spark svg {
  width: 100%;
  height: 100%;
}

.ic-blue {
  color: var(--blue);
}

.ic-purple {
  color: #a78bfa;
}

.ic-amber {
  color: #f59e0b;
}

.ic-green {
  color: #22c55e;
}

.ic-sky {
  color: #38bdf8;
}

.ic-rose {
  color: #fb7185;
}

/* ─── BOTTOM GRID ──────────────────────────────────────── */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-head-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.panel-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e8f6fe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: var(--blue);
  flex-shrink: 0;
}

.panel-title {
  font-size: .88rem;
  font-weight: 700;
  margin-bottom: 1px;
}

.panel-sub {
  font-size: .68rem;
  color: var(--muted);
}

.ver-todos {
  font-size: .74rem;
  color: var(--blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  margin-top: 3px;
}

/* ─── TABLE ─────────────────────────────────────────────── */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: var(--grey);
  border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 540px;
}

thead th {
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  padding: 0 8px 10px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

thead th:first-child {
  text-align: left;
}

tbody tr {
  border-bottom: 1px solid var(--border);
}

tbody tr:last-child {
  border-bottom: none;
}

td {
  padding: 11px 8px;
  vertical-align: middle;
}

td:first-child {
  vertical-align: top;
  padding-top: 13px;
}

td:not(:first-child) {
  text-align: center;
  font-size: .83rem;
}

.evt-name {
  font-size: .83rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.evt-date {
  font-size: .68rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 5px;
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.progress-label {
  font-size: .65rem;
  color: var(--muted);
  white-space: nowrap;
}

.progress-bar {
  flex: 1;
  height: 5px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 4px;
}

.progress-pct {
  font-size: .65rem;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .66rem;
  font-weight: 700;
}

.pill-live {
  background: #dcfce7;
  color: #15803d;
}

.pill-next {
  background: var(--grey);
  color: var(--muted);
}

.pill-done {
  background: #f3f4f6;
  color: #6b7280;
}

/* ─── ACTIVITY LIST ─────────────────────────────────────── */
.act-tabs {
  display: flex;
  gap: 3px;
}

.act-tab {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Varela', sans-serif;
  font-size: .7rem;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--muted);
  transition: background .12s, color .12s;
}

.act-tab.active {
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
}

.act-tab:hover:not(.active) {
  background: var(--grey);
  color: var(--text);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.act-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.act-item>div:not(.act-ico) {
  flex: 1;
  min-width: 0;
}

.act-ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
}

.act-ico.blue {
  background: #e8f6fe;
  color: var(--blue);
}

.act-ico.sky {
  background: #e0f2fe;
  color: #0ea5e9;
}

.act-ico.purple {
  background: #f3e8ff;
  color: #8b5cf6;
}

.act-ico.green {
  background: #dcfce7;
  color: #16a34a;
}

.act-text {
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 3px;
}

.act-meta {
  font-size: .67rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.act-tag {
  font-size: .63rem;
  padding: 1px 7px;
  border-radius: 20px;
  font-weight: 700;
}

.tag-blue {
  background: #dbeafe;
  color: #2563eb;
}

.tag-green {
  background: #dcfce7;
  color: #15803d;
}

.tag-sky {
  background: #e0f2fe;
  color: #0284c7;
}

.ver-activity {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: .74rem;
  color: var(--blue);
  text-decoration: none;
}

.ver-activity:hover {
  text-decoration: underline;
}

/* ─── CHECK-IN SPECIFIC ─────────────────────────────────── */
.ci-event-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ci-event-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}

.ci-event-card:hover {
  border-color: var(--blue);
  box-shadow: 0 2px 10px rgba(97, 191, 247, .18);
}

.ci-event-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  flex-shrink: 0;
}

.ci-event-info {
  flex: 1;
  min-width: 0;
}

.ci-event-name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.ci-event-meta {
  font-size: .72rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.ci-event-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ci-event-arrow {
  color: var(--muted);
  font-size: .8rem;
  transition: transform .15s, color .15s;
}

.ci-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.ci-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 16px 18px;
  text-align: center;
}

.ci-stat-icon {
  font-size: 1.7rem;
  line-height: 1;
}

.ci-stat-icon--green {
  color: #22c55e;
}

.ci-stat-icon--yellow {
  color: #f59e0b;
}

.ci-stat-icon--blue {
  color: var(--blue);
}

.ci-stat-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.ci-stat-label {
  font-size: .62rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .06em;
}

.ci-toolbar {
  margin-bottom: 14px;
}

.ci-qr-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-family: 'Varela', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.ci-qr-btn:hover {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(97, 191, 247, .12);
}

.ci-search-wrap {
  position: relative;
  margin-bottom: 16px;
}

.ci-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .88rem;
  pointer-events: none;
}

.ci-search-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  font-family: 'Varela', sans-serif;
  font-size: .82rem;
  color: var(--text);
  outline: none;
}

.ci-search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(97, 191, 247, .12);
}

.ci-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ci-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  box-shadow: var(--shadow);
}

.ci-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
}

.ci-info {
  flex: 1;
  min-width: 0;
}

.ci-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
}

.ci-sub {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 1px;
}

.ci-btn {
  padding: 7px 18px;
  border: none;
  border-radius: 7px;
  background: var(--blue);
  color: var(--white);
  font-family: 'Varela', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}

.ci-done-time {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .8rem;
  font-weight: 600;
  color: #22c55e;
}

.ci-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  font-size: .9rem;
  cursor: pointer;
}

/* ─── QR SCANNER PANEL ─────────────────────────────────── */
.ci-qr-panel {
  margin-bottom: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ci-qr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.ci-qr-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  font-weight: 700;
  color: var(--blue-dk);
  background: #e8f6fe;
  border: 1px solid rgba(97, 191, 247, .35);
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}

.ci-qr-hint {
  font-size: .7rem;
  color: var(--muted);
}

.ci-qr-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
}

.ci-qr-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0f172a;
}

.ci-qr-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ci-qr-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 3px solid #61bff7;
  filter: drop-shadow(0 0 8px rgba(97, 191, 247, .45));
}

.ci-qr-corner--tl {
  top: 22%;
  left: 30%;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 8px;
}

.ci-qr-corner--tr {
  top: 22%;
  right: 30%;
  border-left: 0;
  border-bottom: 0;
  border-top-right-radius: 8px;
}

.ci-qr-corner--bl {
  bottom: 22%;
  left: 30%;
  border-right: 0;
  border-top: 0;
  border-bottom-left-radius: 8px;
}

.ci-qr-corner--br {
  bottom: 22%;
  right: 30%;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 8px;
}

.ci-qr-scanline {
  position: absolute;
  left: 30%;
  right: 30%;
  top: 24%;
  height: 2px;
  background: linear-gradient(90deg, rgba(97, 191, 247, 0), rgba(97, 191, 247, .95), rgba(97, 191, 247, 0));
  box-shadow: 0 0 10px rgba(97, 191, 247, .75);
  animation: ciScanLine 2.1s ease-in-out infinite;
}

.ci-qr-panel.is-success .ci-qr-corner {
  border-color: #22c55e;
  filter: drop-shadow(0 0 10px rgba(34, 197, 94, .55));
}

.ci-qr-panel.is-success .ci-qr-scanline {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0), rgba(34, 197, 94, .95), rgba(34, 197, 94, 0));
  box-shadow: 0 0 10px rgba(34, 197, 94, .75);
}

@keyframes ciScanLine {

  0%,
  100% {
    top: 24%;
  }

  50% {
    top: 76%;
  }
}

.ci-qr-status {
  font-size: .75rem;
  color: var(--muted);
  padding: 8px 12px;
  border-top: 1px solid var(--border);
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .ci-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .topbar {
    left: 0;
  }

  .topbar-nav {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    width: 72px;
  }

  .sidebar.open .sidebar-user-info,
  .sidebar.open .sidebar-chevron,
  .sidebar.open .sidebar-section-label,
  .sidebar.open .sidebar-link span,
  .sidebar.open .btn-patrocinio span,
  .sidebar.open .btn-premium span,
  .sidebar.open .collapse-link span {
    display: none;
  }

  .sidebar.open .sidebar-link {
    justify-content: center;
    font-size: 0;
  }

  .sidebar.open .sidebar-link .icon {
    margin-right: 0;
  }

  .sidebar.open .sidebar-user {
    justify-content: center;
  }

  .main {
    margin-left: 0;
    padding: 16px 14px 30px;
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-actions {
    display: none;
  }

  .ci-stats-row {
    grid-template-columns: 1fr;
  }
}