:root {
  --bg: #070d14;
  --panel: #111a26;
  --panel-2: #0b131d;
  --stroke: rgba(255, 255, 255, 0.1);
  --text: #f5f8ff;
  --muted: #95a3b6;
  --accent: #00d98b;
  --accent-2: #ffb14a;
  --danger: #ff5f5f;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Outfit", sans-serif;
}

.admin-bg {
  background:
    radial-gradient(circle at 5% 15%, rgba(0, 217, 139, 0.2), transparent 35%),
    radial-gradient(circle at 95% 5%, rgba(255, 177, 74, 0.18), transparent 35%),
    #060a10;
  color: var(--text);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.small {
  margin: 0;
  color: var(--muted);
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem 4vw;
  border-bottom: 1px solid var(--stroke);
  background: rgba(6, 10, 16, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.admin-layout {
  width: min(1200px, 94vw);
  margin: 1.2rem auto 4rem;
  display: grid;
  gap: 1rem;
}

.stats-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.stat-card {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(17, 26, 38, 0.9), rgba(11, 19, 29, 0.9));
  padding: 1rem;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
}

.stat-card strong {
  font-size: 1.5rem;
  display: block;
  margin-top: 0.4rem;
}

.card {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(17, 26, 38, 0.92), rgba(11, 19, 29, 0.96));
  padding: 1rem;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.tab-btn {
  border: 1px solid var(--stroke);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
}

.tab-btn.active {
  border-color: rgba(0, 217, 139, 0.4);
  background: rgba(0, 217, 139, 0.14);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.split-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

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

th,
td {
  border-bottom: 1px solid var(--stroke);
  padding: 0.7rem;
  text-align: left;
  font-size: 0.95rem;
}

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

button,
.ghost-btn {
  border: 0;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

button {
  background: linear-gradient(110deg, var(--accent-2), #ffd08a);
  color: #3a2403;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--stroke);
}

.danger-btn {
  background: rgba(255, 95, 95, 0.12);
  color: #ffd8d8;
  border: 1px solid rgba(255, 95, 95, 0.35);
}

.link {
  color: var(--accent);
  text-decoration: none;
}

.grid-form {
  display: grid;
  gap: 0.8rem;
}

.grid-form label {
  display: grid;
  gap: 0.35rem;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.status {
  min-height: 1rem;
  color: var(--muted);
}

.security-box {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--stroke);
}

.security-box h3 {
  margin: 0 0 0.8rem;
}

.login-wrap {
  width: min(460px, 92vw);
  margin: 12vh auto;
  display: grid;
  gap: 0.8rem;
}

.login-wrap p {
  margin: 0;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 8, 13, 0.7);
  padding: 1rem;
}

.modal.open {
  display: flex;
}

.modal-card {
  width: min(680px, 92vw);
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: #0b111a;
  padding: 1rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.actions {
  display: flex;
  gap: 0.4rem;
}

@media (max-width: 760px) {
  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  th:nth-child(4),
  td:nth-child(4),
  th:nth-child(5),
  td:nth-child(5) {
    display: none;
  }
}
