:root {
  --bg: #ffffff;
  --surface: #f5f5f6;
  --surface-2: #efeff1;
  --text: #0b0b0f;
  --muted: #5b5f6a;
  --border: rgba(0, 0, 0, 0.12);

  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --base: 16px;
  --lh: 1.6;

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 64px;

  --radius: 14px;
}

html[data-theme="dark"] {
  --bg: #111216;
  --surface: #181a20;
  --surface-2: #1d2027;
  --text: #f3f3f5;
  --muted: #a0a4af;
  --border: rgba(255, 255, 255, 0.14);
}

html {
  font-size: var(--base);
  text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p {
  margin: 0;
}

h1 {
  font-size: clamp(2.5rem, 3.2vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 650;
}

h2 {
  font-size: clamp(1.75rem, 2.2vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 650;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 650;
}

h4 {
  font-size: 1.125rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 600;
}

p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
}

.lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}

.label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

button,
input,
select,
textarea {
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text);
}

button {
  cursor: pointer;
}

.container {
  width: min(1220px, calc(100% - 44px));
  margin: 0 auto;
}

.section {
  padding: 76px 0;
}

@media (max-width: 760px) {
  .section {
    padding: 52px 0;
  }
}

.market-header {
  position: sticky;
  top: 0;
  z-index: 110;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(8px);
}

.top-news-wrap {
  position: relative;
  z-index: 120;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  background: #0b0b0f;
  color: #ffffff;
}

html[data-theme="dark"] .top-news-wrap {
  background: #ffffff;
  color: #0b0b0f;
}

.top-news-track {
  display: flex;
  width: max-content;
  animation: tickerScroll 34s linear infinite;
}

.top-news-content {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding: 8px 64px 8px 0;
  font-size: 0.875rem;
  font-weight: 550;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.top-news-content span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-news-content span::after {
  content: "•";
  margin-left: 18px;
  opacity: 0.55;
}

.top-news-content span:last-child::after {
  content: "";
  margin: 0;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.top-nav,
.sub-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.top-nav {
  min-height: 72px;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
}

.logo-img {
  display: block;
  width: auto;
  height: 28px;
  object-fit: contain;
}

.logo-dark {
  display: none;
}

html[data-theme="dark"] .logo-light {
  display: none;
}

html[data-theme="dark"] .logo-dark {
  display: block;
}

@media (max-width: 760px) {
  .logo-img {
    height: 24px;
  }
}

.header-search {
  flex: 1;
  max-width: 540px;
  margin: 0 var(--space-3);
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.header-search input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 12px 16px;
  outline: none;
}

.header-search button {
  border: 0;
  background: transparent;
  padding: 0 14px;
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.points-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.icon-btn:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.cart-link {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--text);
  color: var(--bg);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sub-nav-wrap {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.sub-nav {
  min-height: 48px;
  justify-content: space-between;
}

.sub-nav-left,
.sub-nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sub-nav a,
.sub-nav button {
  font-size: 0.95rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 0;
}

.sub-nav a:hover,
.sub-nav button:hover {
  color: var(--text);
  text-decoration: none;
}

.user-menu {
  position: relative;
}

.user-button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 220px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.user-menu:hover .user-dropdown {
  display: block;
}

.user-dropdown a {
  display: block;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}

.user-dropdown a:last-child {
  border-bottom: 0;
}

.user-dropdown a:hover {
  background: var(--surface);
  text-decoration: none;
}

.hero-shell {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  padding: var(--space-5);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: var(--space-4);
}

.hero-grid-single {
  grid-template-columns: 1fr;
}

.hero-copy {
  max-width: 760px;
}

.hero-note {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: var(--space-3);
}

.hero-actions {
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-2);
}

.card-mini {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  padding: var(--space-3);
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.thumb-row img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 9px;
  border: 1px solid var(--border);
}

.feature-strip {
  margin-top: var(--space-4);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: var(--space-3);
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.product-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--surface-2);
}

.product-info {
  padding: var(--space-2);
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
}

.product-vendor {
  margin-top: 6px;
  margin-bottom: 10px;
  font-size: 0.875rem;
  color: var(--muted);
}

.product-price {
  font-size: 1.25rem;
  font-weight: 650;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 10px 14px;
}

.btn:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.9;
}

footer {
  border-top: 1px solid var(--border);
  padding: var(--space-5) 0;
  margin-top: var(--space-6);
  background: var(--surface);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

.footer-section h4 {
  margin-bottom: var(--space-2);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: var(--space-2);
}

.footer-logo-img {
  height: 24px;
}

.footer-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-section li {
  margin-bottom: 8px;
}

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

.crypto-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.crypto-item span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.crypto-item strong {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text);
}

.crypto-meta {
  margin-top: var(--space-2);
}

.footer-bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
}

