body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: #0b1020;
  color: #e8eefc;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.topbar h1 { margin: 0; }
.topbar p { color: #94a3b8; margin: 8px 0 0; }
.logout {
  color: white;
  text-decoration: none;
  background: #2563eb;
  padding: 10px 14px;
  border-radius: 10px;
}

.panel, .stat-card, .auth-card {
  background: #121a2b;
  border: 1px solid rgba(148,163,184,0.14);
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0,0,0,.25);
}

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

.stat-card {
  padding: 18px;
}
.stat-card span {
  display: block;
  color: #94a3b8;
  font-size: 13px;
  margin-bottom: 8px;
}
.stat-card strong {
  font-size: 30px;
}

.panel {
  padding: 20px;
  margin-bottom: 20px;
}

.link-form {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr auto;
  gap: 12px;
}

input, button {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.18);
  background: #172238;
  color: #e8eefc;
}

button {
  cursor: pointer;
  background: #2563eb;
  border: none;
  font-weight: 700;
}

button.danger { background: #e11d48; }

.table-wrap { overflow: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px;
  border-bottom: 1px solid rgba(148,163,184,0.12);
  text-align: left;
  vertical-align: top;
}

th { color: #94a3b8; font-size: 12px; text-transform: uppercase; }
.url-cell { word-break: break-all; color: #cbd5e1; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions form { margin: 0; }

a { color: #60a5fa; }

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

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 24px;
}

.auth-card p { color: #94a3b8; }
.auth-form { display: grid; gap: 12px; }
.alert {
  padding: 12px;
  background: rgba(225,29,72,.12);
  color: #fda4af;
  border: 1px solid rgba(225,29,72,.25);
  border-radius: 10px;
  margin-bottom: 12px;
}

@media (max-width: 900px) {
  .stats-grid { grid-template-columns: 1fr; }
  .link-form { grid-template-columns: 1fr; }
}
