@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Fira+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #17201d;
  --muted: #68736e;
  --paper: #f5f7f4;
  --panel: #ffffff;
  --line: #dce2de;
  --green: #167a55;
  --green-dark: #0d5a3d;
  --yellow: #f5b82e;
  --coral: #e36a4b;
  --blue: #286eb8;
  --shadow: 0 12px 32px rgba(22, 45, 34, .09);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid rgba(220,226,222,.9); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); }
.header-inner { width: min(1180px, calc(100% - 40px)); min-height: 64px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; color: #fff; background: var(--green); font-weight: 800; border-radius: 8px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 17px; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.main-nav { display: flex; gap: 8px; }
.main-nav a { padding: 9px 14px; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--green); border-bottom-color: var(--green); }
.hero-band { color: #fff; background: #173c30; overflow: hidden; }
.hero-inner { width: min(1180px, calc(100% - 40px)); min-height: 330px; margin: 0 auto; display: grid; grid-template-columns: 1.02fr .98fr; gap: 52px; align-items: center; position: relative; }
.hero-inner::after { content: ""; position: absolute; width: 210px; height: 210px; right: -95px; bottom: -90px; border: 36px solid rgba(245,184,46,.9); transform: rotate(22deg); }
.eyebrow { margin: 0 0 10px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: 0; }
.hero-copy .eyebrow { color: #a6d7c3; }
.hero-copy h1 { margin: 0; max-width: 620px; font-size: 48px; line-height: 1.12; letter-spacing: 0; }
.hero-copy h1 span { color: var(--yellow); }
.hero-copy > p:last-child { max-width: 520px; margin: 16px 0 0; color: #c7d8d0; font-size: 15px; }
.search-panel { position: relative; z-index: 1; padding: 24px; color: var(--ink); background: #fff; border-radius: 8px; box-shadow: 0 18px 55px rgba(0,0,0,.2); }
.search-panel label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 700; }
.search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; }
.search-row input, textarea, .tool-panel input { width: 100%; border: 1px solid var(--line); border-radius: 6px; outline: 0; background: #f9faf9; }
.search-row input { min-width: 0; height: 46px; padding: 0 16px; }
.search-row input:focus, textarea:focus, .tool-panel input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,122,85,.12); }
.search-row button, .primary-button { border: 0; border-radius: 6px; color: #fff; background: var(--green); font-weight: 700; }
.search-row button { padding: 0 22px; }
.search-row button:hover, .primary-button:hover { background: var(--green-dark); }
.quick-tags { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; }
.quick-tags span { color: var(--muted); }
.quick-tags a { padding: 5px 9px; border: 1px solid var(--line); border-radius: 4px; }
.quick-tags a:hover { color: var(--green); border-color: var(--green); }
.stats-band { background: var(--panel); border-bottom: 1px solid var(--line); }
.stats-inner { width: min(1180px, calc(100% - 40px)); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-inner > div { min-height: 78px; padding: 14px 28px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.stats-inner > div:first-child { border-left: 1px solid var(--line); }
.stats-inner strong, .stats-inner span { display: block; }
.stats-inner strong { font-size: 21px; }
.stats-inner span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.content-section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0 20px; }
.products-section { padding-bottom: 80px; }
.marketplace-section { padding-top: 46px; padding-bottom: 80px; }
.marketplace-layout { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 28px; align-items: start; }
.marketplace-products { min-width: 0; }
.marketplace-products .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.popular-shops { position: sticky; top: 94px; min-width: 0; border-top: 1px solid var(--ink); }
.popular-shops-heading { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.popular-shops-heading h2 { margin: 0; font-size: 22px; }
.popular-shops-heading a { color: var(--green); font-size: 11px; font-weight: 700; white-space: nowrap; }
.popular-shop-list { background: var(--panel); }
.popular-shop-row { min-height: 68px; padding: 10px 8px; display: grid; grid-template-columns: 26px 38px minmax(0, 1fr) 18px; gap: 8px; align-items: center; border-bottom: 1px solid var(--line); }
.popular-shop-row:hover { background: #f0f7f3; }
.popular-shop-row .shop-avatar { width: 38px; height: 38px; }
.popular-shop-row .shop-main { min-width: 0; }
.popular-shop-row .shop-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popular-shop-row .arrow { font-size: 15px; }
.popular-shop-row:hover .arrow { transform: translateX(3px); }
.empty-state.compact { padding: 28px 12px; }
.section-heading { margin-bottom: 22px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin: 0; font-size: 30px; line-height: 1.2; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.feed-tools { display: flex; align-items: center; gap: 14px; }
.feed-tools > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sort-form { display: flex; align-items: center; gap: 8px; }
.sort-form label { color: var(--muted); font-size: 11px; }
.sort-form select { height: 38px; padding: 0 32px 0 12px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }
.section-link { color: var(--green); font-size: 12px; font-weight: 700; }
.shop-list { border-top: 1px solid var(--ink); background: var(--panel); }
.shop-row { min-height: 86px; padding: 12px 20px; display: grid; grid-template-columns: 46px 48px minmax(180px,1fr) 120px 130px 32px; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); }
.shop-row:hover { background: #f0f7f3; }
.rank { color: var(--muted); font-size: 13px; font-weight: 700; }
.shop-avatar, .table-shop > span { display: grid; place-items: center; overflow: hidden; color: #fff; background: var(--green); border-radius: 7px; font-weight: 800; }
.shop-avatar { width: 44px; height: 44px; }
.shop-avatar img, .table-shop img, .large-avatar img { width: 100%; height: 100%; object-fit: cover; }
.shop-main strong, .shop-main small, .shop-metric strong, .shop-metric small { display: block; }
.shop-main small, .shop-metric small { color: var(--muted); font-size: 11px; }
.shop-metric strong { font-size: 16px; }
.arrow { color: var(--green); font-size: 20px; transition: transform .2s; }
.shop-row:hover .arrow { transform: translateX(4px); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product-card { min-width: 0; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; transition: transform .2s, box-shadow .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.product-image { aspect-ratio: 4 / 3; position: relative; display: grid; place-items: center; overflow: hidden; color: var(--green); background: #e8efeb; font-size: 32px; font-weight: 800; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.product-card:hover .product-image img { transform: scale(1.025); }
.stock { position: absolute; left: 10px; bottom: 10px; padding: 4px 8px; color: #fff; background: rgba(23,32,29,.8); border-radius: 4px; font-size: 10px; }
.stock.out { background: rgba(227,106,75,.9); }
.product-body { padding: 15px; }
.product-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.product-meta a { color: var(--green); text-align: right; }
.product-body h3 { min-height: 48px; margin: 8px 0 18px; overflow: hidden; font-size: 14px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-footer { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.product-footer strong { color: var(--coral); font-size: 22px; }
.product-footer strong small { font-size: 12px; }
.product-footer > a { padding: 6px 9px; color: var(--green); border: 1px solid #b8d2c6; border-radius: 4px; font-size: 11px; }
.empty-state { padding: 70px 24px; text-align: center; background: var(--panel); border: 1px dashed #bfc9c3; }
.empty-state strong { font-size: 22px; }
.empty-state p { color: var(--muted); }
.empty-state a { color: var(--green); font-weight: 700; }
.pagination { margin-top: 28px; display: flex; align-items: center; justify-content: center; gap: 18px; }
.pagination a { padding: 8px 13px; color: var(--green); background: #fff; border: 1px solid #b8d2c6; border-radius: 4px; font-size: 12px; }
.pagination span { color: var(--muted); font-size: 11px; }
.site-footer { margin-top: 60px; padding: 32px 20px; color: #bdccc5; background: #16251f; }
.site-footer > div { width: min(1180px, 100%); margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; }
.site-footer span { font-size: 12px; }
.disclaimer-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.disclaimer-modal[hidden] { display: none; }
.disclaimer-backdrop { position: absolute; inset: 0; background: rgba(1, 4, 12, .78); backdrop-filter: blur(8px); }
.disclaimer-dialog { position: relative; width: min(520px, 100%); overflow: hidden; color: var(--ink); background: #0b1224; border: 1px solid rgba(125,211,252,.24); border-radius: 8px; box-shadow: 0 28px 80px rgba(0,0,0,.52), 0 0 40px rgba(37,99,235,.12); }
.disclaimer-head { padding: 24px 26px 18px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid rgba(125,211,252,.12); }
.disclaimer-head .eyebrow { margin-bottom: 4px; color: #67e8f9; }
.disclaimer-head h2 { margin: 0; color: #f8fbff; font-size: 21px; }
.disclaimer-icon { flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center; color: #fde68a; background: rgba(245,158,11,.1); border: 1px solid rgba(251,191,36,.35); border-radius: 50%; font: 700 20px/1 "Fira Code", monospace; }
.disclaimer-content { padding: 22px 26px 12px; color: #93a4bd; font-size: 14px; }
.disclaimer-content p { margin: 0 0 16px; }
.disclaimer-content strong { color: #e5edf8; }
.disclaimer-skip { min-height: 44px; margin: 0 26px 16px; display: flex; align-items: center; gap: 10px; color: #9fb0c9; font-size: 13px; cursor: pointer; }
.disclaimer-skip input { width: 18px; height: 18px; margin: 0; accent-color: #22d3ee; }
.disclaimer-actions { padding: 16px 26px 22px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid rgba(125,211,252,.12); }
.disclaimer-actions button { min-height: 44px; padding: 0 18px; border-radius: 6px; font-weight: 700; }
.disclaimer-cancel { color: #9fb0c9; background: #111a2e; border: 1px solid rgba(148,163,184,.2); }
.disclaimer-confirm { color: #f8fbff; background: linear-gradient(135deg, #0891b2, #2563eb); border: 0; box-shadow: 0 8px 24px rgba(37,99,235,.22); }
.disclaimer-cancel:hover { color: #fff; border-color: rgba(125,211,252,.42); }
.disclaimer-confirm:hover { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
body.modal-open { overflow: hidden; }
.shop-hero { color: #fff; background: #173c30; }
.shop-hero-inner { width: min(1180px, calc(100% - 40px)); min-height: 310px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 40px; }
.shop-profile { min-width: 0; display: flex; align-items: center; gap: 26px; }
.large-avatar { flex: 0 0 auto; width: 96px; height: 96px; display: grid; place-items: center; overflow: hidden; color: var(--green); background: #fff; border: 5px solid rgba(255,255,255,.18); border-radius: 8px; font-size: 38px; font-weight: 800; }
.shop-profile .eyebrow { color: #a6d7c3; }
.shop-profile h1 { margin: 0 0 8px; font-size: 36px; }
.shop-profile p:last-child { max-width: 640px; max-height: 74px; margin: 0; overflow: hidden; color: #c7d8d0; font-size: 13px; }
.shop-actions { display: grid; grid-template-columns: repeat(2, 100px); gap: 10px; text-align: center; }
.shop-actions div { padding: 13px 8px; border: 1px solid rgba(255,255,255,.16); }
.shop-actions strong, .shop-actions span { display: block; }
.shop-actions strong { font-size: 21px; }
.shop-actions span { color: #bdccc5; font-size: 10px; }
.shop-actions a { grid-column: 1 / -1; padding: 11px; color: var(--ink); background: var(--yellow); border-radius: 5px; font-weight: 800; }
.category-strip { position: sticky; top: 72px; z-index: 10; padding: 10px; display: flex; gap: 8px; overflow-x: auto; background: rgba(245,247,244,.96); border-bottom: 1px solid var(--line); }
.category-strip a { flex: 0 0 auto; padding: 8px 12px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 4px; font-size: 12px; }
.category-strip a.active { color: #fff; background: var(--green); border-color: var(--green); }
.category-strip span { opacity: .7; }
.category-block { padding-top: 58px; }
.directory-head { padding: 60px 20px; color: #fff; background: #173c30; }
.directory-head > div { width: min(1180px, 100%); margin: 0 auto; }
.directory-head .eyebrow { color: #a6d7c3; }
.directory-head h1 { margin: 0; font-size: 44px; }
.directory-head p:not(.eyebrow) { color: #c7d8d0; }
.directory-head form { max-width: 520px; margin-top: 22px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.directory-head input { min-width: 0; height: 46px; padding: 0 14px; border: 0; border-radius: 5px; outline: 0; }
.directory-head button { padding: 0 20px; color: var(--ink); background: var(--yellow); border: 0; border-radius: 5px; font-weight: 800; }
.directory-section { padding-bottom: 70px; }
.directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.directory-card { min-width: 0; padding: 22px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 6px; }
.directory-card:hover { border-color: var(--green); transform: translateY(-2px); }
.directory-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.directory-card .large-avatar { width: 62px; height: 62px; color: #fff; background: var(--green); border: 0; font-size: 24px; }
.directory-card h2 { margin: 18px 0 2px; overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.directory-card > p { margin: 0; color: var(--muted); font-size: 11px; }
.directory-metrics { margin: 20px 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.directory-metrics div { padding: 13px 5px; }
.directory-metrics div + div { padding-left: 15px; border-left: 1px solid var(--line); }
.directory-metrics strong, .directory-metrics span { display: block; }
.directory-metrics strong { font-size: 17px; }
.directory-metrics span { color: var(--muted); font-size: 10px; }
.directory-enter { display: flex; justify-content: space-between; color: var(--green); font-size: 12px; font-weight: 800; }
.admin-shell { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 72px; height: calc(100vh - 72px); padding: 32px 24px; display: flex; flex-direction: column; color: #fff; background: #173c30; }
.admin-sidebar .eyebrow { color: #8fc5af; }
.admin-sidebar h1 { margin: 0; font-size: 28px; }
.admin-sidebar nav { margin-top: 40px; display: grid; gap: 6px; }
.admin-sidebar nav a { padding: 10px 12px; color: #b8cbc2; border-left: 2px solid transparent; font-size: 13px; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { color: #fff; background: rgba(255,255,255,.06); border-left-color: var(--yellow); }
.back-link { margin-top: auto; color: #b8cbc2; font-size: 12px; }
.admin-content { min-width: 0; padding-bottom: 80px; }
.admin-topbar { height: 66px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }
.admin-topbar > div { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; }
.status-dot.running { background: var(--yellow); box-shadow: 0 0 0 5px rgba(245,184,46,.18); }
.primary-button, .secondary-button { min-height: 38px; padding: 0 15px; }
.secondary-button { border: 1px solid var(--green); border-radius: 6px; color: var(--green); background: #fff; font-weight: 700; }
button:disabled { opacity: .55; cursor: wait; }
.is-loading { position: relative; }
.is-loading::after { content: ""; width: 13px; height: 13px; margin-left: 9px; display: inline-block; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: button-spin .7s linear infinite; vertical-align: -2px; }
@keyframes button-spin { to { transform: rotate(360deg); } }
.admin-section { padding: 40px 32px 0; scroll-margin-top: 90px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); background: #fff; }
.admin-stats > div { min-height: 130px; padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.admin-stats > div:first-child { border-left: 1px solid var(--line); }
.admin-stats span, .admin-stats strong, .admin-stats small { display: block; }
.admin-stats span { color: var(--muted); font-size: 11px; }
.admin-stats strong { margin-top: 12px; font-size: 30px; }
.admin-stats small { color: var(--muted); font-size: 10px; }
.collector-grid { display: grid; grid-template-columns: 1.3fr .85fr .85fr; gap: 14px; }
.tool-panel { padding: 22px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 5px; }
.tool-panel h3 { margin: 0; font-size: 17px; }
.tool-panel p { min-height: 40px; margin: 7px 0 16px; color: var(--muted); font-size: 11px; }
.tool-panel label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: 11px; }
.tool-panel textarea { resize: vertical; padding: 10px 12px; }
.tool-panel input { height: 40px; padding: 0 11px; }
.tool-panel button { width: 100%; margin-top: 14px; }
.primary-tool { border-top-color: var(--yellow); }
.source-option { min-height: 48px; padding: 9px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.source-option strong, .source-option small { display: block; }
.source-option strong { color: var(--ink); font-size: 12px; }
.source-option small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.source-state, .source-label { padding: 4px 7px; color: var(--green); background: #e5f4ed; border-radius: 4px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.switch-row { min-height: 40px; display: flex !important; align-items: center; justify-content: space-between; gap: 15px; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--green); }
.data-table-wrap { overflow-x: auto; background: #fff; border-top: 1px solid var(--ink); }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 12px 14px; color: var(--muted); background: #f7f8f7; text-align: left; font-size: 10px; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table-shop { min-width: 200px; display: flex; align-items: center; gap: 10px; }
.table-shop > span { flex: 0 0 auto; width: 36px; height: 36px; }
.table-shop strong, .table-shop small { display: block; }
.table-shop small { color: var(--muted); }
.status-badge { display: inline-block; margin: 2px; padding: 4px 7px; color: var(--muted); background: #edf0ee; border-radius: 4px; font-size: 9px; font-weight: 800; }
.status-badge.success { color: var(--green); background: #e5f4ed; }
.status-badge.failed { color: #b43e29; background: #fde9e4; }
.status-badge.running { color: #8a5d00; background: #fff1c8; }
.status-badge.partial { color: var(--blue); background: #e7f0fa; }
.status-badge.disabled { color: #777; background: #eee; }
.table-date { white-space: nowrap; }
.error-text { max-width: 180px; display: block; overflow: hidden; color: #b43e29; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 6px; }
.row-actions button, .row-actions a { padding: 5px 8px; color: var(--green); background: #fff; border: 1px solid #b8d2c6; border-radius: 4px; font-size: 10px; white-space: nowrap; }
.empty-cell { padding: 35px !important; color: var(--muted); text-align: center !important; }
.run-list { border-top: 1px solid var(--ink); background: #fff; }
.run-row { min-height: 54px; padding: 10px 14px; display: grid; grid-template-columns: 80px 100px 1fr 1fr 150px; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); font-size: 11px; }
.run-row time { color: var(--muted); text-align: right; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 40; max-width: min(380px, calc(100% - 48px)); padding: 12px 16px; color: #fff; background: var(--green); border-radius: 5px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s; }
.toast.error { background: #b43e29; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 24px; padding: 44px 0; }
  .hero-copy h1 { font-size: 46px; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .marketplace-layout { grid-template-columns: minmax(0, 1fr) 250px; gap: 18px; }
  .marketplace-products .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collector-grid { grid-template-columns: 1fr 1fr; }
  .tool-panel:first-child { grid-row: span 2; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .shop-row { grid-template-columns: 40px 48px minmax(150px,1fr) 100px 28px; }
  .shop-row .shop-metric:nth-of-type(2) { display: none; }
}
@media (max-width: 720px) {
  .header-inner { width: min(100% - 24px, 1180px); min-height: 64px; }
  .brand small { display: none; }
  .main-nav a { padding: 8px; }
  .hero-inner, .stats-inner, .content-section, .shop-hero-inner { width: min(100% - 24px, 1180px); }
  .hero-inner { min-height: 0; gap: 18px; padding: 26px 0; }
  .hero-copy h1 { font-size: 34px; }
  .hero-copy > p:last-child { margin-top: 10px; font-size: 13px; }
  .search-panel { padding: 16px; }
  .search-row { grid-template-columns: 1fr 1fr; }
  .search-row > input { grid-column: 1 / -1; }
  .search-row button { min-height: 44px; padding: 0 12px; }
  .quick-tags { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; white-space: nowrap; }
  .quick-tags > * { flex: 0 0 auto; }
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stats-inner > div { min-height: 70px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .stats-inner strong { font-size: 18px; overflow-wrap: anywhere; }
  .content-section { padding-top: 48px; }
  .marketplace-section { padding-top: 30px; }
  .marketplace-layout { grid-template-columns: 1fr; }
  .popular-shops { position: static; order: 2; }
  .section-heading h2 { font-size: 25px; }
  .section-heading { align-items: flex-start; }
  .feed-tools { align-items: flex-end; flex-direction: column; gap: 5px; }
  .sort-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .shop-row { padding: 12px 10px; grid-template-columns: 32px 42px minmax(0,1fr) 26px; gap: 9px; }
  .shop-avatar { width: 40px; height: 40px; }
  .shop-row .shop-metric { display: none; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .marketplace-products .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .directory-grid { grid-template-columns: 1fr; }
  .directory-head { padding: 44px 12px; }
  .directory-head h1 { font-size: 34px; }
  .product-body { padding: 11px; }
  .product-body h3 { min-height: 44px; margin-bottom: 12px; font-size: 12px; }
  .product-footer strong { font-size: 18px; }
  .product-footer > a { display: none; }
  .site-footer > div { display: grid; }
  .shop-hero-inner { padding: 42px 0; grid-template-columns: 1fr; }
  .shop-profile { align-items: flex-start; gap: 16px; }
  .large-avatar { width: 72px; height: 72px; }
  .shop-profile h1 { font-size: 28px; overflow-wrap: anywhere; }
  .shop-actions { grid-template-columns: 1fr 1fr; }
  .disclaimer-dialog { max-height: calc(100vh - 24px); overflow-y: auto; }
  .disclaimer-head { padding: 20px 18px 16px; }
  .disclaimer-content { padding: 18px 18px 8px; }
  .disclaimer-skip { margin: 0 18px 12px; }
  .disclaimer-actions { padding: 14px 18px 18px; }
  .category-strip { top: 64px; }
  .admin-shell { display: block; }
  .admin-sidebar { position: static; height: auto; padding: 24px 18px; }
  .admin-sidebar nav { margin-top: 24px; display: flex; overflow-x: auto; }
  .admin-sidebar nav a { flex: 0 0 auto; }
  .back-link { display: none; }
  .admin-topbar { height: 60px; padding: 0 16px; }
  .admin-section { padding: 34px 14px 0; }
  .admin-stats, .collector-grid { grid-template-columns: 1fr; }
  .tool-panel:first-child { grid-row: auto; }
  .run-row { grid-template-columns: 70px 1fr 1fr; }
  .run-row span:nth-of-type(3), .run-row time { display: none; }
}
@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr; }
  .marketplace-products .product-grid { grid-template-columns: 1fr; }
  .product-image { aspect-ratio: 16 / 10; }
  .section-heading > span { display: none; }
}

/* Simplified data-management workspace */
.manage-shell { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 210px minmax(0, 1fr); }
.manage-sidebar { position: sticky; top: 72px; height: calc(100vh - 72px); padding: 28px 18px; display: flex; flex-direction: column; color: #fff; background: #173c30; }
.manage-title .eyebrow { color: #8fc5af; }
.manage-title h1 { margin: 0; font-size: 25px; }
.manage-nav { margin-top: 34px; display: grid; gap: 8px; }
.manage-nav a { min-height: 58px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; color: #bad0c7; border-left: 3px solid transparent; }
.manage-nav a.active, .manage-nav a:hover { color: #fff; background: rgba(255,255,255,.07); border-left-color: var(--yellow); }
.manage-nav strong { font-size: 13px; }
.manage-nav span { min-width: 28px; padding: 2px 6px; color: #173c30; background: #fff; border-radius: 4px; text-align: center; font-size: 10px; }
.manage-main { min-width: 0; padding-bottom: 70px; }
.manage-header { min-height: 62px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid var(--line); }
.manage-header > div { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.header-counts { gap: 18px !important; }
.action-band { padding: 28px; display: grid; grid-template-columns: minmax(300px, .85fr) 1.15fr; gap: 14px; background: #eef2ef; border-bottom: 1px solid var(--line); }
.manual-entry { padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.manual-entry label { grid-column: 1 / -1; font-size: 12px; font-weight: 800; }
.manual-entry textarea { min-width: 0; padding: 9px 11px; resize: vertical; }
.manual-entry button { min-width: 100px; }
.main-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.main-actions button { min-height: 100%; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left; }
.main-actions strong, .main-actions span { display: block; }
.main-actions strong { font-size: 15px; }
.main-actions span { margin-top: 4px; opacity: .72; font-size: 10px; }
.schedule-band { padding: 15px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.schedule-row { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.schedule-row label { min-width: 175px; display: flex; align-items: center; gap: 9px; color: var(--ink); }
.schedule-row label > input { width: 17px; height: 17px; accent-color: var(--green); }
.schedule-row strong, .schedule-row small { display: block; }
.schedule-row strong { font-size: 11px; }
.schedule-row small { color: var(--muted); font-size: 9px; }
.schedule-row > input { width: 72px; height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; }
.schedule-band > button { margin-left: auto; }
.list-section { padding: 34px 28px 0; }
.list-heading { margin-bottom: 18px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.list-heading h2 { margin: 0; font-size: 27px; }
.admin-search { display: grid; grid-template-columns: minmax(180px, 280px) auto; }
.admin-search input { height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 5px 0 0 5px; outline: 0; }
.admin-search button { padding: 0 14px; color: #fff; background: var(--green); border: 0; border-radius: 0 5px 5px 0; }
.table-link { max-width: 280px; display: block; overflow: hidden; color: var(--green); text-overflow: ellipsis; white-space: nowrap; }
.table-product { min-width: 280px; display: flex; align-items: center; gap: 10px; }
.table-product img, .table-product > span { flex: 0 0 auto; width: 38px; height: 38px; object-fit: cover; border-radius: 5px; }
.table-product > span { display: grid; place-items: center; color: #fff; background: var(--green); font-weight: 800; }
.table-product strong { max-width: 330px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.price-cell { color: var(--coral); font-weight: 800; white-space: nowrap; }
@media (max-width: 900px) {
  .manage-shell { grid-template-columns: 1fr; }
  .manage-sidebar { position: static; height: auto; padding: 20px 16px; }
  .manage-title { display: none; }
  .manage-nav { margin: 0; grid-template-columns: 1fr 1fr; }
  .manage-sidebar .back-link { display: none; }
  .action-band { grid-template-columns: 1fr; }
  .schedule-band { align-items: stretch; }
  .schedule-row { flex: 1 1 100%; }
  .schedule-band > button { margin-left: 0; }
}
@media (max-width: 620px) {
  .brand { gap: 7px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand strong { font-size: 14px; white-space: nowrap; }
  .main-nav { gap: 2px; }
  .main-nav a { padding: 8px 5px; font-size: 11px; white-space: nowrap; }
  .manage-header, .action-band, .schedule-band, .list-section { padding-left: 14px; padding-right: 14px; }
  .header-counts { display: none !important; }
  .manual-entry { grid-template-columns: 1fr; }
  .manual-entry label { grid-column: auto; }
  .manual-entry button { min-height: 40px; }
  .main-actions { grid-template-columns: 1fr; }
  .main-actions button { min-height: 76px; }
  .schedule-row { flex-wrap: wrap; }
  .schedule-row label { flex: 1 1 100%; }
  .list-heading { align-items: stretch; flex-direction: column; }
  .admin-search { grid-template-columns: 1fr auto; }
}

/* UI/UX Pro Max: premium operations console */
:root {
  --ink: #edf4ff;
  --muted: #91a0b8;
  --paper: #050814;
  --panel: #0b1122;
  --line: rgba(148, 163, 184, .16);
  --green: #22d3ee;
  --green-dark: #0891b2;
  --yellow: #a78bfa;
  --coral: #fb7185;
  --blue: #60a5fa;
  --tech-cyan: #22d3ee;
  --tech-blue: #3b82f6;
  --tech-violet: #8b5cf6;
  --tech-surface: rgba(12, 19, 39, .82);
  --tech-surface-strong: #0c1327;
  --tech-border: rgba(125, 211, 252, .14);
  --tech-glow: 0 0 26px rgba(34, 211, 238, .12);
  --shadow: 0 18px 46px rgba(0, 0, 0, .28);
}
html { color-scheme: dark; }
body {
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(59,130,246,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,.025) 1px, transparent 1px),
    linear-gradient(145deg, #050814 0%, #080d1d 48%, #090818 100%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
  font-family: "Fira Sans", "Microsoft YaHei", sans-serif;
}
h1, h2, h3, .brand strong, .manage-nav strong, .metric-strip strong { font-family: "Fira Code", "Microsoft YaHei", monospace; letter-spacing: 0; }
::selection { color: #031016; background: #67e8f9; }
*:focus-visible { outline: 2px solid #67e8f9; outline-offset: 2px; }
.site-header { border-bottom-color: rgba(125,211,252,.12); background: rgba(5,8,20,.82); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.brand-mark, .console-mark { color: #031016; background: linear-gradient(135deg, #67e8f9, #60a5fa 58%, #a78bfa); box-shadow: 0 0 22px rgba(34,211,238,.2); }
.brand small { color: #71819c; }
.main-nav a { color: #91a0b8; }
.main-nav a:hover, .main-nav a.active { color: #eafaff; border-bottom-color: #22d3ee; }
.hero-band, .shop-hero, .directory-head {
  background: linear-gradient(135deg, rgba(10,18,40,.98), rgba(8,12,29,.98) 56%, rgba(25,12,48,.94));
  border-bottom: 1px solid rgba(125,211,252,.12);
}
.hero-inner::after { border-color: rgba(34,211,238,.35); }
.hero-copy .eyebrow, .shop-profile .eyebrow, .directory-head .eyebrow { color: #67e8f9; }
.hero-copy h1 span { color: #a78bfa; }
.hero-copy > p:last-child, .shop-profile p:last-child, .directory-head p:not(.eyebrow) { color: #9cabc2; }
.search-panel, .stats-band, .shop-list, .popular-shop-list, .product-card, .directory-card, .empty-state {
  color: var(--ink);
  background: rgba(12,19,39,.86);
  border-color: rgba(125,211,252,.14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.search-row input, textarea, .tool-panel input, .directory-head input {
  color: var(--ink);
  background: rgba(3,7,18,.72);
  border-color: rgba(148,163,184,.2);
}
.search-row input::placeholder, textarea::placeholder, input::placeholder { color: #65738d; }
.search-row button, .primary-button, .directory-head button {
  color: #f8fbff;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  box-shadow: 0 8px 24px rgba(37,99,235,.2);
}
.search-row button:hover, .primary-button:hover { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.secondary-button { color: #9befff; background: rgba(34,211,238,.05); border-color: rgba(34,211,238,.42); }
.secondary-button:hover { color: #fff; background: rgba(34,211,238,.11); border-color: #22d3ee; }
.stats-band { background: rgba(8,13,29,.9); }
.stats-inner > div { border-color: var(--line); }
.shop-row { border-bottom-color: var(--line); }
.shop-row:hover { background: rgba(34,211,238,.045); }
.popular-shops { border-top-color: rgba(125,211,252,.24); }
.popular-shops-heading { border-bottom-color: var(--line); }
.popular-shops-heading a { color: #67e8f9; }
.popular-shop-row { border-bottom-color: var(--line); }
.popular-shop-row:hover { background: rgba(34,211,238,.045); }
.shop-avatar, .table-shop > span, .directory-card .large-avatar { background: linear-gradient(135deg, #0e7490, #4f46e5); }
.product-image { color: #7dd3fc; background: #0e172d; }
.product-meta a, .product-footer > a, .empty-state a, .section-link, .table-link { color: #67e8f9; }
.product-footer strong, .price-cell { color: #fb8da0; }
.site-footer { color: #71819c; background: #030611; border-top: 1px solid rgba(125,211,252,.1); }
.category-strip { background: rgba(5,8,20,.9); }
.category-strip a { color: #91a0b8; background: #0b1122; border-color: var(--line); }
.category-strip a.active { color: #031016; background: #67e8f9; border-color: #67e8f9; }

/* Compact homepage search and always-visible product filters */
.hero-inner { min-height: 246px; gap: 34px; }
.hero-copy h1 { font-size: 44px; line-height: 1.08; }
.hero-copy > p:last-child { margin-top: 12px; }
.search-panel { padding: 18px; }
.search-panel label { margin-bottom: 8px; }
.search-row { grid-template-columns: minmax(0, 1fr) auto; }
.search-row input { height: 44px; }
.search-row button { min-height: 44px; white-space: nowrap; }
.quick-tags { margin-top: 12px; }
.content-section { padding-top: 50px; }
.marketplace-section { padding-top: 42px; }
.section-heading { align-items: stretch; flex-direction: column; gap: 16px; }
.feed-title { display: grid; gap: 4px; }
.feed-title small { color: #7e8ca4; font: 600 11px/1.4 "Fira Code", monospace; }
.feed-tools { width: 100%; display: block; }
.feed-filter-form { min-width: 0; padding: 14px; display: grid; grid-template-columns: minmax(138px, 1fr) minmax(138px, 1fr) minmax(130px, .9fr) 120px; gap: 10px; align-items: end; background: rgba(8,13,29,.58); border: 1px solid rgba(125,211,252,.12); border-radius: 7px; }
.feed-filter-form label, .price-filter { min-width: 0; margin: 0; }
.feed-filter-form label > span, .price-filter > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.feed-filter-form input, .feed-filter-form select { width: 100%; height: 38px; padding: 0 10px; color: var(--ink); background: rgba(3,7,18,.72); border: 1px solid rgba(148,163,184,.2); border-radius: 5px; outline: 0; }
.feed-filter-form input:focus, .feed-filter-form select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(34,211,238,.1); }
.price-filter { grid-column: span 2; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); column-gap: 6px; align-items: end; }
.price-filter > span { grid-column: 1 / -1; }
.price-filter i { height: 38px; display: grid; place-items: center; color: var(--muted); font-style: normal; }
.stock-filter { min-height: 38px; padding: 0 10px; display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); background: rgba(3,7,18,.45); border: 1px solid rgba(148,163,184,.18); border-radius: 5px; cursor: pointer; }
.stock-filter input { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.stock-filter span { margin: 0; white-space: nowrap; }
.filter-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.filter-actions button, .filter-actions a { min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 5px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.filter-actions button { color: #f8fbff; background: linear-gradient(135deg, #0891b2, #2563eb); border: 0; }
.filter-actions button:hover { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.filter-actions a { color: #9befff; background: rgba(34,211,238,.05); border: 1px solid rgba(34,211,238,.35); }
.filter-actions a:hover { color: #fff; background: rgba(34,211,238,.11); border-color: #22d3ee; }

@media (max-width: 980px) {
  .hero-inner { min-height: 0; grid-template-columns: 1fr; gap: 18px; padding: 30px 0; }
  .hero-copy h1 { font-size: 40px; }
  .feed-tools { align-items: flex-start; flex-direction: column; }
  .feed-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .hero-inner { padding: 22px 0; }
  .hero-copy h1 { font-size: 32px; }
  .search-panel { padding: 14px; }
  .search-row { grid-template-columns: 1fr; }
  .search-row button { width: 100%; }
  .section-heading { gap: 12px; }
  .feed-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; padding: 12px; }
  .stock-filter, .filter-actions button, .filter-actions a { min-height: 42px; }
}

@media (max-width: 420px) {
  .feed-filter-form { grid-template-columns: 1fr; }
}

.manage-shell { background: transparent; }
.manage-sidebar {
  color: var(--ink);
  background: linear-gradient(180deg, rgba(9,15,32,.98), rgba(6,9,22,.98));
  border-right: 1px solid rgba(125,211,252,.13);
  box-shadow: 18px 0 60px rgba(0,0,0,.14);
}
.manage-title { display: flex; align-items: center; gap: 12px; }
.console-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 7px; font-family: "Fira Code", monospace; font-weight: 800; }
.manage-title .eyebrow { color: #67e8f9; }
.manage-title h1 { color: #f8fbff; }
.manage-nav a { color: #8190aa; border-left-color: transparent; border-radius: 0 6px 6px 0; }
.manage-nav a.active, .manage-nav a:hover { color: #f8fbff; background: linear-gradient(90deg, rgba(34,211,238,.12), rgba(139,92,246,.035)); border-left-color: #22d3ee; }
.manage-nav a span { color: #bdefff; background: rgba(34,211,238,.09); border: 1px solid rgba(34,211,238,.15); }
.sidebar-footer { margin-top: auto; display: grid; gap: 14px; }
.system-online { display: flex; align-items: center; gap: 8px; color: #7f90aa; font-size: 10px; }
.system-online i { width: 7px; height: 7px; background: #34d399; border-radius: 50%; box-shadow: 0 0 10px rgba(52,211,153,.7); }
.manage-main { background: rgba(3,7,18,.18); }
.manage-header { color: var(--muted); background: rgba(8,13,29,.72); border-color: var(--line); backdrop-filter: blur(16px); }
.status-dot { background: #34d399; box-shadow: 0 0 9px rgba(52,211,153,.6); }
.status-dot.running { background: #fbbf24; box-shadow: 0 0 12px rgba(251,191,36,.65); }
.admin-account { gap: 12px !important; }
.admin-account > span { color: #dbeafe; font-family: "Fira Code", monospace; }
.admin-account a, .admin-account button { color: #8fa1ba; background: none; border: 0; font-size: 11px; }
.admin-account a, .admin-account button { min-height: 44px; display: inline-flex; align-items: center; }
.admin-account a:hover, .admin-account button:hover { color: #67e8f9; }
.admin-account form { margin: 0; }
.metric-strip { padding: 18px 28px; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.metric-strip > div { min-height: 94px; padding: 15px 16px; background: linear-gradient(145deg, rgba(15,23,48,.88), rgba(10,16,33,.82)); border: 1px solid var(--tech-border); border-radius: 7px; box-shadow: inset 0 1px rgba(255,255,255,.025); }
.metric-strip span, .metric-strip strong, .metric-strip small { display: block; }
.metric-strip span { color: #5f718f; font: 600 9px/1.3 "Fira Code", monospace; }
.metric-strip strong { margin-top: 8px; color: #f8fbff; font-size: 25px; }
.metric-strip small { color: #8796af; font-size: 10px; }
.metric-strip .metric-state strong { color: #67e8f9; font-size: 19px; }
.action-band { background: transparent; border-color: var(--line); }
.manual-entry, .main-actions button, .schedule-band, .task-console, .list-section .data-table-wrap {
  background: var(--tech-surface);
  border: 1px solid var(--tech-border);
  box-shadow: 0 14px 38px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.025);
  backdrop-filter: blur(14px);
}
.manual-entry { border-radius: 7px; }
.manual-entry label { color: #dbeafe; }
.main-actions button { border-radius: 7px; }
.main-actions .primary-button { background: linear-gradient(135deg, rgba(8,145,178,.94), rgba(37,99,235,.94)); border-color: rgba(96,165,250,.34); }
.main-actions .secondary-button { background: linear-gradient(145deg, rgba(15,23,48,.9), rgba(13,23,43,.9)); }
.schedule-band { margin: 0 28px 18px; border-radius: 7px; }
.schedule-row { color: #7e8ca4; }
.schedule-row label { color: #dbeafe; }
.schedule-row > input { color: #eaf2ff; background: #070c1a; border-color: rgba(148,163,184,.2); }
.schedule-row label > input { accent-color: #22d3ee; }
.task-console { margin: 0 28px 18px; overflow: hidden; border-radius: 7px; }
.task-console > header { min-height: 58px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(125,211,252,.1); }
.task-console > header > div { display: flex; align-items: center; gap: 10px; }
.task-console strong, .task-console small { display: block; }
.task-console strong { color: #dff8ff; font: 600 12px/1.4 "Fira Code", monospace; }
.task-console small, #console-progress-text { color: #71819a; font: 500 9px/1.4 "Fira Code", monospace; }
.task-console-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.task-console-actions button { min-height: 28px; padding: 0 10px; border: 1px solid rgba(34,211,238,.35); border-radius: 6px; color: #b8f5ff; background: rgba(34,211,238,.06); font-size: 11px; font-weight: 700; cursor: pointer; }
.task-console-actions button:hover:not(:disabled) { color: #fff; border-color: #22d3ee; background: rgba(34,211,238,.12); }
.task-console-actions button:disabled { cursor: not-allowed; opacity: .38; }
.console-pulse { width: 9px; height: 9px; background: #34d399; border-radius: 50%; box-shadow: 0 0 12px rgba(52,211,153,.65); }
.console-progress { height: 2px; background: rgba(148,163,184,.08); }
.console-progress span { width: 0; height: 100%; display: block; background: linear-gradient(90deg, #22d3ee, #60a5fa, #a78bfa); box-shadow: 0 0 12px rgba(34,211,238,.55); transition: width .25s ease; }
.task-log-lines { height: 176px; padding: 10px 14px; overflow-y: auto; color: #9fb0c9; background: rgba(2,6,15,.76); font: 400 10px/1.65 "Fira Code", monospace; scrollbar-color: #24324e transparent; }
.task-log-lines p { margin: 0; padding: 2px 0; }
.task-log-lines time { margin-right: 10px; color: #465773; }
.task-log-lines .log-success { color: #6ee7b7; }
.task-log-lines .log-error { color: #fda4af; }
.task-log-lines .log-warning { color: #fcd34d; }
.task-log-lines .log-empty { color: #53627a; }
.list-section { padding-top: 24px; }
.list-heading h2 { color: #f8fbff; }
.admin-search input { color: #eaf2ff; background: #070c1a; border-color: rgba(148,163,184,.2); }
.admin-search button { background: linear-gradient(135deg, #0891b2, #2563eb); }
.data-table-wrap { border-top-color: rgba(34,211,238,.55); }
.data-table { color: #cbd7e8; }
.data-table th { color: #657795; background: rgba(7,12,26,.94); border-bottom: 1px solid rgba(125,211,252,.1); font-family: "Fira Code", monospace; }
.data-table td { border-color: rgba(148,163,184,.09); }
.data-table tbody tr { background: rgba(11,17,34,.55); transition: background .18s ease; }
.data-table tbody tr:hover { background: rgba(34,211,238,.045); }
.table-shop strong, .table-product strong { color: #e8f0fc; }
.table-shop small { color: #667792; }
.row-actions button, .row-actions a { color: #8be9f6; background: rgba(34,211,238,.035); border-color: rgba(34,211,238,.22); }
.row-actions button:hover { color: #fff; background: rgba(34,211,238,.1); }
.status-badge { color: #91a0b8; background: rgba(148,163,184,.09); }
.status-badge.success { color: #6ee7b7; background: rgba(16,185,129,.1); }
.status-badge.failed { color: #fda4af; background: rgba(244,63,94,.1); }
.status-badge.running { color: #fde68a; background: rgba(245,158,11,.1); }
.status-badge.pending { color: #93c5fd; background: rgba(59,130,246,.1); }
.pagination a { color: #8be9f6; background: rgba(34,211,238,.05); border-color: rgba(34,211,238,.22); }

.auth-page { display: grid; place-items: center; overflow-x: hidden; }
.auth-page::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(34,211,238,.055), transparent 34%, rgba(139,92,246,.055)); }
.auth-shell { position: relative; z-index: 1; width: min(980px, calc(100% - 32px)); min-height: 560px; display: grid; grid-template-columns: 1.08fr .92fr; overflow: hidden; background: rgba(7,12,26,.74); border: 1px solid rgba(125,211,252,.14); border-radius: 8px; box-shadow: 0 30px 90px rgba(0,0,0,.48); backdrop-filter: blur(18px); }
.auth-brand { padding: 60px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(145deg, rgba(14,116,144,.13), rgba(30,41,82,.06) 56%, rgba(109,40,217,.12)); border-right: 1px solid rgba(125,211,252,.1); }
.auth-kicker { color: #67e8f9; font: 600 10px/1.5 "Fira Code", monospace; }
.auth-brand h1 { max-width: 480px; margin: 14px 0; font-size: 42px; line-height: 1.15; }
.auth-brand p { max-width: 440px; color: #91a0b8; }
.auth-signal { margin-top: 54px; padding-top: 18px; display: grid; grid-template-columns: 9px 1fr; column-gap: 10px; border-top: 1px solid rgba(125,211,252,.12); }
.auth-signal > span { width: 8px; height: 8px; margin-top: 4px; background: #34d399; border-radius: 50%; box-shadow: 0 0 12px rgba(52,211,153,.7); }
.auth-signal strong, .auth-signal small { display: block; font-family: "Fira Code", monospace; }
.auth-signal strong { color: #dbeafe; font-size: 10px; }
.auth-signal small { grid-column: 2; color: #52627b; font-size: 8px; }
.auth-panel { padding: 48px; display: flex; flex-direction: column; justify-content: center; background: rgba(8,13,29,.72); }
.auth-panel-head { margin-bottom: 28px; display: flex; align-items: center; gap: 12px; }
.auth-panel-head small { color: #60718d; font: 600 8px/1.4 "Fira Code", monospace; }
.auth-panel-head h2 { margin: 3px 0 0; font-size: 22px; }
.auth-form { display: grid; gap: 9px; }
.auth-form label { margin-top: 7px; color: #9fb0c9; font-size: 11px; }
.auth-form input { width: 100%; height: 46px; padding: 0 13px; color: #f4f8ff; background: #060b19; border: 1px solid rgba(148,163,184,.22); border-radius: 6px; }
.auth-form input:focus { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34,211,238,.1); outline: none; }
.auth-submit { min-height: 48px; margin-top: 16px; color: #fff; background: linear-gradient(135deg, #0891b2, #2563eb 58%, #6d28d9); border: 0; border-radius: 6px; font-weight: 700; box-shadow: 0 12px 28px rgba(37,99,235,.2); }
.auth-submit:hover { filter: brightness(1.12); }
.auth-note, .auth-back { margin: 18px 0 0; color: #5e6e87; font-size: 9px; }
.auth-back { color: #67e8f9; }
.form-message { padding: 10px 12px; border: 1px solid; border-radius: 5px; font-size: 11px; }
.form-message.error { color: #fecdd3; background: rgba(244,63,94,.08); border-color: rgba(244,63,94,.24); }
.form-message.success { color: #a7f3d0; background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.24); }
.form-message a { text-decoration: underline; }

.submit-head { padding: 44px 20px 34px; color: #fff; background: linear-gradient(135deg, rgba(10,18,40,.98), rgba(8,12,29,.98) 56%, rgba(25,12,48,.94)); border-bottom: 1px solid rgba(125,211,252,.12); }
.submit-head > div { width: min(1180px, 100%); margin: 0 auto; }
.submit-head .eyebrow { color: #67e8f9; }
.submit-head h1 { margin: 0; font-size: 40px; line-height: 1.12; }
.submit-head p:not(.eyebrow) { max-width: 560px; margin: 12px 0 0; color: #9cabc2; font-size: 14px; }
.submit-section { padding-top: 30px; padding-bottom: 72px; }
.submit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.submit-search, .submit-card { min-width: 0; padding: 18px; background: var(--tech-surface); border: 1px solid var(--tech-border); border-radius: 7px; box-shadow: 0 14px 38px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.025); backdrop-filter: blur(14px); }
.submit-sidebar { position: sticky; top: 94px; display: grid; gap: 18px; }
.submit-panel-head { margin-bottom: 14px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.submit-panel-head h2 { margin: 0; color: #f8fbff; font-size: 22px; }
.submit-panel-head span { color: #7e8ca4; font: 600 11px/1.4 "Fira Code", monospace; white-space: nowrap; }
.submit-search-form { margin-bottom: 18px; }
.submit-search-form label, .submit-card label { display: block; margin-bottom: 7px; color: #9fb0c9; font-size: 11px; font-weight: 700; }
.submit-search-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.submit-search-form input, .submit-card textarea, .submit-card input, .submit-card select { width: 100%; color: #eaf2ff; background: rgba(3,7,18,.72); border: 1px solid rgba(148,163,184,.2); border-radius: 6px; outline: 0; }
.submit-search-form input { height: 44px; padding: 0 13px; }
.submit-card input, .submit-card select { height: 44px; padding: 0 12px; }
.submit-card textarea { resize: vertical; padding: 11px 12px; }
.submit-search-form input:focus, .submit-card textarea:focus, .submit-card input:focus, .submit-card select:focus { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34,211,238,.1); }
.submit-search-form button, .submit-card button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 6px; color: #f8fbff; background: linear-gradient(135deg, #0891b2, #2563eb); font-weight: 800; white-space: nowrap; box-shadow: 0 8px 24px rgba(37,99,235,.2); }
.submit-search-form button:hover, .submit-card button:hover { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.submit-results { display: grid; gap: 20px; }
.submit-results h3 { margin: 0 0 10px; color: #dff8ff; font-size: 15px; }
.submit-results h3 span { color: #67e8f9; font-size: 12px; }
.submit-result-list { display: grid; gap: 8px; }
.submit-shop-row { min-height: 58px; padding: 9px 10px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px; gap: 10px; align-items: center; background: rgba(8,13,29,.58); border: 1px solid rgba(125,211,252,.1); border-radius: 6px; }
.submit-shop-row:hover, .submit-product-card:hover { background: rgba(34,211,238,.07); border-color: rgba(34,211,238,.32); }
.submit-shop-row strong, .submit-shop-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.submit-shop-row strong { color: #eef7ff; font-size: 13px; }
.submit-shop-row small { color: #71819a; font-size: 10px; }
.submit-shop-row i { color: #67e8f9; font-style: normal; }
.submit-product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.submit-product-card { min-width: 0; overflow: hidden; padding-bottom: 10px; background: rgba(8,13,29,.58); border: 1px solid rgba(125,211,252,.1); border-radius: 6px; }
.submit-product-card img, .submit-product-card > span { width: 100%; aspect-ratio: 4 / 3; display: grid; place-items: center; object-fit: cover; color: #7dd3fc; background: #0e172d; font-weight: 800; }
.submit-product-card strong, .submit-product-card small { display: block; margin: 8px 10px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.submit-product-card strong { color: #eef7ff; font-size: 12px; }
.submit-product-card small { color: #71819a; font-size: 10px; }
.submit-empty, .submit-guide { margin: 0; padding: 18px; color: #71819a; background: rgba(3,7,18,.42); border: 1px dashed rgba(125,211,252,.16); border-radius: 6px; font-size: 12px; }
.submit-guide strong { display: block; color: #dff8ff; font-size: 15px; }
.submit-guide p { margin: 6px 0 0; }
.submit-card form { display: grid; gap: 10px; }
.submit-card .form-message { margin-bottom: 12px; }
.submit-note { margin: 14px 0 0; color: #71819a; font-size: 11px; }

@media (max-width: 980px) {
  .submit-layout { grid-template-columns: 1fr; }
  .submit-sidebar { position: static; }
  .submit-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .submit-head { padding: 34px 12px 26px; }
  .submit-head h1 { font-size: 32px; }
  .submit-section { padding-top: 20px; }
  .submit-search, .submit-card { padding: 14px; }
  .submit-search-form > div { grid-template-columns: 1fr; }
  .submit-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

@media (max-width: 900px) {
  .manage-sidebar { background: rgba(7,12,26,.94); }
  .sidebar-footer { display: none; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .auth-shell { min-height: 0; grid-template-columns: 1fr; }
  .auth-brand { padding: 38px; border-right: 0; border-bottom: 1px solid rgba(125,211,252,.1); }
  .auth-brand h1 { font-size: 31px; }
  .auth-signal { margin-top: 24px; }
}
@media (max-width: 620px) {
  .manage-header { min-height: 54px; }
  .admin-account > span, .admin-account a { display: none; }
  .metric-strip { padding: 12px 14px; gap: 8px; }
  .metric-strip > div { min-height: 82px; padding: 12px; }
  .metric-strip strong { font-size: 21px; }
  .schedule-band, .task-console { margin-left: 14px; margin-right: 14px; }
  .task-console > header { align-items: flex-start; gap: 10px; flex-direction: column; }
  .task-console-actions { justify-content: flex-start; flex-wrap: wrap; }
  .task-log-lines { height: 150px; }
  .row-actions button, .row-actions a, .schedule-band > button { min-height: 44px; }
  .auth-shell { width: min(100% - 20px, 520px); }
  .auth-brand { padding: 28px 24px; }
  .auth-brand h1 { font-size: 26px; }
  .auth-brand p { font-size: 12px; }
  .auth-signal { display: none; }
  .auth-panel { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Telegram directory and management */
.telegram-head { background: linear-gradient(135deg, rgba(10,18,40,.98), rgba(8,12,29,.98) 56%, rgba(10,38,58,.92)); border-bottom: 1px solid rgba(125,211,252,.12); }
.telegram-head-inner { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0 38px; display: grid; grid-template-columns: minmax(0, .8fr) minmax(360px, 1.2fr); align-items: end; gap: 44px; }
.telegram-head h1, .telegram-form-head h1 { margin: 5px 0 8px; color: #f8fbff; font-size: 34px; }
.telegram-head p:not(.eyebrow), .telegram-form-head p:not(.eyebrow) { margin: 0; color: #91a0b8; }
.telegram-search { padding: 18px; background: rgba(12,19,39,.86); border: 1px solid rgba(125,211,252,.14); border-radius: 7px; }
.telegram-search > label { display: block; margin-bottom: 7px; color: #91a0b8; font-size: 11px; }
.telegram-search > div:first-of-type { display: grid; grid-template-columns: 1fr auto; }
.telegram-search input, .telegram-admin-form input, .telegram-admin-form select { min-width: 0; height: 44px; padding: 0 13px; color: #edf4ff; background: rgba(3,7,18,.72); border: 1px solid rgba(148,163,184,.2); font: inherit; }
.telegram-search button, .telegram-admin-form button { min-height: 44px; padding: 0 18px; color: #fff; background: linear-gradient(135deg, #0891b2, #2563eb); border: 0; cursor: pointer; font-weight: 700; }
.telegram-type-filter { margin-top: 12px; display: flex; gap: 7px; }
.telegram-type-filter a { min-height: 34px; padding: 7px 13px; display: inline-flex; align-items: center; color: #91a0b8; border: 1px solid rgba(148,163,184,.18); border-radius: 5px; font-size: 12px; }
.telegram-type-filter a:hover, .telegram-type-filter a.active { color: #eafaff; background: rgba(34,211,238,.1); border-color: rgba(34,211,238,.42); }
.telegram-directory { min-height: 460px; }
.telegram-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.telegram-card { min-width: 0; padding: 18px; background: rgba(12,19,39,.86); border: 1px solid rgba(125,211,252,.14); border-top: 3px solid #22d3ee; border-radius: 7px; box-shadow: var(--shadow); }
.telegram-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.telegram-avatar, .table-telegram > span { display: grid; place-items: center; overflow: hidden; color: #eafaff; background: linear-gradient(135deg, #0e7490, #4f46e5); border-radius: 7px; font-family: "Fira Code", monospace; font-weight: 700; }
.telegram-avatar { width: 58px; height: 58px; }
.telegram-avatar img, .table-telegram img { width: 100%; height: 100%; object-fit: cover; }
.telegram-type { padding: 5px 8px; display: inline-flex; color: #9befff; background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.22); border-radius: 4px; font-size: 10px; }
.telegram-type.channel { color: #c4b5fd; background: rgba(167,139,250,.08); border-color: rgba(167,139,250,.24); }
.telegram-card h2 { min-height: 48px; margin: 17px 0 10px; overflow-wrap: anywhere; color: #f8fbff; font-size: 16px; line-height: 1.45; }
.telegram-members { display: flex; align-items: baseline; gap: 6px; color: #8190aa; }
.telegram-members strong { color: #67e8f9; font: 700 21px/1 "Fira Code", monospace; }
.telegram-members span { font-size: 11px; }
.telegram-join { min-height: 42px; margin-top: 17px; display: flex; align-items: center; justify-content: center; color: #eafaff; background: rgba(34,211,238,.07); border: 1px solid rgba(34,211,238,.28); border-radius: 5px; font-size: 12px; font-weight: 700; }
.telegram-join:hover { background: rgba(34,211,238,.13); border-color: #22d3ee; }
.telegram-admin-tools { display: flex; align-items: end; gap: 10px; }
.telegram-add-button { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 5px; font-size: 12px; }
.telegram-import { margin: 0 0 18px; padding: 14px; background: rgba(12,19,39,.72); border: 1px solid rgba(125,211,252,.14); border-radius: 6px; }
.telegram-import summary { color: #dff8ff; cursor: pointer; font-size: 12px; font-weight: 700; }
.telegram-import .form-message { margin: 12px 0 0; }
.telegram-import form { margin-top: 14px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 10px; align-items: end; }
.telegram-json-example { grid-column: 1 / -1; display: grid; gap: 6px; }
.telegram-json-example strong { color: #91a0b8; font-size: 11px; }
.telegram-json-example code { padding: 10px 12px; overflow-x: auto; color: #9befff; background: rgba(3,7,18,.72); border: 1px solid rgba(34,211,238,.22); border-radius: 5px; font-size: 11px; white-space: nowrap; }
.telegram-import label { grid-column: 1 / -1; color: #91a0b8; font-size: 11px; }
.telegram-import textarea { grid-column: 1 / -1; width: 100%; padding: 11px 12px; resize: vertical; color: #eaf2ff; background: rgba(3,7,18,.72); border: 1px solid rgba(148,163,184,.2); border-radius: 5px; }
.telegram-import span { color: #71819a; font-size: 11px; }
.telegram-import input[type="file"] { min-width: 0; color: #91a0b8; font-size: 11px; }
.telegram-import button { min-height: 40px; padding: 0 18px; border: 0; }
.table-telegram { min-width: 220px; display: flex; align-items: center; gap: 10px; }
.table-telegram > span { flex: 0 0 auto; width: 38px; height: 38px; }
.row-actions form { margin: 0; }
.row-actions .danger-button { color: #fecdd3; border-color: rgba(251,113,133,.36); }
.row-actions .danger-button:hover { color: #fff; background: rgba(251,113,133,.12); }
.telegram-form-shell { width: min(720px, calc(100% - 40px)); margin: 40px auto 70px; }
.telegram-form-head { margin-bottom: 20px; }
.telegram-admin-form { padding: 24px; display: grid; grid-template-columns: 150px minmax(0,1fr); align-items: center; gap: 13px 18px; background: rgba(12,19,39,.88); border: 1px solid rgba(125,211,252,.14); border-radius: 7px; box-shadow: var(--shadow); }
.telegram-admin-form label { color: #91a0b8; font-size: 12px; }
.telegram-admin-form .form-message { grid-column: 1 / -1; }
.telegram-form-actions { grid-column: 2; display: flex; justify-content: flex-end; gap: 9px; }
.telegram-form-actions a { min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; color: #91a0b8; border: 1px solid rgba(148,163,184,.2); border-radius: 5px; }

@media (max-width: 980px) {
  .telegram-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .telegram-head-inner { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 620px) {
  .site-header .header-inner { flex-wrap: wrap; }
  .main-nav { width: 100%; overflow-x: auto; }
  .telegram-head-inner { width: min(100% - 28px, 1180px); padding: 34px 0 28px; }
  .telegram-head h1, .telegram-form-head h1 { font-size: 27px; }
  .telegram-grid { grid-template-columns: 1fr; }
  .telegram-admin-tools { align-items: stretch; flex-direction: column; }
  .telegram-import form { grid-template-columns: 1fr; }
  .telegram-import label, .telegram-import textarea { grid-column: 1; }
  .telegram-admin-form { padding: 18px; grid-template-columns: 1fr; }
  .telegram-form-actions { grid-column: 1; }
  .telegram-form-shell { width: min(100% - 28px, 720px); margin-top: 28px; }
}
