:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #0f1f38;
  --muted: #607089;
  --line: #d9e3ef;
  --blue: #245ff2;
  --navy: #08264a;
  --green: #16a66a;
  --amber: #b66b00;
  --purple: #7857d9;
  --red: #df3045;
  --shadow: 0 20px 55px rgba(19, 39, 68, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  background: linear-gradient(135deg, #102a43, #1f4e79);
}

.login-panel {
  width: min(440px, 100%);
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px;
  display: grid;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #172b4d;
  font-weight: 800;
}

.login-panel .brand-mark {
  background: #172b4d;
  color: #fff;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.topbar p,
.module-card p {
  color: var(--muted);
}

.form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
}

label span {
  color: var(--muted);
  font-size: 14px;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 9px 11px;
}

.primary-button,
.secondary-button,
.secondary-link {
  border: 0;
  border-radius: 8px;
  min-height: 40px;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-button {
  background: linear-gradient(135deg, #245ff2, #1746b8);
  color: #fff;
  font-weight: 800;
}

.secondary-button {
  background: #edf3f8;
  color: var(--ink);
  font-weight: 800;
}

.secondary-link {
  background: #edf3f8;
  color: var(--ink);
  font-weight: 700;
}

.back-link {
  display: inline-flex;
  color: var(--blue);
  font-weight: 800;
  margin-bottom: 8px;
  text-decoration: none;
}

.alert {
  border-radius: 8px;
  background: #fff1f0;
  color: #b42318;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.alert-ok {
  background: #e8f6ee;
  color: #17613a;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
}

.sidebar {
  background: linear-gradient(180deg, #061f3d 0%, #0b3558 100%);
  color: #fff;
  padding: 22px 18px;
}

.sidebar .brand {
  margin-bottom: 28px;
}

.sidebar .brand small {
  color: #cbd5e1;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav a {
  color: #e5edf5;
  text-decoration: none;
  border-radius: 8px;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  font-weight: 800;
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav a.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 3px 0 0 #60a5fa;
}

.main {
  min-width: 0;
  padding: 24px;
  width: 100%;
  max-width: 100%;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.topbar h1 {
  margin: 0;
  font-size: 30px;
}

.topbar p {
  margin: 4px 0 0;
}

.metric-grid,
.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metric,
.module-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  text-align: center;
  padding: 16px;
}

.metric span {
  display: block;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.metric-green {
  background: #eaf7ef;
  border-color: #b8dfc7;
  color: var(--green);
}

.metric-blue {
  background: #edf6fd;
  border-color: #b9d9ef;
  color: var(--blue);
}

.metric-amber {
  background: #fff7e6;
  border-color: #f4d49a;
  color: var(--amber);
}

.module-card {
  padding: 16px;
}

.module-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.module-card p {
  margin: 0 0 14px;
  line-height: 1.4;
}

.module-card span {
  color: var(--blue);
  font-weight: 700;
  font-size: 14px;
}

.card-action {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.section-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.section-tabs a {
  min-height: 40px;
  border-radius: 8px;
  padding: 9px 12px;
  display: inline-flex;
  align-items: center;
  background: #e6edf3;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.section-tabs a.active {
  background: var(--blue);
  color: #fff;
}

.access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 14px;
  margin-bottom: 14px;
}

.access-grid-two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.company-grid-large {
  gap: 18px;
}

.company-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.company-card-entry {
  min-height: 250px;
}

.company-card.selected {
  border-color: #86b7e2;
  box-shadow: 0 0 0 3px rgba(31, 78, 121, 0.12), var(--shadow);
}

.company-card h2 {
  margin: 0 0 4px;
  font-size: 20px;
}

.company-card p {
  margin: 0;
  color: var(--muted);
}

.company-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.company-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.company-card dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.company-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.company-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: #172b4d;
  color: #fff;
  font-weight: 900;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip-row span {
  border-radius: 999px;
  background: #eaf1f7;
  color: #31516f;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.company-platform {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.company-context {
  background: #102a43;
  color: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.company-context .company-avatar {
  background: #fff;
  color: #172b4d;
}

.company-context small {
  display: block;
  color: #cbd5e1;
  margin-top: 3px;
}

.company-module-nav {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.company-module-nav a {
  min-height: 42px;
  border-radius: 8px;
  color: #e5edf5;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  text-decoration: none;
  font-weight: 800;
}

.company-module-nav a:hover,
.company-module-nav a.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.company-dashboard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.module-card-action {
  border-left: 5px solid var(--green);
}

.status-pill {
  width: fit-content;
  border-radius: 999px;
  background: #e8f6ee;
  color: var(--green);
  padding: 5px 9px;
  font-size: 13px;
  font-weight: 900;
}

.home-entry-grid .module-card {
  min-height: 150px;
}

.home-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-control-card {
  min-height: 170px;
  display: grid;
  align-content: start;
  gap: 10px;
  border-left: 5px solid var(--blue);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.home-control-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(19, 39, 68, 0.14);
}

.home-control-card .card-action {
  margin-top: auto;
}

.admin-shell {
  grid-template-columns: 250px minmax(0, 1fr);
}

.admin-sidebar {
  background: linear-gradient(180deg, #08264a 0%, #0d3356 100%);
}

.admin-main {
  background:
    radial-gradient(circle at top right, rgba(31, 78, 121, 0.08), transparent 28rem),
    var(--bg);
  min-height: 100vh;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.admin-topbar p {
  margin: 4px 0 0;
  color: var(--muted);
}

.admin-topbar strong {
  color: var(--blue);
}

.eyebrow {
  color: #42526e;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.date-pill {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-weight: 800;
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.admin-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  min-height: 112px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.admin-metric::after {
  content: "";
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  position: absolute;
  right: 14px;
  top: 14px;
}

.admin-metric span,
.admin-metric small {
  display: block;
}

.admin-metric span {
  color: #31445b;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-metric strong {
  display: block;
  color: #0f2343;
  font-size: 28px;
  margin: 8px 0 4px;
  position: relative;
  z-index: 1;
}

.admin-metric small {
  color: var(--muted);
}

.metric-blue-soft {
  background: linear-gradient(135deg, #ffffff, #edf5ff);
  border-color: #c9ddf6;
}

.metric-green-soft {
  background: linear-gradient(135deg, #ffffff, #eaf8f0);
  border-color: #bee7cc;
}

.metric-teal-soft {
  background: linear-gradient(135deg, #ffffff, #e6f8f8);
  border-color: #bde6e5;
}

.metric-purple-soft {
  background: linear-gradient(135deg, #ffffff, #f2edff);
  border-color: #d6c8f7;
}

.metric-amber-soft {
  background: linear-gradient(135deg, #ffffff, #fff4e5);
  border-color: #f5d49c;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr) minmax(300px, 0.85fr);
  gap: 14px;
  margin-bottom: 16px;
}

.admin-chart-panel {
  min-height: 280px;
}

.trend-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
  height: 170px;
  border-bottom: 1px solid var(--line);
  padding: 10px 4px 0;
}

.trend-day {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 7px;
  height: 100%;
  text-align: center;
}

.trend-day span {
  align-self: end;
  width: 100%;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #2f6df6, #1f4e79);
  min-height: 14px;
}

.trend-day small {
  color: var(--muted);
  font-size: 12px;
}

.legend-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.legend-row span::before {
  content: "";
  width: 10px;
  height: 3px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

.legend-blue::before {
  background: #2f6df6;
}

.legend-purple::before {
  background: #7449d8;
}

.legend-green::before {
  background: #18a86b;
}

.legend-red::before {
  background: #ef3b4d;
}

.quick-panel {
  margin-bottom: 16px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.quick-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-card {
  display: grid;
  gap: 7px;
  align-content: center;
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.quick-card:hover {
  border-color: #8fb7ff;
  transform: translateY(-2px);
}

.quick-card strong,
.quick-card span {
  display: block;
}

.quick-card strong {
  font-size: 14px;
}

.quick-card span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.alert-list,
.task-list {
  display: grid;
  gap: 10px;
}

.alert-list a {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 4px;
  padding: 12px;
  text-decoration: none;
}

.alert-list span {
  color: var(--muted);
  font-size: 13px;
}

.alert-count {
  background: #ffe7ea;
  color: #d92d3c;
}

.admin-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.55fr);
  gap: 14px;
}

.task-list label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
  color: var(--ink);
  font-weight: 700;
}

.task-list input {
  width: auto;
  min-height: auto;
}

.task-list small {
  color: #b42318;
  font-weight: 800;
}

.rounds-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.round-list {
  display: grid;
  gap: 10px;
}

.round-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.round-list-item strong,
.round-list-item span {
  display: block;
}

.round-list-item span {
  color: var(--muted);
  margin-top: 4px;
}

.round-execution-panel {
  margin-bottom: 14px;
}

.round-track-summary {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  margin-bottom: 14px;
  padding: 12px;
}

.round-track-summary strong {
  color: var(--ink);
}

.round-track-list {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.inline-action-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.round-point-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.round-point-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid #9aa8b7;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.round-point-card.normal {
  border-left-color: var(--green);
}

.round-point-card.observacion {
  border-left-color: var(--amber);
}

.round-point-card.incidente {
  border-left-color: var(--red);
}

.round-point-card.omitido {
  border-left-color: #6b7280;
}

.round-point-card h3 {
  margin: 8px 0 4px;
}

.round-point-card p {
  margin: 0;
  color: var(--muted);
}

.check-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.check-card input {
  width: auto;
  min-height: auto;
}

.check-card span {
  color: var(--ink);
  font-weight: 800;
}

.table-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) minmax(120px, 0.8fr) auto auto;
  gap: 8px;
  align-items: center;
  min-width: 680px;
}

.table-form-small {
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.8fr) minmax(110px, 0.7fr) minmax(110px, 0.7fr) minmax(90px, 0.5fr) auto auto;
}

.table-form input {
  min-height: 36px;
}

.mini-check {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 700;
}

.mini-check input {
  width: auto;
  min-height: auto;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h2 {
  margin: 0;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.muted {
  color: var(--muted);
}

.result-list,
.card-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.result-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.result-item input {
  width: auto;
  min-height: auto;
}

.result-item strong,
.result-item small {
  display: block;
}

.result-item small,
table small {
  color: var(--muted);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.segmented label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  color: var(--ink);
}

.segmented label + label {
  border-left: 1px solid var(--line);
}

.segmented input {
  width: auto;
  min-height: auto;
}

.vehicle-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.geo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.count-pill {
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #edf2f7;
  color: var(--muted);
  font-weight: 800;
}

.access-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.inside-card-main {
  display: grid;
  gap: 6px;
  text-align: center;
}

.access-card h3 {
  margin: 0;
  font-size: 20px;
}

.inside-card-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.inside-card-summary strong,
.inside-card-summary span {
  display: inline-flex;
  align-items: center;
}

.exit-details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px;
}

.exit-details summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.exit-details[open] {
  display: grid;
  gap: 10px;
}

.empty-state {
  display: grid;
  gap: 10px;
  justify-items: center;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #f8fafc;
  padding: 22px;
  text-align: center;
}

.empty-state h3 {
  margin: 0;
}

.people-directory {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.person-directory-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
}

.person-directory-card.inactive {
  opacity: 0.55;
}

.person-directory-card h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.person-directory-card p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.mini-pill {
  border-radius: 999px;
  background: #eef5ff;
  color: #1f4e79;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  white-space: nowrap;
}

.access-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.access-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.access-card dd {
  margin: 2px 0 0;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 1100px) {
  .metric-grid,
  .module-grid,
  .home-control-grid,
  .admin-metric-grid,
  .admin-dashboard-grid,
  .admin-bottom-grid,
  .rounds-layout,
  .round-point-grid,
  .access-grid,
  .split-grid,
  .settings-grid,
  .company-grid,
  .company-platform {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .app-shell {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100vw;
  }

  .main {
    padding: 14px;
    width: 100%;
    max-width: 100vw;
  }

  .sidebar,
  .admin-sidebar {
    position: relative;
    top: auto;
    width: 100%;
    max-width: 100vw;
    padding: 12px;
    overflow: hidden;
  }

  .sidebar .brand {
    justify-content: center;
    margin-bottom: 12px;
    text-align: left;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    width: 100%;
  }

  .nav a {
    justify-content: center;
    min-height: 48px;
    border-radius: 14px;
    padding: 10px 8px;
    text-align: center;
    white-space: normal;
    line-height: 1.15;
    font-size: 14px;
  }

  .topbar,
  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
  }

  .topbar h1,
  .admin-topbar h1 {
    font-size: 30px;
    line-height: 1.05;
  }

  .admin-top-actions,
  .button-row {
    width: 100%;
  }

  .primary-button,
  .secondary-button,
  .secondary-link {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    text-align: center;
  }

  .panel,
  .metric,
  .module-card,
  .company-card,
  .admin-metric,
  .quick-card,
  .access-card {
    border-radius: 18px;
  }

  .panel {
    padding: 14px;
  }

  .admin-metric-grid,
  .metric-grid,
  .company-grid,
  .company-grid-large,
  .admin-dashboard-grid,
  .admin-bottom-grid,
  .quick-grid,
  .quick-grid.compact,
  .home-control-grid,
  .access-grid,
  .access-grid-two,
  .split-grid,
  .rounds-layout,
  .round-point-grid,
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .admin-metric {
    min-height: 96px;
    padding: 14px;
  }

  .admin-metric strong {
    font-size: 32px;
  }

  .company-card-entry {
    min-height: auto;
  }

  .company-title-row {
    align-items: flex-start;
  }

  .company-card dl,
  .access-card dl {
    grid-template-columns: 1fr;
  }

  .person-directory-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .person-directory-card p {
    justify-content: center;
  }

  .mini-pill {
    justify-self: center;
  }

  .chip-row span {
    font-size: 12px;
    padding: 6px 9px;
  }

  .trend-bars {
    height: 130px;
    gap: 6px;
    overflow: hidden;
  }

  .trend-day small {
    font-size: 10px;
  }

  .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 620px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .inline-form,
  .inline-action-form,
  .vehicle-fields,
  .geo-grid,
  .segmented,
  .access-card dl,
  .check-grid,
  .company-card dl,
  .table-form {
    grid-template-columns: 1fr;
  }

  .table-form {
    min-width: 0;
  }

  .segmented label + label {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media print {
  .sidebar,
  .topbar form,
  .button-row,
  .access-grid,
  .primary-button,
  .secondary-button,
  .secondary-link {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .main {
    padding: 0;
  }

  .panel,
  .metric,
  .module-card {
    box-shadow: none;
  }
}

@media (max-width: 980px) {
  .app-shell,
  .metric-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .nav {
    display: flex;
    overflow-x: auto;
  }

  .nav a {
    white-space: nowrap;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-topbar,
  .admin-top-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-grid,
  .quick-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .quick-grid,
  .quick-grid.compact,
  .home-control-grid,
  .admin-metric-grid {
    grid-template-columns: 1fr;
  }

  .admin-topbar h1 {
    font-size: 28px;
  }

  .admin-metric,
  .home-control-card,
  .quick-card {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: relative;
    top: auto;
    z-index: auto;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: visible;
  }

  .nav a {
    white-space: normal;
  }

  .admin-topbar,
  .admin-top-actions {
    align-items: stretch;
  }

  .main > * {
    max-width: 100%;
  }
}

/* Guardia mobile-first */
.guard-body {
  --guard-ink: #142033;
  --guard-muted: #657386;
  --guard-blue: #215a8a;
  --guard-green: #148558;
  --guard-line: #d7e1ec;
  --guard-bg: #eef3f8;
  --guard-panel: #ffffff;
  --guard-shadow: 0 18px 42px rgba(15, 40, 77, 0.11);
  margin: 0;
  background: var(--guard-bg);
  color: var(--guard-ink);
}

.guard-app {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 92px;
  background: var(--guard-bg);
}

.guard-screen {
  display: none;
}

.guard-screen.active {
  display: block;
}

.guard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  text-align: center;
}

.guard-header > div {
  flex: 1;
}

.guard-header.compact {
  align-items: center;
}

.guard-header.compact > div {
  padding-right: 44px;
}

.guard-eyebrow {
  display: block;
  color: var(--guard-blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.guard-header h1 {
  margin: 4px 0 3px;
  font-size: 31px;
  line-height: 1.05;
}

.guard-header p {
  margin: 0;
  color: var(--guard-muted);
  font-weight: 800;
}

.guard-avatar {
  display: grid;
  flex: 0 0 48px;
  width: 58px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--guard-blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 1000;
  text-decoration: none;
  box-shadow: var(--guard-shadow);
}

.guard-logout-form {
  flex: 0 0 auto;
  margin: 0;
}

.guard-back-button {
  display: grid;
  min-width: 64px;
  min-height: 44px;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--guard-blue);
  cursor: pointer;
  font-weight: 1000;
  box-shadow: var(--guard-shadow);
}

.guard-status-card,
.guard-round-hero,
.guard-incident-hero,
.guard-panel,
.guard-today-grid article,
.guard-home-metric,
.guard-action,
.guard-status-grid article,
.guard-alert {
  border: 1px solid var(--guard-line);
  border-radius: 22px;
  background: var(--guard-panel);
  box-shadow: var(--guard-shadow);
}

.guard-alert {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #9f1239;
  font-weight: 900;
  margin-bottom: 14px;
  padding: 13px;
  text-align: center;
}

.guard-alert.ok {
  border-color: #bfe7d3;
  background: #edfbf4;
  color: #147f55;
}

.guard-status-card {
  display: grid;
  width: 100%;
  min-height: 134px;
  place-items: center;
  border-color: var(--guard-line);
  margin-bottom: 14px;
  padding: 16px;
  text-align: center;
}

.guard-home-detail-button,
.guard-home-metric {
  appearance: none;
  cursor: pointer;
  font: inherit;
}

.guard-home-detail-button.active,
.guard-home-metric.active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.guard-home-detail-button:focus-visible,
.guard-home-metric:focus-visible {
  outline: 3px solid rgba(33, 90, 138, 0.25);
  outline-offset: 3px;
}

.guard-status-card.access {
  background: #edfbf4;
  border-color: #bfe7d3;
}

.guard-status-card span,
.guard-status-card strong,
.guard-status-card small {
  display: block;
}

.guard-status-card span {
  color: var(--guard-muted);
  font-weight: 900;
}

.guard-status-card strong {
  color: var(--guard-blue);
  font-size: 52px;
  line-height: 1;
}

.guard-status-card small {
  color: var(--guard-muted);
  font-weight: 800;
}

.guard-today-grid,
.guard-actions,
.guard-status-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.guard-today-grid,
.guard-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guard-today-grid article,
.guard-home-metric,
.guard-status-grid article {
  padding: 14px 10px;
  text-align: center;
}

.guard-today-grid strong,
.guard-today-grid span,
.guard-home-metric strong,
.guard-home-metric span,
.guard-status-grid strong,
.guard-status-grid span {
  display: block;
}

.guard-today-grid strong,
.guard-home-metric strong {
  color: var(--guard-blue);
  font-size: 30px;
}

.guard-today-grid span,
.guard-home-metric span,
.guard-status-grid span {
  color: var(--guard-muted);
  font-size: 13px;
  font-weight: 850;
  margin-top: 4px;
}

.guard-detail-panel {
  display: none;
}

.guard-detail-panel.active {
  display: block;
}

.guard-action {
  min-height: 82px;
  border: 0;
  color: var(--guard-ink);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.guard-action.primary,
.guard-full-button {
  background: var(--guard-blue);
  color: #fff;
}

.guard-action.danger {
  width: 100%;
  background: #fff1f2;
  color: #9f1239;
}

.guard-action-form {
  margin: 0;
}

.guard-panel {
  padding: 15px;
  margin-bottom: 14px;
}

.guard-panel-title {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  margin-bottom: 12px;
  text-align: center;
}

.guard-panel-title strong {
  grid-column: 2;
  font-size: 18px;
}

.guard-panel-title span {
  display: grid;
  grid-column: 3;
  min-width: 34px;
  min-height: 34px;
  place-items: center;
  border-radius: 999px;
  background: #e7eef8;
  color: var(--guard-blue);
  font-weight: 1000;
}

.guard-list {
  display: grid;
  gap: 10px;
}

.guard-list article {
  border: 1px solid var(--guard-line);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  text-align: center;
}

.guard-list b,
.guard-list span {
  display: block;
}

.guard-list span {
  color: var(--guard-muted);
  margin-top: 4px;
}

.guard-form {
  display: grid;
  gap: 12px;
}

.guard-form label {
  display: grid;
  gap: 6px;
}

.guard-form label span {
  color: var(--guard-muted);
  font-size: 14px;
  font-weight: 850;
}

.guard-form input,
.guard-form select,
.guard-form textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--guard-line);
  border-radius: 16px;
  background: #fff;
  color: var(--guard-ink);
  padding: 12px 14px;
}

.guard-form textarea {
  min-height: 96px;
  resize: vertical;
}

.guard-search-form {
  border-top: 1px solid var(--guard-line);
  padding-top: 12px;
}

.guard-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  border-radius: 18px;
  background: #e7eef8;
  padding: 6px;
}

.guard-segmented button,
.guard-segmented a {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--guard-muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.guard-segmented button.active,
.guard-segmented a.active {
  background: #fff;
  color: var(--guard-blue);
  box-shadow: 0 8px 18px rgba(15, 40, 77, 0.12);
}

.guard-segmented.compact {
  grid-template-columns: 1fr;
  background: transparent;
  padding: 0;
}

.guard-segmented.compact label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 8px;
  border: 1px solid var(--guard-line);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--guard-muted);
  font-size: 13px;
  font-weight: 900;
}

.guard-segmented.compact input {
  width: auto;
  min-height: auto;
}

.guard-round-point-list article {
  display: grid;
  gap: 10px;
}

.guard-round-tracking-note,
.guard-round-help {
  border: 1px solid var(--guard-line);
  border-radius: 14px;
  background: #eff6ff;
  color: var(--guard-blue);
  font-size: 13px;
  font-weight: 900;
  margin: 0 0 12px;
  padding: 10px;
  text-align: center;
}

.guard-round-schedule-list {
  gap: 12px;
}

.guard-round-active-card {
  display: grid;
  gap: 12px;
  border: 1px solid #b9e7d0;
  border-radius: 22px;
  background: #ecfdf5;
  color: #14532d;
  margin: 0 0 14px;
  padding: 16px;
  text-align: center;
}

.guard-round-active-card span,
.guard-round-active-card small {
  display: block;
  color: #426b57;
  font-weight: 900;
}

.guard-round-active-card strong {
  display: block;
  color: #14532d;
  font-size: 22px;
  margin: 3px 0;
}

.guard-full-link {
  display: grid;
  min-height: 58px;
  place-items: center;
  border-radius: 18px;
  background: var(--guard-blue);
  color: #fff;
  font-weight: 1000;
  text-decoration: none;
}

.guard-round-agenda-link {
  display: grid;
  min-height: 54px;
  place-items: center;
  border: 1px solid var(--guard-line);
  border-radius: 18px;
  background: #fff;
  color: var(--guard-blue);
  font-weight: 1000;
  margin: -6px 0 16px;
  text-align: center;
  text-decoration: none;
}

.guard-round-card {
  border: 1px solid var(--guard-line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
}

.guard-round-card summary {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 14px;
  text-align: left;
}

.guard-round-card summary::-webkit-details-marker {
  display: none;
}

.guard-round-time {
  display: grid;
  grid-row: span 2;
  min-height: 54px;
  place-items: center;
  border-radius: 16px;
  background: #e7eef8;
  color: var(--guard-blue);
  font-weight: 1000;
}

.guard-round-card strong,
.guard-round-card small {
  display: block;
}

.guard-round-card small {
  color: var(--guard-muted);
  font-weight: 800;
}

.guard-round-card form {
  border-top: 1px solid var(--guard-line);
  padding: 14px;
}

.guard-camera {
  display: grid;
  min-height: 130px;
  place-items: center;
  border: 2px dashed #93b7df;
  border-radius: 20px;
  background: #f8fbff;
  color: var(--guard-blue);
  font-weight: 1000;
  text-align: center;
  cursor: pointer;
}

.guard-camera input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.guard-camera span,
.guard-camera small {
  display: block;
}

.guard-camera span {
  color: var(--guard-blue) !important;
  font-size: 21px !important;
}

.guard-camera small {
  color: var(--guard-muted);
  font-weight: 850;
}

.guard-full-button {
  display: grid;
  width: 100%;
  min-height: 54px;
  place-items: center;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 1000;
  text-align: center;
  text-decoration: none;
}

.guard-secondary-link {
  background: #e7eef8;
  color: var(--guard-ink);
}

.guard-inline-form {
  display: block;
  margin-top: 10px;
}

.guard-inline-form .guard-full-button {
  width: 100%;
  min-height: 48px;
}

.guard-exit-driver {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  color: var(--guard-blue);
  cursor: pointer;
  font-weight: 950;
  padding: 10px;
  text-align: left;
}

.guard-exit-driver input {
  width: 22px;
  height: 22px;
  accent-color: var(--guard-blue);
}

.guard-vehicle-left {
  display: block;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569 !important;
  font-size: 13px;
  font-weight: 900;
  margin-top: 8px !important;
  padding: 7px 10px;
}

.guard-result-list {
  display: grid;
  gap: 9px;
}

.guard-result-list article,
.guard-result-item,
.guard-vehicle-option {
  border: 1px solid var(--guard-line);
  border-radius: 16px;
  background: #fff;
  color: var(--guard-ink);
  padding: 12px;
  text-align: center;
}

.guard-result-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  cursor: pointer;
  gap: 9px;
  text-decoration: none;
}

.guard-result-item input {
  width: 24px;
  height: 24px;
  accent-color: var(--guard-blue);
}

.guard-result-item strong,
.guard-result-item small,
.guard-result-list b,
.guard-result-list span {
  display: block;
}

.guard-result-item small,
.guard-result-list span {
  color: var(--guard-muted);
  margin-top: 4px;
}

.guard-selected-box {
  border: 1px solid #bfe7d3;
  border-radius: 16px;
  background: #edfbf4;
  color: var(--guard-ink);
  padding: 12px;
  text-align: center;
}

.guard-selected-box strong,
.guard-selected-box span,
.guard-vehicle-option strong,
.guard-vehicle-option span {
  display: block;
}

.guard-selected-box span {
  color: #147f55;
  font-weight: 850;
  margin-top: 4px;
}

.guard-vehicle-option {
  width: 100%;
  cursor: pointer;
  font: inherit;
}

.guard-vehicle-option strong {
  color: var(--guard-blue);
  font-size: 18px;
}

.guard-vehicle-fields {
  display: none;
  gap: 12px;
}

.guard-vehicle-fields.active {
  display: grid;
}

.guard-round-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 102px;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  padding: 18px;
  background: linear-gradient(135deg, #123b8f, #245ff2);
  color: #fff;
}

.guard-round-hero span,
.guard-round-hero strong,
.guard-round-hero small,
.guard-incident-hero span,
.guard-incident-hero strong,
.guard-incident-hero small {
  display: block;
}

.guard-round-hero span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.guard-round-hero strong {
  font-size: 25px;
  line-height: 1.1;
}

.guard-round-hero small {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 850;
  margin-top: 6px;
}

.guard-round-ring {
  display: grid;
  width: 102px;
  height: 102px;
  place-items: center;
  border: 9px solid rgba(255, 255, 255, 0.28);
  border-left-color: #65f0b0;
  border-bottom-color: #65f0b0;
  border-radius: 999px;
  text-align: center;
}

.guard-round-ring strong {
  font-size: 26px;
}

.guard-round-ring span {
  margin-top: -24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
}

.guard-incident-hero {
  padding: 18px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #fff1f2, #fff7ed);
  border-color: #fecdd3;
  text-align: center;
}

.guard-incident-hero span {
  color: #be123c;
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.guard-incident-hero strong {
  font-size: 30px;
  line-height: 1.05;
  margin-top: 5px;
}

.guard-incident-hero small {
  color: var(--guard-muted);
  font-weight: 850;
  margin-top: 8px;
}

.guard-bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: min(100%, 480px);
  margin: 0 auto;
  border-top: 1px solid var(--guard-line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}

.guard-bottom-nav button {
  min-height: 48px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--guard-muted);
  font-size: 13px;
  font-weight: 900;
}

.guard-bottom-nav button.active {
  background: var(--guard-blue);
  color: #fff;
}

@media (min-width: 760px) {
  .guard-app {
    margin-top: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--guard-line);
    border-radius: 32px;
    box-shadow: var(--guard-shadow);
    padding-bottom: 24px;
  }

  .guard-bottom-nav {
    position: static;
    width: auto;
    margin: 18px 18px 0;
    border: 1px solid var(--guard-line);
    border-radius: 24px;
    padding: 10px 12px;
    box-shadow: 0 12px 28px rgba(16, 32, 51, 0.1);
  }
}

/* Operacion supervisor mobile-first */
.ops-body {
  --ops-ink: #102033;
  --ops-muted: #607089;
  --ops-blue: #174f82;
  --ops-bg: #eef3f8;
  --ops-line: #d6e0eb;
  --ops-panel: #ffffff;
  --ops-shadow: 0 18px 44px rgba(16, 32, 51, 0.1);
  margin: 0;
  background: var(--ops-bg);
  color: var(--ops-ink);
}

.ops-shell {
  width: min(100%, 1120px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 92px;
}

.ops-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  text-align: center;
}

.ops-header > div {
  flex: 1;
}

.ops-header span {
  display: block;
  color: var(--ops-blue);
  font-size: 12px;
  font-weight: 1000;
  text-transform: uppercase;
}

.ops-header h1 {
  margin: 4px 0;
  font-size: 32px;
  line-height: 1.05;
}

.ops-header p {
  margin: 0;
  color: var(--ops-muted);
  font-weight: 850;
}

.ops-header button {
  min-height: 46px;
  border: 0;
  border-radius: 16px;
  background: #e4edf6;
  color: var(--ops-ink);
  font-weight: 1000;
  padding: 0 16px;
}

.ops-alert,
.ops-summary a,
.ops-actions a,
.ops-panel {
  border: 1px solid var(--ops-line);
  border-radius: 22px;
  background: var(--ops-panel);
  box-shadow: var(--ops-shadow);
}

.ops-alert {
  margin-bottom: 14px;
  padding: 13px;
  background: #fff1f2;
  color: #9f1239;
  font-weight: 900;
  text-align: center;
}

.ops-alert.ok {
  background: #edfbf4;
  color: #147f55;
}

.ops-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.ops-summary a {
  min-height: 118px;
  padding: 14px 10px;
  color: var(--ops-ink);
  text-align: center;
  text-decoration: none;
}

.ops-summary span,
.ops-summary strong,
.ops-summary small {
  display: block;
}

.ops-summary span {
  color: var(--ops-muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.ops-summary strong {
  color: var(--ops-blue);
  font-size: 42px;
  line-height: 1;
  margin: 9px 0 5px;
}

.ops-summary small {
  color: var(--ops-muted);
  font-weight: 800;
}

.ops-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.ops-actions a {
  display: grid;
  min-height: 76px;
  place-items: center;
  padding: 12px;
  color: var(--ops-ink);
  text-align: center;
  text-decoration: none;
}

.ops-actions strong,
.ops-actions span {
  display: block;
}

.ops-actions strong {
  font-size: 18px;
}

.ops-actions span {
  color: var(--ops-muted);
  font-weight: 800;
  margin-top: 4px;
}

.ops-grid {
  display: grid;
  gap: 14px;
}

.ops-wide {
  grid-column: 1 / -1;
}

.ops-panel {
  padding: 15px;
}

.ops-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  text-align: center;
}

.ops-panel-head h2 {
  margin: 0;
  font-size: 20px;
}

.ops-panel-head span {
  display: grid;
  min-width: 36px;
  min-height: 36px;
  place-items: center;
  border-radius: 999px;
  background: #e7eef8;
  color: var(--ops-blue);
  font-weight: 1000;
}

.ops-list {
  display: grid;
  gap: 10px;
}

.ops-list a,
.ops-list p {
  display: block;
  margin: 0;
  border: 1px solid var(--ops-line);
  border-radius: 16px;
  background: #fff;
  color: var(--ops-ink);
  padding: 12px;
  text-align: center;
  text-decoration: none;
}

.ops-list strong,
.ops-list span {
  display: block;
}

.ops-list span {
  color: var(--ops-muted);
  margin-top: 4px;
}

.ops-compact-list a {
  text-align: left;
}

.ops-mini-metrics {
  display: grid;
  gap: 10px;
}

.ops-mini-metrics div {
  display: grid;
  min-height: 84px;
  place-items: center;
  border: 1px solid var(--ops-line);
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.ops-mini-metrics strong,
.ops-mini-metrics span {
  display: block;
}

.ops-mini-metrics strong {
  color: var(--ops-blue);
  font-size: 32px;
  line-height: 1;
}

.ops-mini-metrics span {
  color: var(--ops-muted);
  font-weight: 850;
}

.ops-bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: min(100%, 520px);
  margin: 0 auto;
  border-top: 1px solid var(--ops-line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
}

.ops-bottom-nav a {
  display: grid;
  min-height: 48px;
  place-items: center;
  border-radius: 16px;
  color: var(--ops-muted);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.ops-bottom-nav a.active {
  background: var(--ops-blue);
  color: #fff;
}

@media (min-width: 760px) {
  .ops-shell {
    padding: 28px 24px;
  }

  .ops-header {
    align-items: center;
    text-align: left;
  }

  .ops-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ops-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-bottom-nav {
    position: static;
    width: auto;
    max-width: 720px;
    margin: 20px auto 0;
    border: 1px solid var(--ops-line);
    border-radius: 24px;
    padding: 10px 12px;
    box-shadow: 0 12px 28px rgba(16, 32, 51, 0.1);
  }
}
