:root {
  --bg: #0b1220;
  --card: #0f1a2e;
  --card2: #0d1730;
  --text: #e9f0ff;
  --muted: #a9b8da;
  --line: rgba(255,255,255,.10);
  --blue: #2f6bff;
  --blue2: #1c4ed8;
  --danger: #ef4444;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 600px at 50% -20%, rgba(47,107,255,.35), transparent 60%), var(--bg);
  color: var(--text);
}

.container {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 16px;
}
.container.narrow { width: min(520px, 100%); }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(11,18,32,.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand.small .title { font-size: 16px; font-weight: 700; }

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(47,107,255,.95), rgba(28,78,216,.95));
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
}

.title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .2px;
}

.subtitle {
  font-size: 12px;
  color: var(--muted);
}

.card {
  background: linear-gradient(180deg, rgba(15,26,46,.98), rgba(13,23,48,.98));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.35);
  margin: 16px 0;
}

h2 {
  margin: 0 0 12px 0;
  font-size: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(135deg, rgba(47,107,255,.95), rgba(28,78,216,.95));
  color: white;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: transform .05s ease;
}

.btn:active { transform: translateY(1px); }

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

.btn.full { width: 100%; }

.form { display: grid; gap: 10px; }
.form.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form.grid .fullrow { grid-column: 1 / -1; }

.label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px 2px;
}

.input, .select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(8, 14, 28, .6);
  color: var(--text);
  outline: none;
}

.select { padding-right: 38px; }

.flash {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(47,107,255,.18);
}

.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); }

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

.table th, .table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.table tr:last-child td { border-bottom: 0; }

.empty {
  padding: 12px;
  border: 1px dashed rgba(255,255,255,.18);
  border-radius: 14px;
  color: var(--muted);
}

.hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.muted { color: var(--muted); }
.small { font-size: 12px; }

@media (max-width: 720px) {
  .form.grid { grid-template-columns: 1fr; }
  .table { min-width: 0; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr {
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }
  .table td {
    border: 0;
    padding: 8px 12px;
  }
  .table td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 4px;
  }
}
