:root {
  --navy: #0a3161;
  --red: #b31942;
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e2e5ea;
  --text: #1b1f27;
  --muted: #6b7280;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
}
a { color: var(--navy); }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  background: var(--navy); color: #fff; padding: .6rem 1rem;
}
.brand { color: #fff; font-weight: 700; text-decoration: none; }
.nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.nav a { color: #dbe4f0; text-decoration: none; }
.nav a:hover { color: #fff; }

.container { max-width: 980px; margin: 0 auto; padding: 1.2rem; }

h1 { font-size: 1.6rem; margin: .2rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.muted { color: var(--muted); }
.error { color: var(--red); font-weight: 600; }
.ok { color: #15803d; font-weight: 600; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.1rem 1.2rem; margin-bottom: 1.1rem;
}
.card.narrow { max-width: 460px; margin-inline: auto; }
.card.empty { text-align: center; }

.row { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: nowrap; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; align-items: center; }
.stack { display: flex; flex-direction: column; gap: .8rem; }
.inline { display: inline; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 1rem; }

label { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; color: #374151; }
input, select, textarea {
  font: inherit; padding: .5rem .6rem; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; width: 100%;
}
hr { border: none; border-top: 1px solid var(--line); margin: .4rem 0; }

.btn {
  display: inline-block; padding: .5rem .9rem; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  text-decoration: none; cursor: pointer; font: inherit;
}
.btn:hover { background: #f0f2f5; }
.btn-primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: #0c3c77; }
.btn-danger { color: var(--red); border-color: #f0c2cd; }
.btn-sm { padding: .35rem .6rem; font-size: .85rem; }
.btn.done { background: #15803d; color: #fff; border-color: #15803d; }
button.link {
  background: none; border: none; color: var(--navy); cursor: pointer;
  font: inherit; padding: 0; text-decoration: underline;
}

table { width: 100%; border-collapse: collapse; margin-top: .6rem; }
th, td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: #f7f9fc; }

.chip {
  display: inline-block; padding: .1rem .55rem; border-radius: 999px;
  font-size: .8rem; font-weight: 600; background: #eef1f5; color: #374151;
}
.chip-active { background: #dcfce7; color: #15803d; }
.chip-prospect { background: #fef9c3; color: #854d0e; }
.chip-lapsed { background: #fee2e2; color: #b91c1c; }
.chip-pending { background: #fef9c3; color: #854d0e; }
.chip-accepted { background: #dcfce7; color: #15803d; }
.chip-revoked, .chip-canceled { background: #fee2e2; color: #b91c1c; }
.chip-trial { background: #e0e7ff; color: #3730a3; }

.hero { text-align: center; padding: 1rem 0 2rem; }
.hero h1 { font-size: 2.2rem; }
.hero .lead { max-width: 620px; margin: 0 auto 1.4rem; color: #374151; }
.cta { display: flex; gap: .8rem; justify-content: center; margin-bottom: 2rem; }
.features { list-style: none; padding: 0; max-width: 420px; margin: 0 auto; text-align: left; }
.features li { padding: .35rem 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 1rem; margin-bottom: 1.1rem; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; text-align: center; }
.stat .num { display: block; font-size: 1.7rem; font-weight: 700; color: var(--navy); }
.stat .lbl { color: var(--muted); font-size: .85rem; }

.holiday-card { text-decoration: none; color: inherit; transition: box-shadow .15s; }
.holiday-card:hover { box-shadow: 0 4px 14px rgba(10,49,97,.12); }
.holiday-card .progress { font-size: .9rem; }

.map { height: 360px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: .6rem; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: #374151; margin-bottom: 1.1rem; }
.legend .dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: .3rem; vertical-align: middle; }
.pin-marker {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; color: #fff;
  font-size: .8rem; font-weight: 700; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.seq {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: var(--navy);
  color: #fff; font-size: .75rem; margin-right: .2rem;
}
.state { font-size: .85rem; font-weight: 600; }
.stops { list-style: none; padding: 0; margin: 0; }
.stop { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.stop-info { display: flex; flex-direction: column; }
.stop-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.maplink { font-size: .85rem; }
.log { list-style: none; padding: 0; }
.log li { padding: .3rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }

@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .row { flex-wrap: wrap; }
}
