/* Hyponomic Store — motion + polish (one file, no 20k-line bloat) */

:root {
  --bg-deep: #060a12;
  --bg-mid: #0c1428;
  --surface: rgba(18, 32, 58, 0.65);
  --surface-solid: #121f3a;
  --border: rgba(100, 160, 255, 0.18);
  --border-strong: rgba(120, 180, 255, 0.35);
  --text: #f0f6ff;
  --text-soft: #a8bddc;
  --muted: #7a94b8;
  --accent: #4f8fff;
  --accent-bright: #7eb6ff;
  --accent-dim: #2d6fd4;
  --glow: rgba(79, 143, 255, 0.45);
  --glow-soft: rgba(79, 143, 255, 0.12);
  --danger: #ff7a8a;
  --danger-bg: rgba(255, 90, 110, 0.12);
  --success: #5ee9a0;
  --success-bg: rgba(60, 220, 140, 0.1);
  --radius: 14px;
  --radius-lg: 20px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", var(--font);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px var(--glow-soft), 0 20px 50px -12px var(--glow);
  --header-h: 72px;
  /* Семантика для переключения light/dark */
  --header-bg: rgba(6, 10, 18, 0.72);
  --foot-bg: rgba(6, 10, 18, 0.5);
  --card-img-shade: #0a1224;
  --card-img-vignette: rgba(6, 10, 18, 0.65);
  --field-bg: rgba(6, 10, 20, 0.55);
  --field-bg-focus: rgba(10, 18, 36, 0.75);
  --nav-link-shine: rgba(79, 143, 255, 0.15);
  --nav-link-hover-bg: rgba(79, 143, 255, 0.1);
  --table-th-bg: rgba(10, 18, 36, 0.85);
  --hero-title-gradient: linear-gradient(135deg, #fff 0%, #b8d4ff 50%, #7eb6ff 100%);
  --lepuo-cta-border: rgba(38, 165, 228, 0.35);
  --lepuo-cta-bg: linear-gradient(145deg, rgba(38, 165, 228, 0.1), rgba(10, 18, 36, 0.5));
  --link-hover-strong: #fff;
  --flash-info-bg: rgba(79, 143, 255, 0.1);
  --selection-bg: rgba(79, 143, 255, 0.35);
  --selection-color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.app {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  line-height: 1.55;
  background: var(--bg-deep);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.45s var(--ease-out-expo),
    color 0.35s ease;
}

/* ---- Animated atmosphere ---- */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(60, 120, 255, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(40, 80, 200, 0.2), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 80%, rgba(100, 60, 220, 0.15), transparent 45%),
    var(--bg-deep);
  animation: mesh-shift 18s var(--ease-out-expo) infinite alternate;
}

@keyframes mesh-shift {
  0% {
    filter: hue-rotate(0deg) saturate(1);
    transform: scale(1);
  }
  100% {
    filter: hue-rotate(12deg) saturate(1.08);
    transform: scale(1.03);
  }
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 170, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 70%);
  animation: grid-drift 40s linear infinite;
}

@keyframes grid-drift {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(48px, 48px);
  }
}

.app > .top,
.app > .main,
.app > .foot {
  position: relative;
  z-index: 1;
}

/* ---- Header ---- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  animation: header-in 0.7s var(--ease-out-expo) both;
}

@keyframes header-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.top-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.85rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
  position: relative;
  padding: 0.35rem 0;
  transition: color 0.35s var(--ease-out-expo), transform 0.35s var(--ease-spring);
}

.brand::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out-expo);
  border-radius: 2px;
  opacity: 0.9;
}

.brand:hover {
  color: var(--accent-bright);
  transform: translateY(-1px);
  text-decoration: none;
}

.brand:hover::after {
  transform: scaleX(1);
}

.nav,
.nav-admin-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-admin-bar {
  font-size: 0.9rem;
}

.nav > a,
.nav-admin-bar > a,
.inline-logout {
  position: relative;
}

.nav > a,
.nav-admin-bar > a {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.94rem;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  transition:
    color 0.3s var(--ease-out-expo),
    background 0.35s var(--ease-out-expo),
    transform 0.25s var(--ease-spring),
    box-shadow 0.35s ease;
}

.nav > a::before,
.nav-admin-bar > a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--nav-link-shine), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.nav > a:hover,
.nav-admin-bar > a:hover {
  color: var(--text);
  background: var(--nav-link-hover-bg);
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.nav > a:hover::before,
.nav-admin-bar > a:hover::before {
  opacity: 1;
}

.inline-logout {
  display: inline;
  margin: 0;
}

.link-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  transition: color 0.3s ease, background 0.3s ease;
}

.link-btn:hover {
  color: var(--danger);
  background: var(--danger-bg);
  text-decoration: none;
}

/* ---- Main content entrance ---- */
.main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2rem 1.35rem 4rem;
}