.auth-links {
  display: flex;
  gap: 10px;
}

.auth-links a {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  background: var(--surface);
}

.auth-links a.primary {
  background: var(--text);
  color: var(--bg);
}

.auth-links a:hover {
  text-decoration: none;
  opacity: 0.9;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.auth-wrap {
  padding-top: var(--space-4);
}

.auth-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
}

.auth-aside {
  border-right: 1px solid var(--border);
  padding: var(--space-4);
  background: var(--surface-2);
}

.auth-benefits {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.auth-benefits i {
  width: 18px;
  text-align: center;
}

.auth-card {
  padding: var(--space-4);
}

.auth-title {
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-1);
}

.auth-subtitle {
  margin-bottom: var(--space-3);
}

.auth-form {
  display: grid;
  gap: var(--space-2);
}

.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.auth-submit {
  width: 100%;
  margin-top: var(--space-1);
  min-height: 44px;
}

.auth-link-row {
  margin-top: var(--space-3);
  color: var(--muted);
}

.auth-link-row a {
  color: var(--text);
  font-weight: 600;
}

.form-error {
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.recovery-box {
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  padding: var(--space-2);
  margin-bottom: var(--space-3);
}

.recovery-key {
  display: block;
  margin-top: var(--space-1);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  word-break: break-all;
  color: var(--text);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-1);
  color: var(--muted);
}

.auth-input-shell {
  position: relative;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  min-height: 46px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-input-shell:focus-within {
  border-color: color-mix(in srgb, var(--text) 28%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 8%, transparent);
}

.auth-input-icon {
  width: 38px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.auth-input {
  border: 0;
  background: transparent;
  outline: none;
  padding: 0 12px 0 0;
  min-height: 46px;
}

.auth-input::placeholder {
  color: color-mix(in srgb, var(--muted) 85%, transparent);
}

.form-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  min-height: 46px;
  padding: 0 14px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-input:focus {
  border-color: color-mix(in srgb, var(--text) 28%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 8%, transparent);
}

/* Shared primitives for remaining storefront/admin/vendor pages */
.page-shell {
  padding: var(--space-4) 0 var(--space-6);
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--space-3);
}

.panel + .panel {
  margin-top: var(--space-3);
}

.table-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

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

.table-shell thead {
  background: var(--surface-2);
}

.table-shell th,
.table-shell td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface-2);
}

