:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  letter-spacing: 0;
  --bg-base: #ffffff;
  --bg-surface: #f8fafc;
  --bg-card: #ffffff;
  --border-subtle: #e2e8f0;
  --border-highlight: #cbd5e1;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #f8fafc;
  --dark: #0f172a;
  --gold: #d97706;
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.2);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.2);
  --primary: #0f172a;
}

* { box-sizing: border-box; }
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  overflow-clip-margin: 0;
  position: relative;
  background-color: #ffffff;
  background-image: 
    radial-gradient(ellipse 85% 55% at 50% -20%, rgba(16, 185, 129, 0.07), transparent),
    radial-gradient(ellipse 65% 45% at 90% 15%, rgba(6, 182, 212, 0.05), transparent),
    radial-gradient(ellipse 55% 35% at 10% 35%, rgba(99, 102, 241, 0.04), transparent);
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #0f172a;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: not-allowed; opacity: .45; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; }

h1, h2, h3, p { margin: 0; }
h1 { font-size: 34px; line-height: 1.2; font-weight: 800; letter-spacing: -0.025em; color: #0f172a; }
h2 { font-size: 22px; line-height: 1.35; font-weight: 700; letter-spacing: -0.02em; color: #0f172a; }
h3 { font-size: 16px; line-height: 1.4; font-weight: 600; color: #1e293b; }
p { line-height: 1.7; color: var(--muted); }
svg { width: 18px; height: 18px; flex-shrink: 0; }
button svg { pointer-events: none; }
small, .muted { color: var(--muted); }

input, select, textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input::placeholder, textarea::placeholder { color: #94a3b8; }
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--emerald);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15), 0 0 16px rgba(16, 185, 129, 0.08);
}
input[readonly] { background: #f8fafc; color: #64748b; }
textarea { min-height: 100px; resize: vertical; }
label { display: grid; gap: 8px; font-size: 12px; font-weight: 600; color: #334155; line-height: 1.5; }

/* Layout Structure */
.layout { min-height: 100dvh; display: flex; flex-direction: column; width: 100%; max-width: 100%; overflow-x: hidden; overflow-x: clip; }
.main { width: 100%; min-width: 0; max-width: 100%; flex: 1; }
.content { width: 100%; max-width: 1280px; min-width: 0; margin: auto; padding: 36px 24px 64px; box-sizing: border-box; }

/* Sticky Glass Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background .2s ease;
}
.topbar-inner {
  min-height: 68px;
  max-width: 1380px;
  width: 100%;
  margin: auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex-shrink: 0; }
.store-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.store-logo.large { width: 68px; height: 68px; border-radius: 16px; }
.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.25;
}
.brand-name small {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #64748b;
  text-transform: uppercase;
}

.top-actions { display: flex; align-items: center; gap: 12px; min-width: 0; }
.telegram-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all .18s;
}
.telegram-link:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
}
.telegram-link svg { width: 15px; height: 15px; }

.balance-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 6px 14px;
  margin-right: 4px;
  transition: all .18s;
}
.balance-mini:hover {
  border-color: rgba(16, 185, 129, 0.35);
  background: #ecfdf5;
}
.balance-mini svg { color: var(--emerald); width: 18px; height: 18px; }
.balance-mini small { display: block; font-size: 9px; font-weight: 600; color: #64748b; text-transform: uppercase; margin-bottom: 2px; }
.balance-mini strong { display: block; font-size: 13px; font-weight: 700; color: #0f172a; white-space: nowrap; }

.avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #059669;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.user-button {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 180px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 5px 12px 5px 6px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 500;
  transition: all .18s;
}
.user-button:hover { background: #f1f5f9; border-color: var(--border-highlight); }
.user-button span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-button svg { width: 14px; color: #64748b; }

/* Header Navigation Pills (Desktop Single-Row Navbar) */
.header-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
  white-space: nowrap;
  background: #f1f5f9;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 3px 4px;
  border-radius: 9999px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  min-width: 0;
  flex-shrink: 0;
}
.header-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  height: auto;
  position: relative;
  transition: all .16s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}
.header-nav a svg { width: 14px; height: 14px; }
.header-nav a:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.05);
}
.header-nav a.active {
  color: #065f46;
  background: #ffffff;
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.15);
  font-weight: 600;
}
.header-nav a.active svg { color: #10b981; }
.header-nav a.active::after { display: none; }

/* Dedicated Admin Quick-Action Button */
.admin-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.1);
  transition: all .18s ease;
  white-space: nowrap;
  text-decoration: none;
}
.admin-pill-btn svg { width: 14px; height: 14px; color: #b45309; }
.admin-pill-btn:hover {
  background: #fde68a;
  border-color: #fcd34d;
  color: #92400e;
}
.admin-pill-btn.active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}
.admin-pill-btn.active svg { color: #ffffff; }

/* Mobile Navigation Drawer (Hidden on Desktop) */
.mobile-nav-drawer {
  display: none;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 35;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.mobile-nav-drawer.open { display: block; }
.nav-inner {
  max-width: 1320px;
  margin: auto;
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.nav { display: flex; gap: 14px; min-width: 0; flex-wrap: wrap; }
.nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  transition: all .18s;
}
.nav a svg { width: 16px; height: 16px; }
.nav a:hover { color: #0f172a; background: #f8fafc; }
.nav a.active {
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 700;
}
.nav a.active svg { color: #10b981; }
.nav-end { display: flex; align-items: center; gap: 20px; font-size: 12px; color: #8492a6; }
.nav-end a { display: flex; align-items: center; gap: 7px; transition: color .18s; }
.nav-end a:hover { color: #0f172a; }
.nav-end svg { width: 15px; }

/* Buttons & Micro Interactions */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  background: #0f172a;
  border: 1px solid #0f172a;
  color: #ffffff;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
  border-radius: 8px;
  white-space: nowrap;
  transition: all .18s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.btn:hover {
  background: #1e293b;
  border-color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}
.btn.secondary {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: none;
}
.btn.secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1px);
}
.btn.subtle { background: #ecfdf5; border-color: transparent; color: #059669; }
.btn.subtle:hover { background: #d1fae5; }
.btn.danger { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.btn.danger:hover { background: #fee2e2; border-color: #f87171; }
.btn.small { min-height: 35px; padding: 7px 13px; font-size: 11px; border-radius: 7px; }
.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: #64748b;
  transition: all .18s;
}
.icon-btn:hover {
  background: #f8fafc;
  border-color: var(--border-highlight);
  color: #0f172a;
}

/* Page Head */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.page-head p { margin-top: 8px; font-size: 13px; color: var(--muted); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #34d399;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.eyebrow svg { width: 13px; height: 13px; }

/* Hero Section: Modern SaaS Tech Redesign */
.catalog-intro {
  min-height: 0;
  padding: 56px 0 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 52px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.catalog-intro::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.catalog-intro-copy { max-width: 720px; }
.intro-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.intro-brand .store-logo {
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.2);
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #34d399;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-glow 2s infinite ease-in-out;
}
.pulse-dot-inline {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  margin-right: 6px;
}
.pulse-dot-inline.live {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 8px #10b981; }
  50% { transform: scale(1.35); opacity: 0.85; box-shadow: 0 0 16px #10b981; }
}

.catalog-intro h1 {
  font-size: clamp(34px, 5.2vw, 54px);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.08;
  background: linear-gradient(135deg, #0f172a 30%, #334155 70%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 12px 0;
}
.catalog-intro p {
  font-size: 14px;
  line-height: 1.75;
  color: #64748b;
  max-width: 620px;
  margin: 0;
}
.intro-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}
.intro-links span, .intro-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all .2s;
}
.intro-links span:hover, .intro-links a:hover {
  border-color: rgba(16, 185, 129, 0.35);
  color: #0f172a;
  background: #f8fafc;
}
.intro-links svg { width: 14px; height: 14px; color: var(--emerald); }

/* Store Status Telemetry Box */
.store-status {
  width: 100%;
  display: grid;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
.store-status>div {
  min-height: 64px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #f1f5f9;
}
.store-status>div:last-child { border-bottom: 0; }
.store-status span { color: #64748b; font-size: 11px; font-weight: 500; }
.store-status strong { font-size: 16px; font-weight: 700; color: #0f172a; }
.store-status strong small { color: #d97706; font-size: 10px; margin-left: 4px; }
.status-unit { font-size: 10px; font-weight: 500; color: #64748b; }
.status-text { color: #64748b; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }
.status-text.online { color: #059669; }

/* Catalog Section, Header, & Search Controls */
.catalog-section { padding-top: 10px; }
.catalog-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 44px 0 20px;
}
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--emerald);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.section-kicker svg { width: 13px; height: 13px; }
.catalog-heading h2 { font-size: 26px; font-weight: 800; letter-spacing: -0.025em; color: #0f172a; }
.catalog-heading p { color: var(--muted); font-size: 12px; margin-top: 6px; }

.catalog-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 24px;
  border-top: 1px solid var(--border-subtle);
}
.search { width: 330px; position: relative; flex: 0 0 330px; }
.search svg { position: absolute; left: 14px; top: 13px; width: 16px; height: 16px; color: #64748b; }
.search input {
  padding: 11px 14px 11px 40px;
  height: 42px;
  font-size: 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: #0f172a;
}
.search input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15), 0 0 16px rgba(16, 185, 129, 0.1);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tab {
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  line-height: 1.4;
  white-space: nowrap;
  transition: all .18s;
}
.tab:hover {
  color: #0f172a;
  border-color: var(--border-highlight);
  background: #f1f5f9;
}
.tab.active {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.5);
  color: #065f46;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(16, 185, 129, 0.15);
}

/* Product Cards Grid: High-Tech Glass */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.product-card {
  min-width: 0;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  min-height: 385px;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.3), transparent);
  opacity: 0;
  transition: opacity .22s;
}
.product-card:hover {
  border-color: #10b981;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08), 0 0 20px rgba(16, 185, 129, 0.08);
  transform: translateY(-4px);
}
.product-card:hover::before { opacity: 1; }

.product-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}
.product-heading h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #0f172a;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.product-category {
  display: block;
  margin-bottom: 3px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0284c7;
}

.product-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.product-logo img { width: 24px; height: 24px; object-fit: contain; }
.product-logo span { font-size: 16px; font-weight: 800; color: #0f172a; }

.product-availability {
  min-height: 32px;
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: #64748b;
}
.delivery-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: #64748b;
}
.delivery-type svg { width: 13px; height: 13px; color: #64748b; }

.stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 14px;
  color: #065f46;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.stock .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}
.stock.off {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}
.stock.off .dot { background: #94a3b8; box-shadow: none; }

.product-description {
  min-height: 60px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  color: #64748b;
  font-size: 11px;
  line-height: 1.6;
}
.product-description p {
  max-height: 52px;
  overflow: hidden;
}

.product-meta {
  min-height: 48px;
  display: grid;
  align-content: start;
  gap: 6px;
  color: #64748b;
  font-size: 10px;
  margin-top: auto;
  padding-top: 8px;
}
.product-meta span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.product-meta svg { width: 13px; height: 13px; color: #d97706; flex-shrink: 0; }

.product-footer {
  display: grid;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}
.product-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.price {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.price small {
  display: block;
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}
.usdt-value {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

.card-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
}
.card-command .btn {
  min-height: 40px;
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 750;
  border-radius: 8px;
  padding: 8px 12px;
}
.card-command .btn:hover {
  background: #1e293b;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}
.card-command .btn svg { width: 14px; height: 14px; }
.card-command .icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  color: #64748b;
}
.card-command .icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.catalog-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #64748b;
  padding-top: 28px;
  margin-top: 24px;
  border-top: 1px solid var(--border-subtle);
  line-height: 1.6;
}
.catalog-foot span { display: inline-flex; align-items: center; gap: 6px; }
.catalog-foot svg { width: 14px; height: 14px; }

/* Site Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 28px max(28px, calc((100% - 1280px) / 2));
  font-size: 11px;
  color: #64748b;
}
.site-footer>div { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.site-footer strong { font-size: 13px; color: #0f172a; font-weight: 700; }
.site-footer a { display: inline-flex; align-items: center; gap: 6px; color: #64748b; transition: color .18s; }
.site-footer a:hover { color: #0f172a; }
.site-footer svg { width: 13px; height: 13px; }

/* Notice & Alerts */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 14px 18px;
  margin-bottom: 24px;
  color: #1e40af;
  font-size: 12px;
  line-height: 1.65;
  border-radius: 10px;
}
.notice svg { margin-top: 2px; width: 17px; height: 17px; }
.notice.warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}
.notice.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

/* Empty State & Auth Gate */
.empty, .auth-gate {
  text-align: center;
  padding: 72px 24px;
  border: 1px dashed var(--border-subtle);
  border-radius: 16px;
  background: #f8fafc;
}
.empty>svg { width: 44px; height: 44px; color: #64748b; margin-bottom: 18px; }
.empty h2, .auth-gate h2 { font-size: 22px; margin-bottom: 10px; color: #0f172a; }
.empty p, .auth-gate p { font-size: 13px; color: var(--muted); margin-bottom: 24px; max-width: 440px; margin-left: auto; margin-right: auto; }
.auth-gate>.store-logo { margin-bottom: 20px; }
.auth-gate .actions { justify-content: center; }

/* Tables & Data View */
.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.table-wrap::-webkit-scrollbar {
  height: 6px;
}
.table-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
table { width: 100%; min-width: 580px; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
th {
  background: #f8fafc;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
td {
  border-top: 1px solid #f1f5f9;
  padding: 16px 20px;
  color: #334155;
}
td strong { font-size: 12px; font-weight: 650; color: #0f172a; }

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.badge.completed, .badge.paid, .badge.active, .badge.connected {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.28);
}
.badge.pending, .badge.processing, .badge.creating {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}
.badge.partial, .badge.manual_review {
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.3);
}
.badge.failed, .badge.cancelled, .badge.refunded {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}
.badge.expired, .badge.inactive, .badge.disconnected {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.25);
}
.mono { font: 12px/1.7 Consolas, monospace; color: #cbd5e1; }

/* Split Views & Sections */
.split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; min-width: 0; }
.split>div { min-width: 0; }
.section { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--border-subtle); }
.section h2 { margin-bottom: 20px; font-size: 18px; }
.form-grid { display: grid; gap: 18px; max-width: 500px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.section .form-grid { margin-top: 20px; }
.stock-input-field { display: flex; flex-direction: column; gap: 8px; }
.stock-helper { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11.5px; }
.stock-count-badge { display: inline-flex; align-items: center; gap: 5px; color: #34d399; font-weight: 600; }
.stock-count-badge .count-tag { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.35); padding: 1px 7px; border-radius: 9999px; color: #34d399; font-weight: 700; }
.file-upload-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; padding: 5px 12px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-subtle); color: #94a3b8; font-size: 11.5px; font-weight: 550; transition: all .16s ease; white-space: nowrap; }
.file-upload-btn:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.16); color: #f8fafc; }
.file-upload-btn svg { width: 13px; height: 13px; }
.product-image-field { display: flex; flex-direction: column; gap: 8px; }
.image-input-group { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.image-input-group input { flex: 1; min-width: 0; }
.image-preview-wrap { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: rgba(255, 255, 255, 0.02); border: 1px dashed var(--border-subtle); border-radius: 10px; }
.product-logo-preview { width: 44px; height: 44px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-subtle); display: grid; place-items: center; flex-shrink: 0; overflow: hidden; }
.product-logo-preview .product-logo { width: 100%; height: 100%; border: 0; background: transparent; box-shadow: none; }
.product-logo-preview img { width: 28px; height: 28px; object-fit: contain; }
.product-logo-preview span { font-size: 18px; font-weight: 800; color: #f8fafc; }

.wallet-value {
  font-size: 34px;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 12px 0 28px;
  overflow-wrap: anywhere;
}
.wallet-value .usdt-value { font-size: 13px; margin-top: 6px; }

/* Payment Methods List */
.method-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: #ffffff;
  text-align: left;
  font-size: 12px;
  color: #0f172a;
  min-width: 0;
  transition: all .18s;
}
.method:hover {
  border-color: var(--border-highlight);
  background: #f8fafc;
}
.method.selected {
  border-color: var(--emerald);
  background: #ecfdf5;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.12), inset 0 0 0 1px var(--emerald);
}
.method small { display: block; font-size: 10px; line-height: 1.5; margin-top: 3px; color: #64748b; }
.method>span { min-width: 0; overflow-wrap: anywhere; }
.method em { font-size: 9px; color: #64748b; font-style: normal; margin-left: auto; }
.deposit-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Timeline & Events */
.timeline { display: grid; }
.timeline-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.timeline-row>.icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  color: #0284c7;
  flex-shrink: 0;
}
.timeline-row .item { min-width: 0; flex: 1; }
.timeline-row .item p { font-size: 12px; color: #334155; overflow-wrap: anywhere; }
.timeline-row small { font-size: 10px; color: #64748b; }
.timeline-row strong { font-size: 12px; color: #0f172a; }

.event {
  padding: 18px 0;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.event h3 { font-size: 14px; margin-bottom: 5px; color: #0f172a; }
.event p { font-size: 12px; color: #64748b; }
.event small { font-size: 10px; color: #64748b; }
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  margin-right: 5px;
  flex-shrink: 0;
}

.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 440px;
  margin: 18px 0;
  font-size: 13px;
  color: #0f172a;
}
.toggle input { width: 18px; height: 18px; accent-color: var(--emerald); }

.code-block {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  color: #0f172a;
  padding: 20px;
  border-radius: 10px;
  overflow: auto;
  margin: 16px 0 24px;
}
pre { margin: 0; font: 12px/1.8 Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.api-key {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}
.api-key code { min-width: 0; overflow-wrap: anywhere; color: #0284c7; }

.endpoint { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.endpoint span {
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  color: #065f46;
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 4px;
}
.endpoint.post span {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.account-row { display: flex; align-items: center; gap: 15px; margin-bottom: 24px; }
.account-row .avatar { width: 48px; height: 48px; font-size: 16px; }

/* Dialog & Modals */
dialog {
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 0;
  width: min(540px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow: auto;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  animation: modal-in .18s ease-out;
}
dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #f1f5f9;
}
.modal-head h2 { font-size: 18px; color: #0f172a; }
.modal-body { padding: 24px; }
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 24px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
}
.modal-body .description {
  max-height: 220px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #475569;
  font-size: 12.5px;
  line-height: 1.7;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
}

/* Purchase Modal Dialog */
.purchase-dialog { width: min(980px, calc(100vw - 32px)); }
.purchase-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 32px;
  min-width: 0;
}
.purchase-description, .purchase-checkout { min-width: 0; }
.purchase-description .product-logo { width: 44px; height: 44px; }
.purchase-product-brand { display: flex; align-items: center; gap: 12px; color: #64748b; font-size: 12px; margin-bottom: 14px; }
.purchase-description h3 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin: 18px 0 8px;
}

/* Product Specifications Grid */
.product-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
}
.product-facts .fact-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 0;
  transition: all .18s ease;
}
.product-facts .fact-card:hover {
  background: #f1f5f9;
  border-color: var(--border-highlight);
}
.product-facts .fact-wide {
  grid-column: 1 / -1;
}
.product-facts dt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin: 0;
  padding: 0;
}
.product-facts dt svg {
  width: 13px;
  height: 13px;
  color: #64748b;
  flex-shrink: 0;
}
.product-facts dd {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  padding: 0;
  word-break: break-word;
  line-height: 1.4;
}
.product-facts dd.stock-highlight {
  color: #059669;
  font-weight: 700;
}

.purchase-checkout {
  padding: 22px;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}
.quantity-control {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
}
.quantity-control input {
  width: 80px;
  min-width: 0;
  height: 42px;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: #0f172a;
  font-weight: 700;
}
.quantity-control .icon-btn { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 8px; }
.checkout-total { font-size: 19px !important; }
.checkout-total strong { color: #0f172a; font-size: 22px; font-weight: 800; }
.checkout-wallet {
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
  display: grid;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
}
.checkout-wallet strong { color: #0f172a; font-size: 15px; }
.checkout-wallet a { display: inline-flex; align-items: center; gap: 5px; color: var(--emerald); font-size: 11px; font-weight: 600; }
.purchase-submit { margin-top: 24px; width: 100%; min-height: 46px; font-size: 13px; }

.delivery {
  padding: 16px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  background: #ecfdf5;
  color: #065f46;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  max-height: 280px;
  overflow: auto;
  font: 12px/1.8 Consolas, monospace;
}
.invoice-qr { display: block; width: 220px; height: 220px; margin: 8px auto 20px; border-radius: 10px; background: #fff; padding: 10px; border: 1px solid var(--border-subtle); }
.invoice-summary { display: grid; gap: 14px; margin: 20px 0; }
.invoice-summary>div { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; font-size: 12px; }
.invoice-summary span { color: #64748b; }
.invoice-summary strong { color: #0f172a; text-align: right; overflow-wrap: anywhere; }

/* Authentication Dialog - Clean Light Theme */
.auth-dialog { background: #ffffff; color: #0f172a; border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); width: min(460px, calc(100vw - 32px)); }
.auth-dialog .modal-head { border-bottom: 0; padding-bottom: 0; }
.auth-dialog .modal-head h2 { font-size: 20px; color: #0f172a; font-weight: 700; }
.auth-dialog .modal-head .close-btn { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; border-radius: 8px; }
.auth-dialog .modal-head .close-btn:hover { background: #e2e8f0; color: #0f172a; }
.auth-dialog .auth-intro { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.auth-dialog .auth-intro strong { color: #0f172a; font-size: 18px; }
.auth-dialog .auth-tabs { background: #f1f5f9; border: 1px solid #e2e8f0; padding: 4px; display: grid; grid-template-columns: 1fr 1fr; border-radius: 8px; gap: 4px; margin-bottom: 22px; }
.auth-dialog .auth-tabs button { padding: 10px; background: transparent; color: #64748b; font-size: 12px; border-radius: 6px; transition: all .15s; font-weight: 500; }
.auth-dialog .auth-tabs button:hover { color: #0f172a; background: #e2e8f0; }
.auth-dialog .auth-tabs button.active { background: #ffffff; border: 1px solid #e2e8f0; color: #0f172a; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); font-weight: 700; }
.auth-dialog .input-wrap { position: relative; background: #f8fafc; border: 1px solid #cbd5e1; border-radius: 8px; transition: border-color .15s, box-shadow .15s; }
.auth-dialog .input-wrap:focus-within { border-color: #0f172a; background: #ffffff; box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08); }
.auth-dialog .input-wrap input { background: transparent; border: 0; color: #0f172a; box-shadow: none; padding-left: 40px; padding-right: 42px; min-height: 46px; font-size: 13px; font-weight: 500; }
.auth-dialog .input-wrap input::placeholder { color: #94a3b8; }
.auth-dialog .input-wrap>svg { position: absolute; top: 15px; left: 13px; width: 16px; height: 16px; color: #64748b; pointer-events: none; }
.auth-dialog .password-toggle { position: absolute; right: 6px; top: 5px; color: #64748b; background: transparent; }
.auth-dialog .password-toggle:hover { color: #0f172a; }
.auth-dialog .auth-submit { width: 100%; margin-top: 6px; min-height: 46px; background: #0f172a; color: #ffffff; border-radius: 8px; font-weight: 600; }
.auth-dialog .auth-submit:hover { background: #1e293b; }
.auth-dialog .auth-bottom { display: flex; justify-content: center; align-items: center; gap: 7px; font-size: 11px; color: #64748b; margin-top: 22px; }
.auth-dialog .auth-bottom svg { width: 14px; height: 14px; color: #d97706; }

.password-requirement { display: grid; gap: 6px; margin-top: -6px; }
.password-requirement small { font-size: 10px; color: #8492a6; }
.password-requirement progress { width: 100%; height: 3px; border: 0; appearance: none; background: #1f2430; border-radius: 2px; }
.password-requirement progress::-webkit-progress-bar { background: #1f2430; }
.password-requirement progress::-webkit-progress-value { background: var(--emerald); transition: width .15s; }
.password-requirement progress::-moz-progress-bar { background: var(--emerald); }

.inline-error { color: #f87171; font-size: 12px; line-height: 1.6; }
.inline-error:not(:empty) { background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.25); padding: 10px 14px; border-radius: 8px; margin-top: 14px; }

/* Toast */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  padding: 12px 22px;
  max-width: calc(100vw - 32px);
  display: none;
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(16px);
  z-index: 100;
}
#toast.visible { display: block; animation: modal-in .18s ease-out; }

/* Initial App Loader */
.initial { padding: 80px 25px; text-align: center; }
.initial-app {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #ffffff;
}
.initial-app img { width: 76px; height: 76px; object-fit: contain; border-radius: 18px; margin-bottom: 20px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); }
.initial-app h1 { font-size: 22px; color: #0f172a; }
.initial-app p { font-size: 11px; color: #64748b; margin-top: 8px; }
.loading-track { margin-top: 24px; width: 140px; height: 3px; background: #e2e8f0; border-radius: 3px; overflow: hidden; }
.loading-track::after { content: ""; display: block; width: 45%; height: 100%; background: linear-gradient(90deg, #10b981, #06b6d4); animation: loading-track 1.2s ease-in-out infinite; }

.loading-view { padding: 10px 0; }
.loading-header { display: grid; gap: 14px; margin-bottom: 40px; }
.loading-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.loading-row { display: grid; gap: 15px; padding: 20px 0; border-top: 1px solid var(--border-subtle); }
.skeleton { display: block; background: #f1f5f9; border-radius: 6px; animation: skeleton-pulse 1.2s ease-in-out infinite; }
.skeleton-text { height: 22px; width: 55%; }
.skeleton-line { height: 11px; width: 85%; }
.skeleton-icon { width: 42px; height: 42px; }
.spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0; }
.hidden { display: none !important; }
.gap-top { margin-top: 24px; }
.space-between { display: flex; align-items: center; justify-content: space-between; gap: 15px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes loading-track { from { transform: translateX(-110%); } to { transform: translateX(330%); } }
@keyframes skeleton-pulse { 50% { opacity: .35; } }
@keyframes modal-in { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: scale(1); } }

/* EXACT Test Requirements for Admin Workspace */
.admin-layout .content { width: 100%; max-width: 1440px; min-width: 0; padding-top: 35px; box-sizing: border-box; }
.admin-layout .page-head { margin-bottom: 25px; }
.admin-layout .page-head h1 { font-size: 28px; color: #0f172a; }
.admin-live { min-height: 34px; padding: 0 12px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border-subtle); border-radius: 8px; background: #f8fafc; color: #64748b; font-size: 10px; }
.admin-live i { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 8px #10b981; }

.admin-shell { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 28px; align-items: start; width: 100%; min-width: 0; max-width: 100%; }
.admin-nav-panel { position: sticky; top: 88px; padding: 10px; border: 1px solid var(--border-subtle); border-radius: 12px; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
.admin-nav-label { padding: 10px 11px 8px; color: #64748b; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.admin-nav-item { width: 100%; min-height: 40px; padding: 0 10px; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 8px; color: #64748b; background: transparent; font-size: 11px; font-weight: 500; text-align: left; transition: all .15s; }
.admin-nav-item svg { width: 15px; height: 15px; }
.admin-nav-item:hover { color: #0f172a; background: #f1f5f9; }
.admin-nav-item.active { color: #0f172a; border-color: #cbd5e1; background: #f1f5f9; font-weight: 650; }
.admin-nav-item.active svg { color: var(--emerald); }
.admin-nav-item b { min-width: 18px; height: 18px; padding: 0 5px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #fef3c7; color: #b45309; font-size: 9px; }

.admin-workspace { min-width: 0; max-width: 100%; }
.admin-section-head { min-height: 65px; margin-bottom: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.admin-section-head h2 { margin: 0 0 6px; font-size: 20px; color: #0f172a; }
.admin-section-head p { margin: 0; color: #64748b; font-size: 12px; }

.admin-kpis { margin-bottom: 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border-subtle); border-radius: 12px; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); overflow: hidden; }
.admin-kpi { min-width: 0; min-height: 115px; padding: 20px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--border-subtle); }
.admin-kpi:last-child { border-right: 0; }
.admin-kpi span { color: #64748b; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.admin-kpi strong { margin: 8px 0 6px; color: #0f172a; font-size: 22px; font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.admin-kpi small { color: #64748b; font-size: 10px; }

.admin-dashboard-grid { margin-top: 20px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 18px; min-width: 0; }
.admin-panel { min-width: 0; padding: 20px; border: 1px solid var(--border-subtle); border-radius: 12px; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
.admin-panel h3 { margin: 0 0 5px; font-size: 14px; color: #0f172a; }
.admin-panel p { margin: 0; color: #64748b; font-size: 11px; }

.compact-list { margin-top: 15px; border-top: 1px solid var(--border-subtle); }
.compact-order { width: 100%; min-height: 58px; padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--border-subtle); color: #0f172a; background: transparent; text-align: left; }
.compact-order>span { min-width: 0; display: grid; gap: 3px; }
.compact-order>span:last-child { justify-items: end; font-size: 11px; }
.compact-order strong { font-size: 11px; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-order small { color: #64748b; font-size: 9px; }
.compact-order .badge { margin-top: 2px; }

.text-btn { display: inline-flex; align-items: center; gap: 6px; color: #64748b; background: transparent; font-size: 10px; font-weight: 600; }
.text-btn:hover { color: #0f172a; }
.text-btn svg { width: 13px; height: 13px; }

.service-list { margin: 14px 0 17px; }
.service-row { min-height: 50px; display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--border-subtle); }
.service-row>svg { width: 17px; color: #64748b; }
.service-row span { display: grid; gap: 2px; }
.service-row strong { font-size: 11px; color: #0f172a; }
.service-row small { color: #64748b; font-size: 9px; }
.status-light { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; }
.status-light.online { background: #10b981; box-shadow: 0 0 6px #10b981; }

.admin-toolbar { min-height: 50px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-toolbar .search { width: min(420px, 100%); }
.admin-count, .admin-inline-note { color: #64748b; font-size: 10px; }
.admin-inline-note { display: inline-flex; align-items: center; gap: 7px; }
.admin-inline-note svg { width: 14px; color: var(--emerald); }

.admin-callout { margin-bottom: 18px; padding: 16px 20px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 1px solid rgba(16, 185, 129, 0.3); border-radius: 12px; background: #ecfdf5; }
.admin-callout>svg { width: 20px; color: var(--emerald); }
.admin-callout strong { font-size: 12px; color: #0f172a; }
.admin-callout p { margin: 3px 0 0; color: #64748b; font-size: 10px; }

.integration-cards { margin-bottom: 18px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.integration-card { min-height: 96px; padding: 16px; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; border: 1px solid var(--border-subtle); border-radius: 12px; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
.integration-card>svg { width: 20px; color: #64748b; }
.integration-card strong { font-size: 12px; color: #0f172a; }
.integration-card p { margin: 4px 0 10px; color: #64748b; font-size: 9px; line-height: 1.5; }
.connection-state { grid-column: 2; width: max-content; padding: 3px 8px; border-radius: 6px; background: #fef2f2; color: #dc2626; font-size: 9px; font-weight: 600; }
.connection-state.ready { background: #ecfdf5; color: #059669; }

.supplier-balance-row, .service-meta { min-height: 44px; margin-top: 12px; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); color: #64748b; font-size: 10px; }
.supplier-balance-row strong { margin-left: auto; color: #0f172a; }
.service-meta { justify-content: space-between; margin-top: 8px; }
.service-meta+.service-meta { margin-top: 0; border-top: 0; }

.audit-list { border: 1px solid var(--border-subtle); border-radius: 12px; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); overflow: hidden; }
.audit-row { min-height: 72px; padding: 14px 18px; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 13px; border-bottom: 1px solid var(--border-subtle); }
.audit-row:last-child { border-bottom: 0; }
.audit-icon { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border-subtle); border-radius: 8px; color: #64748b; background: #f8fafc; }
.audit-icon svg { width: 15px; }
.audit-row strong { font-size: 11px; color: #0f172a; text-transform: capitalize; }
.audit-row p { margin: 4px 0; color: #475569; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.audit-row small { color: #64748b; font-size: 9px; overflow-wrap: anywhere; }

.admin-workspace>.section, .admin-settings-width, .admin-workspace .binance-settings { max-width: none; }
.admin-workspace>.section { margin-bottom: 18px; padding: 22px; border: 1px solid var(--border-subtle); border-radius: 12px; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }

.admin-bot-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 24px; min-width: 0; }
.admin-bot-layout>form, .bot-preview-tool { padding: 22px; border: 1px solid var(--border-subtle); border-radius: 12px; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
.bot-status-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; margin-bottom: 18px; border: 1px solid var(--border-subtle); border-radius: 12px; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
.bot-status-bar>div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.bot-menu-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr) 76px; align-items: end; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.bot-menu-row label { font-size: 10px; }
.bot-menu-row .menu-enabled { display: flex; align-items: center; gap: 8px; align-self: center; }
.bot-menu-row input[type="checkbox"] { width: 16px; height: 16px; }
.bot-menu-row .actions { gap: 2px; padding-bottom: 3px; }
.bot-preview-brand { display: flex; align-items: center; gap: 10px; margin: 20px 0 14px; }
.bot-preview-brand .store-logo { width: 34px; height: 34px; }
.bot-preview-brand strong { display: block; font-size: 12px; color: #0f172a; }
.bot-preview-brand small { display: block; font-size: 10px; color: #64748b; }
.bot-preview-message { background: #f8fafc; border: 1px solid var(--border-subtle); border-radius: 8px; padding: 14px; font-size: 11px; line-height: 1.7; color: #0f172a; white-space: pre-wrap; }
.bot-preview-keyboard { display: grid; gap: 5px; margin-top: 8px; }
.bot-preview-keyboard>div { display: flex; gap: 5px; }
.bot-preview-keyboard span { flex: 1; min-width: 0; text-align: center; padding: 9px 5px; font-size: 10px; background: #ffffff; border: 1px solid var(--border-subtle); border-radius: 6px; color: #334155; }

.customer-profile { margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.customer-profile h3 { margin: 0; font-size: 15px; color: #0f172a; }
.customer-profile p { margin: 3px 0 0; color: #64748b; font-size: 11px; }
.customer-balance-summary, .modal-record-head { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.customer-balance-summary { padding: 14px 18px; border: 1px solid var(--border-subtle); border-radius: 10px; background: #f8fafc; }
.customer-balance-summary span { color: #64748b; font-size: 11px; }
.customer-balance-summary strong { font-size: 18px; color: #0f172a; font-weight: 800; }

.binance-settings { border: 1px solid var(--border-subtle); padding: 22px; border-radius: 12px; background: #ffffff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04); }
.section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.section-title p { max-width: 660px; color: #8492a6; font-size: 12px; }

/* Documentation Layout */
.docs-columns { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 45px; }
.docs-nav { position: sticky; top: 90px; align-self: start; border-right: 1px solid var(--border-subtle); padding-right: 20px; color: #8492a6; font-size: 12px; line-height: 2.8; }
.docs-nav a { display: block; transition: color .15s; }
.docs-nav a:hover { color: #34d399; }
.api-docs { max-width: 900px; min-width: 0; }
.api-docs table { margin: 16px 0 24px; }
.api-docs td { padding: 12px; }

/* Mobile & Responsive Adaptations */
.mobile-menu, .mobile-dock { display: none; }

/* 1. Medium Desktops & Standard Laptops (1200px - 1380px) */
@media (max-width: 1380px) {
  .topbar-inner { padding: 10px 16px; gap: 10px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 15px; }
  .brand-name small { font-size: 8px; }
  .header-nav { gap: 2px; padding: 2px 3px; }
  .header-nav a { padding: 5px 9px; font-size: 11.5px; gap: 5px; }
  .header-nav a svg { width: 13px; height: 13px; }
  .top-actions { gap: 6px; }
  .telegram-link span { display: none; }
  .telegram-link { padding: 6px 8px; }
  .admin-pill-btn { padding: 5px 9px; font-size: 11px; gap: 5px; }
  .admin-pill-btn svg { width: 13px; height: 13px; }
  .balance-mini { padding: 4px 8px; gap: 6px; margin-right: 0; }
  .balance-mini strong { font-size: 11.5px; }
  .balance-mini small { font-size: 8px; }
  .balance-mini svg { width: 15px; height: 15px; }
  .user-button { max-width: 125px; padding: 4px 8px; font-size: 11px; }
  .admin-shell { grid-template-columns: 190px minmax(0, 1fr); gap: 20px; }
}

/* 2. Compact Desktops, Laptops & Landscape Tablets (880px - 1200px) */
@media (max-width: 1200px) {
  .header-nav { display: none; }
  .mobile-menu { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; }
  .top-actions .telegram-link { display: none; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 180px minmax(0, 1fr); gap: 18px; }
  .admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-kpi:nth-child(2) { border-right: 0; }
  .admin-kpi:nth-child(-n+2) { border-bottom: 1px solid var(--border-subtle); }
  .integration-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-intro { gap: 32px; }
}

/* 3. Tablets & Phablets (< 880px) */
@media (max-width: 880px) {
  .catalog-intro { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 28px; }
  .catalog-intro-copy { max-width: 100%; }
  .store-status { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .store-status>div { border-bottom: 0; border-right: 1px solid var(--border-subtle); }
  .store-status>div:last-child { border-right: 0; }
  .topbar-inner { min-height: 64px; padding: 10px 16px; }
  .balance-mini { display: none; }
  .split { grid-template-columns: 1fr; gap: 28px; }
  .purchase-layout { grid-template-columns: 1fr; gap: 24px; }
  .product-facts { grid-template-columns: 1fr; }
  .product-facts .fact-wide { grid-column: auto; }
  .docs-columns { grid-template-columns: 1fr; }
  .docs-nav { display: none; }
  
  /* Responsive Admin Workspace */
  .admin-shell { display: flex; flex-direction: column; gap: 18px; width: 100%; }
  .admin-nav-panel {
    position: sticky;
    top: 64px;
    z-index: 25;
    width: 100%;
    max-width: 100%;
    margin-bottom: 16px;
    padding: 6px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
  .admin-nav-panel::-webkit-scrollbar { display: none; }
  .admin-nav-label { display: none; }
  .admin-nav-item {
    width: auto;
    min-width: max-content;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border-radius: 20px;
    font-size: 11.5px;
  }
  .admin-section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    min-height: auto;
  }
  .admin-section-head .btn {
    width: 100%;
    justify-content: center;
  }
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    min-height: auto;
  }
  .admin-toolbar .search {
    width: 100%;
  }
  .admin-dashboard-grid { grid-template-columns: 1fr; }
  .admin-bot-layout { grid-template-columns: 1fr; }
}

/* 4. Small Mobile Phones (< 640px) */
@media (max-width: 640px) {
  .layout { padding-bottom: 74px; }
  .topbar-inner { padding: 8px 12px; }
  .content { padding: 20px 12px 36px; }
  .store-logo { width: 36px; height: 36px; }
  .brand-name { font-size: 14px; }
  .brand-name small { display: none; }
  .top-actions .telegram-link, .signup-button { display: none; }
  .admin-pill-btn { padding: 5px 9px; font-size: 11px; }
  .admin-pill-btn span { display: none; }
  .mobile-menu { display: inline-flex; width: 34px; height: 34px; }
  .user-button span, .user-button svg { display: none; }
  .user-button { padding: 3px; border-radius: 50%; }
  .sidebar { display: none; position: fixed; top: 60px; left: 0; right: 0; background: rgba(255, 255, 255, 0.98); border-bottom: 1px solid var(--border-subtle); z-index: 45; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); }
  .sidebar.open { display: block; }
  .nav-inner { padding: 14px 16px; display: block; }
  .nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .nav a { height: 42px; padding: 8px 12px; background: #f8fafc; border: 1px solid var(--border-subtle); border-radius: 8px; color: #64748b; }
  .nav a.active::after { display: none; }
  .catalog-intro h1 { font-size: 26px; }
  .store-status { grid-template-columns: 1fr; }
  .store-status>div { border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  .catalog-heading { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px 0 14px; }
  .catalog-heading h2 { font-size: 20px; }
  .catalog-tools { flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 0 16px; }
  .search { width: 100%; flex-basis: auto; }
  .tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; }
  .catalog-grid { grid-template-columns: 1fr; }
  .admin-kpis { grid-template-columns: 1fr; }
  .admin-kpi { border-right: 0; border-bottom: 1px solid var(--border-subtle); }
  .integration-cards { grid-template-columns: 1fr; }
  
  /* Mobile Modals */
  dialog, .purchase-dialog, .auth-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 20px);
    border-radius: 14px;
    margin: auto;
  }
  .modal-head { padding: 16px 18px; }
  .modal-body { padding: 18px 16px; }
  .modal-foot { padding: 14px 16px; flex-direction: column-reverse; gap: 10px; align-items: stretch; }
  .modal-foot .btn { width: 100%; justify-content: center; }
  .field-row { grid-template-columns: 1fr; gap: 12px; }
  .product-facts { grid-template-columns: 1fr; }
  .purchase-layout { grid-template-columns: 1fr; gap: 20px; }
  
  .mobile-dock {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    z-index: 50;
    padding: 8px 4px max(8px, env(safe-area-inset-bottom));
    min-height: 60px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
  }
  .mobile-dock a {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    color: #64748b;
    font-size: 9px;
    font-weight: 500;
  }
  .mobile-dock a.active { color: #0f172a; font-weight: 700; }
  .mobile-dock a.active svg { color: var(--emerald); }
  .mobile-dock svg { width: 18px; height: 18px; }
  #toast { bottom: 80px; }
}