.content-enter {
  animation: content-rise 0.85s var(--ease-out-expo) 0.08s both;
}

@keyframes content-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.foot {
  text-align: center;
  padding: 1.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-top: 1px solid var(--border);
  background: var(--foot-bg);
  animation: foot-fade 1s ease 0.5s both;
}

@keyframes foot-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---- Hero (store) ---- */
.hero {
  margin-bottom: 2.5rem;
  animation: hero-in 0.9s var(--ease-out-expo) 0.12s both;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-bright);
  opacity: 0.95;
  animation: eyebrow-pulse 3s ease-in-out infinite;
}

@keyframes eyebrow-pulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0 0 0.65rem;
  background: var(--hero-title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  margin: 0;
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 36ch;
}

.page-title:not(.hero-title) {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.lead:not(.hero-lead) {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

/* ---- Flashes ---- */
.flashes {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.flash {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
  font-weight: 500;
  animation: flash-in 0.5s var(--ease-out-expo) both;
  border: 1px solid transparent;
}

.flash:nth-child(2) {
  animation-delay: 0.06s;
}
.flash:nth-child(3) {
  animation-delay: 0.12s;
}

@keyframes flash-in {
  from {
    opacity: 0;
    transform: translateX(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.flash.success {
  background: var(--success-bg);
  border-color: rgba(94, 233, 160, 0.25);
  color: var(--success);
}

.flash.error {
  background: var(--danger-bg);
  border-color: rgba(255, 122, 138, 0.3);
  color: #ffb3bd;
}

.flash.info {
  background: var(--flash-info-bg);
  border-color: var(--border-strong);
  color: var(--accent-bright);
}

/* ---- Product grid ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 1.35rem;
}

.stagger-children .card {
  opacity: 0;
  animation: card-appear 0.65s var(--ease-out-expo) forwards;
}

.stagger-children .card:nth-child(1) {
  animation-delay: 0.05s;
}
.stagger-children .card:nth-child(2) {
  animation-delay: 0.1s;
}
.stagger-children .card:nth-child(3) {
  animation-delay: 0.15s;
}
.stagger-children .card:nth-child(4) {
  animation-delay: 0.2s;
}
.stagger-children .card:nth-child(5) {
  animation-delay: 0.25s;
}
.stagger-children .card:nth-child(6) {
  animation-delay: 0.3s;
}
.stagger-children .card:nth-child(7) {
  animation-delay: 0.35s;
}
.stagger-children .card:nth-child(8) {
  animation-delay: 0.4s;
}
.stagger-children .card:nth-child(9) {
  animation-delay: 0.45s;
}
.stagger-children .card:nth-child(10) {
  animation-delay: 0.5s;
}
.stagger-children .card:nth-child(11) {
  animation-delay: 0.55s;
}
.stagger-children .card:nth-child(12) {
  animation-delay: 0.6s;
}

@keyframes card-appear {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.45s var(--ease-out-expo),
    box-shadow 0.45s var(--ease-out-expo),
    border-color 0.4s ease,
    background 0.4s ease;
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 40%,
    transparent 60%,
    rgba(79, 143, 255, 0.2) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  text-decoration: none;
}

.card:hover::before {
  opacity: 1;
}

.card-img-wrap {
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, var(--surface-solid), var(--card-img-shade));
  overflow: hidden;
  position: relative;
}

.card-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, var(--card-img-vignette) 100%);
  pointer-events: none;
  opacity: 0.85;
  transition: opacity 0.4s ease;
}

.card:hover .card-img-wrap::after {
  opacity: 0.55;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease-out-expo);
}

.card:hover .card-img-wrap img {
  transform: scale(1.06);
}

.card-placeholder {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.card-placeholder.large {
  min-height: 260px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
  background: var(--surface);
}

.card-body {
  padding: 1.15rem 1.25rem 1.35rem;
  position: relative;
  z-index: 1;
}

.card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.card:hover .card-title {
  color: var(--accent-bright);
}

.card-price {
  margin: 0.45rem 0 0;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent-bright);
}

.empty,
.muted {
  color: var(--muted);
}

.empty {
  animation: empty-fade 0.6s ease both;
}

@keyframes empty-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---- Product page ---- */
.product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  animation: product-in 0.85s var(--ease-out-expo) both;
}

@keyframes product-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}

.product-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  display: block;
  transition: transform 0.45s var(--ease-out-expo), box-shadow 0.45s ease;
}

.product-gallery-item:hover img {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.admin-gallery-preview {
  margin: 0.75rem 0 1rem;
}

.admin-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.admin-gallery-thumbs img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.product-media {
  position: relative;
}

.product-media::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: linear-gradient(135deg, var(--accent), transparent 50%, rgba(150, 100, 255, 0.4));
  opacity: 0.35;
  filter: blur(12px);
  z-index: -1;
  animation: glow-breathe 5s ease-in-out infinite;
}

@keyframes glow-breathe {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.45;
    transform: scale(1);
  }
}

.product-media > img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transition: transform 0.6s var(--ease-out-expo), box-shadow 0.5s ease;
}

.product-media:hover > img {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

.product-price {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-bright);
  margin: 0 0 1rem;
}

.product-desc {
  color: var(--text-soft);
  font-size: 1.02rem;
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.product-actions {
  margin: 1.75rem 0;
}

/* Прямоугольная кнопка lepuo → t.me/lepuo (не квадрат) */
.product-lepuo-cta {
  margin: 1.75rem 0;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--lepuo-cta-border);
  background: var(--lepuo-cta-bg);
}

.lepuo-square-wrap {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
}

.btn-lepuo-square {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
  text-transform: lowercase;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 4px 18px rgba(34, 158, 217, 0.35);
}

.btn-lepuo-square:hover {
  transform: translateY(-2px);
  color: #fff;
}

.product-info a:not(.btn) {
  color: var(--accent-bright);
  font-weight: 500;
  transition: color 0.25s ease, gap 0.25s ease;
}

.product-info a:not(.btn):hover {
  color: var(--link-hover-strong);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.35rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s var(--ease-spring),
    box-shadow 0.4s ease,
    filter 0.3s ease,
    border-color 0.3s ease,
    background 0.35s ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease-out-expo);
}

