@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,500;0,600;1,500;1,600&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');

:root {
  --ink: #2B2622;
  --ink-soft: #4A423A;
  --parch: #F2ECDA;
  --parch-dim: #E7DFC7;
  --ember: #C1592B;
  --ember-soft: rgba(193, 89, 43, .14);
  --brass: #C99A3E;
  --brass-soft: rgba(201, 154, 62, .16);
  --sage: #6B7A5E;
  --sage-soft: rgba(107, 122, 94, .16);
  --line: rgba(43, 38, 34, .14);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(43, 38, 34, .08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--parch);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mono {
  font-family: 'IBM Plex Mono', monospace;
}

.icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- TOPBAR ---------- */
.sancho-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--parch);
  border-bottom: 1px solid var(--line);
}

.sancho-topbar .brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
}

.sancho-topbar .brand:not(.brand-compact) {
  flex: 1;
}

.sancho-topbar .mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.sancho-topbar .mark-sm {
  width: 24px;
  height: 24px;
}

.sancho-topbar .word {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 21px;
}

.topbar-title {
  flex: 1;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  margin: 0;
}

.sancho-topbar .logout {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ink-soft);
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.sancho-topbar .logout svg {
  width: 18px;
  height: 18px;
}

/* ---------- MAIN ---------- */
.sancho-main {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 18px 18px 110px;
}

.page-intro {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.section-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 22px 0 10px;
}

.section-title:first-child {
  margin-top: 0;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0 10px;
}

.section-title-row:first-of-type {
  margin-top: 0;
}

.section-title-row .section-title {
  margin: 0;
}

.title-actions {
  display: flex;
  gap: 8px;
}

.title-actions form {
  display: contents;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--parch-dim);
  color: var(--ink-soft);
  cursor: pointer;
  flex-shrink: 0;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.icon-btn.add {
  background: var(--ember-soft);
  color: var(--ember);
}

/* ---------- CARD GENERIC ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.empty-state {
  text-align: center;
  padding: 34px 18px;
  color: var(--ink-soft);
}

.empty-state .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-style: italic;
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 8px;
}

.empty-state p {
  margin: 0;
  font-size: 13.5px;
}

/* ---------- BLUEPRINT (camper + sensori) ---------- */
.blueprint-card {
  background: var(--ink);
  color: var(--parch);
  border-radius: var(--radius-lg);
  padding: 16px 14px 12px;
  position: relative;
}

.blueprint-card .trip-tag {
  font-size: 11px;
  color: var(--brass);
  padding: 0 6px 10px;
}

.blueprint-wrap {
  position: relative;
  width: 100%;
}

.blueprint-wrap svg.van {
  width: 100%;
  height: auto;
  display: block;
}

.marker {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 5px;
}

.mdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 6px var(--brass);
  flex-shrink: 0;
}

.mlabel {
  font-size: 10px;
  font-weight: 600;
  padding: 2.5px 7px;
  border-radius: 7px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(242, 236, 218, .18);
  white-space: nowrap;
  color: var(--brass);
}

/* ---------- ROW CARD (scadenze) ---------- */
.row-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  margin-bottom: 10px;
}

.row-card.urgent {
  border-left-color: var(--ember);
}

.row-card.soon {
  border-left-color: var(--brass);
}

.row-card.ok {
  border-left-color: var(--sage);
}

.row-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--parch-dim);
  color: var(--ink-soft);
}

.row-icon svg {
  width: 18px;
  height: 18px;
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-main .title {
  font-weight: 600;
  font-size: 14px;
}

.row-main .sub {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.row-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--parch-dim);
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---------- ITEM ROW (inventario) ---------- */
.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
}

.item-row:last-child {
  border-bottom: none;
}

.item-main {
  flex: 1;
  min-width: 0;
}

.item-main .name {
  font-weight: 600;
  font-size: 14px;
}

.item-main .meta {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.toggle-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--parch-dim);
  color: var(--ink-soft);
  white-space: nowrap;
}

.toggle-pill.in {
  background: var(--sage-soft);
  border-color: rgba(107, 122, 94, .35);
  color: var(--sage);
}

.toggle-pill .pdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- CHECKLIST ---------- */
.progress-wrap {
  margin-bottom: 10px;
}

.progress-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.progress-top .lbl {
  font-size: 12px;
  color: var(--ink-soft);
}

.progress-top .val {
  font-size: 13px;
  color: var(--ember);
  font-weight: 600;
}

.progress-track {
  height: 8px;
  border-radius: 5px;
  background: var(--parch-dim);
  overflow: hidden;
}

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

.check-list {
  margin-bottom: 6px;
}

/* ---------- ROUTE (itinerario a tappe) ---------- */
.route-stage {
  display: flex;
  gap: 12px;
}

.route-rail {
  position: relative;
  width: 18px;
  flex-shrink: 0;
}

.route-rail::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: -4px;
  left: 50%;
  border-left: 2px dashed rgba(43, 38, 34, .25);
}

.route-stage:last-child .route-rail::before {
  display: none;
}

.route-node {
  position: absolute;
  top: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--parch);
  box-shadow: 0 0 0 2px var(--line);
  background: var(--brass);
}

