:root {
  --bg: #04060f;
  --bg-soft: #0a1022;
  --card: rgba(9, 14, 34, 0.72);
  --text: #eef3ff;
  --muted: #a4b1d0;
  --border: rgba(169, 193, 255, 0.2);
  --primary: #4f8cff;
  --primary-2: #8a5cff;
  --danger: #fca5a5;
  --success: #86efac;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 6%, rgba(67, 112, 255, 0.34) 0%, rgba(67, 112, 255, 0) 46%),
    radial-gradient(circle at 95% 88%, rgba(68, 223, 255, 0.26) 0%, rgba(68, 223, 255, 0) 44%),
    linear-gradient(150deg, var(--bg-soft) 0%, var(--bg) 58%);
  display: grid;
  place-items: center;
  padding: 28px 14px;
}

.panel-wrap {
  width: min(900px, 100%);
}

.panel-card {
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)) , var(--card);
  border-radius: 18px;
  padding: 24px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
}

.panel-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

h1, h2 {
  margin: 0 0 6px;
  letter-spacing: 0.2px;
}

h2 {
  margin-top: 18px;
  font-size: 1.02rem;
}

.muted {
  color: var(--muted);
  margin: 0 0 14px;
  font-size: 0.92rem;
}

.panel-form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid rgba(169, 193, 255, 0.14);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.015);
}

.form-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.form-head h2 {
  margin: 0;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 10px;
  text-decoration: none;
  color: #d6e4ff;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ghost-link:hover {
  border-color: rgba(124, 160, 255, 0.9);
  background: rgba(79, 140, 255, 0.14);
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: #dfe9ff;
}

input {
  border: 1px solid var(--border);
  background: rgba(3, 8, 24, 0.86);
  color: var(--text);
  border-radius: 10px;
  padding: 11px 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder {
  color: rgba(187, 204, 241, 0.7);
}

input:focus {
  outline: none;
  border-color: rgba(124, 160, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(79, 140, 255, 0.2);
  background: rgba(5, 12, 34, 0.95);
}

button {
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 12px 24px rgba(79, 140, 255, 0.25);
}

button:active {
  transform: translateY(0);
}

button.ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  box-shadow: none;
}

.status {
  border-radius: 10px;
  padding: 11px 12px;
  margin: 10px 0;
  font-size: 0.92rem;
}

.status.error {
  color: var(--danger);
  border: 1px solid rgba(252, 165, 165, 0.4);
  background: rgba(252, 165, 165, 0.08);
}

.status.ok {
  color: var(--success);
  border: 1px solid rgba(134, 239, 172, 0.4);
  background: rgba(134, 239, 172, 0.08);
}

.table-wrap {
  margin-top: 16px;
  border: 1px solid rgba(169, 193, 255, 0.14);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.015);
}

table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.015);
}

th, td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.93rem;
}

thead th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 600;
}

.back-link {
  display: inline-block;
  margin-top: 12px;
  color: #cddcff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: #eef3ff;
}

.table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.table-actions form {
  margin: 0;
}

.mini-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(124, 160, 255, 0.6);
  border-radius: 8px;
  padding: 6px 10px;
  background: rgba(79, 140, 255, 0.12);
  color: #dfe9ff;
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.mini-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.mini-btn.danger {
  border-color: rgba(252, 165, 165, 0.55);
  background: rgba(252, 165, 165, 0.12);
  color: #ffd6d6;
}

@media (max-width: 640px) {
  .panel-card {
    padding: 18px;
  }

  h1 {
    font-size: 1.55rem;
  }

  .panel-top {
    align-items: flex-start;
  }
}
