:root {
  --primary-color: #00d4ff;
  --secondary-color: #2563eb;
  --bg-primary: #0a0e27;
  --bg-secondary: #141b2d;
  --bg-card: #1a2332;
  --bg-hover: #252f42;
  --text-primary: #f0f4ff;
  --text-secondary: #c7d2fe;
  --text-muted: #94a3b8;
  --border-color: #2d3748;
  --border-glow: rgba(0, 212, 255, 0.3);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 8px 30px rgba(0, 212, 255, 0.2);
  --heading-gradient: linear-gradient(100deg, #67e8f9 0%, #22d3ee 38%, #3b82f6 100%);
  --nav-gradient: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(37, 99, 235, 0.14) 100%);
  --surface-gradient: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
}

[data-theme="light"] {
  --bg-primary: #f3f7fd;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #eef5ff;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-color: #d5e1f0;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 12px 28px rgba(37, 99, 235, 0.16);
  --surface-gradient: linear-gradient(135deg, #f7fbff 0%, #e7eef8 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--surface-gradient);
}

main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: inherit; }

button, input, textarea { font: inherit; }

::selection { background: rgba(0, 212, 255, 0.35); }

.container {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 8px 0;
  background-image: var(--nav-gradient), var(--surface-gradient);
  box-shadow: var(--shadow);
  border-bottom: 1px solid rgba(0, 212, 255, 0.08);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.55));
  transition: 0.3s;
}

.brand-link:hover .logo-img {
  filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.85));
  transform: scale(1.06);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0.78rem;
  border-radius: 8px;
  transition: 0.3s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary-color);
  background: var(--bg-hover);
  transform: translateY(-2px);
}

.nav-drop { position: relative; }

