:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --accent: #38bdf8;
  --accent-dim: #0ea5e9;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --danger: #f87171;
  --success: #4ade80;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 56px;
}

nav .brand { font-weight: 700; font-size: 1.1rem; color: var(--accent); }
nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
nav a:hover, nav a.active { color: var(--text); }
nav .spacer { flex: 1; }
nav .logout { color: var(--danger) !important; }

main { padding: 2rem; max-width: 1200px; margin: 0 auto; }

h1 { font-size: 1.4rem; font-weight: 600; margin-bottom: 1.5rem; }
h2 { font-size: 1rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.card .value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.card .label { font-size: 0.8rem; color: var(--muted); margin-top: .25rem; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: 0.875rem;
}

th {
  text-align: left;
  padding: .75rem 1rem;
  background: #263348;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

td {
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--text);
}

tr:hover td { background: #263348; }

.badge {
  display: inline-block;
  padding: .2rem .5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-full { background: #1e3a5f; color: var(--accent); }
.badge-diver { background: #1a2e1a; color: var(--success); }
.badge-waves { background: #2a1f3d; color: #c084fc; }

.pagination { display: flex; gap: .5rem; margin-top: 1rem; }
.pagination a {
  padding: .4rem .8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
}
.pagination a:hover { background: var(--surface); }

/* Login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  width: 340px;
}

.login-box h1 { font-size: 1.5rem; margin-bottom: 1.5rem; text-align: center; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: .4rem; }
.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .6rem .9rem;
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}
.field input:focus { border-color: var(--accent); }

.btn {
  display: block;
  width: 100%;
  background: var(--accent-dim);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .7rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: .5rem;
}
.btn:hover { background: var(--accent); }

.error { color: var(--danger); font-size: 0.85rem; margin-bottom: 1rem; }

.top-beaches { display: flex; flex-direction: column; gap: .5rem; }
.beach-row { display: flex; align-items: center; gap: .75rem; }
.beach-rank { color: var(--muted); font-size: 0.8rem; width: 1.5rem; }
.beach-bar-wrap { flex: 1; background: var(--bg); border-radius: 4px; height: 6px; }
.beach-bar { background: var(--accent); height: 6px; border-radius: 4px; }
.beach-name { font-size: 0.875rem; flex: 3; }
.beach-count { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
