﻿:root {
  --paper: #f7f1e8;
  --paper-strong: #fcdcc0;
  --paper-soft: #e7f4ee;
  --ink: #1f1a17;
  --muted: #6c625c;
  --accent: #f46f3b;
  --accent-dark: #cc4e22;
  --accent-soft: rgba(244, 111, 59, 0.15);
  --teal: #2c8b8b;
  --teal-dark: #1f6d6d;
  --teal-soft: rgba(44, 139, 139, 0.18);
  --card: #ffffff;
  --shadow: rgba(31, 26, 23, 0.12);
  --shadow-strong: rgba(31, 26, 23, 0.2);
  --ink-soft: rgba(31, 26, 23, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(
    135deg,
    var(--paper) 0%,
    var(--paper-strong) 35%,
    var(--paper-soft) 100%
  );
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 10% 20%, var(--accent-soft), transparent 40%),
    radial-gradient(circle at 80% 10%, var(--teal-soft), transparent 45%),
    radial-gradient(circle at 50% 80%, var(--ink-soft), transparent 60%);
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  font-family: "Fraunces", serif;
  font-size: 24px;
  font-weight: 700;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(31, 26, 23, 0.2);
}

.brand-title {
  font-family: "Fraunces", serif;
  font-size: 20px;
}

.brand-sub {
  font-size: 14px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-login {
  position: relative;
}

.nav-login-trigger {
  white-space: nowrap;
}

.nav-login-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--card);
  padding: 14px;
  border-radius: 16px;
  box-shadow: 0 18px 36px var(--shadow);
  width: 260px;
  display: grid;
  gap: 10px;
  z-index: 20;
}

.nav-login-menu[hidden] {
  display: none;
}

.nav-login-title {
  font-weight: 700;
  font-size: 14px;
}

.nav-login-menu .login-status {
  margin: 0;
  font-size: 12px;
}

.nav-login-menu .telegram-widget {
  margin: 0;
}

.nav-login-menu .btn {
  width: 100%;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.lang-switch select {
  width: auto;
  min-width: 90px;
  padding: 6px 10px;
  border-radius: 999px;
}

.status-pill {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(31, 26, 23, 0.08);
}

.link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.announcement-card {
  background: var(--card);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 16px 32px var(--shadow);
  display: grid;
  gap: 12px;
}

.announcement-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.announcement-title {
  font-weight: 700;
  font-size: 16px;
}

.announcement-viewport {
  overflow: hidden;
}

.announcement-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.announcement-track::-webkit-scrollbar {
  display: none;
}

.announcement-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  display: grid;
  gap: 8px;
}

.announcement-slide h3 {
  margin: 0;
  font-size: 18px;
}

.announcement-body {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  display: grid;
  gap: 8px;
}

.announcement-body p {
  margin: 0;
}

.announcement-body ul,
.announcement-body ol {
  margin: 0;
  padding-left: 18px;
}

.announcement-body li {
  margin: 0;
}

.announcement-body a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.announcement-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 20px var(--shadow);
}

.announcement-actions {
  display: flex;
  justify-content: flex-end;
}

.announcement-actions a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.announcement-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.announcement-nav {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
}

.announcement-nav[hidden] {
  display: none;
}

.announcement-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex: 1;
}

.announcement-dots[hidden] {
  display: none;
}

.announcement-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(31, 26, 23, 0.2);
}

.announcement-dot.active {
  background: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.hero-copy {
  padding: 28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 18px 40px var(--shadow);
  animation: floatIn 0.6s ease-out;
}

.hero-copy h1 {
  font-family: "Fraunces", serif;
  font-size: 40px;
  margin: 0 0 12px;
}

.hero-copy p {
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(244, 111, 59, 0.12);
  color: #7c391b;
  font-size: 14px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.stat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 10px 20px var(--shadow);
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  font-size: 22px;
  font-weight: 700;
  margin-top: 4px;
}

.hero-panel {
  display: grid;
  gap: 18px;
}

.panel {
  background: var(--card);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 16px 32px var(--shadow);
}

.panel.accent {
  background: linear-gradient(135deg, rgba(44, 139, 139, 0.15), rgba(244, 111, 59, 0.12));
}

.panel-title {
  font-weight: 700;
  margin-bottom: 12px;
  font-size: 16px;
}

.panel-body label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.inline-input {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(31, 26, 23, 0.15);
  font-family: inherit;
  background: white;
}

select {
  cursor: pointer;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 12px 24px rgba(244, 111, 59, 0.35);
}

.btn.primary:hover {
  transform: translateY(-1px);
}

.btn.outline {
  background: transparent;
  border: 1px solid rgba(31, 26, 23, 0.2);
}

.btn.ghost {
  background: rgba(31, 26, 23, 0.05);
}

.muted {
  color: var(--muted);
}

.tiny {
  font-size: 12px;
}

.login-status {
  margin: 12px 0;
  font-size: 14px;
}

.telegram-widget {
  margin: 12px 0;
}

.hint-list {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(31, 26, 23, 0.08);
  font-size: 13px;
  color: var(--muted);
}

.hint-title {
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.hint-list ul {
  margin: 0;
  padding-left: 18px;
}

.hint-list li {
  margin-bottom: 4px;
}

.account-name {
  font-size: 20px;
  font-weight: 700;
}

.account-card {
  gap: 14px;
}

.account-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

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

.account-meta {
  font-size: 14px;
  color: var(--muted);
}

.account-telegram {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(44, 139, 139, 0.08);
  display: grid;
  gap: 4px;
}

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

.account-telegram-value {
  font-size: 14px;
  font-weight: 600;
}

.account-telegram-value.active {
  color: var(--teal-dark);
}

.account-balance {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(44, 139, 139, 0.12);
  display: grid;
  gap: 6px;
}

.account-balance-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.account-balance-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--teal-dark);
}

