@import url("https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap");

:root {
  --bg: #f1eee7;
  --fg: #232323;
  --muted: #5b5a56;
  --accent: #ff9100;
  --surface: #fffdf8;
  --surface-2: #e8e4db;
  --line: rgba(35, 35, 35, 0.12);
  --ok: #1f8a5b;
  --bad: #c23b3b;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  --radius: 14px;
  --font: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --max: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(255, 145, 0, 0.12), transparent 55%),
    radial-gradient(700px 360px at 92% 8%, rgba(35, 35, 35, 0.05), transparent 50%),
    var(--bg);
  color: var(--fg);
  line-height: 1.65;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding: 12px 16px 0;
  background: linear-gradient(to bottom, var(--bg) 60%, transparent);
}

.site-nav {
  display: flex;
  width: min(100%, var(--max));
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #232323;
  color: #c6c6c6;
  box-shadow: var(--shadow);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 12px 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #f1eee7;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 145, 0, 0.25);
}

.lang-switch {
  flex: 0 0 auto;
  margin-left: 4px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f1eee7;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lang-switch:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 145, 0, 0.55);
  color: #fff;
}

.nav-links {
  display: flex;
  flex: 1;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  position: relative;
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c6c6c6;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: #fff;
}

.nav-links a.active {
  color: #fff;
}

.nav-links a.active::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}

.shell {
  width: min(100% - 32px, var(--max));
  margin: 28px auto 48px;
}

.hero {
  padding: 28px 0 8px;
}

.hero .eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.panel {
  margin-top: 22px;
  padding: 24px 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 1.15rem;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.card-link {
  display: block;
  padding: 16px 16px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.card-link:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 145, 0, 0.45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.card-link strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.card-link span {
  color: var(--muted);
  font-size: 0.88rem;
}

.doc-body h2,
.doc-body h3 {
  margin: 1.4em 0 0.55em;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.doc-body h2 {
  font-size: 1.35rem;
}

.doc-body h3 {
  font-size: 1.08rem;
}

.doc-toc {
  margin: 0 0 1.4em;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 0.92rem;
}

.doc-toc strong {
  display: block;
  margin-bottom: 8px;
}

.doc-toc ul {
  margin: 0;
  padding-left: 1.15em;
}

.doc-toc li + li {
  margin-top: 0.25em;
}

.doc-toc a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.doc-toc a:hover {
  border-bottom-color: var(--accent);
}

.doc-body p,
.doc-body ul,
.doc-body ol {
  margin: 0.7em 0;
}

.doc-body ul,
.doc-body ol {
  padding-left: 1.25em;
}

.doc-body li + li {
  margin-top: 0.35em;
}

.doc-body code,
.mono {
  font-family: var(--mono);
  font-size: 0.9em;
}

.doc-body :not(pre) > code {
  padding: 0.12em 0.4em;
  border-radius: 6px;
  background: var(--surface-2);
}

.doc-body pre {
  margin: 1em 0;
  padding: 14px 16px;
  overflow: auto;
  border-radius: 12px;
  background: #232323;
  color: #f1eee7;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
}

.doc-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.doc-body blockquote {
  margin: 1em 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 145, 0, 0.08);
  color: var(--muted);
}

.doc-body .price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.doc-body .price-table th,
.doc-body .price-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.doc-body .price-table th {
  background: var(--surface-2);
  font-weight: 600;
}

.doc-body .price-table tr:last-child td {
  border-bottom: 0;
}

.contact-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: start;
}

.qr {
  width: min(100%, 240px);
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.muted {
  color: var(--muted);
}

.site-footer {
  width: min(100% - 32px, var(--max));
  margin: 0 auto 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
}

.site-footer a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer a:hover {
  border-bottom-color: currentColor;
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: min(400px, 100%);
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.login-card h1 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.login-card label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.login-card input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--fg);
  font: inherit;
}

.btn,
button {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--fg);
  color: #f1eee7;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn.ghost,
button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

.btn.danger,
button.danger {
  background: transparent;
  color: var(--bad);
  border: 1px solid rgba(194, 59, 59, 0.35);
  padding: 6px 10px;
  font-size: 0.82rem;
}

.btn.danger:hover,
button.danger:hover {
  background: rgba(194, 59, 59, 0.08);
}

.cell-vip-expire {
  white-space: normal;
  min-width: 200px;
}

.vip-expire-view {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.vip-expire-view .btn-edit-vip,
.vip-expire-edit button {
  padding: 4px 8px;
  font-size: 0.78rem;
  border-radius: 8px;
}

.vip-expire-edit {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.vip-expire-edit[hidden] {
  display: none;
}

.vip-expire-edit input[type="datetime-local"] {
  width: 100%;
  max-width: 220px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--fg);
  font: inherit;
  font-size: 0.82rem;
}

.vip-expire-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.err {
  margin: 0;
  color: var(--bad);
}

.admin-shell {
  width: min(100% - 28px, 1280px);
  margin: 24px auto 40px;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-top h1 {
  margin: 0 0 6px;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.stat {
  min-width: 120px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.stat b {
  display: block;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.stat span {
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.admin-panel h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
}

.admin-panel h2 span {
  color: var(--muted);
  font-weight: 400;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th,
td {
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 500;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge.ok {
  background: rgba(31, 138, 91, 0.12);
  color: var(--ok);
}

.badge.bad {
  background: rgba(194, 59, 59, 0.12);
  color: var(--bad);
}

.badge.warn {
  background: rgba(255, 145, 0, 0.15);
  color: #9a5a00;
}

.sublist {
  margin: 6px 0 0;
  padding-left: 16px;
}

.sublist li {
  margin: 0 0 8px;
  line-height: 1.35;
  white-space: normal;
}

.cell-rich {
  white-space: normal;
  min-width: 180px;
  max-width: 280px;
}

.count-line {
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 2px;
}

.empty {
  color: var(--muted);
  padding: 16px;
}

@media (max-width: 760px) {
  .contact-row {
    grid-template-columns: 1fr;
  }

  .admin-top {
    flex-direction: column;
  }

  .nav-links a {
    letter-spacing: 0.06em;
    padding: 8px 9px;
  }
}
