:root {
  --bg: #f3efe7;
  --panel: #fffaf2;
  --panel-strong: #f8f1e4;
  --ink: #1f1b17;
  --muted: #766a5c;
  --line: #d7c7b0;
  --accent: #b14f2f;
  --accent-soft: #f4d9cf;
  --ok: #d8ecd9;
  --ok-ink: #225a2a;
  --error: #f6d4d4;
  --error-ink: #7d2222;
  --shadow: 0 18px 45px rgba(64, 41, 19, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font: 15px/1.5 "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(177, 79, 47, 0.18), transparent 28%),
    linear-gradient(180deg, #f6f1e8 0%, #efe6d8 100%);
}

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

code {
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 0.9em;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 28px 22px;
  border-right: 1px solid rgba(123, 97, 68, 0.18);
  background: rgba(255, 251, 245, 0.7);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 30px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, #a53f22, #d67d3d);
  box-shadow: var(--shadow);
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 13px;
}

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

.nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 600;
}

.nav a.active,
.nav a:hover {
  background: var(--panel-strong);
}

.logout-form {
  margin-top: 24px;
}

.content {
  padding: 30px;
}

.page-head {
  margin-bottom: 20px;
}

.page-head h1 {
  margin: 0 0 6px;
  font-size: 32px;
}

.page-head p,
.section-copy,
.muted {
  color: var(--muted);
}

.flash {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 18px;
  font-weight: 600;
}

.flash-ok {
  background: var(--ok);
  color: var(--ok-ink);
}

.flash-error {
  background: var(--error);
  color: var(--error-ink);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card,
.panel,
.hero-card {
  background: rgba(255, 250, 242, 0.92);
  border: 1px solid rgba(144, 114, 81, 0.16);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 18px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.stat-card strong {
  font-size: 28px;
}

.stat-card.accent {
  background: linear-gradient(135deg, #b14f2f, #e49352);
  color: white;
}

.stat-card.accent span {
  color: rgba(255, 255, 255, 0.82);
}

.panel,
.hero-card {
  padding: 22px;
  margin-bottom: 18px;
}

.legal-card p {
  margin: 0 0 12px;
}

.legal-meta {
  color: var(--muted);
}

.legal-list {
  margin: 0;
  padding-left: 20px;
}

.legal-list li {
  margin-bottom: 8px;
}

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

.panel-head h2,
.section-title {
  margin: 0;
  font-size: 20px;
}

.split {
  display: grid;
  grid-template-columns: minmax(320px, 430px) 1fr;
  gap: 18px;
  align-items: start;
}

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

.stack-form label,
.inline-form label {
  display: grid;
  gap: 6px;
}

.inline-form {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

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

input,
textarea,
select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffcf8;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, #a84727, #cf7c3c);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.button.secondary {
  background: #eadac4;
  color: var(--ink);
}

.button.full {
  width: 100%;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(140, 112, 78, 0.16);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero-card.narrow {
  max-width: 460px;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(123, 97, 68, 0.18);
  }

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

.taplink-body {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top, rgba(209, 120, 63, 0.18), transparent 34%),
    linear-gradient(180deg, #f8f1e7 0%, #efe1cd 100%);
}

.taplink-orb {
  position: fixed;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(40px);
  opacity: 0.35;
}

.taplink-orb-left {
  top: -80px;
  left: -120px;
  background: rgba(209, 120, 63, 0.42);
}

.taplink-orb-right {
  top: 220px;
  right: -140px;
  background: rgba(123, 158, 111, 0.25);
}

.taplink-shell {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.taplink-hero {
  padding: 32px;
  margin-bottom: 18px;
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 251, 245, 0.98), rgba(246, 233, 213, 0.9)),
    rgba(255, 250, 242, 0.92);
  border: 1px solid rgba(144, 114, 81, 0.1);
  box-shadow: 0 30px 80px rgba(64, 41, 19, 0.11);
}

.taplink-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.taplink-brand {
  display: inline-block;
  padding: 10px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: #9f492b;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.taplink-status {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #4f5b46;
  font-size: 14px;
  font-weight: 600;
}

.taplink-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.85fr);
  gap: 20px;
  align-items: stretch;
}

.taplink-kicker {
  margin: 0 0 10px;
  color: #9b4427;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.taplink-hero h1 {
  margin: 0 0 12px;
  font-size: 52px;
  line-height: 0.94;
  letter-spacing: -0.03em;
}

.taplink-lead {
  margin: 0 0 18px;
  max-width: 660px;
  color: var(--muted);
  font-size: 18px;
}

.taplink-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.taplink-trust-chip {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(144, 114, 81, 0.08);
  color: #5f554a;
  font-size: 14px;
  font-weight: 600;
}

.taplink-side {
  display: grid;
  gap: 14px;
}

.taplink-side-card {
  display: grid;
  gap: 6px;
  padding: 20px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(144, 114, 81, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.taplink-side-card strong {
  font-size: 38px;
  line-height: 1;
}

.taplink-side-card span {
  color: var(--muted);
}

.taplink-process {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.taplink-process-card {
  padding: 18px 18px 20px;
  border-radius: 24px;
  background: rgba(255, 250, 242, 0.78);
  border: 1px solid rgba(144, 114, 81, 0.1);
  box-shadow: 0 14px 34px rgba(64, 41, 19, 0.06);
}

.taplink-process-card span {
  display: inline-block;
  margin-bottom: 10px;
  color: #9f492b;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.taplink-process-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.taplink-process-card p {
  margin: 0;
  color: var(--muted);
}

.taplink-grid {
  display: grid;
  gap: 16px;
}

.taplink-card {
  position: relative;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 250, 242, 0.92);
  border: 1px solid rgba(144, 114, 81, 0.12);
  box-shadow: 0 22px 48px rgba(64, 41, 19, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.taplink-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 58px rgba(64, 41, 19, 0.12);
  border-color: rgba(177, 79, 47, 0.22);
}

.taplink-card-primary {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(250, 236, 213, 0.94)),
    rgba(255, 250, 242, 0.96);
}

.taplink-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.taplink-card-top-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.taplink-card-badge,
.taplink-card-code {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.taplink-card-badge {
  background: linear-gradient(135deg, #a84727, #cf7c3c);
  color: white;
}

.taplink-card-code {
  background: rgba(255, 255, 255, 0.68);
  color: #5f554a;
}

.taplink-card-head {
  margin-bottom: 16px;
}

.taplink-card h2 {
  margin: 0;
  font-size: 32px;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.taplink-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
  max-width: 58ch;
}

.taplink-price {
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #b14f2f, #e49352);
  color: white;
  font-weight: 700;
  white-space: nowrap;
}

.taplink-benefits {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
}

.taplink-benefits li {
  position: relative;
  padding: 0 0 0 22px;
  color: #443a31;
}

.taplink-benefits li::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a84727, #cf7c3c);
}

.taplink-card-footer {
  display: grid;
  gap: 12px;
}

.taplink-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.taplink-card-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #5f554a;
  font-size: 14px;
  font-weight: 600;
}

.taplink-button {
  display: inline-block;
  width: 100%;
  padding: 16px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a84727, #cf7c3c);
  color: white;
  text-align: center;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(177, 79, 47, 0.24);
}

.taplink-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.taplink-card-links a {
  color: var(--muted);
  font-size: 14px;
}

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

@media (max-width: 640px) {
  .taplink-shell {
    padding: 22px 14px 36px;
  }

  .taplink-hero {
    padding: 22px;
  }

  .taplink-hero-grid,
  .taplink-process {
    grid-template-columns: 1fr;
  }

  .taplink-hero-top,
  .taplink-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .taplink-hero h1 {
    font-size: 36px;
  }

  .taplink-lead {
    font-size: 16px;
  }

  .taplink-card h2 {
    font-size: 26px;
  }
}