.btn:hover::after {
  transform: translateX(100%);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-primary {
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: #fff;
  box-shadow: 0 4px 24px var(--glow), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 36px var(--glow), 0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.product-telegram-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: #7dd3fc;
}

.product-telegram-hint {
  margin: 0 0 1rem;
  font-size: 0.88rem;
}

.btn-telegram {
  background: linear-gradient(180deg, #2aabee 0%, #229ed9 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(34, 158, 217, 0.35);
}

.btn-telegram:hover {
  filter: brightness(1.07);
  box-shadow: 0 8px 28px rgba(34, 158, 217, 0.45);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text-soft);
}

.btn-ghost:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(79, 143, 255, 0.08);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
  border-radius: 9px;
}

.btn-danger {
  background: var(--danger-bg);
  border-color: rgba(255, 122, 138, 0.35);
  color: #ffc2c9;
}

.btn-danger:hover {
  background: rgba(255, 90, 110, 0.2);
  border-color: rgba(255, 122, 138, 0.55);
  color: #fff;
}

/* ---- Admin table ---- */
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  animation: hero-in 0.7s var(--ease-out-expo) both;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  animation: table-in 0.75s var(--ease-out-expo) 0.1s both;
}

@keyframes table-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table th,
.table td {
  padding: 0.9rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease;
}

.table tbody tr {
  transition: background 0.3s ease, transform 0.25s ease;
}

