:root {
  --bg: #0f172a;
  --panel: #111827;
  --accent: #22c55e;
  --accent-2: #38bdf8;
  --border: #1f2937;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --error: #f87171;
  --warning: #fbbf24;
  --radius: 14px;
  --mono: "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 28px 18px 40px;
  background: radial-gradient(circle at 20% 20%, #122136, #0f172a 55%, #0b1220 100%);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  overflow: auto;
}

main.page {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  color: #7dd3fc;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #0f172aee;
  border: 1px solid #1f2937;
  border-radius: 14px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
}

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

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0b1220;
  border: 1px solid var(--border);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mobile-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: #0b1220;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.nav-link,
.nav-button {
  border: 1px solid #253248;
  background: #0d1524;
  color: var(--text);
  padding: 9px 13px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.nav-link:hover,
.nav-button:hover {
  border-color: #38bdf8aa;
  background: #111c2f;
}

.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: #0e182a;
  border: 1px solid #243047;
  border-radius: 12px;
  min-width: 200px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
  z-index: 30;
}

.dropdown.open .dropdown-menu {
  display: flex;
}

.dropdown-menu a {
  padding: 9px 11px;
  border-radius: 10px;
  color: var(--text);
  border: 1px solid transparent;
}

.dropdown-menu a:hover {
  background: #111f33;
  border-color: #243047;
}

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

p.subtitle {
  margin: 0 0 10px;
  color: var(--muted);
}

.card {
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  flex: 1;
  max-height: calc(100vh - 160px);
  overflow: auto;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #1f2937;
  background: #0b1220;
  color: #9ca3af;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}

.tab:hover {
  border-color: #2b3648;
  color: #cbd5e1;
}

.tab.active {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: var(--text);
  border-color: #38bdf866;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

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

.panel {
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 14px;
  background: #0d1626;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), 0 10px 26px rgba(0, 0, 0, 0.25);
}

label {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.textarea,
textarea {
  width: 100%;
  min-height: 240px;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid #1f2937;
  background: #0b1220;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  resize: vertical;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.textarea:focus,
textarea:focus {
  outline: none;
  border-color: #22c55e80;
  box-shadow: 0 0 0 1px #22c55e30;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
  justify-content: flex-end;
}

button,
.file-label {
  appearance: none;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 11px 15px;
  background: #0f172a;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.14s ease, filter 0.14s ease;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

button:hover,
.file-label:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

button.primary {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: #22c55e;
  color: #052e16;
  box-shadow: 0 12px 26px rgba(34, 197, 94, 0.25);
}

button.primary:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

button.secondary {
  background: #111827;
  border-color: #1f2937;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.file-label {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: #0b1220;
}

input[type="file"] {
  display: none;
}

.status {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0b1220;
  color: var(--muted);
  font-size: 14px;
  display: none;
}

.status.show {
  display: block;
}

.status.error {
  color: #fecdd3;
  border-color: #f87171;
  background: #7f1d1d40;
}

.status.success {
  color: #d1fae5;
  border-color: #22c55e;
  background: #064e3b50;
}

.status.warning {
  color: #fef9c3;
  border-color: #fbbf24;
  background: #78350f50;
}

.badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 10px;
}

.badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  background: #0f172a;
}

.extras {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.note {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #0f172a;
}

.note strong {
  color: var(--text);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.pill {
  background: #0f172a;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--text);
  font-size: 12px;
}

.extra-table {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.extra-table strong {
  color: var(--text);
}

.small {
  padding: 8px 10px;
  font-size: 12px;
}

.docs {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  background: #0f172a;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.docs strong {
  color: var(--text);
}

.hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  cursor: help;
  margin-left: 6px;
}

.advanced-hidden {
  display: none !important;
}

.content-section {
  border: 1px solid #1f2937;
  background: #0f172a;
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

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

.section-card {
  background: #0d1626;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), 0 12px 28px rgba(0, 0, 0, 0.25);
}

.section-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.list-tight {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.5;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  user-select: none;
}

.toggle input {
  accent-color: #22c55e;
}

.drag-hint {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: #0f172a;
  color: var(--muted);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

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

@media (max-width: 720px) {
  body {
    padding: 22px 14px 32px;
    overflow: auto;
  }

  h1 {
    font-size: 22px;
  }

  .top-nav {
    position: sticky;
    top: 0;
    gap: 10px;
  }

  .mobile-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .top-nav.open .nav-links {
    display: flex;
  }

  .dropdown {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    width: 100%;
    margin-top: 4px;
  }

  .dropdown-menu a {
    width: 100%;
  }
}