.route-node.stage-partenza {
  background: var(--ember);
}

.route-node.stage-arrivo {
  background: var(--brass);
}

.route-node.stage-ritorno {
  background: var(--sage);
}

.route-body {
  flex: 1;
  min-width: 0;
  padding-bottom: 26px;
}

.route-stage:last-child .route-body {
  padding-bottom: 0;
}

.route-body .section-title-row {
  margin-top: 0;
}

/* ---------- SLIDE ROW (swipe per completare) ---------- */
.row-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.row-line:last-child {
  margin-bottom: 0;
}

.row-delete-form {
  display: contents;
}

.row-delete {
  all: unset;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  opacity: .55;
  cursor: pointer;
  flex-shrink: 0;
}

.row-delete svg {
  width: 16px;
  height: 16px;
}

.slide-row {
  position: relative;
  overflow: hidden;
  height: 54px;
  flex: 1;
  min-width: 0;
  border-radius: 999px;
  background: var(--parch-dim);
  border: 1px solid var(--line);
}

.slide-fill {
  position: absolute;
  inset: 0;
  width: 48px;
  background: var(--ember-soft);
  transition: width .25s cubic-bezier(.3, 1, .4, 1), background .2s ease;
}

.slide-row.done .slide-fill {
  width: 100%;
  background: var(--sage-soft);
}

.slide-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 18px 0 60px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .2s ease;
}

.slide-row.done .slide-label {
  color: var(--ink-soft);
  text-decoration: line-through;
}

.slide-handle {
  all: unset;
  position: absolute;
  top: 4px;
  left: 4px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ember);
  color: var(--parch);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  transition: left .25s cubic-bezier(.3, 1, .4, 1), background .2s ease;
  box-shadow: 0 2px 6px rgba(43, 38, 34, .25);
}

.slide-row.done .slide-handle {
  left: calc(100% - 48px);
  background: var(--sage);
}

.slide-icon-check {
  display: none;
}

.slide-row.done .slide-icon-arrow {
  display: none;
}

.slide-row.done .slide-icon-check {
  display: block;
}

.list-empty-hint {
  font-size: 12.5px;
  color: var(--ink-soft);
  padding: 8px 4px 4px;
  margin: 0;
}

/* ---------- PLACE ROW (slider casa/camper) ---------- */
.place-row .slide-fill {
  background: var(--parch-dim);
}

.place-row.in-camper .slide-fill {
  width: 100%;
  background: var(--sage-soft);
}

.place-end {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--ink-soft);
  opacity: .45;
  pointer-events: none;
}

.place-end-casa {
  left: 18px;
}

.place-end-camper {
  right: 18px;
}

.place-row .slide-label {
  justify-content: center;
  padding: 0 48px;
  text-align: center;
}

.place-row .slide-handle {
  background: var(--ink-soft);
}

.place-row.in-camper .slide-handle {
  left: calc(100% - 48px);
  background: var(--sage);
}

.place-icon-camper {
  display: none;
}

.place-row.in-camper .place-icon-casa {
  display: none;
}

.place-row.in-camper .place-icon-camper {
  display: block;
}

.place-row.in-camper .slide-label {
  text-decoration: none;
  color: var(--ink);
}

/* ---------- NFC LISTEN (lettura tag in pagina) ---------- */
.nfc-listen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px;
  margin-bottom: 18px;
  border-radius: 999px;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  cursor: pointer;
}

.nfc-listen .icon {
  width: 15px;
  height: 15px;
}

.nfc-listen.active {
  border-style: solid;
  border-color: rgba(107, 122, 94, .4);
  background: var(--sage-soft);
  color: var(--sage);
  cursor: default;
}

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 16px);
  max-width: min(420px, calc(100vw - 40px));
  background: var(--ink);
  color: var(--parch);
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  box-shadow: 0 6px 18px rgba(43, 38, 34, .3);
  z-index: 40;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- BOX CARD (scatole inventario) ---------- */
.box-card {
  padding: 12px;
  margin-bottom: 14px;
}

.box-card .row-line {
  margin-bottom: 0;
}

.box-card .slide-row {
  background: var(--parch);
}

.box-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 4px 0;
}

.box-stray-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ember);
}

.box-meta-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.nfc-btn.paired {
  background: var(--sage-soft);
  color: var(--sage);
}

.box-items {
  margin-top: 6px;
}

.box-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-top: 1px solid var(--line);
}

.box-item-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-chip {
  all: unset;
  width: 34px;
  height: 26px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--parch-dim);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  cursor: pointer;
  flex-shrink: 0;
}

.place-chip.in-camper {
  background: var(--sage-soft);
  color: var(--sage);
  border-color: rgba(107, 122, 94, .35);
}

.place-chip svg {
  width: 14px;
  height: 14px;
}

.chip-icon-camper {
  display: none;
}

.place-chip.in-camper .chip-icon-casa {
  display: none;
}

.place-chip.in-camper .chip-icon-camper {
  display: block;
}

.place-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 22px;
  font-size: 11px;
  color: var(--ink-soft);
}

