* { box-sizing: border-box; }

:root {
  --bg: #080b09;
  --bg-2: #101610;
  --panel: rgba(18, 24, 18, 0.94);
  --panel-2: rgba(24, 31, 22, 0.94);
  --line: #2d392c;
  --line-soft: #1d261d;
  --text: #e8eadf;
  --muted: #9da892;
  --faint: #697364;
  --accent: #b8914b;
  --accent-2: #d2b16d;
  --green: #7d9b63;
  --danger: #a34f42;
  --danger-2: #c46456;
  --shadow: rgba(0, 0, 0, 0.38);
}

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(77, 97, 56, 0.24), transparent 32rem),
    radial-gradient(circle at 82% 12%, rgba(184, 145, 75, 0.11), transparent 34rem),
    linear-gradient(180deg, #070907 0%, #0c110d 44%, #060806 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent 78%);
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #ecd39a; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: rgba(7, 10, 7, 0.88);
  border-bottom: 1px solid rgba(184, 145, 75, 0.24);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

.topbar a {
  color: var(--text);
  margin-left: 18px;
  font-size: 14px;
  letter-spacing: 0.02em;
}

.brand {
  margin-left: 0 !important;
  color: var(--accent-2) !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em !important;
}

.topbar nav a {
  padding: 7px 10px;
  border-radius: 6px;
}

.topbar nav a:hover { background: rgba(184, 145, 75, 0.12); }

.page {
  width: min(1280px, calc(100% - 32px));
  margin: 26px auto 48px;
}

.hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid rgba(184, 145, 75, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(110deg, rgba(15, 20, 15, 0.96), rgba(15, 22, 16, 0.78)),
    radial-gradient(circle at 90% 18%, rgba(184, 145, 75, 0.18), transparent 24rem);
  box-shadow: 0 18px 40px var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), transparent 70%);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.24);
}

.panel h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #f0ead4;
  font-size: 18px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.panel h2::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--accent);
}

.panel p { color: var(--muted); }
.narrow { max-width: 520px; }

.notice {
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(184, 145, 75, 0.38);
  background: rgba(184, 145, 75, 0.12);
  border-radius: 8px;
  color: #f1e1b4;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.stats div {
  min-width: 0;
  padding: 12px;
  background: linear-gradient(180deg, rgba(36, 46, 34, 0.9), rgba(23, 31, 22, 0.9));
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

dt {
  color: var(--faint);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

dd {
  margin: 5px 0 0;
  color: #f4f1e5;
  font-size: 21px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

form { display: grid; gap: 10px; margin: 0; }
.inline { display: inline-grid; margin-right: 8px; margin-top: 12px; }

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 14px;
}

input {
  min-height: 40px;
  border: 1px solid #46533e;
  border-radius: 6px;
  padding: 9px 11px;
  background: #090d09;
  color: var(--text);
  font: inherit;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 145, 75, 0.16);
}

button, .button {
  display: inline-block;
  width: fit-content;
  border: 1px solid rgba(210, 177, 109, 0.3);
  border-radius: 6px;
  background: linear-gradient(180deg, #9b783b, #72592d);
  color: #fff8e7;
  padding: 9px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

button:hover, .button:hover {
  color: white;
  background: linear-gradient(180deg, #b18845, #826332);
}

form[action*="remove"] button,
form[action*="revoke"] button,
form[action*="unlink"] button {
  border-color: rgba(196, 100, 86, 0.36);
  background: linear-gradient(180deg, var(--danger-2), var(--danger));
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  border-top: 1px solid var(--line-soft);
  padding: 10px 9px;
  vertical-align: top;
}

tbody tr:first-child td { border-top: 0; }
tbody tr:nth-child(odd) { background: rgba(255, 255, 255, 0.018); }
tbody tr:hover { background: rgba(184, 145, 75, 0.07); }

th {
  color: var(--accent-2);
  background: rgba(9, 13, 9, 0.72);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

td { color: var(--muted); }

code {
  background: #080b08;
  border: 1px solid #273225;
  color: #d8cfaa;
  padding: 2px 5px;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  .grid, .stats { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; gap: 10px; flex-direction: column; }
  .topbar a { margin-left: 0; margin-right: 12px; }
  .hero { padding: 22px; }
  .page { width: min(100% - 20px, 1280px); }
}
