:root {
  --green:       #22c55e;
  --green-dark:  #15803d;
  --green-dim:   #166534;
  --green-bg:    #f0fdf4;
  --gold:        #f59e0b;
  --bg:          #f8fafc;
  --card:        #ffffff;
  --text:        #0f172a;
  --muted:       #64748b;
  --border:      #e2e8f0;
  --red:         #ef4444;
  --blue:        #3b82f6;
  --orange:      #f97316;
  --purple:      #8b5cf6;
  --nav-bg:      #0f172a;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:      0 4px 16px rgba(0,0,0,.08);
  --shadow-lg:   0 10px 40px rgba(0,0,0,.12);
  --radius:      12px;
  --radius-lg:   18px;
}

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

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ── */
nav {
  background: var(--nav-bg);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.nav-logo {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .4rem;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.nav-logo span { color: var(--green); }

.nav-links { display: flex; align-items: center; gap: .1rem; }
.nav-links a {
  color: rgba(255,255,255,.6);
  text-decoration: none;
  padding: .4rem .75rem;
  border-radius: 8px;
  font-size: .82rem;
  font-weight: 500;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-links a.active { color: var(--green); background: rgba(34,197,94,.1); }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 600;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

.btn-primary  { background: var(--green-dark); color: #fff; }
.btn-primary:hover { background: var(--green); }
.btn-gold     { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #d97706; }
.btn-blue     { background: var(--blue); color: #fff; }
.btn-orange   { background: var(--orange); color: #fff; }
.btn-outline  { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--green-dark); color: var(--green-dark); background: var(--green-bg); }
.btn-danger   { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm       { padding: .3rem .65rem; font-size: .78rem; border-radius: 6px; }

/* ── Cards ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

/* ── Hero ── */
.hero {
  background: var(--nav-bg);
  color: #fff;
  padding: 5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(34,197,94,.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(21,128,61,.2) 0%, transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,197,94,.4), transparent);
}

.hero-content { position: relative; max-width: 680px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -.03em;
  line-height: 1.15;
}
.hero h1 span { color: var(--green); }
.hero p { font-size: 1.05rem; color: rgba(255,255,255,.65); margin-bottom: 2rem; }
.hero-btns { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ── Sections ── */
.section { padding: 3rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: .3rem; letter-spacing: -.02em; }
.section-sub { color: var(--muted); margin-bottom: 2rem; font-size: .9rem; }

/* ── Services grid ── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }

.service-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  cursor: default;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--green);
}
a.service-card { text-decoration: none; color: inherit; cursor: pointer; }

.service-icon { font-size: 2rem; margin-bottom: .75rem; display: block; }
.service-card h3 { color: var(--text); margin-bottom: .35rem; font-size: .9rem; font-weight: 700; }
.service-card p  { color: var(--muted); font-size: .82rem; line-height: 1.5; }

/* ── Stat grid ── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 2rem; }

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--green);
  border-radius: 3px 3px 0 0;
}
.stat-card:nth-child(2)::before { background: var(--gold); }
.stat-card:nth-child(3)::before { background: var(--blue); }
.stat-card:nth-child(4)::before { background: var(--orange); }
.stat-card:nth-child(5)::before { background: var(--purple); }
.stat-card:nth-child(6)::before { background: var(--red); }

.stat-number { font-size: 2.2rem; font-weight: 800; color: var(--text); line-height: 1; letter-spacing: -.03em; }
.stat-number.red    { color: var(--red); }
.stat-number.orange { color: var(--orange); }
.stat-number.blue   { color: var(--blue); }
.stat-label { color: var(--muted); font-size: .78rem; margin-top: .35rem; font-weight: 500; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); }

table { width: 100%; border-collapse: collapse; font-size: .85rem; }

th {
  background: var(--nav-bg);
  color: rgba(255,255,255,.8);
  padding: .7rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
th:first-child { border-radius: var(--radius) 0 0 0; }
th:last-child  { border-radius: 0 var(--radius) 0 0; }

td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--green-bg); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .01em;
}
.badge-entry, .badge-active, .badge-completed, .badge-paid, .badge-available {
  background: #dcfce7; color: #15803d;
}
.badge-exit, .badge-cancelled, .badge-unpaid, .badge-overdue {
  background: #fee2e2; color: #dc2626;
}
.badge-pending, .badge-upcoming {
  background: #fef9c3; color: #a16207;
}
.badge-in_progress, .badge-on_trip {
  background: #dbeafe; color: #1d4ed8;
}

/* ── Forms ── */
.form-group { margin-bottom: 1rem; }

label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: .3rem;
  color: var(--text);
}

input, select, textarea {
  width: 100%;
  padding: .55rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .875rem;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34,197,94,.12);
}
textarea { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Modals ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  width: min(560px, 100%);
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.modal-close {
  background: var(--bg);
  border: 1px solid var(--border);
  width: 30px; height: 30px;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.modal-close:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--nav-bg);
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 10px;
  font-size: .85rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(120px);
  opacity: 0;
  transition: all .3s cubic-bezier(.34,1.56,.64,1);
  z-index: 999;
  max-width: 300px;
  border-left: 3px solid var(--green);
}
#toast.show { transform: translateY(0); opacity: 1; }

/* ── NFC pulse ── */
.nfc-pulse {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(34,197,94,.1);
  color: var(--green-dark);
  padding: .35rem .9rem;
  border-radius: 99px;
  font-size: .8rem;
  font-weight: 600;
  border: 1px solid rgba(34,197,94,.25);
}
.nfc-pulse::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.3;transform:scale(1.5)} }

/* ── Map ── */
#map { height: 420px; border-radius: var(--radius); border: 1px solid var(--border); }

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* ── Team grid (about page) ── */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.team-card { text-align: center; padding: 1.5rem 1rem; }
.team-avatar { font-size: 2.5rem; margin-bottom: .75rem; }
.team-card h4 { font-size: .9rem; font-weight: 700; color: var(--text); margin-bottom: .2rem; }
.team-card p  { font-size: .8rem; color: var(--muted); }

/* ── Footer ── */
footer {
  background: var(--nav-bg);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: .8rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
footer a { color: var(--green); text-decoration: none; }
footer a:hover { color: #4ade80; }

/* ── Responsive ── */
@media (max-width: 768px) {
  nav { padding: 0 1rem; }
  .hamburger { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    padding: .75rem 1rem 1rem;
    gap: .15rem;
    z-index: 99;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .55rem .75rem; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 3.5rem 1.25rem; }
  .section { padding: 2rem 1.25rem; }
  .page-header { padding-bottom: 1rem; }
}
