@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #0b0b0b;
  --panel: #151310;
  --text: #f6f2ee;
  --muted: #c8bdb3;
  --border: #2d2621;
  --accent: #e27d39;
  --accent-hover: #f3b079;
  --surface: #1b1714;
  --surface-alt: #221c18;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  position: relative;
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(226, 125, 57, 0.16), transparent 60%),
    radial-gradient(700px 420px at 92% 0%, rgba(243, 176, 121, 0.12), transparent 62%),
    radial-gradient(circle at 1px 1px, rgba(243, 176, 121, 0.16) 1px, transparent 1px);
  background-size: auto, auto, 18px 18px;
  pointer-events: none;
  opacity: 0.45;
  z-index: 0;
}

.container {
  max-width: 1120px;
  margin: 56px auto 36px;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

.page-header {
  margin: 0 0 30px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

h1 {
  margin: 0 0 10px;
  font-size: 38px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.1px;
}

.muted {
  color: var(--muted);
  margin: 0 0 12px;
  font-size: 15px;
  max-width: 880px;
}

.page-footer {
  margin-top: 28px;
  padding-top: 6px;
  border-top: 0;
  color: var(--muted);
  font-size: 12px;
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.page-footer a {
  color: var(--accent-hover);
  text-decoration: none;
  font-weight: 700;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 600;
}

input,
textarea,
button,
select {
  font: inherit;
}

select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

option {
  background: #1a1613;
  color: var(--text);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 11px;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:not([type="checkbox"]):not([type="radio"]),
select {
  min-height: 42px;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  border-radius: 4px;
  box-shadow: none;
}

input::placeholder,
textarea::placeholder {
  color: #857769;
}

input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(226, 125, 57, 0.2);
}

input[type="checkbox"]:focus,
input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: none;
}

textarea {
  min-height: 230px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.45;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 22px;
}

.actions-top {
  margin-top: 12px;
  margin-bottom: 22px;
}

.actions-generate {
  margin-top: 6px;
  margin-bottom: 14px;
}

.actions-export {
  margin-top: 12px;
  margin-bottom: 6px;
}

button {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  border-radius: 999px;
  min-height: 40px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.2s ease, background-color 0.2s ease;
}

button:focus {
  outline: none;
}

button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(226, 125, 57, 0.24);
}

button:hover {
  border-color: #5a4739;
  transform: translateY(-0.5px);
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a140f;
  font-weight: 700;
}

button.primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

button:active {
  transform: scale(0.99);
}

.add-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: var(--surface);
  margin-bottom: 20px;
}

.add-grid {
  display: grid;
  grid-template-columns: 120px 1fr 1fr 110px 90px;
  gap: 10px;
  align-items: end;
}

.add-grid-2 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.add-help {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.add-submit-wrap {
  margin-top: 10px;
}

.txt-wrap {
  margin-top: 10px;
}

.txt-content {
  min-height: 90px;
}

.proxy-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 40px;
}

.hidden {
  display: none !important;
}

.filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0 10px;
}

.filter-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: #e7d9cc;
  border-radius: 999px;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
}

.filter-btn:hover {
  border-color: #5a4739;
  color: #f6e8db;
  transform: none;
}

.filter-btn:focus,
.filter-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(226, 125, 57, 0.24);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #1a140f;
}

.editor-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  margin-top: 14px;
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
  background: var(--panel);
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 9px;
  font-size: 13px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-alt);
  position: sticky;
  top: 0;
  z-index: 1;
}

.col-name {
  width: 24%;
}

.col-ttl {
  width: 9%;
}

.col-type {
  width: 9%;
}

.col-value {
  width: 42%;
}

.col-proxied {
  width: 10%;
}

.col-action {
  width: 6%;
}

.cell-input,
.cell-select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  font-size: 13px;
  background: var(--surface);
  color: var(--text);
}

.status {
  display: none;
  margin-top: 10px;
  font-size: 14px;
  color: #dfc7b4;
}

.delete-btn {
  border: 1px solid #f0b3b3;
  color: #a02727;
  background: #fff5f5;
}

@media (max-width: 760px) {
  h1 {
    font-size: 30px;
  }

  .container {
    margin-top: 34px;
  }

  .card {
    padding: 18px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .add-grid,
  .add-grid-2 {
    grid-template-columns: 1fr;
  }
}
