/* =============================================================
   AQUA AMAZÓNICA — COMPONENTES REUTILIZABLES
   Header, bottom-nav, chip, btn, card, toast, input, search-bar.
   ============================================================= */

/* ===================== APP HEADER ===================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: calc(var(--header-height) + var(--safe-area-top));
  padding: var(--safe-area-top) var(--screen-padding-x) 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-soft);
}

.app-header--transparent {
  background: transparent;
  border-bottom: none;
  position: absolute;
  top: 0; left: 0; right: 0;
}

.app-header__title {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-2xl);
  color: var(--color-primary);
  letter-spacing: var(--ls-tight);
  margin: 0;
}

.app-header--transparent .app-header__title {
  color: var(--color-text-on-image);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  font-size: var(--fs-lg);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-primary);
  transition: background var(--transition-fast);
}
.icon-btn:active { background: var(--color-bg-soft); transform: scale(0.95); }

.icon-btn--on-image {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.icon-btn--on-image:active { background: rgba(255,255,255,0.4); }

/* ===================== BOTTOM NAV ===================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-content-width);
  height: calc(var(--bottom-nav-height) + var(--safe-area-bottom));
  padding-bottom: var(--safe-area-bottom);
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-bottom-nav);
  z-index: var(--z-bottom-nav);
}

body:not(.has-bottom-nav) .bottom-nav { display: none; }

.bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: var(--space-1);
  color: var(--color-text-muted-4);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  transition: color var(--transition-fast);
  position: relative;
  padding: var(--space-2) var(--space-1);
}

.bottom-nav__icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.bottom-nav__item.active {
  color: var(--color-primary);
}
.bottom-nav__item.active .bottom-nav__icon-wrapper {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 10px -2px rgba(0, 58, 81, 0.35);
}
.bottom-nav__item.active--floating .bottom-nav__icon-wrapper {
  width: 56px;
  height: 56px;
  margin-top: -24px;
  background: var(--color-primary);
  color: white;
  box-shadow: 0 6px 14px -2px rgba(0, 58, 81, 0.45);
}

.bottom-nav__label { line-height: 1; }

/* ===================== CHIP ===================== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  background: var(--color-bg-muted);
  color: var(--color-text-body);
  white-space: nowrap;
  line-height: 1;
}
.chip__icon { width: 14px; height: 14px; flex-shrink: 0; }

.chip--sm { padding: 4px 8px; font-size: var(--fs-2xs); }
.chip--lg { padding: 8px 16px; font-size: var(--fs-md); }

.chip--info    { background: var(--color-info-bg); color: var(--color-blue-accent); }
.chip--eco     { background: var(--color-eco-soft-2); color: var(--color-eco-deep); }
.chip--eco-alt { background: var(--color-eco-soft-3); color: var(--color-eco-deep); }
.chip--eco-bright { background: var(--color-eco-bright); color: white; }
.chip--lime    { background: var(--color-lime); color: var(--color-eco-text); }
.chip--top     { background: var(--color-primary-soft); color: var(--color-primary); }
.chip--neutral { background: var(--color-bg-muted); color: var(--color-text-muted); }
.chip--rating  { background: var(--color-lime); color: var(--color-eco-text); font-weight: var(--fw-bold); }
.chip--rating .chip__icon { color: var(--color-amber); fill: var(--color-amber); stroke: var(--color-amber); }
.chip--primary { background: var(--color-primary); color: white; }
.chip--white   { background: white; color: var(--color-text-primary); box-shadow: var(--shadow-sm); }
.chip--warning { background: var(--color-warning-bg); color: var(--color-warning); }
.chip--danger  { background: var(--color-danger-bg); color: var(--color-danger); }
.chip--success { background: var(--color-success-bg); color: var(--color-success); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-md);
  line-height: 1;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn__icon { width: 18px; height: 18px; flex-shrink: 0; }

.btn--sm  { padding: 8px 14px; font-size: var(--fs-sm); }
.btn--md  { padding: 12px 20px; }
.btn--lg  { padding: 14px 28px; font-size: var(--fs-lg); }
.btn--full { width: 100%; }

.btn--primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 58, 81, 0.2);
}
.btn--primary:hover { background: var(--color-primary-light); }
.btn--primary:active { background: var(--color-primary-dark); }

.btn--eco {
  background: var(--color-eco-bright);
  color: white;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.25);
}
.btn--eco-deep {
  background: var(--color-eco-deep);
  color: white;
}

.btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--secondary:active { background: var(--color-primary-soft); }

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
}

.btn--danger {
  background: transparent;
  color: var(--color-danger);
}

.btn--white {
  background: white;
  color: var(--color-primary);
}

/* ===================== CARDS ===================== */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.card--soft {
  background: var(--color-bg-soft);
  box-shadow: none;
}

