/* =============================================
   COMPONENTS — Elementos reutilizables
   ============================================= */

/* ── Avatar ── */
.avatar {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: var(--primary-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3C3489;
  font-size: 22px;
  flex-shrink: 0;
  position: relative;
}

.avatar-dot {
  width: 11px;
  height: 11px;
  border-radius: var(--radius-full);
  background: var(--success);
  border: 2.5px solid var(--bg);
  position: absolute;
  bottom: 1px;
  right: 1px;
}

/* ── Pill / Badge ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
}

.pill--ghost {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

.pill--ghost .pill-dot {
  background: rgba(255, 255, 255, 0.35);
}

.pill--active .pill-dot {
  background: #4ade80;
}

/* ── Status chips ── */
.chip {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: clamp(10px, 2.8vw, 11px);
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}

.chip--success { background: var(--bg-success); color: var(--success); }
.chip--warning { background: var(--bg-warning); color: var(--warning); }
.chip--danger  { background: var(--bg-danger);  color: var(--danger);  }

/* ── Card base (superfice blanca con borde) ── */
.card-base {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--gap-md) var(--gap-lg);
}

/* ── Card oscura (home status) ── */
.card-dark {
  background: var(--primary-dk);
  border-radius: var(--radius-xl);
  padding: 18px;
  color: white;
}

/* ── Ítem de registro (kardex row) ── */
.record-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: var(--gap-md);
}

.record-date-badge {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--primary-50);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.record-date-badge .day  { font-size: 19px; font-weight: 800; line-height: 1; }
.record-date-badge .dow  { font-size: 9px;  font-weight: 700; margin-top: 1px; }

.record-name {
  font-size: clamp(13px, 3.5vw, 15px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.record-times {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: clamp(10px, 2.8vw, 12px);
  color: var(--text2);
}

/* ── Summary cards (kardex stats) ── */
.summary-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.summary-card {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 8px;
  text-align: center;
}

.summary-card .icon  { font-size: 22px; color: var(--primary); margin-bottom: 4px; }
.summary-card .value { font-size: clamp(15px, 4vw, 18px); font-weight: 800; color: var(--text); }
.summary-card .label { font-size: 11px; color: var(--text3); margin-top: 2px; }

/* ── Toggle (día / semana) ── */
.toggle-row {
  display: flex;
  margin: 0 18px 14px;
  background: rgba(83, 74, 183, 0.08);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  flex-shrink: 0;
}

.toggle-btn {
  flex: 1;
  padding: 9px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--text2);
  transition: all 0.2s;
}

.toggle-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(83, 74, 183, 0.3);
}

/* ── Date navigator ── */
.date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.date-nav-arrow {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--primary);
  font-size: 18px;
  padding: 6px;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.date-nav-arrow:active { background: var(--primary-50); }

.date-nav-label {
  font-size: clamp(12px, 3.5vw, 14px);
  font-weight: 700;
  color: var(--text);
}

/* ── Field row (perfil) ── */
.field-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.field-label {
  font-size: 10px;
  color: var(--text3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.field-value {
  font-size: clamp(13px, 3.5vw, 15px);
  color: var(--text);
  font-weight: 600;
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
}

select.field-value {
  cursor: pointer;
  -webkit-appearance: none;
}

/* ── Section label ── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 14px 0 8px;
}

/* ── Request item ── */
.request-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  cursor: pointer;
  transition: transform 0.1s;
}

.request-item:active {
  transform: scale(0.98);
  background: var(--surface2);
}

.request-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.request-title { font-size: clamp(13px, 3.8vw, 15px); font-weight: 700; color: var(--text); }
.request-desc  { font-size: clamp(10px, 2.8vw, 12px); color: var(--text2); margin-top: 2px; }

/* ── Empty state ── */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text3);
}

.empty-state i    { font-size: 60px; }
.empty-state p    { font-size: 16px; font-weight: 700; color: var(--text2); }
.empty-state span { font-size: 13px; }

/* ── Bell button ── */
.btn-bell {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--primary-50);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 20px;
}

.btn-bell:active { background: var(--primary-100); }
