:root {
  --navy:        #0f2744;
  --navy-card:   #163557;
  --teal:        #3ab8cc;
  --teal-dark:   #2a9aaa;
  --white:       #ffffff;
  --white-muted: rgba(255, 255, 255, 0.58);
  --checked-bg:  rgba(58, 184, 200, 0.09);
  --success:     #4caf85;
  --border:      rgba(255, 255, 255, 0.08);
  --radius:      12px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--navy);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100dvh;
}

/* ─── Watermark ──────────────────────────────────────── */

.logo-watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;
  max-width: 90vw;
  pointer-events: none;
  z-index: 0;
  opacity: 0.055;
  filter: blur(14px);
}

.logo-watermark img {
  width: 100%;
  height: auto;
  display: block;
}

/* ─── Header ──────────────────────────────────────── */

.app-header {
  position: relative;
  z-index: 1;
  padding: 32px 20px 28px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: block;
  margin: 0 auto;
  height: 120px;
  width: auto;
}

.header-subtitle {
  margin-top: 14px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--teal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─── Container ──────────────────────────────────────── */

.container {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 16px;
  width: 100%;
}

/* ─── Progress ──────────────────────────────────────── */

.progress-section {
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--border);
}

.progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 9px;
  font-size: 0.6875rem;
  color: var(--white-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

#progress-count {
  color: var(--teal);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.progress-track {
  height: 8px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 100px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal-dark), var(--teal));
  border-radius: 100px;
  transition: width 0.35s ease;
}

/* ─── Checklist Main ──────────────────────────────────────── */

#checklist-root {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0;
}

/* ─── Category Card ──────────────────────────────────────── */

.category-card {
  background: var(--navy-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.category-header {
  background: var(--teal);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.3s ease;
}

.category-header.complete {
  background: var(--success);
}

.category-icon {
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.category-title {
  flex: 1;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
}

.category-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.18);
  padding: 2px 9px;
  border-radius: 100px;
  flex-shrink: 0;
}

/* ─── Items ──────────────────────────────────────── */

.items-list {
  list-style: none;
}

.item-row {
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

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

.item-row.checked {
  background: var(--checked-bg);
}

.item-label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  min-height: 52px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ─── Custom Checkbox ──────────────────────────────────────── */

.item-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border: 2px solid var(--teal);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}

.item-checkbox:checked {
  background: var(--teal);
  border-color: var(--teal);
}

.item-checkbox:checked::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 7px;
  height: 12px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(45deg);
}

.item-checkbox:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

/* ─── Item Text ──────────────────────────────────────── */

.item-text {
  font-size: 0.9375rem;
  color: var(--white);
  line-height: 1.4;
  transition: color 0.15s;
}

.item-row.checked .item-text {
  color: var(--white-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.25);
}

/* ─── Footer ──────────────────────────────────────── */

.app-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0 100px;
  text-align: center;
}

.last-updated {
  font-size: 0.75rem;
  color: var(--white-muted);
  min-height: 1.1rem;
}

/* ─── FAB Nova Viagem ──────────────────────────────────────── */

.fab-reset {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  right: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  appearance: none;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 13px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(58, 184, 200, 0.35);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  min-height: 48px;
}

.fab-reset:hover {
  background: var(--teal-dark);
  box-shadow: 0 6px 24px rgba(58, 184, 200, 0.45);
}

.fab-reset:active {
  transform: scale(0.96);
}

.fab-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.fab-label {
  line-height: 1;
}

/* ─── FAB WhatsApp ──────────────────────────────────────── */

.fab-whatsapp {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  left: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  border-radius: 100px;
  padding: 13px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.35);
  transition: background 0.15s, transform 0.15s;
  min-height: 48px;
}

.fab-whatsapp:hover {
  background: #1ebc5a;
}

.fab-whatsapp:active {
  transform: scale(0.96);
}

.fab-wa-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ─── Modal ──────────────────────────────────────── */

dialog {
  background: var(--navy-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: var(--white);
  padding: 0;
  max-width: 340px;
  width: calc(100% - 40px);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal-inner {
  padding: 28px 24px 24px;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.modal-body {
  font-size: 0.9375rem;
  color: var(--white-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.btn-confirm {
  flex: 1;
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  min-height: 48px;
  transition: background 0.15s;
}

.btn-confirm:hover {
  background: var(--teal-dark);
}

.btn-cancel {
  flex: 1;
  background: transparent;
  color: var(--white-muted);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 12px;
  cursor: pointer;
  min-height: 48px;
  transition: border-color 0.15s, color 0.15s;
}

.btn-cancel:hover {
  border-color: rgba(255, 255, 255, 0.40);
  color: #fff;
}

/* ─── Desktop ──────────────────────────────────────── */

@media (min-width: 640px) {
  .app-header {
    padding: 40px 20px 36px;
  }

  .logo {
    height: 150px;
  }

  .header-subtitle {
    margin-top: 16px;
    font-size: 1rem;
  }

  .container {
    padding: 0 24px;
  }

  .item-label:hover {
    background: rgba(255, 255, 255, 0.025);
  }
}
