/* ─────────────────────────────────────────────────────────────
   Inner Page — Layout compartido para pantallas secundarias
───────────────────────────────────────────────────────────── */

html, body {
  height: 100%;
  overflow: hidden;
}

.inner-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background-color: var(--color-background);
}

.inner-page__scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 8px 20px calc(40px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.inner-page__scroll::-webkit-scrollbar { display: none; }

/* ── Header ──────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 63px;
  padding: 5px 20px 0;
  background-color: var(--color-background);
  flex-shrink: 0;
}

.page-header__back {
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-on-surface);
  border-radius: 8px;
  flex-shrink: 0;
  margin-left: -6px;
  text-decoration: none;
  transition: color 0.15s;
}
.page-header__back:active { background: rgba(0,0,0,.05); }
.page-header__back .material-symbols-outlined { font-size: 22px; }

.page-header__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--color-on-surface);
  margin: 0;
  flex: 1;
}

.page-header__action {
  display: flex;
  align-items: center;
  color: var(--color-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.page-header__action .material-symbols-outlined { font-size: 22px; }

/* ── Form card ───────────────────────────────────────────────── */
.form-card {
  background-color: var(--color-surface);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 2px 6px 0 rgb(0 0 0 / .04);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-secondary);
}

.input-frame {
  position: relative;
  display: flex;
  align-items: center;
  height: 44px;
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 10px 14px;
  gap: 8px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-frame:focus-within {
  border-color: var(--border-focus);
  box-shadow: var(--focus-ring);
}

.input-frame--sm {
  height: 40px;
  padding: 8px 10px;
}

.form-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-on-surface);
  width: 100%;
  min-width: 0;
}
.form-input::placeholder { color: var(--color-muted); font-weight: 400; }

.form-select {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-on-surface);
  width: 100%;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.input-icon-left  { color: var(--color-muted); font-size: 16px; flex-shrink: 0; line-height: 1; }
.input-icon-right { color: var(--color-muted); font-size: 16px; flex-shrink: 0; line-height: 1; pointer-events: none; }

.btn-eye {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s;
}
.btn-eye:hover { color: var(--color-secondary); }
.btn-eye .material-symbols-outlined { font-size: 18px; }

/* ── Botón primario ──────────────────────────────────────────── */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  background: var(--gradient-button);
  color: var(--color-on-primary);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: var(--shadow-cyan-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.btn-primary:hover:not(:disabled) { box-shadow: var(--shadow-cyan-md); }
.btn-primary:active:not(:disabled) { transform: scale(.98); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.btn-primary .material-symbols-outlined { font-size: 20px; }

/* ── Botón outline ───────────────────────────────────────────── */
.btn-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 40px;
  background-color: var(--color-surface);
  color: var(--color-primary);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--color-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.15s;
}
.btn-outline:hover { background-color: var(--tint-primary); }
.btn-outline .material-symbols-outlined { font-size: 16px; }

/* ── Scroll — extra bottom padding when a FAB is present ─────── */
.inner-page__scroll--fab {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

/* ── Floating Action Button ──────────────────────────────────── */
.page-fab {
  position: fixed;
  bottom: calc(54px + env(safe-area-inset-bottom, 0px));
  right: 20px;
  z-index: 200;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s;
}
.page-fab:active { transform: scale(0.92); }
.page-fab:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.page-fab--primary {
  background: var(--color-primary);
  box-shadow: 0 4px 14px rgba(0,240,255, .40);
}
.page-fab--primary .material-symbols-outlined {
  font-size: 22px;
  color: var(--color-on-primary);
}

/* ── Content card (páginas estáticas) ────────────────────────── */
.content-card {
  background-color: var(--color-surface);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 2px 6px 0 rgb(0 0 0 / .04);
}

.content-divider {
  height: 1px;
  background-color: var(--color-border);
  border: none;
  margin: 0;
}

.content-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content-section__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-on-surface);
  margin: 0;
}

.content-section__body {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--color-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ── Section label (caps: TODAY · APR 7, RESULTS · 10) ──────── */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: 1.5px;
  margin: 0;
}

/* ── List card ───────────────────────────────────────────────── */
.list-card {
  background-color: var(--color-surface);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 6px 0 rgb(0 0 0 / .04);
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  width: 100%;
  background: none;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}
.list-item:hover { background-color: var(--color-background); }