.nav-drop-panel {
  display: none;
  position: absolute;
  top: calc(100% - 2px);
  left: 0;
  z-index: 40;
  min-width: 250px;
  padding: 0.75rem 0.9rem 0.9rem;
  background: #12182e;
  border: 1px solid rgba(0, 212, 255, 0.28);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.nav-drop:hover .nav-drop-panel,
.nav-drop:focus-within .nav-drop-panel { display: grid; gap: 0.15rem; }

.nav-drop-panel strong {
  margin: 0.55rem 0 0.15rem;
  color: var(--primary-color);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.nav-drop-panel a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.28rem 0.15rem;
  border-radius: 8px;
}

.nav-drop-panel a:hover { color: #fff; }

[data-theme="light"] .nav-drop-panel { background: #fff; }
[data-theme="light"] .nav-drop-panel a:hover { color: #0f172a; }

.nav-link.is-active {
  color: #fff;
  font-weight: 700;
  background: rgba(56, 132, 220, 0.38);
  box-shadow: inset 0 -2px 0 #fff;
}

[data-theme="light"] .nav-link.is-active {
  color: #0f172a;
  background: rgba(37, 99, 235, 0.12);
  box-shadow: inset 0 -2px 0 #2563eb;
}

.lang-theme-section,
.auth-section {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.35rem;
}

.theme-toggle,
.hamburger {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  cursor: pointer;
  transition: 0.3s;
}

[data-theme="light"] .theme-toggle,
[data-theme="light"] .hamburger {
  background: rgba(255, 255, 255, 0.7);
}

.theme-toggle:hover,
.hamburger:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.theme-icon.mode-light { display: none; }
[data-theme="dark"] .theme-icon.mode-light { display: inline; }
[data-theme="dark"] .theme-icon.mode-dark { display: none; }
[data-theme="light"] .theme-icon.mode-dark { display: inline; }
[data-theme="light"] .theme-icon.mode-light { display: none; }

.language-switcher { display: flex; gap: 0.2rem; }

.lang-btn {
  min-width: 36px;
  padding: 0.4rem 0.7rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-btn:hover { color: var(--text-primary); background: rgba(0, 212, 255, 0.1); }

.lang-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #00d4ff, #2563eb);
  box-shadow: 0 2px 8px rgba(0, 212, 255, 0.3);
}

.btn {
  border-radius: 8px;
  padding: 0.48rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

.btn-primary {
  color: #fff;
  border: 1px solid #00d4ff;
  background: linear-gradient(135deg, #00d4ff, #2563eb);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 212, 255, 0.45);
}

.btn-secondary {
  color: var(--text-primary);
  border: 1px solid #3b82f6;
  background: rgba(37, 99, 235, 0.2);
}

.btn-secondary:hover {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.32);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.hamburger span {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.hero,
.page-hero {
  padding: 75px 0;
  text-align: center;
  background-image: var(--nav-gradient);
  border-bottom: 1px solid rgba(45, 55, 72, 0.85);
}

.page-hero { padding: 56px 0 40px; }

.hero h1,
.page-hero h1,
.section-title {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.03em;
  background-image: var(--heading-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.35;
}

.page-hero h1,
.section-title {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  position: relative;
}

.hero p,
.page-hero p {
  max-width: 760px;
  margin: 0.85rem auto 0;
  color: #d5deea;
  font-size: 1.05rem;
}

[data-theme="light"] .hero p,
[data-theme="light"] .page-hero p { color: var(--text-secondary); }

.features-section { padding: 4.2rem 0 1.5rem; }
.quick-links-section,
.page-section { padding: 2.2rem 0 4.5rem; }

.section-title { text-align: center; margin-bottom: 3rem; }

.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 100px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.features-grid,
.card-grid,
.quick-links-grid {
  display: grid;
  gap: 1.5rem;
}

.features-grid { grid-template-columns: repeat(4, 1fr); }
.quick-links-grid,
.card-grid { grid-template-columns: repeat(3, 1fr); }

.feature-card,
.info-card,
.quick-link-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  box-shadow: var(--shadow);
  padding: 30px;
}

.feature-card,
.info-card { text-align: center; transition: 0.3s; }

.feature-card:hover,
.info-card:hover,
.quick-link-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  background: var(--bg-hover);
  box-shadow: var(--shadow-hover), 0 0 30px rgba(0, 212, 255, 0.16);
}

.feature-icon {
  font-size: 2.6rem;
  margin-bottom: 0.8rem;
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.3));
}

.feature-card h2,
.info-card h2,
.quick-link-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.08rem;
}

.feature-card p,
.info-card p,
.quick-link-card p,
.prose p,
.timeline p {
  margin: 0;
  color: var(--text-muted);
}

.quick-link-card {
  display: flex;
  flex-direction: column;
  min-height: 168px;
  text-decoration: none;
  color: var(--text-primary);
  position: relative;
}

.quick-link-card h2 { color: var(--primary-color); }
.quick-link-card p { flex: 1; color: var(--text-secondary); }

.quick-link-arrow {
  align-self: flex-end;
  margin-top: 1rem;
  color: var(--primary-color);
  font-size: 1.4rem;
}

.footer {
  padding: 45px 0 22px;
  background-image: var(--nav-gradient), linear-gradient(180deg, rgba(8, 12, 32, 0.15), rgba(8, 12, 32, 0.45));
  border-top: 1px solid rgba(45, 55, 72, 0.95);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .footer {
  background-image: linear-gradient(180deg, #f8fbff, #e7eef8);
}

.footer-content {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer h2 {
  margin: 0 0 0.8rem;
  color: var(--primary-color);
  font-size: 1.4rem;
}

.footer h3 {
  margin: 0 0 0.9rem;
  color: #f0f4ff;
  font-size: 1rem;
}

[data-theme="light"] .footer h3 { color: var(--text-primary); }

.footer p { margin: 0; color: var(--text-secondary); max-width: 320px; }

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 0.7rem; }

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: 0.3s;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.3rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.floating-contacts {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 60;
  display: flex;
  flex-direction: column-reverse;
  gap: 15px;
}

.contact-item {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  transition: 0.3s;
}

.contact-item svg { width: 30px; height: 30px; fill: currentColor; }
.contact-item.zalo { background: #0068ff; }
.contact-item.telegram { background: #229ed9; }

.contact-item:hover { transform: scale(1.08) translateY(-4px); }

.contact-item::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 74px;
  background: #1a2332;
  color: #fff;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}

.contact-item:hover::before { opacity: 1; right: 70px; }

.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin: 1.6rem 0 0.45rem; font-size: 1.2rem; }
.prose p + p { margin-top: 0.8rem; }

.timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 760px;
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.timeline li {
  position: relative;
  padding: 1.2rem 1.3rem 1.2rem 4.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 15px;
}

.timeline li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1.15rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, #00d4ff, #2563eb);
}

.timeline h2 { margin: 0 0 0.35rem; font-size: 1.05rem; }

.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  align-items: start;
}

.form-card,
.contact-layout .info-card { text-align: left; }

.auth-section[hidden],
.user-section[hidden],
#otpForm[hidden],
#registerForm[hidden] { display: none !important; }

.user-section {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.35rem;
}

#headerUsername { font-weight: 700; color: var(--primary-color); }

.course-list { display: grid; gap: 1.25rem; }

.course {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}

.course h2 { margin: 0 0 0.35rem; color: var(--primary-color); font-size: 1.35rem; }
.course > p { margin: 0 0 1rem; color: var(--text-secondary); }

.lesson-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }

.lesson-list li {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border-color);
}

[data-theme="light"] .lesson-list li { background: #f8fbff; }

.lesson-list h3 { margin: 0 0 0.3rem; font-size: 1.02rem; }
.lesson-list p { margin: 0; }

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.offer-card {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: 1.6rem;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.offer-index {
  color: var(--primary-color);
  font-weight: 700;
  letter-spacing: 0.14em;
}

.offer-card h2 {
  margin: 0.7rem 0 0.45rem;
  font-size: 1.45rem;
  background-image: var(--heading-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.offer-path {
  margin: 0 0 0.8rem;
  color: #7dd3fc;
  font-weight: 600;
}

.offer-card > p:last-of-type { flex: 1; }
.offer-card .btn { align-self: flex-start; margin-top: 1.2rem; }

.planner {
  margin-bottom: 1.5rem;
  padding: 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  box-shadow: var(--shadow);
}

.planner-head,
.planner-form,
.task-row {
  display: grid;
  gap: 0.8rem;
}

.planner-head {
  grid-template-columns: 1fr auto;
  align-items: end;
  margin-bottom: 1rem;
}

.planner h2 { margin: 0 0 0.35rem; color: var(--primary-color); }
.planner-head p { margin: 0; color: var(--text-secondary); }

.view-switch { display: flex; gap: 0.35rem; }

.view-switch button,
.task-row button {
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
}

.view-switch button.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #00d4ff, #2563eb);
}

.planner-form { grid-template-columns: 1.4fr 0.8fr 0.8fr 0.9fr 0.9fr 0.6fr auto; align-items: end; margin-bottom: 1rem; }
.planner-form label { display: flex; flex-direction: column; gap: 0.3rem; color: var(--text-secondary); font-weight: 600; font-size: 0.85rem; }
.planner-form select { width: 100%; padding: 0.75rem 0.9rem; border-radius: 10px; border: 1px solid var(--border-color); background: #0f1528; color: var(--text-primary); }

.task-row {
  grid-template-columns: 1.6fr auto 140px auto auto;
  align-items: center;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border-color);
}

.task-row h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.task-row p { margin: 0; color: var(--text-muted); }
.task-status { color: #7dd3fc; font-weight: 600; }
.task-progress { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.task-progress span { display: block; height: 100%; background: linear-gradient(90deg, #00d4ff, #2563eb); }
.planner-empty { color: var(--text-muted); }
.utility-rest { margin-top: 1.5rem; grid-template-columns: repeat(2, 1fr); }

.otp-hint { margin: 0 0 0.9rem; color: var(--text-secondary); }
#otpForm { display: grid; gap: 0.75rem; }
#otpForm .btn-secondary { margin-top: 0.2rem; }

.form-card label,
.modal-card label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
}

input, textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: #0f1528;
  color: var(--text-primary);
}

[data-theme="light"] input,
[data-theme="light"] textarea {
  background: #fff;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.16);
}

textarea { min-height: 140px; resize: vertical; }

.modal[hidden] { display: none; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.modal-card h2 { margin: 0 0 1rem; }

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  width: min(520px, calc(100% - 32px));
  transform: translateX(-50%) translateY(12px);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #1a2332;
  color: #fff;
  border: 1px solid rgba(0, 212, 255, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.market-toolbar,
.market-search,
.detail-layout,
.cart-layout,
.admin-grid {
  display: grid;
  gap: 1rem;
}

.market-search {
  grid-template-columns: 1fr auto;
  margin: 1.2rem 0 0.8rem;
}

.market-search input,
.market-toolbar select,
.admin-form input,
.admin-form textarea,
.admin-form select,
.detail-copy select,
.detail-copy textarea,
.tab-panel select,
.tab-panel textarea,
.qty-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font: inherit;
}

.market-toolbar {
  grid-template-columns: 1fr auto;
  align-items: center;
  margin-bottom: 1.2rem;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.chip {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: transparent;
}

.chip.is-active,
.chip:hover {
  color: #fff;
  border-color: rgba(0, 212, 255, 0.55);
  background: rgba(0, 212, 255, 0.12);
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 212, 255, 0.55);
  box-shadow: 0 10px 28px rgba(0, 212, 255, 0.16);
}

.product-visual,
.gallery-main {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(circle at 30% 20%, rgba(0, 212, 255, 0.18), transparent 42%),
    #12182b;
  color: var(--primary-color);
  font-weight: 700;
}

.product-visual img,
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.badge-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.7rem 0 0.35rem; }

.badge {
  color: #041018;
  background: var(--primary-color);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge.best { background: linear-gradient(90deg, #2563eb, #7c3aed); color: #fff; }
.badge.new { background: transparent; color: var(--primary-color); border: 1px solid rgba(0, 212, 255, 0.45); }

.product-card h2,
.detail-copy h1 { margin: 0.15rem 0; font-size: 1.05rem; }
.product-card p,
.muted { margin: 0.15rem 0; color: var(--text-secondary); font-size: 0.92rem; }
.product-card .price { margin: 0.45rem 0 0.7rem; font-weight: 700; }
.product-card .btn { margin-top: auto; align-self: flex-start; }

.detail-layout { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; }
.detail-copy h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.buy-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.qty-input { max-width: 96px; }

.tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 1.4rem 0 0.8rem; }
.tabs button {
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  cursor: pointer;
}
.tabs button.is-active { color: #fff; border-color: rgba(0, 212, 255, 0.55); }
.tab-panel {
  padding: 1rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}
.tab-panel[hidden] { display: none; }

.cart-line,
.order-card,
.admin-block {
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}

.cart-line { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.admin-grid { grid-template-columns: 180px 1fr; align-items: start; }
.admin-nav { display: grid; gap: 0.35rem; }
.admin-nav button { text-align: left; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.7rem; margin-bottom: 1rem; }
.stat-row article {
  padding: 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}
.admin-form { display: grid; gap: 0.6rem; margin-bottom: 1rem; }
.hub-group { margin-bottom: 1.6rem; }
.hub-group h2 { margin-bottom: 0.7rem; }

.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 999px;
  padding: 0.25rem 0.7rem 0.25rem 0.25rem;
  font: inherit;
  cursor: pointer;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff, #2563eb);
  color: #041018;
  font-weight: 700;
}

.avatar.lg { width: 64px; height: 64px; font-size: 1.4rem; }

.user-panel button {
  text-align: left;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  padding: 0.28rem 0.15rem;
  font: inherit;
  cursor: pointer;
}

.otp-boxes { display: flex; gap: 0.4rem; margin: 0.8rem 0; }
.otp-digit {
  width: 42px;
  height: 48px;
  text-align: center;
  font-size: 1.2rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 212, 255, 0.35);
  border-radius: 12px;
}

.check-line { display: flex; align-items: center; gap: 0.4rem; margin: 0.35rem 0; }
.text-link { background: none; border: 0; color: var(--primary-color); cursor: pointer; padding: 0; }

.account-shell { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; align-items: start; }
.account-nav { display: grid; gap: 0.35rem; }
.account-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  border: 1px solid transparent;
}
.account-nav a.is-active,
.account-nav a:hover { color: #fff; border-color: rgba(0, 212, 255, 0.35); background: rgba(0, 212, 255, 0.08); }

.profile-head { display: flex; gap: 0.9rem; align-items: center; margin-bottom: 1rem; }
.profile-head h1 { margin: 0; }
.wallet-card, .table-wrap {
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
}
.wallet-card strong { display: block; margin: 0.3rem 0 0.8rem; font-size: 1.8rem; }
.table-wrap { overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { padding: 0.65rem 0.4rem; border-bottom: 1px solid var(--border-color); text-align: left; }
.table-wrap tr { cursor: pointer; }

.progress { height: 8px; margin: 0.45rem 0 0.8rem; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #00d4ff, #7c3aed); }

.status-badge { display: inline-flex; border-radius: 999px; padding: 0.12rem 0.5rem; font-size: 0.75rem; font-weight: 700; }
.status-badge.ok { color: #041018; background: #00d4ff; }
.status-badge.wait { color: #fff; background: linear-gradient(90deg, #2563eb, #7c3aed); }
.status-badge.bad { color: #fff; background: #7f1d1d; border: 1px solid rgba(248, 113, 113, 0.45); }

@media (max-width: 1120px) {
  .hamburger { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.8rem 1rem 1rem;
    background: #10172e;
    border-bottom: 1px solid var(--border-color);
  }
  [data-theme="light"] .nav-menu { background: #fff; }
  .nav-menu.open { display: flex; }
  .nav-drop-panel {
    position: static;
    display: grid;
    min-width: 0;
    margin: 0 0 0.4rem 0.7rem;
    padding: 0.2rem 0 0.4rem;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .navbar .container { position: relative; flex-wrap: wrap; }
  .lang-theme-section, .auth-section { margin-left: 0; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

[data-theme="light"] .planner-form select { background: #fff; }

@media (max-width: 1100px) {
  .market-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-layout,
  .admin-grid,
  .stat-row { grid-template-columns: 1fr 1fr; }
  .planner-form,
  .task-row,
  .planner-head { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .account-shell { grid-template-columns: 1fr; }
  .account-nav { display: flex; gap: 0.35rem; overflow-x: auto; }
  .account-nav a { white-space: nowrap; }
  .market-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-toolbar,
  .market-search,
  .detail-layout,
  .admin-grid,
  .stat-row { grid-template-columns: 1fr; }
  .quick-links-grid,
  .card-grid,
  .offer-grid,
  .utility-rest,
  .footer-content,
  .contact-layout { grid-template-columns: 1fr; }
  .hero, .page-hero { padding: 48px 0; }
  .floating-contacts { right: 16px; bottom: 16px; }
  .contact-item { width: 52px; height: 52px; }
}

@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .market-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