.table tbody tr:hover {
  background: rgba(79, 143, 255, 0.06);
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table th {
  background: var(--table-th-bg);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table td a {
  color: var(--accent-bright);
  font-weight: 500;
}

.row-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.inline {
  display: inline;
  margin: 0;
}

/* ---- Forms ---- */
.form-panel {
  max-width: 540px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  animation: form-in 0.7s var(--ease-out-expo) both;
}

@keyframes form-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.field {
  display: block;
  margin-bottom: 1.25rem;
}

.field span {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.field input[type="text"],
.field input[type="password"],
.field input[type="file"],
.field textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease,
    transform 0.2s ease;
}

.field input:hover,
.field textarea:hover {
  border-color: var(--border-strong);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow-soft);
  background: var(--field-bg-focus);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.55;
}

.field.checkbox {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-direction: row;
}

.field.checkbox input {
  width: auto;
  accent-color: var(--accent);
  transform: scale(1.1);
}

.field.checkbox span {
  margin: 0;
}

.form-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* ---- Links (global) ---- */
a {
  color: var(--accent-bright);
}

a:hover {
  text-decoration: underline;
}

/* ---- Selection ---- */
::selection {
  background: var(--selection-bg);
  color: var(--selection-color);
}

/* ---- Светлая тема (beige chic) ---- */
html[data-theme="light"] {
  --bg-deep: #f4efe6;
  --bg-mid: #ebe3d6;
  --surface: rgba(255, 252, 248, 0.78);
  --surface-solid: #e8e0d2;
  --border: rgba(60, 48, 36, 0.12);
  --border-strong: rgba(100, 80, 55, 0.22);
  --text: #2a2319;
  --text-soft: #5c5246;
  --muted: #7a7062;
  --accent: #8b5a2b;
  --accent-bright: #a67c52;
  --accent-dim: #6d4520;
  --glow: rgba(139, 90, 43, 0.35);
  --glow-soft: rgba(139, 90, 43, 0.14);
  --danger: #c43d4a;
  --danger-bg: rgba(196, 61, 74, 0.1);
  --success: #2d8a5e;
  --success-bg: rgba(45, 138, 94, 0.12);
  --shadow-sm: 0 2px 14px rgba(40, 30, 20, 0.08);
  --shadow-md: 0 10px 36px rgba(40, 30, 20, 0.1);
  --shadow-lg: 0 24px 56px rgba(40, 30, 20, 0.14);
  --shadow-glow: 0 0 0 1px var(--glow-soft), 0 18px 44px -14px var(--glow);
  --header-bg: rgba(255, 252, 248, 0.88);
  --foot-bg: rgba(240, 234, 224, 0.92);
  --card-img-shade: #ddd5c8;
  --card-img-vignette: rgba(42, 35, 25, 0.28);
  --field-bg: rgba(255, 255, 255, 0.72);
  --field-bg-focus: rgba(255, 255, 255, 0.95);
  --nav-link-shine: rgba(160, 120, 70, 0.18);
  --nav-link-hover-bg: rgba(139, 90, 43, 0.1);
  --table-th-bg: rgba(232, 224, 210, 0.95);
  --hero-title-gradient: linear-gradient(135deg, #2a2319 0%, #6b5340 48%, #9a7b3a 100%);
  --lepuo-cta-border: rgba(34, 140, 180, 0.35);
  --lepuo-cta-bg: linear-gradient(145deg, rgba(34, 140, 180, 0.12), rgba(245, 240, 232, 0.85));
  --link-hover-strong: #1a1510;
  --flash-info-bg: rgba(139, 90, 43, 0.1);
  --selection-bg: rgba(139, 90, 43, 0.22);
  --selection-color: #2a2319;
}

html[data-theme="light"] .bg-mesh {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(210, 180, 130, 0.32), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(190, 160, 115, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 80%, rgba(175, 140, 105, 0.14), transparent 45%),
    var(--bg-deep);
}

html[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(100, 80, 60, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 80, 60, 0.07) 1px, transparent 1px);
}

/* Переключатель темы */
.top-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  transition:
    transform 0.3s var(--ease-spring),
    border-color 0.3s ease,
    box-shadow 0.35s ease,
    background 0.35s ease,
    color 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  color: var(--accent-bright);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--glow-soft);
}

.theme-toggle .theme-ic {
  display: none;
}

html[data-theme="dark"] .theme-toggle .theme-ic-sun,
html:not([data-theme]) .theme-toggle .theme-ic-sun {
  display: inline;
}

html[data-theme="light"] .theme-toggle .theme-ic-moon {
  display: inline;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.25rem;
}

.foot-inner a {
  color: var(--muted);
  text-decoration: none;
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: none;
  transition: color 0.25s ease;
}

.foot-inner a:hover {
  color: var(--accent-bright);
  text-decoration: underline;
}

.disclaimer-page .disclaimer-body {
  max-width: 52rem;
  margin: 0 auto;
}

.disclaimer-page .disclaimer-body h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}

.disclaimer-page .disclaimer-body p {
  margin: 0 0 0.85rem;
  color: var(--text-soft);
  font-size: 0.98rem;
}