.list-item__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.list-item__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-item__sub {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-divider {
  height: 1px;
  background-color: var(--color-border);
  border: none;
  margin: 0;
}

.list-chevron {
  color: var(--color-secondary);
  font-size: 16px;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Status dot ──────────────────────────────────────────────── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--green  { background-color: var(--color-success); }
.status-dot--red    { background-color: var(--color-error); }
.status-dot--yellow { background-color: var(--color-warning); }
.status-dot--gray   { background-color: var(--color-muted); }

/* ── Search bar ──────────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  background-color: var(--color-surface);
  border-radius: 10px;
  padding: 0 12px;
  box-shadow: 0 2px 6px 0 rgb(0 0 0 / .04);
}
.search-bar__icon { color: var(--color-muted); font-size: 16px; flex-shrink: 0; line-height: 1; }
.search-bar__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-on-surface);
}
.search-bar__input::placeholder { color: var(--color-muted); }

/* ── Stats mini row ──────────────────────────────────────────── */
.stats-mini-row {
  display: flex;
  gap: 8px;
}

.stat-mini {
  flex: 1;
  background-color: var(--color-surface);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / .04);
}

.stat-mini__value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-on-surface);
  line-height: 1.2;
}
.stat-mini__value--green { color: var(--color-success); }
.stat-mini__value--red   { color: var(--color-error); }

.stat-mini__label {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--color-muted);
}

/* ── Filter card ─────────────────────────────────────────────── */
.filter-card {
  background-color: var(--color-surface);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 6px 0 rgb(0 0 0 / .04);
}

.filter-header {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.filter-header__icon  { color: var(--color-primary); font-size: 18px; line-height: 1; }
.filter-header__title { flex: 1; font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--color-on-surface); }
.filter-header__chevron { color: var(--color-secondary); font-size: 18px; line-height: 1; }

.filter-row {
  display: flex;
  gap: 8px;
}
.filter-row .input-frame { flex: 1; height: 40px; padding: 8px 10px; }

/* ── Avatar circle ───────────────────────────────────────────── */
.avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  overflow: hidden;
  flex-shrink: 0;
  background-color: var(--color-background);
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }
.avatar-circle__initials {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
}

/* ── Rating badge ────────────────────────────────────────────── */
.rating-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-warning);
  flex-shrink: 0;
}

/* ── Icon bubble (notificaciones) ────────────────────────────── */
.icon-bubble {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-bubble--red   { background-color: var(--tint-primary); }
.icon-bubble--green { background-color: var(--tint-success); }
.icon-bubble--blue  { background-color: var(--tint-info); }
.icon-bubble .material-symbols-outlined { font-size: 18px; }
.icon-bubble--red   .material-symbols-outlined { color: var(--color-primary); }
.icon-bubble--green .material-symbols-outlined { color: var(--color-success); }
.icon-bubble--blue  .material-symbols-outlined { color: var(--color-info); }

/* ── Load more ───────────────────────────────────────────────── */
.load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 0;
}
.load-more .material-symbols-outlined { color: var(--color-muted); font-size: 16px; }
.load-more__text { font-family: var(--font-body); font-size: 13px; color: var(--color-muted); }

.load-more--btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
}
.load-more--end {
  cursor: default;
  opacity: 0.6;
}

/* ── Support rows ────────────────────────────────────────────── */
.support-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 4px 0;
}
.support-row + .support-row { margin-top: 14px; }

.support-row__icon {
  font-size: 20px;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.support-row__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.support-row__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: 1px;
}

.support-row__value {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-on-surface);
  text-decoration: none;
}
a.support-row__value { color: var(--color-primary); }
a.support-row__value:hover { text-decoration: underline; }

/* ── Date pick (display span + invisible native input covers .input-frame) */
.date-pick-display {
  flex: 1;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.date-pick-display--placeholder { color: var(--color-muted); font-weight: 400; }

/* Sits on top of the whole .input-frame (which has position:relative) */
.date-pick-native {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 1;
}

/* ── Autocomplete (city, driver, etc.) ──────────────────────── */
.ac-wrap {
  position: relative;
}

.ac-clear {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s;
}
.ac-clear:hover { color: var(--color-secondary); }
.ac-clear .material-symbols-outlined { font-size: 16px; }

.ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
  z-index: 100;
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
}

.ac-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 0.12s;
}
.ac-option:hover,
.ac-option[aria-selected="true"] { background-color: var(--color-background); }
.ac-option + .ac-option { border-top: 1px solid var(--color-border); }

.ac-option__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ac-option__name {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-on-surface);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-option__meta {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--color-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── File upload zone ────────────────────────────────────────── */
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 120px;
  background-color: var(--color-background);
  border: 1.5px dashed var(--color-border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.upload-zone:hover  { border-color: var(--color-primary); background-color: var(--tint-primary); }
.upload-zone--active { border-color: var(--color-primary); background-color: var(--tint-primary); }
.upload-zone .material-symbols-outlined { font-size: 32px; color: var(--color-muted); }
.upload-zone__text { font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--color-secondary); }
.upload-zone__hint { font-family: var(--font-body); font-size: 11px; color: var(--color-muted); letter-spacing: 0.3px; }