/* Tailwind-like compatibility layer for unstyled legacy templates */
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-2 { margin-left: 8px; margin-right: 8px; }
.w-full { width: 100%; }
.inline { display: inline; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.whitespace-nowrap { white-space: nowrap; }
.sticky { position: sticky; }
.top-24 { top: 96px; }
.cursor-pointer { cursor: pointer; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }

.px-2 { padding-left: 8px; padding-right: 8px; }
.px-1 { padding-left: 4px; padding-right: 4px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.py-12 { padding-top: 48px; padding-bottom: 48px; }
.p-2 { padding: 8px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.pt-2 { padding-top: 8px; }
.pb-2 { padding-bottom: 8px; }

.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-6 > * + * { margin-top: 24px; }
.space-x-2 > * + * { margin-left: 8px; }
.space-x-4 > * + * { margin-left: 16px; }
.space-x-8 > * + * { margin-left: 32px; }

.max-h-96 { max-height: 24rem; }
.min-h-96 { min-height: 24rem; }
.max-w-2xl { max-width: 42rem; }

.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-48 { width: 12rem; }
.h-24 { height: 6rem; }
.h-48 { height: 12rem; }
.h-96 { height: 24rem; }

.object-cover { object-fit: cover; }
.opacity-75 { opacity: 0.75; }
.hover\:opacity-75:hover { opacity: 0.75; }

.border {
  border: 1px solid var(--border);
}
.border-b {
  border-bottom: 1px solid var(--border);
}
.border-b-2 {
  border-bottom: 2px solid var(--border);
}
.border-l-4 {
  border-left: 4px solid var(--border);
}
.rounded { border-radius: 8px; }
.rounded-lg { border-radius: 12px; }
.border-2 { border-width: 2px; }
.border-gray-200,
.border-gray-300,
.border-blue-200,
.border-yellow-200,
.border-blue-500,
.border-blue-600 { border-color: var(--border); }
.border-transparent { border-color: transparent; }

.shadow,
.shadow-md {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}
.shadow-lg,
.hover\:shadow-xl:hover {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.divide-y > * + * {
  border-top: 1px solid var(--border);
}
.divide-gray-200 > * + * {
  border-top: 1px solid var(--border);
}

.bg-white {
  background: var(--surface);
}
.bg-gray-50,
.bg-gray-100,
.bg-gray-200,
.bg-blue-50 {
  background: var(--surface-2);
}
.bg-blue-600,
.bg-blue-700 {
  background: var(--text);
  color: var(--bg);
}
.bg-red-100,
.bg-green-100 {
  background: var(--surface-2);
}
.bg-gray-300,
.bg-gray-600,
.bg-gray-700,
.bg-green-600,
.bg-green-700,
.bg-purple-600,
.bg-purple-700,
.bg-yellow-50,
.bg-yellow-100,
.bg-yellow-600,
.bg-yellow-700,
.bg-indigo-600,
.bg-indigo-700,
.bg-pink-600,
.bg-pink-700,
.bg-teal-600,
.bg-teal-700 {
  background: var(--surface-2);
  color: var(--text);
}

.text-white { color: var(--bg); }
.text-gray-500,
.text-gray-600,
.text-gray-700 { color: var(--muted); }
.text-gray-800,
.text-blue-600,
.text-blue-800,
.text-green-600,
.text-red-600 { color: var(--text); }
.text-red-500,
.text-red-700,
.text-green-500,
.text-green-700,
.text-yellow-400,
.text-yellow-800 { color: var(--text); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-4xl { font-size: clamp(2rem, 2.8vw, 2.6rem); }
.text-6xl { font-size: clamp(2.6rem, 4vw, 3.4rem); }
.text-3xl {
  font-size: clamp(1.9rem, 2.4vw, 2.4rem);
  line-height: 1.12;
}

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-relaxed { line-height: 1.7; }

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lg\:col-span-1 { grid-column: span 1 / span 1; }
.lg\:col-span-2 { grid-column: span 2 / span 2; }
.lg\:col-span-3 { grid-column: span 3 / span 3; }

.text-center { text-align: center; }
.list-disc { list-style-type: disc; }
.list-inside { list-style-position: inside; }

.transition {
  transition: all 0.18s ease;
}
.hover\:bg-blue-700:hover,
.hover\:bg-blue-600:hover,
.hover\:bg-gray-300:hover,
.hover\:bg-gray-700:hover,
.hover\:bg-green-700:hover,
.hover\:bg-purple-700:hover,
.hover\:bg-yellow-100:hover,
.hover\:bg-yellow-700:hover,
.hover\:bg-indigo-700:hover,
.hover\:bg-pink-700:hover,
.hover\:bg-teal-700:hover {
  background: color-mix(in srgb, var(--text) 88%, var(--bg));
}

.hover\:text-blue-600:hover,
.hover\:text-blue-700:hover,
.hover\:text-gray-700:hover,
.hover\:text-red-700:hover {
  color: var(--text);
}

.last\:border-0:last-child {
  border: 0;
}
.focus\:ring-2:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 8%, transparent);
}
.focus\:ring-blue-500:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--text) 8%, transparent);
}

input.w-full,
select.w-full,
textarea.w-full {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  padding: 10px 12px;
  color: var(--text);
}

button.bg-blue-600,
a.bg-blue-600,
button.bg-gray-200,
a.bg-gray-200 {
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
}

/* Additional utilities used by legacy pages */
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: var(--space-3);
}

.alert {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  padding: 12px 14px;
}

.alert-error {
  color: var(--text);
}

.form-group {
  display: grid;
  gap: 6px;
}

.form-label {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.px-8 { padding-left: 32px; padding-right: 32px; }
.pt-4 { padding-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.ml-2 { margin-left: 8px; }
.my-4 { margin-top: 16px; margin-bottom: 16px; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.border-t { border-top: 1px solid var(--border); }

.border-red-400,
.border-green-400 { border-color: var(--border); }

.text-yellow-600,
.text-yellow-900,
.text-purple-600 { color: var(--text); }

.hover\:bg-blue-100:hover {
  background: color-mix(in srgb, var(--text) 88%, var(--bg));
}

@media (max-width: 1024px) {
  .lg\:grid-cols-2 {
    grid-template-columns: 1fr;
  }

  .lg\:grid-cols-3 {
    grid-template-columns: 1fr;
  }

  .lg\:col-span-3 {
    grid-column: auto;
  }

  .lg\:col-span-1,
  .lg\:col-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 840px) {
  .md\:grid-cols-2,
  .md\:grid-cols-3,
  .md\:grid-cols-4,
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4,
  .sm\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .container.mx-auto.px-4.py-8 {
    width: min(1220px, calc(100% - 32px));
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 680px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: var(--space-3);
  }

  .auth-card {
    padding: var(--space-3);
  }

  .auth-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 980px) {
  .top-news-content {
    font-size: 0.8rem;
    gap: 20px;
  }

  .top-nav {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .header-search {
    order: 3;
    width: 100%;
    max-width: none;
    margin: 0;
  }

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

  .sub-nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
    gap: 10px;
  }

  .sub-nav-left,
  .sub-nav-right {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }
}
