:root{
  --green1:#0ea37e;
  --green2:#078b6d;
  --bg:#f6f8fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e6edf5;
  --shadow:0 14px 40px rgba(15, 23, 42, .10);
  --shadow2:0 10px 26px rgba(15, 23, 42, .10);
  --radius:18px;
}

*{box-sizing:border-box;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial}
body{margin:0;background:var(--bg);color:var(--text)}

/* HERO */
.hero{
  background:linear-gradient(135deg,var(--green1),var(--green2));
  padding:22px 16px 18px;
  color:#fff;
}
.hero__inner{
  max-width:1160px;margin:0 auto;
  display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap
}
.hero__title{display:flex;gap:12px;align-items:center}
.hero__logo{font-size:26px}
.hero__h1{font-size:28px;font-weight:900;letter-spacing:-.2px}
.hero__sub{opacity:.9;margin-top:3px;font-size:14px}

.hero__right{display:flex;gap:10px;flex-wrap:wrap}

/* BUTTONS */
.btn{
  border:1px solid rgba(255,255,255,.35);
  padding:10px 14px;border-radius:12px;
  cursor:pointer;font-weight:800;display:inline-flex;gap:8px;align-items:center
}
.btn--ghost{background:rgba(255,255,255,.10);color:#fff}
.btn--solid{background:#fff;color:#0b3b2f;border-color:#fff}
.btn:active{transform:translateY(1px)}

/* KPI */
.kpi-wrap{
  max-width:1160px;margin:16px auto 0;
  display:grid;grid-template-columns:repeat(4,1fr);gap:12px
}
.kpi{
  background:rgba(255,255,255,.95);
  border-radius:16px;padding:14px 14px;
  display:flex;gap:12px;align-items:center;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  color:var(--text)
}
.kpi__icon{
  width:42px;height:42px;border-radius:14px;
  display:grid;place-items:center;
  background:#eef2ff;color:#1f2a44;font-size:18px
}
.kpi__icon--ok{background:#eafff5;color:#0b7a59}
.kpi__icon--fly{background:#eaf2ff;color:#1e60ff}
.kpi__icon--warn{background:#fff3e6;color:#c2410c}
.kpi__num{font-size:26px;font-weight:900;line-height:1}
.kpi__label{font-size:13px;color:var(--muted);margin-top:3px}

@media(max-width:980px){.kpi-wrap{grid-template-columns:repeat(2,1fr)}}
@media(max-width:520px){.kpi-wrap{grid-template-columns:1fr}}

/* WRAP */
.wrap{max-width:1160px;margin:0 auto;padding:16px 14px 96px}

/* TOOLBAR */
.toolbar{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:20px;
  padding:14px;
  box-shadow:var(--shadow2);
  margin-top:10px
}
.searchbox{
  display:flex;align-items:center;gap:10px;
  border:1px solid var(--line);
  border-radius:14px;padding:10px 12px;
  background:#fff
}
.searchbox__icon{opacity:.7}
.searchbox__input{
  border:none;outline:none;width:100%;
  font-size:14px;background:transparent
}
.toolbar__right{
  margin-top:10px;
  display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap
}

/* SELECT + INPUT */
.select,.input{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 12px;
  background:#fff;
  outline:none;
  font-weight:700;
}
.select--full,.input--full{width:100%}

/* TABS */
.tabs{
  margin-top:12px;
  display:flex;gap:8px;flex-wrap:wrap;
  padding:6px;background:#f3f6fb;
  border-radius:14px;border:1px solid var(--line)
}
.tab{
  border:none;background:transparent;
  padding:9px 12px;border-radius:12px;
  cursor:pointer;font-weight:900;color:#334155
}
.tab.is-active{
  background:#fff;border:1px solid var(--line);
  box-shadow:0 6px 16px rgba(15,23,42,.06)
}

/* GRID + CARD */
.grid{
  margin-top:14px;
  display:grid;grid-template-columns:repeat(3,1fr);gap:14px
}
@media(max-width:980px){.grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.grid{grid-template-columns:1fr}}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:var(--shadow2);
  overflow:hidden;
}
.card__top{
  height:6px;background:#e2e8f0;
}
.card__top.is-warn{background:#ef4444}
.card__body{padding:14px}
.card__row{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.card__title{font-weight:950;font-size:16px}
.card__sub{margin-top:4px;color:var(--muted);font-weight:700;font-size:13px}
.card__tags{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap}
.badge{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 10px;border-radius:999px;
  border:1px solid var(--line);
  font-weight:900;font-size:12px
}
.badge--cat{background:#fff7ed;color:#9a3412}
.badge--ok{background:#eafff5;color:#0b7a59}
.badge--prio{background:#eef2ff;color:#1f2a44}

.card__timeline{
  margin-top:12px;
  padding:10px 0 2px;
  border-top:1px solid var(--line);
  display:flex;justify-content:space-between;gap:8px
}
.dot{
  width:12px;height:12px;border-radius:999px;
  background:#e2e8f0;border:2px solid #e2e8f0
}
.dot.is-on{background:#10b981;border-color:#a7f3d0}
.tlabel{font-size:11px;color:var(--muted);font-weight:800;text-align:center;margin-top:6px}
.tstep{display:flex;flex-direction:column;align-items:center;min-width:54px}

.card__action{
  padding:10px 14px 14px;
  display:flex;align-items:center;justify-content:center;
  color:#0b7a59;font-weight:950;gap:8px;
  cursor:pointer
}
.card__action:hover{opacity:.85}

/* FAB */
.fab{
  position:fixed;right:20px;bottom:20px;
  width:58px;height:58px;border:none;
  border-radius:999px;
  background:#0ea37e;color:#fff;
  font-size:32px;font-weight:900;
  box-shadow:0 18px 46px rgba(0,0,0,.25);
  cursor:pointer
}
.fab:active{transform:translateY(1px)}

/* DIALOG */
.dlg{
  border:none;border-radius:22px;
  width:min(720px, calc(100% - 22px));
  box-shadow:0 40px 120px rgba(0,0,0,.35);
  padding:0;
}
.dlg::backdrop{background:rgba(15,23,42,.55)}
.dlg__head{
  padding:18px 18px 10px;
  display:flex;justify-content:space-between;align-items:center
}
.dlg__title{font-size:26px;font-weight:950}
.iconbtn{
  border:none;background:transparent;
  font-size:20px;cursor:pointer;opacity:.7
}
.dlg__body{padding:0 18px 18px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:640px){.form-row{grid-template-columns:1fr}}
.field{margin-top:12px}
.field label{display:block;font-weight:900;margin-bottom:8px;color:#0f172a}
.muted{color:var(--muted);font-size:12px;margin-top:8px}

.dlg__actions{
  margin-top:16px;
  display:flex;justify-content:flex-end;gap:10px
}

/* TRACK STEPS */
.step-list{display:flex;flex-direction:column;gap:10px;margin-top:6px}
.step{
  border:2px solid var(--line);
  border-radius:16px;
  padding:14px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  cursor:pointer;background:#fff
}
.step.is-active{
  border-color:#10b981;
  background:#eafff5
}
.step__left{display:flex;align-items:center;gap:12px}
.step__icon{
  width:42px;height:42px;border-radius:14px;
  background:#f1f5f9;
  display:grid;place-items:center;font-size:18px
}
.step__name{font-weight:950}
.step__sub{color:var(--muted);font-weight:800;font-size:13px;margin-top:2px}
.step__check{
  width:30px;height:30px;border-radius:999px;
  border:2px solid var(--line);
  display:grid;place-items:center;color:#10b981;font-weight:950
}
.step.is-active .step__check{border-color:#10b981;background:#10b981;color:#fff}

/* LOCATION GRID */
.loc-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:10px;
}
@media(max-width:860px){.loc-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:520px){.loc-grid{grid-template-columns:repeat(2,1fr)}}

.loc{
  border:2px solid var(--line);
  border-radius:16px;
  padding:14px 10px;
  text-align:center;
  cursor:pointer;
  background:#fff;
  font-weight:900;
  color:#334155;
}
.loc .ico{font-size:22px;margin-bottom:6px;opacity:.9}
.loc.is-on{
  border-color:#10b981;
  background:#eafff5;
  color:#065f46;
}