.place-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.place-legend .icon {
  width: 14px;
  height: 14px;
}

/* ---------- SHEET EXTRA (inventario) ---------- */
.sheet-text {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

.sheet-secondary {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sheet-secondary .icon {
  width: 16px;
  height: 16px;
}

.nfc-url-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.nfc-write-status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-align: center;
  margin: 10px 0 0;
}

.nfc-url-row input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12.5px;
  background: var(--parch-dim);
  color: var(--ink);
}

/* ---------- NFC RESULT PAGE ---------- */
.nfc-result-icon {
  width: 34px;
  height: 34px;
  color: var(--brass);
  margin: 0 auto 12px;
  display: block;
}

.nfc-result-title {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 19px;
  color: var(--parch);
  margin: 0 0 8px;
}

.nfc-result-sub {
  font-size: 13px;
  color: var(--parch-dim);
  margin: 0 0 20px;
}

.nfc-result-link {
  display: block;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  background: var(--ember);
  color: var(--parch);
  font-weight: 700;
  font-size: 14.5px;
}

/* ---------- BOTTOM SHEET (aggiungi voce) ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(43, 38, 34, .45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 30;
}

.sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  background: var(--parch);
  border-radius: 20px 20px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom, 0));
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.32, .72, 0, 1);
  box-shadow: 0 -8px 30px rgba(43, 38, 34, .2);
  z-index: 31;
}

.sheet.open {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  margin: 0 auto 16px;
}

.sheet-title {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 16px;
}

.sheet input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  margin-bottom: 16px;
  box-sizing: border-box;
}

.sheet-confirm {
  width: 100%;
  padding: 13px;
  border-radius: 999px;
  border: none;
  background: var(--ember);
  color: var(--parch);
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
}

/* ---------- GAUGES (sensori) ---------- */
.gauge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gauge-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 8px;
  text-align: center;
}

.gauge-card svg {
  width: 52px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.gauge-outline {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 6;
  stroke-linejoin: round;
  stroke-opacity: .6;
}

.gauge-dot {
  fill: var(--ink-soft);
  stroke: none;
  opacity: .6;
}

.gauge-card .gval {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 17px;
  font-weight: 600;
  margin-top: 8px;
}

.gauge-card .glabel {
  font-size: 10.5px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 2px;
}

.gps-card {
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.gps-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.gps-top .title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}

.gps-top svg {
  width: 16px;
  height: 16px;
  color: var(--ember);
}

.gps-coords {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  margin-top: 10px;
  color: var(--ink-soft);
}

.gps-sub {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* ---------- NFC TEASER ---------- */
.nfc-cta {
  margin-top: 14px;
  background: var(--parch-dim);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.nfc-cta .nfc-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ember-soft);
  color: var(--ember);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nfc-cta .nfc-icon svg {
  width: 22px;
  height: 22px;
}

.nfc-cta .title {
  font-size: 13px;
  font-weight: 600;
}

.nfc-cta .sub {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-top: 2px;
}

/* ---------- AUTH ---------- */
.auth-screen {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--parch);
  padding: 40px 20px;
}

.auth-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
  text-align: center;
}

.auth-lockup .mark {
  width: 64px;
  height: 64px;
}

.auth-lockup .word {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 34px;
}

.auth-lockup .tag {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: var(--parch-dim);
  max-width: 32ch;
  margin: 0;
}

.auth-card {
  width: 100%;
  max-width: 340px;
  background: rgba(242, 236, 218, .06);
  border: 1px solid rgba(242, 236, 218, .18);
  border-radius: var(--radius-lg);
  padding: 26px;
  text-align: center;
}

.auth-card p {
  font-size: 13.5px;
  color: var(--parch-dim);
  margin: 0 0 18px;
}

.auth-card input {
  width: 100%;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(242, 236, 218, .25);
  background: rgba(0, 0, 0, .2);
  color: var(--parch);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
}

.auth-card input::placeholder {
  color: rgba(242, 236, 218, .4);
}

.auth-card button {
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  border: none;
  background: var(--ember);
  color: var(--parch);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
}

.error {
  color: #E2957A;
  font-size: 12.5px;
  margin-bottom: 14px;
}

.install-btn {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid rgba(242, 236, 218, .3);
  background: transparent;
  color: var(--parch);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}

.install-btn .icon {
  width: 16px;
  height: 16px;
}

.install-hint {
  margin: 16px 0 0;
  font-size: 11.5px;
  color: var(--parch-dim);
  text-align: center;
}

/* ---------- SIMPLE FOOTER (login/404) ---------- */
.sancho-footer {
  text-align: center;
  padding: 16px;
  font-size: 11.5px;
  color: var(--parch-dim);
}

/* ---------- TAB BAR ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  background: rgba(242, 236, 218, .92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 8px 6px calc(10px + env(safe-area-inset-bottom, 0px));
  max-width: 480px;
  margin: 0 auto;
}

.tabbtn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--ink-soft);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 0;
}

.tabbtn svg {
  width: 21px;
  height: 21px;
}

.tabbtn.active {
  color: var(--ember);
}
