:root {
  color: #111111;
  background: #f7f7f8;
  font-family: "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body { margin: 0; }

button, input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: #2f6fed;
  color: white;
  padding: 0.7rem 1rem;
  cursor: pointer;
}

button.ghost {
  background: transparent;
  color: #111111;
  border: 1px solid #e6e6e8;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
}

label.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

input {
  border: 1px solid #e6e6e8;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  background: white;
}

.error { color: #e11d48; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login form, dialog form {
  width: min(420px, 100%);
  display: grid;
  gap: 0.9rem;
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
}

dialog {
  border: 0;
  border-radius: 16px;
  padding: 0;
}

dialog::backdrop { background: rgba(17, 17, 17, 0.4); }

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.brand img {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.login h1.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

header, .header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

header {
  padding: 0.9rem 1.2rem;
  background: white;
  border-bottom: 1px solid #e6e6e8;
}

.workspace {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: calc(100vh - 61px);
}

aside {
  overflow: auto;
  background: white;
  border-right: 1px solid #e6e6e8;
}

#map { min-height: 320px; background: #e6e6e8; }

#vehicles { list-style: none; margin: 0; padding: 0.5rem; }

#vehicles button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: inherit;
  border-radius: 12px;
}

#vehicles button.selected { background: #e7eefc; }

.vehicle-row { display: grid; gap: 0.2rem; }

.muted { color: #6b6b70; font-size: 0.85rem; }

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
  font-size: 0.75rem;
  background: #e6e6e8;
}

.pill.moving { background: #e7eefc; }
.pill.stopped { background: #e6e6e8; }
.pill.offline { background: #ffedd5; color: #c2410c; }
.pill.immobilized { background: #ffe4e6; color: #e11d48; }
.pill.suspended { background: #e6e6e8; }

.clients {
  height: calc(100vh - 61px);
  overflow: auto;
  padding: 1.2rem;
}

.clients-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.clients-bar h2 { margin: 0; }

.table-wrap {
  background: white;
  border-radius: 16px;
  overflow: auto;
}

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

th, td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e6e6e8;
  white-space: nowrap;
}

th { font-size: 0.8rem; color: #6b6b70; font-weight: 600; }

.row-actions { display: flex; gap: 0.5rem; }

.row-actions button { padding: 0.4rem 0.7rem; }

.pin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid white;
  background: #2f6fed;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.pin.immobilized { background: #e11d48; }
.pin.offline { background: #c2410c; }
.pin.stopped { background: #6b6b70; }

@media (max-width: 800px) {
  .workspace { grid-template-columns: 1fr; height: auto; }
  #map { height: 55vh; }
  .clients { height: auto; }
  header { flex-wrap: wrap; }
}
