:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f7f8;
  color: #172126;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(29, 114, 115, .13), transparent 36%),
    linear-gradient(315deg, rgba(235, 96, 64, .12), transparent 34%),
    #f4f7f8;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(100%, 720px);
  background: rgba(255, 255, 255, .92);
  border: 1px solid #dce5e6;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(25, 41, 48, .12);
  padding: clamp(24px, 6vw, 48px);
}

.topbar,
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  color: #1d7273;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 18px;
}

.topbar .brand,
.admin-header .brand { margin-bottom: 8px; }

.admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 6px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #c9d6d8;
  color: #172126;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

h1 {
  margin: 0 0 28px;
  font-size: clamp(2rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.admin-header h1 {
  margin-bottom: 0;
  font-size: clamp(1.9rem, 4vw, 3.4rem);
}

.form {
  display: grid;
  gap: 10px;
}

label {
  color: #4b5b62;
  font-size: .92rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #c9d6d8;
  border-radius: 6px;
  padding: 0 14px;
  font: inherit;
  outline: none;
  background: #fff;
}

input:focus {
  border-color: #1d7273;
  box-shadow: 0 0 0 4px rgba(29, 114, 115, .14);
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 6px;
  margin-top: 8px;
  padding: 0 18px;
  background: #1d7273;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover { background: #175e5f; }
button:disabled { cursor: wait; opacity: .72; }

.result {
  margin-top: 24px;
  padding: 16px;
  border-radius: 8px;
  background: #ecf5f4;
  border: 1px solid #cce0df;
}

.result span {
  display: block;
  color: #4b5b62;
  font-size: .86rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.copy-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.copy-row a {
  flex: 1;
  color: #0d5556;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.copy-row button {
  width: 108px;
  margin: 0;
  background: #eb6040;
}

.message {
  min-height: 24px;
  margin: 18px 0 0;
  color: #9a341f;
  font-weight: 700;
}

.admin-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 28px;
}

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

.stat {
  background: #fff;
  border: 1px solid #dce5e6;
  border-radius: 8px;
  padding: 18px;
}

.stat span {
  display: block;
  color: #4b5b62;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat strong {
  font-size: 2.2rem;
  line-height: 1;
}

.table-wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #dce5e6;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf2f3;
  text-align: left;
  vertical-align: top;
}

th {
  color: #4b5b62;
  font-size: .82rem;
  text-transform: uppercase;
}

td a {
  color: #0d5556;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.number {
  font-weight: 900;
  color: #eb6040;
}

.empty {
  padding: 18px;
  margin: 0;
  color: #4b5b62;
  font-weight: 700;
}

@media (max-width: 560px) {
  .copy-row,
  .admin-header,
  .topbar { align-items: stretch; flex-direction: column; }
  .copy-row button,
  .admin-link { width: 100%; }
  .stats-grid { grid-template-columns: 1fr; }
  .admin-shell { padding: 18px; }
}

.danger-button {
  min-height: 38px;
  margin: 0;
  padding: 0 14px;
  background: #b42318;
  font-size: .92rem;
}

.danger-button:hover { background: #8f1f17; }
.danger-button:disabled { opacity: .65; }
