:root {
  color-scheme: light;
  --bg: #f5efe3;
  --bg-accent: radial-gradient(circle at top left, rgba(178, 73, 36, 0.18), transparent 34%), linear-gradient(135deg, #f6ead0 0%, #efe7db 48%, #d8e0d7 100%);
  --panel: rgba(255, 251, 245, 0.88);
  --panel-border: rgba(78, 53, 36, 0.12);
  --text: #241913;
  --muted: #705b4e;
  --accent: #bb4a1f;
  --accent-strong: #8a3111;
  --accent-soft: rgba(187, 74, 31, 0.12);
  --success: #2f6a39;
  --danger: #a02f1b;
  --shadow: 0 24px 60px rgba(66, 41, 24, 0.14);
  --radius-lg: 28px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Georgia", "Times New Roman", serif;
  color: var(--text);
  background: var(--bg-accent);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(36, 25, 19, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 25, 19, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.shell {
  width: min(860px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.admin-shell {
  width: min(1180px, calc(100vw - 32px));
}

.panel,
.subpanel {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel {
  padding: 32px;
}

.subpanel {
  padding: 22px;
  margin-top: 24px;
}

.hero-panel {
  margin-top: 36px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  font-weight: 700;
}

h1 {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 0.95;
}

h2 {
  font-size: 32px;
}

h3 {
  font-size: 20px;
}

.lead {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 42rem;
}

.stack {
  display: grid;
  gap: 16px;
}

.compact-stack {
  margin-top: 16px;
}

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

.field span,
.muted {
  color: var(--muted);
  font-size: 14px;
}

.field input,
button,
.link-button,
.secondary-button {
  border-radius: var(--radius-md);
  font: inherit;
}

.field input {
  width: 100%;
  border: 1px solid rgba(78, 53, 36, 0.18);
  background: rgba(255, 255, 255, 0.78);
  padding: 16px 18px;
  font-size: 16px;
  color: var(--text);
}

.field input:focus {
  outline: 2px solid rgba(187, 74, 31, 0.24);
  border-color: rgba(187, 74, 31, 0.34);
}

button,
.link-button {
  border: 0;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff9f2;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 160ms ease, opacity 160ms ease;
}

button:hover,
.link-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

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

.secondary-button {
  background: rgba(36, 25, 19, 0.06);
  color: var(--text);
  border: 1px solid rgba(36, 25, 19, 0.08);
  padding: 12px 16px;
}

.message {
  min-height: 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

.hidden {
  display: none;
}

.result-panel {
  margin-top: 20px;
}

.result-grid,
.triple-grid {
  display: grid;
  gap: 16px;
}

.result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

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

.value {
  font-size: 24px;
  font-weight: 700;
  margin-top: 6px;
  word-break: break-all;
}

.actions {
  display: flex;
  gap: 12px;
}

.otp-box {
  border-radius: 24px;
  border: 1px dashed rgba(36, 25, 19, 0.2);
  background: rgba(255, 255, 255, 0.5);
  padding: 24px;
  text-align: center;
  font-size: clamp(38px, 8vw, 72px);
  letter-spacing: 0.22em;
  font-weight: 700;
}

.static-field {
  border: 1px solid rgba(36, 25, 19, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.46);
}

.static-field strong {
  font-size: 20px;
}

.admin-header,
.subpanel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(36, 25, 19, 0.08);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.inline-actions {
  display: flex;
  gap: 8px;
}

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

.danger-button {
  background: linear-gradient(135deg, #cb5e49 0%, #9c2d17 100%);
}

.config-box {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

a {
  color: var(--accent-strong);
}

@media (max-width: 768px) {
  .shell {
    width: calc(100vw - 20px);
    padding: 24px 0;
  }

  .panel {
    padding: 22px;
  }

  .result-grid,
  .triple-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 38px;
  }
}
