* {
  box-sizing: border-box;
}

:root {
  --bg-top: #f0d69f;
  --bg-mid: #ce9955;
  --bg-bottom: #1a140f;
  --panel: linear-gradient(180deg, rgba(33, 24, 18, 0.9), rgba(18, 13, 10, 0.94));
  --panel-soft: rgba(255, 255, 255, 0.06);
  --card: linear-gradient(180deg, rgba(255, 243, 214, 0.09), rgba(255, 255, 255, 0.03));
  --border: rgba(255, 227, 168, 0.18);
  --text: #fff7e8;
  --muted: rgba(255, 244, 222, 0.76);
  --accent: #ffd54a;
  --accent-strong: #ff9b3d;
  --accent-soft: #ffe6a6;
  --success: #93ffc4;
  --warning: #ffd1a4;
  --danger: #ffb0a6;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-pill: 999px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI Variable", Bahnschrift, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.45), transparent 20%),
    radial-gradient(circle at 82% 18%, rgba(255, 214, 74, 0.22), transparent 18%),
    radial-gradient(circle at 15% 90%, rgba(255, 122, 61, 0.16), transparent 22%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 24%, #684322 52%, var(--bg-bottom) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(transparent 0, rgba(16, 11, 8, 0.18) 100%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.025) 0,
      rgba(255, 255, 255, 0.025) 1px,
      transparent 1px,
      transparent 120px
    );
  opacity: 0.55;
}

a {
  color: inherit;
}

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

button,
.btn,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 231, 176, 0.22);
  background: linear-gradient(135deg, rgba(255, 213, 74, 0.18), rgba(255, 155, 61, 0.16));
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

button:hover,
.btn:hover,
.button-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 213, 74, 0.5);
  background: linear-gradient(135deg, rgba(255, 213, 74, 0.28), rgba(255, 155, 61, 0.26));
}

button:disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 28px));
  margin: 0 auto;
  padding: 26px 0 36px;
}

.page-shell.wide {
  width: min(1360px, calc(100% - 28px));
}

.topbar {
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 20px;
}

.brand-chip,
.info-chip,
.action-group,
.pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(62, 43, 29, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 12px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(14px);
}

.brand-chip,
.info-chip,
.status-chip {
  padding: 14px 22px;
}

.brand-chip {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 20px rgba(255, 213, 74, 0.72);
}

.info-chip,
.status-chip {
  justify-content: space-between;
  width: 100%;
  flex-wrap: wrap;
  color: var(--muted);
}

.action-group {
  padding: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.action-group .btn,
.topbar > .btn,
.topbar > a.btn {
  min-height: 42px;
}

.glass-panel,
.hero-panel,
.card,
.table-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.glass-panel::before,
.hero-panel::before,
.card::before,
.table-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 30%, transparent 70%, rgba(255, 213, 74, 0.08));
}

.hero-panel,
.glass-panel,
.card,
.table-shell {
  padding: 24px;
}

.hero-grid,
.content-grid,
.cards-grid,
.split-grid {
  display: grid;
  gap: 18px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
  margin-bottom: 20px;
}

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

.cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-soft);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
  position: relative;
  z-index: 1;
}

h1 {
  margin: 14px 0 10px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.95;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

p,
.muted,
.meta,
.helper-text {
  color: var(--muted);
  line-height: 1.6;
}

.metric-grid,
.stat-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.metric-card,
.stat-card,
.list-row,
.info-block,
.table-row {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 235, 192, 0.11);
  background: var(--card);
}

.metric-card,
.stat-card,
.info-block {
  padding: 16px 18px;
}

.metric-label,
.stat-label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 244, 222, 0.62);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-value,
.stat-value {
  font-size: 1.45rem;
  font-weight: 800;
}

.progress-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 235, 192, 0.11);
  background: rgba(255, 255, 255, 0.04);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 24px rgba(255, 213, 74, 0.32);
}

.section-stack {
  display: grid;
  gap: 18px;
}

.link-row,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.list-row {
  display: grid;
  gap: 14px;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  padding: 14px;
}

.list-rank,
.badge-square {
  min-width: 60px;
  min-height: 60px;
  max-width: 112px;
  display: grid;
  place-items: center;
  padding: 8px 10px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #2a1806;
  font-weight: 900;
  font-size: 0.84rem;
  line-height: 1.1;
  text-align: center;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 213, 74, 0.14);
  color: var(--accent-soft);
  font-weight: 700;
}

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

.status-warn {
  color: var(--warning);
}

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

.form-grid {
  display: grid;
  gap: 14px;
}

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

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

.field label,
.fieldset-title {
  color: var(--accent-soft);
  font-size: 0.9rem;
  font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="file"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 233, 186, 0.18);
  background: rgba(255, 248, 237, 0.08);
  color: var(--text);
}

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

input::placeholder,
textarea::placeholder {
  color: rgba(255, 244, 222, 0.45);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(255, 213, 74, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 213, 74, 0.08);
}

.checkbox-list,
.radio-list {
  display: grid;
  gap: 10px;
}

.choice-card {
  display: grid;
  gap: 10px;
  grid-template-columns: auto 1fr;
  align-items: start;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 235, 192, 0.11);
  background: rgba(255, 255, 255, 0.045);
}

.message {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 235, 192, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.message.error {
  border-color: rgba(255, 176, 166, 0.26);
  color: var(--danger);
}

.message.success {
  border-color: rgba(147, 255, 196, 0.24);
  color: var(--success);
}

.table-shell {
  padding: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  position: relative;
  z-index: 1;
}

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

th {
  color: var(--accent-soft);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

code {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-soft);
}

.empty-state {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(255, 235, 192, 0.16);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.inline-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.text-center {
  text-align: center;
}

@media (max-width: 1080px) {
  .topbar,
  .hero-grid,
  .split-grid,
  .form-grid.two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-shell,
  .page-shell.wide {
    width: min(100% - 18px, 1360px);
    padding-top: 18px;
  }

  .brand-chip,
  .info-chip,
  .status-chip {
    width: 100%;
  }

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

  .list-rank,
  .badge-square {
    min-width: 56px;
  }
}
