* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, 'Segoe UI', Arial, sans-serif;
  background: #f4f5f7;
  color: #1a1a1a;
}

a { color: #2a5db0; }

.topbar {
  background: #14181f;
  color: #fff;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar .brand {
  font-weight: 700;
  font-size: 16px;
}

.topbar nav {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 14px;
}

.topbar nav a {
  color: #cfd6e4;
  text-decoration: none;
}

.topbar nav a:hover,
.topbar nav a.active {
  color: #fff;
}

.topbar .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #9aa4b5;
}

.role-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.role-badge.admin { background: #ff6600; color: #fff; }
.role-badge.user { background: #3a4150; color: #cfd6e4; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

h1 { font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 17px; margin: 0 0 14px; }
.subtitle { color: #666; font-size: 14px; margin-bottom: 24px; }

.card {
  background: #fff;
  border: 1px solid #e2e4e9;
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0 4px;
  color: #333;
}

input[type=text], input[type=password], input[type=number], select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; font-weight: 400; }

button, .btn {
  display: inline-block;
  background: #2a5db0;
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .btn:hover { background: #204a8f; }
button.secondary, .btn.secondary { background: #6b7280; }
button.secondary:hover { background: #545b66; }
button.danger, .btn.danger { background: #c0392b; }
button.danger:hover { background: #992d22; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #ececec; }
th { color: #666; font-weight: 600; font-size: 12px; text-transform: uppercase; }

.alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
}
.alert.error { background: #fdecea; color: #9c2c22; border: 1px solid #f3c1ba; }
.alert.success { background: #eafaf0; color: #1e7a43; border: 1px solid #b7e6c8; }

#map {
  height: 420px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

pre.output {
  background: #14181f;
  color: #d7e2f2;
  padding: 14px;
  border-radius: 8px;
  font-size: 12.5px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 320px;
  background: #fff;
  border: 1px solid #e2e4e9;
  border-radius: 10px;
  padding: 28px;
}
.login-card h1 { text-align: center; }

.help-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0 20px;
}
.help-legend .item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  background: #f4f5f7;
  padding: 6px 12px;
  border-radius: 20px;
}
.help-legend .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

iframe.widget-preview {
  width: 100%;
  height: 480px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

code, .mono { font-family: 'SFMono-Regular', Consolas, monospace; }
