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

[hidden] {
  display: none !important;
}

body {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: #f5f5f5;
  color: #222;
  font-size: 14px;
}

header {
  background: #000;
  color: #fff;
  padding: 14px 24px;
}

header .topbar {
  max-width: 1500px;
  margin: 0 auto;
}

h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

h2 {
  font-size: 16px;
  margin-bottom: 10px;
}

header a {
  border: 1px solid #666;
  border-radius: 2px;
  color: #fff;
  padding: 6px 14px;
  text-decoration: none;
  font-size: 13px;
}

header a:hover { border-color: #fff; }

main {
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px;
}

.topbar,
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.card,
form,
.section,
.stat,
table {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
}

.card {
  padding: 20px 24px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
}

.muted,
.notice {
  color: #666;
  line-height: 1.4;
}

.notice {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
  margin-bottom: 16px;
  padding: 14px 18px;
}

form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: #444;
  font-size: 12px;
  font-weight: 600;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 8px 10px;
  background: #fff;
  color: #222;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #999;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
}

button,
.button {
  background: #000;
  border: none;
  border-radius: 2px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  text-decoration: none;
}

.button {
  background: #FBBC04;
  color: #000;
  margin-top: 14px;
}

button.secondary,
.button.secondary {
  background: #fff;
  border: 1px solid #999;
  color: #111;
}

button.danger {
  background: #c0392b;
}

.location-actions {
  margin-top: -2px;
}

.location-btn {
  background: #FBBC04;
  color: #000;
}

.form-actions {
  border-top: 1px solid #eee;
  padding-top: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.stat {
  padding: 14px 16px;
}

.stat strong {
  display: block;
  font-size: 24px;
  margin-bottom: 4px;
}

.stat span {
  color: #666;
  font-size: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

thead tr {
  background: #f0f0f0;
}

th,
td {
  border-bottom: 1px solid #eee;
  padding: 8px 9px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #333;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

tbody tr:hover {
  background: #fafafa;
}

.token {
  max-width: 240px;
  overflow-wrap: anywhere;
}

.token a {
  color: #1a73e8;
  text-decoration: none;
}

.token a:hover {
  text-decoration: underline;
}

@media (max-width: 980px) {
  main { padding: 14px; }
  form { grid-template-columns: 1fr; }
  header { padding: 12px 14px; }
  table { display: block; overflow-x: auto; }
}