.card--alt {
  background: var(--color-bg-alt);
  box-shadow: none;
}

.card--hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card-image);
  padding: 0;
}
.card--hero img {
  width: 100%;
  height: 100%;
  display: block;
}

.card--canton {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  height: 200px;
  background: var(--color-bg-soft);
  padding: 0;
}

/* ===================== INPUT / SEARCH ===================== */
.input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  color: var(--color-text-body);
  transition: border-color var(--transition-fast);
}
.input::placeholder { color: var(--color-text-muted-3); }
.input:focus { outline: none; border-color: var(--color-primary); }

.textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  color: var(--color-text-body);
  resize: vertical;
  transition: border-color var(--transition-fast);
}
.textarea:focus { outline: none; border-color: var(--color-primary); }

.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 18px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-soft);
  color: var(--color-text-muted-2);
}
.search-bar__icon { width: 20px; height: 20px; color: var(--color-text-muted-2); }
.search-bar__input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  color: var(--color-text-body);
}
.search-bar__input::placeholder { color: var(--color-text-muted-3); }

.search-bar--button {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 14px 18px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-soft);
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.search-bar--button:active { background: var(--color-bg-muted); }
.search-bar__placeholder {
  flex: 1;
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  color: var(--color-text-muted-3);
}

/* ===================== TOAST ===================== */
#toast-container {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + 24px + var(--safe-area-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  background: var(--color-text-primary);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  animation: toast-in 250ms ease;
}
.toast--success { background: var(--color-eco-bright); }
.toast--info    { background: var(--color-blue-accent); }
.toast--error   { background: var(--color-danger); }
.toast--warning { background: var(--color-warning); color: var(--color-text-primary); }

.toast.leaving { animation: toast-out 250ms ease forwards; }
@keyframes toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes toast-out {
  to { transform: translateY(20px); opacity: 0; }
}

/* ===================== RADIO CARDS (reportes) ===================== */
.radio-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.radio-card__indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-bg-soft);
  flex-shrink: 0;
  color: transparent;
}
.radio-card__label {
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-md);
  flex: 1;
}
.radio-card.is-active--success { background: var(--color-success-bg); border-color: var(--color-success); }
.radio-card.is-active--success .radio-card__indicator { background: var(--color-success); color: white; }
.radio-card.is-active--warning { background: var(--color-warning-bg); border-color: var(--color-warning); }
.radio-card.is-active--warning .radio-card__indicator { background: var(--color-warning); color: white; }
.radio-card.is-active--danger  { background: var(--color-danger-bg);  border-color: var(--color-danger); }
.radio-card.is-active--danger  .radio-card__indicator { background: var(--color-danger); color: white; }

