:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-hover: #242836;
  --border: #2a2e3a;
  --text: #e4e4e7;
  --text-muted: #71717a;
  --green: #22c55e;
  --green-bg: rgba(34, 197, 94, 0.1);
  --green-border: rgba(34, 197, 94, 0.25);
  --yellow: #eab308;
  --yellow-bg: rgba(234, 179, 8, 0.1);
  --yellow-border: rgba(234, 179, 8, 0.25);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.1);
  --red-border: rgba(239, 68, 68, 0.25);
  --gray: #6b7280;
  --gray-bg: rgba(107, 114, 128, 0.1);
  --gray-border: rgba(107, 114, 128, 0.25);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --radius: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

/* Auth Overlay */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  max-width: 360px;
  width: 90%;
}

.auth-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.auth-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.auth-card input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.auth-card input:focus {
  border-color: var(--green);
}

.auth-card button {
  width: 100%;
  padding: 0.75rem;
  background: var(--green);
  color: #000;
  border: none;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.auth-card button:hover {
  opacity: 0.9;
}

.auth-error {
  color: var(--red);
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

/* Dashboard */
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.header h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.last-updated {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.fleet-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid;
}

.fleet-badge.green {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: var(--green);
}

.fleet-badge.yellow {
  background: var(--yellow-bg);
  border-color: var(--yellow-border);
  color: var(--yellow);
}

.fleet-badge.red {
  background: var(--red-bg);
  border-color: var(--red-border);
  color: var(--red);
}

.fleet-badge.gray {
  background: var(--gray-bg);
  border-color: var(--gray-border);
  color: var(--gray);
}

/* Probe Grid */
.probe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.probe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: background 0.2s, border-color 0.2s;
}

.probe-card:hover {
  background: var(--surface-hover);
}

.probe-card.green {
  border-color: var(--green-border);
  background: var(--green-bg);
}

.probe-card.yellow {
  border-color: var(--yellow-border);
  background: var(--yellow-bg);
}

.probe-card.red {
  border-color: var(--red-border);
  background: var(--red-bg);
}

.probe-card.gray {
  border-color: var(--gray-border);
  background: var(--gray-bg);
}

.probe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.probe-name {
  font-weight: 600;
  font-size: 1rem;
  text-transform: capitalize;
}

.probe-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.probe-status .icon {
  font-size: 1rem;
}

.probe-detail {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  word-break: break-word;
}

.probe-data {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.8;
}

@media (max-width: 600px) {
  .dashboard {
    padding: 1rem;
  }

  .header h1 {
    font-size: 1.25rem;
  }

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