:root {
  --bg: #0b1220;
  --card: rgba(255, 255, 255, 0.06);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.65);
  --line: rgba(255, 255, 255, 0.12);
  --primary: #7c5cff;
  --primary2: #35c6ff;
  --danger: #ff5c7a;
  --shadow: 0 16px 45px rgba(0, 0, 0, 0.45);
  --radius: 14px;
}

* {
  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";
  color: var(--text);
  background: radial-gradient(1000px 600px at 20% 15%, rgba(124, 92, 255, 0.35), transparent 60%),
    radial-gradient(900px 650px at 80% 10%, rgba(53, 198, 255, 0.25), transparent 55%),
    radial-gradient(1200px 800px at 50% 100%, rgba(255, 92, 122, 0.16), transparent 60%),
    var(--bg);
}

.app {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  background: rgba(10, 16, 30, 0.35);
}

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

.logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.95), rgba(53, 198, 255, 0.85));
  box-shadow: 0 10px 25px rgba(124, 92, 255, 0.25);
}

.title {
  font-weight: 700;
  letter-spacing: 0.2px;
}

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

.main {
  padding: 26px 20px;
  display: grid;
  place-items: start center;
}

.card {
  width: min(720px, 96vw);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.tab {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.tab.is-active {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.panels {
  padding: 16px;
}

.panel {
  display: none;
}

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

.form {
  display: grid;
  gap: 14px;
}

.row {
  display: grid;
  gap: 8px;
}

.row-inline {
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 10px;
}

.grow {
  min-width: 0;
}

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

.input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 8, 16, 0.42);
  color: var(--text);
  outline: none;
}

.input:focus {
  border-color: rgba(124, 92, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.18);
}

.btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 11px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  border-color: rgba(124, 92, 255, 0.5);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.9), rgba(53, 198, 255, 0.7));
}

.btn-secondary {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
}

.btn-ghost {
  background: transparent;
}

.me {
  display: grid;
  gap: 10px;
}

.kv {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
}

.k {
  color: var(--muted);
  font-size: 12px;
  align-self: center;
}

.v {
  overflow-wrap: anywhere;
  align-self: center;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 12px;
}

.me-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 6px;
}

.toast {
  width: min(720px, 96vw);
  margin-top: 12px;
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
}

.toast.is-error {
  color: rgba(255, 92, 122, 0.95);
}

.footer {
  padding: 18px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  background: rgba(10, 16, 30, 0.28);
  backdrop-filter: blur(10px);
}

@media (max-width: 520px) {
  .kv {
    grid-template-columns: 1fr;
  }
  .row-inline {
    grid-template-columns: 1fr;
  }
  .me-actions {
    justify-content: stretch;
    flex-direction: column;
  }
}