/* ===================== DROPZONE ===================== */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  border: 2px dashed var(--color-text-muted-2);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.dropzone:hover { border-color: var(--color-primary); background: var(--color-bg-soft); }
.dropzone__icon { color: var(--color-text-muted-2); }
.dropzone__title { font-family: var(--font-body); font-weight: var(--fw-semibold); font-size: var(--fs-md); color: var(--color-text-body); }
.dropzone__hint  { font-family: var(--font-body); font-size: var(--fs-xs); color: var(--color-text-muted); }
.dropzone__preview { max-width: 100%; max-height: 240px; border-radius: var(--radius-md); }

/* ===================== PROGRESS BAR ===================== */
.progress {
  width: 100%;
  height: 8px;
  background: var(--color-bg-muted);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  background: var(--color-eco-bright);
  border-radius: var(--radius-pill);
  transition: width 400ms ease;
}
.progress--eco .progress__bar { background: var(--color-eco-deep); }
.progress--blue .progress__bar { background: var(--color-blue-accent); }

/* ===================== ALERT BANNER (alertas informativas) ===================== */
.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-info-bg);
  border-left: 4px solid var(--color-info);
}
.alert-banner + .alert-banner { margin-top: var(--space-2); }
.alert-banner--first { margin-bottom: var(--space-2); }

.alert-banner__icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  color: var(--color-info);
}
.alert-banner__content { flex: 1; min-width: 0; }
.alert-banner__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-base);
  color: var(--color-text-primary);
}
.alert-banner__msg {
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  color: var(--color-text-body);
  margin-top: 2px;
}
.alert-banner__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-text-muted);
}
.alert-banner__close:active { background: rgba(0, 0, 0, 0.06); }

/* Variantes por nivel */
.alert-banner--info    { background: var(--color-info-bg);    border-left-color: var(--color-info); }
.alert-banner--info    .alert-banner__icon { color: var(--color-info); }
.alert-banner--warning { background: var(--color-warning-bg); border-left-color: var(--color-warning); }
.alert-banner--warning .alert-banner__icon { color: var(--color-warning); }
.alert-banner--danger  { background: var(--color-danger-bg);  border-left-color: var(--color-danger); }
.alert-banner--danger  .alert-banner__icon { color: var(--color-danger); }

/* ===================== BOTTOM SHEET ===================== */
.bottom-sheet {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: var(--bottom-nav-height);
  width: 100%;
  max-width: var(--max-content-width);
  background: var(--color-surface-on-dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top-left-radius: var(--radius-3xl);
  border-top-right-radius: var(--radius-3xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3) var(--space-5) var(--space-5);
  z-index: var(--z-modal);
  animation: sheet-in 300ms ease;
}
.bottom-sheet__handle {
  width: 36px;
  height: 4px;
  background: var(--color-text-muted-2);
  border-radius: var(--radius-pill);
  margin: 0 auto var(--space-3);
}
@keyframes sheet-in {
  from { transform: translate(-50%, 100%); }
  to   { transform: translate(-50%, 0); }
}

/* ===================== FAB ===================== */
.fab {
  position: absolute;
  bottom: var(--space-4);
  right: var(--space-4);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: var(--z-overlay);
}

/* ===================== AVATAR ===================== */
.avatar {
  display: inline-block;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-bg-soft);
  flex-shrink: 0;
}
.avatar--40  { width: 40px; height: 40px; }
.avatar--60  { width: 60px; height: 60px; }
.avatar--80  { width: 80px; height: 80px; }
.avatar--120 { width: 120px; height: 120px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ===================== DIVIDER ===================== */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-border-soft);
  margin: var(--space-4) 0;
}

/* ===================== HEART BUTTON ===================== */
.heart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow);
  color: var(--color-text-muted-2);
  transition: color var(--transition-fast), transform var(--transition-fast);
}
.heart-btn.is-active { color: var(--color-danger); }
.heart-btn.is-active .icon { fill: var(--color-danger); }
.heart-btn:active { transform: scale(0.92); }

/* ===================== SIDE MENU (drawer) ===================== */
.side-menu {
  position: fixed;
  inset: 0;
  z-index: 1500;
  pointer-events: none;
}
.side-menu.is-open { pointer-events: auto; }

