/* ILECO III — Admin pages: Reports, Privacy, Outside changes, Visitors, Coverage, Backups, Health */
.dg-tools {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.dg-tools select {
  width: auto;
  min-width: 200px;
}
.dg-tools input[type='search'] {
  min-width: 200px;
  width: auto;
}
.dg-tools input[type='search'] {
  flex: 1 1 260px;
}
.dg-tools input[type='text'] {
  min-width: 200px;
  width: auto;
  flex: 1 1 220px;
}
.rep-card {
  margin-bottom: 18px;
}
.rep-card .table-wrap {
  margin: 0;
}
.rep-nota {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 12.5px;
}
tr.rep-alarma td {
  background: var(--red-tint) !important;
}
tr.rep-alarma td:first-child {
  box-shadow: inset 3px 0 0 var(--red);
}

.prv-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 4px 0 10px;
}
.prv-head label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-weight: 600;
  cursor: pointer;
}
.prv-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.prv-warn {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--amber-tint);
  border: 1px solid var(--amber);
  color: var(--amber-deep);
  font-size: 13px;
  margin-bottom: 14px;
}

.out-json {
  max-width: 560px;
  max-height: 300px;
  overflow: auto;
  margin: 6px 0 0;
  padding: 10px;
  border-radius: 8px;
  background: #0f1b27;
  color: #dde5eb;
  font:
    12px/1.45 'IBM Plex Mono',
    monospace;
  white-space: pre;
}
details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
}

.cov-found {
  min-height: 18px;
  margin: -6px 0 14px;
  font-weight: 600;
  color: var(--green);
}
.cov-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.cov-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.cov-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.cov-head h3 {
  font-size: 16px;
}
.cov-count {
  font:
    600 12px 'IBM Plex Mono',
    monospace;
  color: var(--ink-soft);
}
.cov-town {
  border-top: 1px solid var(--line);
  padding: 7px 0;
}
.cov-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 0 2px;
}
.cov-chip {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--amber-tint);
  color: var(--amber-deep);
  font-size: 12px;
  font-weight: 600;
}

.bk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
.bk-grid fieldset p {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-size: 13px;
}
.bk-last {
  font-weight: 600;
  margin: 4px 0 12px;
}

.hl-time {
  color: var(--ink-soft);
  font-size: 12.5px;
}
.hl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.hl-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.hl-card p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--ink-soft);
}
.hl-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.hl-pill {
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #e8e4da;
  color: var(--ink-soft);
}
.hl-ok {
  border-left-color: var(--green);
}
.hl-ok .hl-pill {
  background: var(--green-tint);
  color: var(--green);
}
.hl-warn {
  border-left-color: #c2410c;
}
.hl-warn .hl-pill {
  background: #ffedd5;
  color: #9a3412;
}
.hl-bad {
  border-left-color: var(--red);
}
.hl-bad .hl-pill {
  background: var(--red-tint);
  color: var(--red);
}
.hl-info {
  border-left-color: #4678be;
}

/* Live map + visitors map */
.loc-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.loc-map {
  height: min(70vh, 640px);
  min-height: 340px;
}
.loc-map.vis-map {
  height: min(60vh, 520px);
}
.loc-list {
  display: grid;
  gap: 10px;
  max-height: min(70vh, 640px);
  overflow: auto;
  padding-right: 2px;
}
.loc-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-left: 6px solid var(--line);
}
.loc-card.fresh {
  border-left-color: #2e9e57;
}
.loc-card.recent {
  border-left-color: #ffb020;
}
.loc-card.old {
  border-left-color: #9aa0ad;
}
.loc-card.sel {
  outline: 3px solid #5fd0ff;
}
.loc-card b {
  font-size: 15px;
  color: var(--navy);
}
.loc-card .sub {
  color: var(--ink-soft);
  font-size: 12.5px;
  margin: 2px 0 8px;
}
.loc-card .acts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.loc-card .acts button,
.loc-card .acts a {
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--navy);
  background: #fff;
  color: var(--navy);
  font:
    700 12px 'Segoe UI',
    system-ui,
    sans-serif;
  cursor: pointer;
  text-decoration: none;
}
.loc-card .acts button:hover,
.loc-card .acts a:hover {
  background: var(--navy);
  color: var(--amber);
}
.loc-empty {
  padding: 20px;
  border: 2px dashed #e0cf8f;
  border-radius: 14px;
  text-align: center;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.5);
}
@media (max-width: 900px) {
  .loc-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .loc-list {
    max-height: none;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  }
  .loc-map {
    height: 60vh;
  }
}

/* GPS accuracy words (Live map) and the readable list of the visitors' places */
.gps {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 700;
  background: #e8e4da;
  color: var(--ink-soft);
}
.gps-good {
  background: #cfe9d4;
  color: #14532d;
}
.gps-fair {
  background: #fff0bf;
  color: #5c4400;
}
.gps-poor {
  background: #fbe0dc;
  color: #7a2417;
}
.vis-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px 14px;
  margin-top: 10px;
}
.vis-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.vis-item i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3px rgba(20, 33, 61, 0.25);
}
.dg-tools .dl-lbl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Live map: filters (Office, Town, Barangay) and the search box */
.loc-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 14px;
}
.loc-filters select {
  width: auto;
  min-width: 160px;
}
.loc-filters input[type='search'] {
  flex: 1 1 280px;
  min-width: 200px;
}

