:root {
  --bg: #0b1220;
  --card: #111a2e;
  --muted: #a7b3cc;
  --text: #e9eefb;
  --line: rgba(255, 255, 255, 0.08);
  --primary: #6ea8fe;
  --primary-2: #3f7fe6;
  --danger: #ff6b6b;
  --success: #3ddc97;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.45);
}

* {
  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(1200px 600px at 30% 20%, #182a52 0%, var(--bg) 60%),
    radial-gradient(900px 500px at 80% 30%, #1a3b40 0%, var(--bg) 55%);
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 4px 18px;
}

h1 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 28px;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 62ch;
}

.pill {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.card {
  background: rgba(17, 26, 46, 0.85);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(8px);
}

.cardHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 12px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.cardTitle {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cardMeta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  font-size: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

@media (max-width: 780px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

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

.hint {
  font-size: 12px;
  color: rgba(167, 179, 204, 0.8);
}

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  outline: none;
}

.input:focus {
  border-color: rgba(110, 168, 254, 0.55);
  box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.18);
}

.textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  outline: none;
  resize: vertical;
  min-height: 220px;
  line-height: 1.35;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
}

.textarea:focus {
  border-color: rgba(110, 168, 254, 0.55);
  box-shadow: 0 0 0 3px rgba(110, 168, 254, 0.18);
}

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

.meta {
  font-size: 12px;
  color: rgba(167, 179, 204, 0.9);
}

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

.actions.left {
  justify-content: flex-start;
  margin-top: 0;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

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

.btn.primary {
  border-color: rgba(110, 168, 254, 0.45);
  background: linear-gradient(180deg, rgba(110, 168, 254, 0.18), rgba(110, 168, 254, 0.06));
}

.btn.primary:hover:not(:disabled) {
  border-color: rgba(110, 168, 254, 0.75);
  background: linear-gradient(180deg, rgba(110, 168, 254, 0.26), rgba(110, 168, 254, 0.1));
}

.btn.secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.btn.danger {
  border-color: rgba(255, 107, 107, 0.45);
  background: linear-gradient(180deg, rgba(255, 107, 107, 0.16), rgba(255, 107, 107, 0.06));
}

.btn.danger:hover:not(:disabled) {
  border-color: rgba(255, 107, 107, 0.75);
  background: linear-gradient(180deg, rgba(255, 107, 107, 0.24), rgba(255, 107, 107, 0.1));
}

.statusWrap {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.status {
  font-size: 13px;
}

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

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
  margin-left: 6px;
}

.footer {
  margin-top: 14px;
  padding: 0 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status.ok {
  color: var(--success);
}

.status.err {
  color: var(--danger);
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.modalCard {
  width: min(640px, 100%);
  background: rgba(17, 26, 46, 0.95);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(10px);
}

.modalHeader {
  margin-bottom: 12px;
}

.modalTitle {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.modalSubtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

