﻿:root {
  --ink-900: #10212f;
  --ink-700: #24394e;
  --ink-500: #5f7386;
  --line: #d9e3ec;
  --surface: #ffffff;
  --bg: #eef3f7;
  --nav-a: #0f2539;
  --nav-b: #0a1b2b;
  --brand: #25c56f;
  --blue: #157be8;
  --red: #dc4b4b;
  --amber: #e4a325;
  --shadow: 0 10px 24px rgba(16, 33, 47, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", Tahoma, sans-serif;
  color: var(--ink-900);
  background:
    radial-gradient(circle at 10% -20%, #ffffff 5%, #eef3f7 45%, #e8eef5 100%);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 258px;
  background: linear-gradient(180deg, var(--nav-a), var(--nav-b));
  color: #d7e4ef;
  padding: 22px 14px;
  z-index: 5;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 6px 6px 14px;
}

.brand img {
  width: 140px;
  height: auto;
  max-height: none;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  padding: 0;
  mix-blend-mode: normal;
}

.brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.1;
}

.brand-text strong {
  color: #ffffff;
  font-size: 22px;
  letter-spacing: 0.2px;
  line-height: 1;
}

.brand-text span {
  color: #8fc8ff;
  font-size: 12px;
}

.navlinks a {
  display: block;
  text-decoration: none;
  color: #d6e2ed;
  border-radius: 10px;
  padding: 11px 12px;
  margin: 5px 0;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.navlinks a:hover,
.navlinks a.on {
  background: linear-gradient(90deg, #0a76e4, #2a90f2);
  color: #ffffff;
  transform: translateX(1px);
}

.boundary {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 22px;
  border: 1px solid #2d4153;
  border-radius: 10px;
  padding: 10px;
  color: #bed0df;
  font-size: 12px;
  line-height: 1.3;
  background: rgba(255, 255, 255, 0.02);
}

.content-shell {
  margin-left: 258px;
  width: calc(100% - 258px);
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  z-index: 4;
  font-weight: 700;
}

.user {
  font-size: 13px;
  color: #45617c;
  font-weight: 600;
}

.page-content {
  padding: 24px;
}

h1 {
  margin: 0;
  font-size: 28px;
}

.sub {
  margin: 6px 0 0;
  color: var(--ink-500);
}

.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2d89e7;
  font-weight: 600;
  margin-top: 8px;
}

.source span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #42cc84;
  box-shadow: 0 0 0 7px rgba(66, 204, 132, 0.2);
}

.cards {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.card,
.panel,
.drop,
.filter,
.notice {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card b {
  font-size: 31px;
}

.card span {
  color: var(--ink-500);
}

.card.green b { color: #1da85c; }
.card.blue b { color: var(--blue); }
.card.red b { color: var(--red); }

.grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1.1fr 1.9fr;
  gap: 14px;
}

.panel {
  padding: 16px;
  overflow: auto;
}

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

.status-diagram {
  width: 194px;
  height: 194px;
  margin: 10px auto;
  border-radius: 50%;
  background:
    conic-gradient(
      #1ea65c 0 var(--online-pct),
      #cad5df var(--online-pct) 100%
    );
  display: grid;
  place-items: center;
}

.status-inner {
  width: 142px;
  height: 142px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #dce7ef;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 4px 10px rgba(37, 66, 95, 0.06);
}

.status-inner strong {
  font-size: 33px;
  line-height: 1;
}

.status-inner small {
  color: var(--ink-500);
}

.status-legend p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0;
  color: var(--ink-700);
  font-size: 14px;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
}

.dot.ok { background: #1ea65c; }
.dot.stale { background: #a9b8c6; }
.dot.info { background: #2f8ce9; }
.dot.err { background: #d84a4a; }

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #d7e2eb;
  background: #f2f6fa;
  color: #2d4257;
}

.badge.succeeded { background: #e6f6ee; color: #157f4b; border-color: #b9e5cd; }
.badge.failed { background: #fdeeee; color: #b92f2f; border-color: #efc0c0; }
.badge.unknown { background: #eef3f7; color: #556e84; border-color: #d4e0ea; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border-bottom: 1px solid #e0e9f0;
  padding: 10px 8px;
  text-align: left;
  font-size: 14px;
}

th {
  color: #647b8f;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

td a {
  color: #0d6ad0;
  text-decoration: none;
  font-weight: 600;
}

td a:hover {
  text-decoration: underline;
}

.empty {
  text-align: center;
  color: var(--ink-500);
  padding: 20px;
}

.drop {
  margin-top: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.drop button,
form button,
.filter button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #0d74de, #2490f3);
  color: white;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.drop .btn-compact {
  width: auto;
  align-self: flex-start;
  padding: 8px 14px;
  font-size: 13px;
}

.drop input,
.filter select,
.fleetfilters input {
  border: 1px solid #cedce9;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f9fcff;
}

.filter {
  margin-top: 14px;
  padding: 12px;
}

.notice {
  margin-top: 14px;
  padding: 12px;
  color: #52697d;
}

.fleetfilters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 12px;
  flex-wrap: wrap;
}

.fleetfilters button {
  border: 1px solid #c7d4e0;
  border-radius: 999px;
  background: #f2f7fc;
  color: #38526a;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.fleetfilters button.active {
  background: #0f7ce8;
  border-color: #0f7ce8;
  color: #fff;
}

.fleetfilters input {
  margin-left: auto;
  min-width: 230px;
}

.fleettable {
  overflow: auto;
  border: 1px solid #d3e0ea;
  border-radius: 12px;
  background: white;
}

.fleettable table {
  min-width: 860px;
}

.fleettable th,
.fleettable td {
  text-align: left;
}

.fleettable th:first-child,
.fleettable td:first-child,
.fleettable th:nth-child(2),
.fleettable td:nth-child(2),
.fleettable th:nth-child(4),
.fleettable td:nth-child(4),
.fleettable th:nth-child(5),
.fleettable td:nth-child(5),
.fleettable th:nth-child(6),
.fleettable td:nth-child(6) {
  text-align: left;
}

.serial {
  font-weight: 700;
}

.state {
  display: inline-flex;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
}

.state.ONLINE { background: #e6f7ee; color: #16844f; }
.state.ERROR { background: #fbe8ea; color: #ba2f40; }
.state.STALE { background: #fbf3df; color: #ac7310; }
.state.OFFLINE { background: #edf2f6; color: #6a7a88; }

.fleeterror {
  margin: 8px 0 12px;
  padding: 11px;
  border-radius: 10px;
  border: 1px solid #e4b5b5;
  color: #9d3232;
  background: #fdeeee;
}

.loading-row {
  margin: 8px 0 12px;
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid #d0deea;
  background: #f4f9ff;
  color: #3b5d7c;
  font-size: 13px;
}

.diag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.diag-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #d1deea;
  background: #f4f8fc;
  color: #4b647a;
}

.diag-pill.good {
  background: #eaf9f0;
  border-color: #c5e8d2;
  color: #177d4c;
}

.diag-pill.bad {
  background: #fdeeee;
  border-color: #ebc0c0;
  color: #ae3232;
}

.statusbig {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

.progress {
  width: 100%;
  height: 11px;
  background: #e7edf3;
  border-radius: 999px;
  overflow: hidden;
  margin: 9px 0;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0d74de, #2aa6f7);
}

@media (max-width: 1060px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1400px) {
  .page-content {
    padding: 28px 36px;
  }

  .cards {
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding-bottom: 14px;
  }

  .boundary {
    position: static;
    margin-top: 10px;
  }

  .content-shell {
    width: 100%;
    margin-left: 0;
  }

  .topbar {
    padding: 0 16px;
  }

  .brand img {
    width: 126px;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .brand-text span {
    font-size: 11px;
  }

  .page-content {
    padding: 16px;
  }

  .fleetfilters input {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .brand img {
    width: 114px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text span {
    font-size: 10px;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}