/* Users: the office of every user */
select.no-office {
  border-color: #c0614f;
  background: #fbe0dc;
  color: #7a2417;
}
#users-body select[data-action='office'] {
  min-width: 190px;
}

/* Errors */
.er-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid #c0614f;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}
.er-card.er-db {
  border-left-color: #4678be;
}
.er-card.er-resource {
  border-left-color: #ffb020;
}
.er-card.er-manual {
  border-left-color: #9aa0ad;
}
.er-top {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.er-kind {
  padding: 2px 9px;
  border-radius: 99px;
  background: #fbe0dc;
  color: #7a2417;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}
.er-db .er-kind {
  background: #dde8f8;
  color: #1f3f72;
}
.er-resource .er-kind {
  background: #fff0bf;
  color: #5c4400;
}
.er-msg {
  color: var(--navy);
  overflow-wrap: anywhere;
}
.er-meta {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.er-acts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.er-card.er-report {
  border-left-color: #2e9e57;
}
.er-report .er-kind {
  background: #cfe9d4;
  color: #14532d;
}
.er-new {
  padding: 2px 9px;
  border-radius: 99px;
  background: #d93025;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.er-card.er-slow {
  border-left-color: #9aa0ad;
}
.er-slow .er-kind {
  background: #e7e9ee;
  color: #3a4152;
}

/* Live map: the speed of a crew (lakbay.js) and the Trips list */
.loc-card .sub.spd {
  font-weight: 700;
  margin: 2px 0 2px;
}
.spd-moving {
  color: #14532d;
}
.spd-moving::before {
  content: '\25B6\00a0';
}
.spd-stopped {
  color: #5c4400;
}
.spd-stopped::before {
  content: '\25A0\00a0';
}
.spd-offline,
.spd-unknown {
  color: var(--ink-soft);
  font-weight: 600;
}
.loc-card .acts .trips-btn {
  background: var(--navy);
  color: var(--amber);
}
.loc-card .acts .trail-btn.on {
  background: #1f6bff;
  border-color: #1f6bff;
  color: #fff;
} /* matches the blue line drawn on the map, so it is clear whose trail is showing */
.loc-trips {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.loc-trips[hidden] {
  display: none;
}
.trips-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.trips-head h3 {
  margin: 0;
  font-size: 17px;
  color: var(--navy);
}
.trips-sum {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.trips-kpi {
  flex: 1 1 120px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(20, 33, 61, 0.06);
  display: flex;
  flex-direction: column;
}
.trips-kpi span {
  font-size: 11.5px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.trips-kpi b {
  font-size: 17px;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.trips-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.trips-item {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.trips-stop {
  border-left: 6px solid var(--navy);
}
.trips-stop.is-here {
  border-left-color: #2e9e57;
}
.trips-stop.is-lost,
.trips-trip.is-lost {
  border-left-color: #9aa0ad;
}
.trips-trip {
  margin-left: 22px;
  border-left: 6px dashed #1f6bff;
  background: rgba(31, 107, 255, 0.05);
}
.trips-trip.is-going {
  border-left-color: #2e9e57;
}
.trips-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.trips-title b {
  font-size: 14.5px;
  color: var(--navy);
}
.trips-no {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--amber);
  font-weight: 700;
  font-size: 12.5px;
}
.trips-arrow {
  font-size: 16px;
  color: #1f6bff;
  font-weight: 700;
}
.trips-times {
  display: grid;
  grid-template-columns: repeat(3, max-content minmax(110px, 1fr));
  gap: 3px 10px;
  font-size: 13px;
  align-items: baseline;
}
.trips-times .trips-lbl {
  color: var(--ink-soft);
}
.trips-times b {
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
  .trips-times {
    grid-template-columns: max-content minmax(0, 1fr);
  }
  .trips-trip {
    margin-left: 8px;
  }
}
.trips-go {
  margin-top: 8px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--navy);
  background: #fff;
  color: var(--navy);
  font:
    700 12px 'Segoe UI',
    system-ui,
    sans-serif;
  cursor: pointer;
}
.trips-go:hover {
  background: var(--navy);
  color: var(--amber);
}
.trips-warn {
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff8e1;
  border: 1px solid #f0d98a;
  color: #5c4400;
  font-size: 12.5px;
}
.trips-note {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}
@media print {
  .trips-go,
  .trips-head button {
    display: none;
  }
}

/* ---------- Admin > Users: the Edit window and the full name under the user name ---------- */
.usr-sub {
  font-size: 11.5px;
  color: var(--ink-soft, #5b6275);
  margin-top: 2px;
  font-weight: 500;
}
.usr-dlg {
  width: min(460px, 94vw);
}
.usr-dlg .usr-field {
  margin-bottom: 10px;
}
.usr-dlg .usr-field label {
  display: block;
  margin-bottom: 4px;
}
.usr-dlg .usr-field small {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--ink-soft, #5b6275);
}
.usr-dlg input[readonly] {
  background: #f1ede2;
  color: #5b6275;
}
.usr-dlg .usr-nota {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--ink-soft, #5b6275);
}
.usr-dlg .usr-sayop {
  min-height: 1.2em;
  margin-top: 8px;
  color: #b3261e;
  font-weight: 600;
  font-size: 13px;
}
