:root {
  color-scheme: dark;
  --bg: #050606;
  --panel: #101312;
  --panel-soft: #171b19;
  --line: #2a302d;
  --text: #f4f7f5;
  --muted: #9ba59f;
  --accent: #21f218;
  --accent-dark: #0fb907;
  --danger: #ff6b6b;
  --success: #6dff8d;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(33, 242, 24, 0.08), transparent 36rem),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08), transparent 24rem),
    var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  align-items: center;
}

.lead-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 19, 18, 0.92);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  padding: clamp(20px, 4vw, 40px);
}

.brand-row {
  display: grid;
  grid-template-columns: 240px 1fr auto;
  gap: 28px;
  align-items: center;
  margin-bottom: 32px;
}

.logo {
  width: min(240px, 100%);
  height: auto;
  display: block;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.language-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #090b0a;
  padding: 4px;
}

.language-button {
  min-width: 48px;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.language-button.active {
  background: var(--accent);
  color: #031003;
}

.request-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.field-wide,
.blocks,
.form-footer,
.status {
  grid-column: 1 / -1;
}

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

.field span,
legend {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #090b0a;
  color: var(--text);
  padding: 14px 15px;
  outline: none;
}

textarea {
  min-height: 160px;
  resize: vertical;
}

textarea:focus,
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(33, 242, 24, 0.14);
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 10px;
}

.segmented,
.checkbox-grid {
  display: grid;
  gap: 8px;
}

.segmented {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checkbox-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segmented label,
.checkbox-grid label {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 11px 12px;
  color: var(--text);
}

.segmented input,
.checkbox-grid input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.custom-field {
  margin-top: 12px;
}

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

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.hint {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
}

.submit-button,
.ghost-button {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  font-weight: 800;
  letter-spacing: 0;
}

.submit-button {
  min-width: 210px;
  background: var(--accent);
  color: #031003;
  padding: 0 20px;
}

.submit-button:hover {
  background: var(--success);
}

.ghost-button {
  border: 1px solid var(--line);
  background: #0a0d0c;
  color: var(--text);
  padding: 0 16px;
}

.status {
  min-height: 24px;
  margin: 0;
  font-weight: 700;
}

.status[data-type="success"] {
  color: var(--success);
}

.status[data-type="error"] {
  color: var(--danger);
}

.admin-shell {
  align-items: start;
}

.admin-panel {
  width: 100%;
}

.admin-header {
  grid-template-columns: 220px 1fr auto;
}

.login-form {
  max-width: 420px;
  display: grid;
  gap: 14px;
}

.hidden {
  display: none !important;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.table-toolbar p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.request-list {
  display: grid;
  gap: 12px;
}

.request-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  padding: 16px;
}

.request-card time {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-weight: 800;
}

.request-prompt {
  margin: 0 0 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.request-meta {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.request-meta dt {
  color: var(--muted);
  font-weight: 800;
}

.request-meta dd {
  margin: 0;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 840px) {
  .page-shell {
    width: min(100% - 20px, 640px);
    padding: 10px 0;
  }

  .brand-row,
  .admin-header,
  .request-form,
  .contact-grid,
  .form-footer {
    grid-template-columns: 1fr;
  }

  .brand-row {
    gap: 18px;
  }

  .language-switch {
    justify-self: start;
  }

  .logo {
    width: 210px;
  }

  .segmented,
  .checkbox-grid {
    grid-template-columns: 1fr;
  }

  .form-footer {
    display: grid;
  }

  .submit-button {
    width: 100%;
  }

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