.side-menu__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 30, 44, 0.55);
  opacity: 0;
  transition: opacity 250ms ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.side-menu.is-open .side-menu__overlay { opacity: 1; }

.side-menu__panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: var(--color-bg);
  transform: translateX(-105%);
  transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: calc(var(--space-4) + var(--safe-area-bottom));
  box-shadow: 4px 0 24px rgba(0, 30, 44, 0.25);
  -webkit-overflow-scrolling: touch;
}
.side-menu.is-open .side-menu__panel { transform: translateX(0); }

.side-menu__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-4) var(--space-4);
  padding-top: calc(var(--space-5) + var(--safe-area-top));
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: white;
}
.side-menu__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: 2px solid rgba(255,255,255,0.3);
}
.side-menu__avatar img { width: 100%; height: 100%; object-fit: cover; }
.side-menu__user { flex: 1; min-width: 0; }
.side-menu__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: white;
  margin: 0;
}
.side-menu__level {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.85);
  margin-top: 2px;
}
.side-menu__close {
  color: white;
  background: rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.side-menu__close:active { background: rgba(255,255,255,0.25); }

.side-menu__section {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-2xs);
  letter-spacing: var(--ls-wider);
  color: var(--color-text-muted);
  padding: var(--space-4) var(--space-4) var(--space-2);
}

.side-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--space-2);
}
.side-menu__nav a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--fs-md);
  color: var(--color-text-primary);
  transition: background var(--transition-fast);
}
.side-menu__nav a:active { background: var(--color-bg-soft); }
.side-menu__nav--compact a { padding: var(--space-2) var(--space-3); }

.side-menu__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.side-menu__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.side-menu__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-menu__sublabel {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-weight: 400;
}
.side-menu__chev { color: var(--color-text-muted-2); }

.side-menu__footer {
  margin-top: auto;
  padding: var(--space-4) var(--space-3) var(--space-3);
  display: flex;
  gap: var(--space-2);
  border-top: 1px solid var(--color-border-soft);
}
.side-menu__footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-soft);
  color: var(--color-text-body);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-xs);
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast);
  flex: 1;
  justify-content: center;
}
.side-menu__footer-btn:active { background: var(--color-bg-muted); transform: scale(0.97); }
.side-menu__footer-btn--danger { color: var(--color-danger); }

/* Cuando el menú está abierto: bloquear scroll del body */
body.menu-open { overflow: hidden; }

/* ===================== SEARCH OVERLAY ===================== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1600;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease;
}
.search-overlay.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.search-overlay__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3);
  padding-top: calc(var(--space-3) + var(--safe-area-top));
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-soft);
  position: sticky;
  top: 0;
  z-index: 1;
}
.search-overlay__input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-soft);
}
.search-overlay__icon { color: var(--color-text-muted-2); flex-shrink: 0; }
.search-overlay__input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  color: var(--color-text-primary);
  min-width: 0;
}
.search-overlay__input::placeholder { color: var(--color-text-muted-3); }
.search-overlay__clear {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-text-muted-2);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.search-overlay__body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--space-4) + var(--safe-area-bottom));
}

.search-overlay__hint {
  padding: var(--space-4) var(--screen-padding-x);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}
.search-overlay__section {
  padding: var(--space-4) var(--screen-padding-x) var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wider);
  color: var(--color-text-muted);
  text-transform: uppercase;
}
.search-overlay__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--space-2);
}
.search-overlay__empty {
  text-align: center;
  padding: var(--space-10) var(--screen-padding-x);
}

.search-result {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}
.search-result:active { background: var(--color-bg-soft); }
.search-result img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}
.search-result__info { flex: 1; min-width: 0; }
.search-result__name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--color-text-primary);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result__meta {
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result__chev { color: var(--color-text-muted-2); flex-shrink: 0; }
