
:root {
  --bg: #0b1020;
  --bg-soft: #10182b;
  --card: #121c31;
  --card-2: #16243d;
  --line: #263754;
  --text: #f3f6ff;
  --muted: #9fb0d0;
  --accent: #5ba7ff;
  --accent-2: #2f76d2;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 0% -10%, rgba(91, 167, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% -20%, rgba(47, 118, 210, 0.18), transparent 55%),
    var(--bg);
}

.container {
  max-width: 1320px;
  margin: 24px auto;
  padding: 0 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #7cbcff; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 32, 0.92);
  backdrop-filter: blur(4px);
}

.brand-wrap { display: flex; align-items: baseline; gap: 10px; }
.brand {
  font-weight: 800;
  font-size: 22px;
  color: #eef4ff;
}
.brand-sub {
  color: var(--muted);
  font-size: 13px;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.header-nav a {
  color: #d6e7ff;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 7px 10px;
}

.header-nav a:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  max-width: 1320px;
  margin: 20px auto;
  padding: 0 16px 20px;
}

.sidebar {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  height: fit-content;
}

.sidebar-title {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.side-link {
  display: block;
  padding: 10px;
  border-radius: 10px;
  color: #dfe9ff;
}

.side-link:hover {
  background: rgba(255,255,255,.06);
}

.content {
  min-width: 0;
}

.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

h2 { margin: 0 0 12px; font-size: 20px; }

.muted { color: var(--muted); }

label {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

input, textarea, select, button {
  font: inherit;
}

input, textarea, select {
  width: 100%;
  color: var(--text);
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(91,167,255,.2);
}

button, .btn, .btn-secondary, .link-btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  line-height: 1;
}

button, .btn {
  color: #fff;
  background: linear-gradient(180deg, #4ea2ff, #2f76d2);
}

button:hover, .btn:hover {
  filter: brightness(1.07);
}

.btn-secondary {
  color: #d9e7ff;
  border-color: var(--line);
  background: rgba(255,255,255,.03);
}

.link-btn {
  color: #cfe2ff;
  border-color: var(--line);
  background: rgba(255,255,255,.03);
}

.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form-grid { max-width: 760px; }
.error { color: #ff9a9a; font-weight: 600; }
.auth { max-width: 520px; margin: 20px auto; }
.notice { margin-bottom: 12px; color: #d9e9ff; border-color: #355a88; }

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  font-size: 14px;
  vertical-align: top;
}

th {
  color: #bcd2f6;
  font-weight: 700;
}

.copy-block { margin: 14px 0; }

code {
  display: block;
  margin-top: 8px;
  color: #d7e6ff;
  background: #0f172a;
  border: 1px dashed #31527a;
  padding: 8px;
  border-radius: 8px;
  word-break: break-all;
}

.danger {
  background: linear-gradient(180deg, #ff6b6b, #e25555);
  color: #fff;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    order: 2;
  }

  .content {
    order: 1;
  }
}

@media (max-width: 680px) {
  .topbar { padding: 12px 14px; }
  .brand { font-size: 20px; }
  .toolbar { flex-direction: column; align-items: flex-start; }
  th, td { font-size: 12px; }
}
