* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  background: #eef2f5;
  color: #263238;
  font-size: 12px;
}

.app {
  min-height: 100vh;
  padding: 7px;
  background: linear-gradient(180deg, #eef2f5 0%, #f7f9fb 100%);
}

/* Compact GPS+ header */
.topbar {
  background: linear-gradient(135deg, #123d73 0%, #1d77b7 100%);
  color: #fff;
  border-radius: 6px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  box-shadow: 0 3px 10px rgba(16, 48, 86, 0.18);
}

.brand {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.4px;
}

.subtitle {
  font-size: 11px;
  color: #dceeff;
  margin-top: 3px;
}

.badge {
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
}

.badge.ok {
  background: #dffbe9;
  color: #18713a;
  border-color: #b8efca;
}

.badge.error {
  background: #fdeaea;
  color: #a52727;
  border-color: #efb8b8;
}

/* Summary */
.summary {
  display: grid;
  grid-template-columns: 1.25fr 1fr 48px;
  gap: 6px;
  margin-bottom: 7px;
}

.summary > div {
  background: #ffffff;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  padding: 7px 8px;
  min-width: 0;
  box-shadow: 0 1px 3px rgba(20, 40, 70, 0.05);
}

.summary-label {
  font-size: 10px;
  color: #6b7c8f;
  margin-bottom: 3px;
}

.summary-value {
  font-size: 12px;
  font-weight: 800;
  color: #1f2d3d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tabs */
.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 7px;
}

.tab {
  border: 1px solid #d5dee7;
  background: #ffffff;
  color: #3b4a5a;
  height: 30px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(20, 40, 70, 0.04);
}

.tab:hover {
  background: #f3f8fc;
}

.tab.active {
  background: #1d9bd1;
  border-color: #1688b6;
  color: #fff;
}

/* Panels */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.card {
  background: #ffffff;
  border: 1px solid #d9e1e8;
  border-radius: 7px;
  padding: 9px;
  margin-bottom: 7px;
  box-shadow: 0 2px 7px rgba(20, 40, 70, 0.06);
}

.card.compact {
  padding: 7px;
}

.card h2 {
  margin: 0 0 6px 0;
  font-size: 14px;
  color: #1f2d3d;
  line-height: 1.2;
  font-weight: 800;
}

.muted {
  color: #687789;
  font-size: 11px;
  line-height: 1.35;
  margin: 0 0 7px 0;
}

.small {
  margin-top: 7px;
}

/* Forms */
label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #3b4a5a;
  margin: 7px 0 3px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #ccd8e2;
  border-radius: 5px;
  background: #fbfdff;
  padding: 6px 7px;
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  color: #263238;
  outline: none;
}

input,
select {
  height: 30px;
}

textarea {
  resize: vertical;
  min-height: 62px;
  max-height: 95px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #1d9bd1;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(29,155,209,0.12);
}

.primary {
  width: 100%;
  height: 32px;
  margin-top: 8px;
  border: 1px solid #1688b6;
  background: linear-gradient(180deg, #25a9dc 0%, #168fc3 100%);
  color: #fff;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(22, 143, 195, 0.22);
}

.primary:hover {
  background: linear-gradient(180deg, #1b9dcc 0%, #127faf 100%);
}

.result {
  display: none;
  margin-top: 7px;
  padding: 7px;
  border-radius: 5px;
  font-size: 11px;
}

.result.ok {
  display: block;
  background: #e8f7e8;
  border: 1px solid #b7dfb9;
  color: #2f7d32;
}

.result.error {
  display: block;
  background: #fdeaea;
  border: 1px solid #efb8b8;
  color: #a52727;
}

/* Units */
.units {
  max-height: 310px;
  overflow: auto;
  border: 1px solid #d9e1e8;
  background: #f3f6f9;
  padding: 5px;
  border-radius: 6px;
}

.unit-row {
  background: #ffffff;
  border: 1px solid #d9e1e8;
  border-radius: 5px;
  padding: 7px;
  margin-bottom: 5px;
}

.unit-row:last-child {
  margin-bottom: 0;
}

.unit-name {
  font-weight: 800;
  color: #1f2d3d;
  margin-bottom: 2px;
  font-size: 12px;
}

.unit-meta {
  color: #7b8794;
  font-size: 10px;
}

/* More services */
.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.service-grid button {
  border: 1px solid #d5dee7;
  background: #f8fafc;
  color: #687789;
  border-radius: 5px;
  padding: 8px 6px;
  font-size: 11px;
  font-weight: 700;
}

/* Diagnostic */
.diag {
  display: grid;
  gap: 5px;
}

.diag div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 5px;
  font-size: 11px;
}

.diag span {
  color: #7b8794;
}

.diag strong {
  color: #263238;
  word-break: break-word;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #eef2f5;
}

::-webkit-scrollbar-thumb {
  background: #b8c4cf;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9eacb8;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.small-btn {
  border: 0;
  border-radius: 8px;
  background: #e8f3fb;
  color: #14527d;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.requests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.request-item {
  background: #ffffff;
  border: 1px solid #dde7ef;
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
}

.request-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.request-meta {
  margin-top: 3px;
  color: #6b7c8d;
  font-size: 11px;
}

.request-row {
  margin-top: 6px;
  color: #1f2f3d;
}

.request-message {
  margin-top: 7px;
  padding: 8px;
  background: #f5f8fb;
  border-radius: 8px;
  color: #2b3d4f;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  background: #eef2f5;
  color: #425466;
}

.status-new {
  background: #fff4d8;
  color: #8a6200;
}

.status-in_progress {
  background: #e3f2ff;
  color: #075985;
}

.status-done {
  background: #e6f7ed;
  color: #087443;
}

.status-rejected {
  background: #fde8e8;
  color: #a61b1b;
}