.account-token {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

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

.account-token-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.account-token-row input {
  flex: 1;
  min-width: 0;
}

.account-topup,
.account-history {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.account-topup-label,
.account-history-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.account-topup-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.account-topup-row input {
  flex: 1;
  min-width: 0;
}

.account-history-list {
  display: grid;
  gap: 6px;
}

.account-history-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(31, 26, 23, 0.04);
  font-size: 13px;
}

.account-history-item span {
  color: var(--muted);
}

.account-history-amount {
  font-weight: 600;
  color: var(--ink);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

.divider {
  height: 1px;
  background: rgba(31, 26, 23, 0.1);
  margin: 16px 0;
}

.section {
  margin-top: 30px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-family: "Fraunces", serif;
  font-size: 28px;
}

.section-heading span {
  display: block;
  margin-top: 4px;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.search-field {
  display: flex;
  gap: 8px;
  min-width: 240px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(31, 26, 23, 0.06);
  font-size: 13px;
  cursor: pointer;
}

.chip input {
  width: 16px;
  margin: 0;
}

.catalog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 14px;
}

.guest-checkout {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 24px var(--shadow);
  margin-bottom: 18px;
}

.guest-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.guest-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.guest-form input {
  flex: 1 1 220px;
}

.guest-order-search {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 12px 24px var(--shadow);
  margin-bottom: 16px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.product-card {
  background: var(--card);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 24px var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeUp 0.4s ease forwards;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 32px var(--shadow-strong);
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.product-header h3 {
  margin: 0;
  font-size: 18px;
}

.price {
  font-weight: 700;
  color: var(--teal);
}

.product-desc {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.stock-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(44, 139, 139, 0.15);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 600;
}

.stock-pill.out {
  background: rgba(244, 111, 59, 0.18);
  color: #8c3a18;
}

.product-status {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}

.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  margin-bottom: 10px;
}

.product-stock {
  font-size: 13px;
  color: var(--muted);
}

.product-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal-dark);
  text-decoration: none;
}

.product-link:hover {
  text-decoration: underline;
}

.order-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: auto;
}

.payment-select {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(31, 26, 23, 0.15);
  background: white;
  font-size: 13px;
  font-family: inherit;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(31, 26, 23, 0.05);
  padding: 6px 10px;
  border-radius: 999px;
}

.qty-control input {
  width: 52px;
  text-align: center;
  border: none;
  background: transparent;
  padding: 4px 0;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: white;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(31, 26, 23, 0.12);
}

.empty-state {
  padding: 16px;
  border-radius: 14px;
  background: rgba(31, 26, 23, 0.06);
  color: var(--muted);
}

.order-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.summary-card {
  background: var(--card);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 10px 20px var(--shadow);
}

.summary-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
  margin-top: 6px;
}

.orders {
  display: grid;
  gap: 12px;
}

.order-card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  box-shadow: 0 10px 20px var(--shadow);
}

.order-card strong {
  font-size: 14px;
}

.order-keys {
  background: rgba(31, 26, 23, 0.05);
  border-radius: 12px;
  padding: 8px 10px;
  display: grid;
  gap: 6px;
  font-size: 12px;
}

.order-keys.pending {
  color: var(--muted);
}

.order-keys-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  color: var(--muted);
}

.order-keys-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.order-keys-list code {
  background: rgba(44, 139, 139, 0.16);
  color: var(--teal-dark);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(31, 26, 23, 0.08);
}

.status-chip.pending {
  background: rgba(244, 111, 59, 0.15);
  color: #8c3a18;
}

.status-chip.paid {
  background: rgba(44, 139, 139, 0.16);
  color: var(--teal-dark);
}

.status-chip.cancelled {
  background: rgba(31, 26, 23, 0.1);
  color: var(--muted);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(31, 26, 23, 0.05);
  min-height: 160px;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: shimmer 1.2s infinite;
}

.skeleton-line {
  height: 12px;
  background: rgba(31, 26, 23, 0.08);
  border-radius: 999px;
  margin-bottom: 12px;
}

.skeleton-line.wide {
  width: 70%;
}

.skeleton-line.short {
  width: 40%;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--ink);
  color: white;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(31, 26, 23, 0.2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid rgba(31, 26, 23, 0.08);
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer-note {
  font-size: 12px;
  color: var(--muted);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-login-menu {
    right: auto;
    left: 0;
    width: min(90vw, 280px);
  }

  .section-title {
    flex-direction: column;
    align-items: flex-start;
  }

  .search-field {
    width: 100%;
  }

  .filter-bar {
    width: 100%;
    justify-content: space-between;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
