* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
}

body {
  display: flex;
  flex-direction: column;
}

header {
  padding: 12px 20px;
  background: #1a1a1a;
  color: #fff;
}

header h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.banner {
  padding: 10px 20px;
  font-size: 0.9rem;
  text-align: center;
}

.banner--stale {
  background: #fff3cd;
  color: #664d03;
  border-bottom: 1px solid #ffe69c;
}

.banner--error {
  background: #f8d7da;
  color: #58151c;
  border-bottom: 1px solid #f1aeb5;
}

#map {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.locate-button {
  display: block;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  font-size: 18px;
  color: #1a73e8;
  background: #fff;
  text-decoration: none;
  cursor: pointer;
}

.locate-button--busy {
  opacity: 0.5;
  pointer-events: none;
}

.locate-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 10px 16px;
  background: #1a1a1a;
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
  z-index: 1500;
}

.locate-toast[hidden] {
  display: none;
}

.gate {
  position: fixed;
  inset: 0;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.gate[hidden] {
  display: none;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 220px;
}

.gate-form label {
  color: #ddd;
  font-size: 0.85rem;
}

.gate-form input {
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid #444;
  border-radius: 4px;
}

.gate-form button {
  padding: 10px 12px;
  font-size: 1rem;
  background: #d4a017;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.gate-error {
  color: #f8d7da;
  font-size: 0.85rem;
  margin: 0;
}

#info-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 320px;
  max-width: 85vw;
  background: #fff;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
  padding: 20px;
  overflow-y: auto;
  z-index: 1000;
}

#info-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

#info-content h2 {
  margin: 0 32px 16px 0;
  font-size: 1.1rem;
}

.info-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #888;
  margin-bottom: 2px;
}

.info-value {
  font-size: 0.95rem;
}

.lease-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.risk-badge {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.risk-badge--high    { background: #d93025; color: #fff; }
.risk-badge--medium  { background: #f58231; color: #1a1a1a; }
.risk-badge--low     { background: #3cb44b; color: #fff; }
.risk-badge--none,
.risk-badge--unknown { background: #e0e0e0; color: #444; }

.lease-badge--expired  { background: #1a1a1a; color: #fff; }
.lease-badge--critical { background: #d93025; color: #fff; }
.lease-badge--warning  { background: #f58231; color: #1a1a1a; }
.lease-badge--watch    { background: #f9d949; color: #1a1a1a; }
.lease-badge--ok       { background: #3cb44b; color: #fff; }
.lease-badge--unknown  { background: #e0e0e0; color: #444; font-style: italic; }
