@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; }
.product-schedule-row { flex: 1 1 100%; align-items: flex-start; }
.product-schedule-row > span { width: 175px; padding-top: 10px; color: var(--ink); font-weight: 700; }
.product-schedule-list { min-width: 0; display: grid; gap: 7px; }
.product-schedule-period { display: flex; align-items: center; gap: 7px; }
.product-schedule-period input { width: 100px; height: 34px; padding: 0 8px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.product-schedule-period input[type=number] { width: 84px; }
.product-schedule-period button, #add-product-schedule { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 4px; color: var(--green); background: #fff; font-size: 18px; line-height: 1; }
#add-product-schedule { flex: 0 0 auto; }
.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%; }
  .product-schedule-row > span { width: 100%; padding-top: 0; }
  .product-schedule-list { width: 100%; }
  .product-schedule-period { flex-wrap: wrap; }
  .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); }
.product-schedule-period input { color: #eaf2ff; background: #070c1a; border-color: rgba(148,163,184,.2); }
.product-schedule-period button, #add-product-schedule { color: #8be9f6; background: rgba(34,211,238,.035); border-color: rgba(34,211,238,.22); }
.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; }
.proxy-monitor { margin: 0 28px 18px; overflow: hidden; border: 1px solid rgba(125,211,252,.12); border-radius: 7px; background: rgba(7,12,26,.76); }
.proxy-monitor > header { min-height: 52px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(125,211,252,.1); }
.proxy-monitor > header strong, .proxy-monitor > header small { display: block; }
.proxy-monitor > header strong { color: #dff8ff; font-size: 12px; }
.proxy-monitor > header small { margin-top: 3px; color: #71819a; font-size: 9px; }
#relay-proxy-count { color: #67e8f9; font: 700 20px/1 "Fira Code", monospace; }
.proxy-list { padding: 10px 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.proxy-list > div { min-width: 0; padding: 8px 10px; background: rgba(3,7,18,.58); border: 1px solid rgba(148,163,184,.1); border-radius: 5px; }
.proxy-list strong, .proxy-list small { display: block; overflow-wrap: anywhere; }
.proxy-list strong { color: #c7f5ff; font: 600 10px/1.4 "Fira Code", monospace; }
.proxy-list small, .proxy-list p { margin: 2px 0 0; color: #71819a; font-size: 9px; }
.product-updated { display: block; margin-top: 7px; color: #71819a; font-size: 10px; }
.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, .proxy-monitor { margin-left: 14px; margin-right: 14px; }
  .proxy-list { grid-template-columns: 1fr; }
  .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; }
}

/* Site-wide announcement and its admin settings */
.site-announcement { display: block; color: #bbf7d0; background: #102a23; border-bottom: 1px solid rgba(74, 222, 128, .18); }
.announcement-inner { width: min(1180px, calc(100% - 40px)); min-height: 42px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; text-align: center; }
.announcement-inner strong { flex: 0 0 auto; padding: 4px 9px; color: #86efac; background: rgba(34, 197, 94, .08); border: 1px solid rgba(74, 222, 128, .3); border-radius: 5px; font-size: 10px; }
.announcement-inner span { color: #a7f3d0; }
.announcement-inner i { flex: 0 0 auto; color: #6ee7b7; font-style: normal; transition: transform .2s ease; }
.site-announcement:hover { background: #133128; }
.site-announcement:hover .announcement-inner i { transform: translateX(3px); }
.popular-shops, .submit-sidebar { top: 136px; }
.category-strip { top: 114px; }
.manage-sidebar { top: 114px; height: calc(100vh - 114px); }
.manage-shell { min-height: calc(100vh - 114px); }
.ad-settings-row { flex: 1 1 100%; }
.ad-settings-row label { min-width: 150px; }
.schedule-row.ad-settings-row > input { min-width: 220px; height: 36px; padding: 0 10px; }
#ad-banner-text { flex: 1 1 360px; }
#ad-banner-url { flex: 1 1 280px; }

@media (max-width: 720px) {
  .announcement-inner { width: min(100% - 24px, 1180px); min-height: 46px; gap: 7px; font-size: 11px; line-height: 1.4; }
  .announcement-inner strong { padding: 3px 7px; }
}

@media (max-width: 620px) {
  .announcement-inner { padding: 7px 0; text-align: left; }
  .category-strip { position: static; }
  .ad-settings-row { align-items: stretch; }
  .schedule-row.ad-settings-row > input { width: 100%; min-width: 0; }
}

/* Homepage interaction controls */
.feed-heading-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.product-view-switch { flex: 0 0 auto; display: inline-flex; padding: 3px; gap: 2px; background: rgba(3,7,18,.64); border: 1px solid rgba(125,211,252,.14); border-radius: 6px; }
.product-view-switch button { min-height: 34px; padding: 0 13px; color: #8190aa; background: transparent; border: 0; border-radius: 4px; font-size: 11px; font-weight: 700; cursor: pointer; }
.product-view-switch button:hover { color: #eafaff; }
.product-view-switch button[aria-pressed="true"] { color: #031016; background: #67e8f9; }
#product-results { position: relative; scroll-margin-top: 126px; transition: opacity .2s ease; }
#product-results.is-loading { min-height: 280px; opacity: .48; pointer-events: none; }
#product-results.is-loading::after { content: ""; position: absolute; top: 176px; left: 50%; width: 22px; height: 22px; border: 2px solid rgba(103,232,249,.25); border-top-color: #67e8f9; border-radius: 50%; animation: results-spin .7s linear infinite; }
@keyframes results-spin { to { transform: rotate(360deg); } }
html[data-product-view="list"] #product-results .product-grid { grid-template-columns: 1fr; gap: 10px; }
html[data-product-view="list"] #product-results .product-card { display: grid; grid-template-columns: 178px minmax(0, 1fr); }
html[data-product-view="list"] #product-results .product-image { height: 100%; min-height: 136px; aspect-ratio: auto; }
html[data-product-view="list"] #product-results .product-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "meta footer" "updated footer" "title footer"; align-items: center; column-gap: 18px; }
html[data-product-view="list"] #product-results .product-meta { grid-area: meta; }
html[data-product-view="list"] #product-results .product-updated { grid-area: updated; margin-top: 3px; }
html[data-product-view="list"] #product-results .product-body h3 { grid-area: title; min-height: 0; margin: 5px 0 0; }
html[data-product-view="list"] #product-results .product-footer { grid-area: footer; height: 100%; flex-direction: column; align-items: flex-end; justify-content: center; }
.theme-toggle { min-height: 38px; padding: 0 8px 0 7px; display: inline-flex; align-items: center; gap: 7px; color: #91a0b8; background: rgba(34,211,238,.05); border: 1px solid rgba(34,211,238,.22); border-radius: 18px; font-size: 11px; font-weight: 700; cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.theme-toggle:hover { color: #eafaff; border-color: #22d3ee; background: rgba(34,211,238,.11); }
.theme-toggle-track { width: 31px; height: 18px; position: relative; display: block; border-radius: 999px; background: #0e7490; }
.theme-toggle-track i { position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; display: block; border-radius: 50%; background: #e0f2fe; transition: transform .2s ease; }
.header-actions { min-width: 0; display: flex; align-items: center; gap: 8px; }
html[data-theme="light"] .theme-toggle-track { background: #d2dbe4; }
html[data-theme="light"] .theme-toggle-track i { transform: translateX(13px); background: #0f766e; }

/* Light theme: a cool, high-contrast counterpart to the existing dark palette */
html[data-theme="light"] {
  color-scheme: light;
  --ink: #172538;
  --muted: #5f6f82;
  --paper: #f3f6f8;
  --panel: #ffffff;
  --line: #d9e2e9;
  --green: #087f73;
  --green-dark: #06645c;
  --yellow: #7555c7;
  --coral: #c64f68;
  --blue: #286eb8;
  --tech-cyan: #087f9b;
  --tech-blue: #2563eb;
  --tech-violet: #7555c7;
  --tech-surface: rgba(255,255,255,.94);
  --tech-surface-strong: #ffffff;
  --tech-border: #d9e2e9;
  --tech-glow: 0 8px 24px rgba(26,67,91,.08);
}
html[data-theme="light"] body { color: var(--ink); background-color: var(--paper); background-image: linear-gradient(rgba(38,110,184,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(38,110,184,.035) 1px, transparent 1px), linear-gradient(145deg, #f8fbfc 0%, #eef4f7 100%); }
html[data-theme="light"] .site-header { border-bottom-color: var(--line); background: rgba(255,255,255,.93); box-shadow: 0 8px 24px rgba(26,67,91,.08); }
html[data-theme="light"] .main-nav a { color: #5f6f82; }
html[data-theme="light"] .main-nav a:hover, html[data-theme="light"] .main-nav a.active { color: #087f73; border-bottom-color: #087f73; }
html[data-theme="light"] .theme-toggle { color: #415369; background: #f0f5f7; border-color: #c5d2dc; }
html[data-theme="light"] .theme-toggle:hover { color: #06645c; background: #e4f1ef; border-color: #087f73; }
html[data-theme="light"] .site-announcement { color: #17634d; background: #e5f4ed; border-bottom-color: #b8ddca; }
html[data-theme="light"] .announcement-inner strong { color: #17634d; background: #f3fbf7; border-color: #8ac5a9; }
html[data-theme="light"] .announcement-inner span { color: #27684f; }
html[data-theme="light"] .announcement-inner i { color: #087f73; }
html[data-theme="light"] .site-announcement:hover { background: #d7eee3; }
html[data-theme="light"] .hero-band, html[data-theme="light"] .shop-hero, html[data-theme="light"] .directory-head, html[data-theme="light"] .submit-head, html[data-theme="light"] .telegram-head { color: #172538; background: linear-gradient(135deg, #e9f5f5, #eef1fb 58%, #f4effa); border-bottom-color: #d5e1e8; }
html[data-theme="light"] .hero-copy .eyebrow, html[data-theme="light"] .shop-profile .eyebrow, html[data-theme="light"] .directory-head .eyebrow, html[data-theme="light"] .submit-head .eyebrow, html[data-theme="light"] .telegram-head .eyebrow { color: #087f73; }
html[data-theme="light"] .hero-copy h1 span { color: #7555c7; }
html[data-theme="light"] .hero-copy > p:last-child, html[data-theme="light"] .shop-profile p:last-child, html[data-theme="light"] .directory-head p:not(.eyebrow), html[data-theme="light"] .submit-head p:not(.eyebrow), html[data-theme="light"] .telegram-head p:not(.eyebrow) { color: #52657a; }
html[data-theme="light"] .search-panel, html[data-theme="light"] .stats-band, html[data-theme="light"] .shop-list, html[data-theme="light"] .popular-shop-list, html[data-theme="light"] .product-card, html[data-theme="light"] .directory-card, html[data-theme="light"] .empty-state, html[data-theme="light"] .telegram-card { color: var(--ink); background: rgba(255,255,255,.95); border-color: var(--line); box-shadow: 0 12px 30px rgba(26,67,91,.08); }
html[data-theme="light"] .search-row input, html[data-theme="light"] textarea, html[data-theme="light"] .tool-panel input, html[data-theme="light"] .directory-head input, html[data-theme="light"] .feed-filter-form input, html[data-theme="light"] .feed-filter-form select, html[data-theme="light"] .admin-search input, html[data-theme="light"] .submit-search-form input, html[data-theme="light"] .submit-card textarea, html[data-theme="light"] .submit-card input, html[data-theme="light"] .submit-card select, html[data-theme="light"] .telegram-search input, html[data-theme="light"] .telegram-admin-form input, html[data-theme="light"] .telegram-admin-form select { color: var(--ink); background: #f9fbfc; border-color: #cbd8e1; }
html[data-theme="light"] input::placeholder, html[data-theme="light"] textarea::placeholder { color: #8090a1; }
html[data-theme="light"] .stats-band { background: rgba(255,255,255,.9); }
html[data-theme="light"] .stats-inner > div { border-color: var(--line); }
html[data-theme="light"] .popular-shops { border-top-color: #203247; }
html[data-theme="light"] .popular-shops-heading, html[data-theme="light"] .popular-shop-row { border-color: var(--line); }
html[data-theme="light"] .popular-shops-heading a, html[data-theme="light"] .product-meta a, html[data-theme="light"] .product-footer > a, html[data-theme="light"] .empty-state a, html[data-theme="light"] .section-link, html[data-theme="light"] .table-link, html[data-theme="light"] .directory-enter { color: #087f73; }
html[data-theme="light"] .popular-shop-row:hover, html[data-theme="light"] .shop-row:hover, html[data-theme="light"] .data-table tbody tr:hover { background: #eef8f5; }
html[data-theme="light"] .product-image { color: #087f73; background: #e6f0f1; }
html[data-theme="light"] .product-footer strong, html[data-theme="light"] .price-cell { color: #c64f68; }
html[data-theme="light"] .site-footer { color: #d5e4df; background: #18342c; border-top-color: #2e5b4b; }
html[data-theme="light"] .category-strip { background: rgba(243,246,248,.95); }
html[data-theme="light"] .category-strip a { color: #5f6f82; background: #fff; border-color: var(--line); }
html[data-theme="light"] .category-strip a.active { color: #fff; background: #087f73; border-color: #087f73; }
html[data-theme="light"] .feed-filter-form { background: #f7fafb; border-color: var(--line); }
html[data-theme="light"] .stock-filter { color: #5f6f82; background: #f1f6f8; border-color: #cbd8e1; }
html[data-theme="light"] .product-view-switch { background: #edf3f5; border-color: #cbd8e1; }
html[data-theme="light"] .product-view-switch button { color: #5f6f82; }
html[data-theme="light"] .product-view-switch button:hover { color: #087f73; }
html[data-theme="light"] .product-view-switch button[aria-pressed="true"] { color: #fff; background: #087f73; }
html[data-theme="light"] .filter-actions a { color: #087f73; background: #eef8f5; border-color: #9bcfc2; }
html[data-theme="light"] .filter-actions a:hover { color: #06645c; background: #e0f2ed; border-color: #087f73; }
html[data-theme="light"] .manage-sidebar { color: var(--ink); background: linear-gradient(180deg, #ffffff, #eef4f7); border-right-color: var(--line); box-shadow: 12px 0 30px rgba(26,67,91,.08); }
html[data-theme="light"] .manage-title h1, html[data-theme="light"] .list-heading h2 { color: var(--ink); }
html[data-theme="light"] .manage-title .eyebrow { color: #087f73; }
html[data-theme="light"] .manage-nav a { color: #5f6f82; }
html[data-theme="light"] .manage-nav a.active, html[data-theme="light"] .manage-nav a:hover { color: #17334a; background: #e4f1ef; border-left-color: #087f73; }
html[data-theme="light"] .manage-nav a span { color: #087f73; background: #e4f1ef; border-color: #b8d9d0; }
html[data-theme="light"] .manage-header { color: #5f6f82; background: rgba(255,255,255,.9); border-color: var(--line); }
html[data-theme="light"] .admin-account > span { color: #17334a; }
html[data-theme="light"] .admin-account a, html[data-theme="light"] .admin-account button { color: #5f6f82; }
html[data-theme="light"] .metric-strip > div, html[data-theme="light"] .manual-entry, html[data-theme="light"] .main-actions button, html[data-theme="light"] .schedule-band, html[data-theme="light"] .task-console, html[data-theme="light"] .list-section .data-table-wrap, html[data-theme="light"] .submit-search, html[data-theme="light"] .submit-card, html[data-theme="light"] .telegram-import, html[data-theme="light"] .telegram-admin-form { color: var(--ink); background: #ffffff; border-color: var(--line); box-shadow: 0 10px 28px rgba(26,67,91,.07); }
html[data-theme="light"] .metric-strip span, html[data-theme="light"] .schedule-row, html[data-theme="light"] .schedule-row small, html[data-theme="light"] .feed-title small, html[data-theme="light"] .submit-panel-head span, html[data-theme="light"] .submit-search-form label, html[data-theme="light"] .submit-card label, html[data-theme="light"] .telegram-search > label, html[data-theme="light"] .telegram-admin-form label { color: #66778a; }
html[data-theme="light"] .product-schedule-period input { color: #17334a; background: #fff; border-color: var(--line); }
html[data-theme="light"] .product-schedule-period button, html[data-theme="light"] #add-product-schedule { color: #087f73; background: #f5fbfa; border-color: #a6d2c8; }
html[data-theme="light"] .metric-strip strong, html[data-theme="light"] .manual-entry label, html[data-theme="light"] .schedule-row label, html[data-theme="light"] .task-console strong, html[data-theme="light"] .proxy-monitor > header strong, html[data-theme="light"] .table-shop strong, html[data-theme="light"] .table-product strong, html[data-theme="light"] .submit-panel-head h2, html[data-theme="light"] .submit-results h3, html[data-theme="light"] .telegram-card h2, html[data-theme="light"] .telegram-head h1, html[data-theme="light"] .telegram-form-head h1 { color: #17334a; }
html[data-theme="light"] .task-log-lines { color: #51677b; background: #f4f8fa; }
html[data-theme="light"] .proxy-monitor { color: var(--ink); background: #f8fbfc; border-color: var(--line); }
html[data-theme="light"] .proxy-monitor > header, html[data-theme="light"] .task-console > header { border-color: var(--line); }
html[data-theme="light"] .proxy-list > div, html[data-theme="light"] .submit-shop-row, html[data-theme="light"] .submit-product-card { background: #f5f9fa; border-color: var(--line); }
html[data-theme="light"] .proxy-list strong, html[data-theme="light"] .submit-shop-row strong, html[data-theme="light"] .submit-product-card strong { color: #17334a; }
html[data-theme="light"] .proxy-list small, html[data-theme="light"] .submit-shop-row small, html[data-theme="light"] .submit-product-card small, html[data-theme="light"] .submit-note { color: #66778a; }
html[data-theme="light"] .data-table-wrap { background: #fff; border-top-color: #087f73; }
html[data-theme="light"] .data-table { color: #34495e; }
html[data-theme="light"] .data-table th { color: #66778a; background: #f1f6f8; border-color: var(--line); }
html[data-theme="light"] .data-table td { border-color: var(--line); }
html[data-theme="light"] .row-actions button, html[data-theme="light"] .row-actions a { color: #087f73; background: #f5fbfa; border-color: #a6d2c8; }
html[data-theme="light"] .pagination a { color: #087f73; background: #fff; border-color: #a6d2c8; }
html[data-theme="light"] .auth-shell { background: rgba(255,255,255,.9); border-color: var(--line); box-shadow: 0 24px 70px rgba(26,67,91,.18); }
html[data-theme="light"] .auth-brand { background: linear-gradient(145deg, #e4f1ef, #eef1fb 56%, #f5effb); border-color: var(--line); }
html[data-theme="light"] .auth-brand p, html[data-theme="light"] .auth-note { color: #52657a; }
html[data-theme="light"] .auth-panel { background: #fff; }
html[data-theme="light"] .auth-panel-head small, html[data-theme="light"] .auth-form label { color: #66778a; }
html[data-theme="light"] .auth-form input { color: var(--ink); background: #f9fbfc; border-color: #cbd8e1; }
html[data-theme="light"] .auth-back { color: #087f73; }
html[data-theme="light"] .telegram-search, html[data-theme="light"] .telegram-card { background: #fff; }
html[data-theme="light"] .telegram-type-filter a { color: #5f6f82; border-color: #cbd8e1; }
html[data-theme="light"] .telegram-type-filter a:hover, html[data-theme="light"] .telegram-type-filter a.active { color: #087f73; background: #e4f1ef; border-color: #9bcfc2; }
html[data-theme="light"] .telegram-join { color: #087f73; background: #eef8f5; border-color: #a6d2c8; }
html[data-theme="light"] .telegram-import summary, html[data-theme="light"] .telegram-json-example strong { color: #17334a; }
html[data-theme="light"] .telegram-json-example code { color: #087f73; background: #f3f8f9; border-color: #b8d9d0; }
html[data-theme="light"] .telegram-import textarea { color: var(--ink); background: #f9fbfc; border-color: #cbd8e1; }
html[data-theme="light"] .telegram-type { color: #087f73; background: #eef8f5; border-color: #a6d2c8; }
html[data-theme="light"] .telegram-type.channel { color: #7555c7; background: #f1edfb; border-color: #cbbdea; }
html[data-theme="light"] .disclaimer-dialog { background: #fff; border-color: #cbd8e1; box-shadow: 0 28px 80px rgba(26,67,91,.24); }
html[data-theme="light"] .disclaimer-head { border-color: var(--line); }
html[data-theme="light"] .disclaimer-head h2 { color: #17334a; }
html[data-theme="light"] .disclaimer-content { color: #52657a; }
html[data-theme="light"] .disclaimer-content strong { color: #17334a; }
html[data-theme="light"] .disclaimer-skip { color: #52657a; }
html[data-theme="light"] .disclaimer-actions { border-color: var(--line); }
html[data-theme="light"] .disclaimer-cancel { color: #52657a; background: #f1f6f8; border-color: #cbd8e1; }
html[data-theme="light"] .disclaimer-cancel:hover { color: #17334a; border-color: #9bcfc2; }

@media (max-width: 720px) {
  .feed-heading-line { align-items: stretch; flex-direction: column; gap: 10px; }
  .product-view-switch { align-self: flex-start; }
  html[data-product-view="list"] #product-results .product-card { grid-template-columns: 112px minmax(0, 1fr); }
  html[data-product-view="list"] #product-results .product-image { min-height: 118px; }
  html[data-product-view="list"] #product-results .product-body { display: block; padding: 12px; }
  html[data-product-view="list"] #product-results .product-body h3 { margin-top: 7px; }
  html[data-product-view="list"] #product-results .product-footer { margin-top: 9px; display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; }
}

@media (max-width: 620px) {
  .header-actions { width: 100%; }
  .header-actions .main-nav { width: auto; min-width: 0; flex: 1 1 auto; }
  .header-actions .theme-toggle { flex: 0 0 auto; }
}

/* Collection run analysis */
.analysis-run-picker { min-width: min(100%, 430px); display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.analysis-run-picker select { min-width: 0; height: 40px; padding: 0 10px; color: #eaf2ff; background: #070c1a; border: 1px solid rgba(148,163,184,.2); border-radius: 5px 0 0 5px; }
.analysis-run-picker button { padding: 0 16px; color: #fff; background: linear-gradient(135deg, #0891b2, #2563eb); border: 0; border-radius: 0 5px 5px 0; font-weight: 700; }
.analysis-workspace { display: grid; gap: 16px; }
.analysis-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.analysis-summary > div { min-height: 92px; padding: 14px; background: var(--tech-surface); border: 1px solid var(--tech-border); border-radius: 7px; }
.analysis-summary span, .analysis-summary strong, .analysis-summary small { display: block; }
.analysis-summary span { color: #657795; font: 600 9px/1.3 "Fira Code", monospace; }
.analysis-summary strong { margin-top: 8px; color: #eef8ff; font: 700 22px/1.2 "Fira Code", monospace; }
.analysis-summary small { margin-top: 4px; color: #7e8ca4; font-size: 9px; }
.analysis-panel { min-width: 0; overflow: hidden; background: var(--tech-surface); border: 1px solid var(--tech-border); border-radius: 7px; box-shadow: 0 14px 38px rgba(0,0,0,.14); }
.analysis-panel > header { min-height: 56px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(125,211,252,.1); }
.analysis-panel > header strong, .analysis-panel > header small { display: block; }
.analysis-panel > header strong { color: #dff8ff; font-size: 13px; }
.analysis-panel > header small { margin-top: 3px; color: #71819a; font-size: 9px; }
.analysis-panel > header > span { color: #67e8f9; font: 700 11px/1.4 "Fira Code", monospace; }
.analysis-panel .data-table-wrap { border: 0; box-shadow: none; }
.analysis-grid { min-width: 0; display: grid; grid-template-columns: minmax(280px, .75fr) minmax(0, 1.25fr); gap: 16px; }
.analysis-run-table { min-width: 1050px; }
.analysis-shop-table { min-width: 1380px; }
.selected-row td { background: rgba(34,211,238,.055); }
.proxy-address { color: #bdefff; font-family: "Fira Code", monospace; white-space: nowrap; }
.analysis-shop strong, .analysis-shop small { display: block; }
.analysis-shop strong { min-width: 150px; color: #e8f0fc; }
.analysis-shop small { margin-top: 3px; color: #667792; font-family: "Fira Code", monospace; }
.analysis-proxies { max-width: 180px; display: block; overflow: hidden; color: #9befff; text-overflow: ellipsis; white-space: nowrap; }
.analysis-proxies + small { display: block; margin-top: 3px; color: #71819a; }
.analysis-error { max-width: 260px; margin-top: 4px; display: block; overflow: hidden; color: #7e8ca4; text-overflow: ellipsis; white-space: nowrap; }

html[data-theme="light"] .analysis-run-picker select { color: var(--ink); background: #f9fbfc; border-color: #cbd8e1; }
html[data-theme="light"] .analysis-summary > div, html[data-theme="light"] .analysis-panel { color: var(--ink); background: #fff; border-color: var(--line); box-shadow: 0 10px 28px rgba(26,67,91,.07); }
html[data-theme="light"] .analysis-summary span, html[data-theme="light"] .analysis-summary small, html[data-theme="light"] .analysis-panel > header small, html[data-theme="light"] .analysis-error { color: #66778a; }
html[data-theme="light"] .analysis-summary strong, html[data-theme="light"] .analysis-panel > header strong, html[data-theme="light"] .analysis-shop strong { color: #17334a; }
html[data-theme="light"] .analysis-panel > header { border-color: var(--line); }
html[data-theme="light"] .proxy-address, html[data-theme="light"] .analysis-proxies { color: #087f73; }
html[data-theme="light"] .selected-row td { background: #eef8f5; }

/* Editorial channels */
.article-channel-head { padding: 52px 20px 42px; border-bottom: 1px solid rgba(125,211,252,.12); background: radial-gradient(circle at 75% 15%, rgba(34,211,238,.1), transparent 30%), #050914; }
.article-channel-inner { width: min(1180px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 390px; align-items: end; gap: 48px; }
.article-channel-inner h1 { max-width: 760px; margin: 5px 0 10px; color: #f8fbff; font-size: clamp(34px, 5vw, 58px); line-height: 1.05; }
.article-channel-inner > div > p:last-child { max-width: 680px; margin: 0; color: #91a0b8; font-size: 15px; }
.article-search { display: grid; gap: 8px; }
.article-search label { color: #91a0b8; font-size: 11px; }
.article-search > div { display: grid; grid-template-columns: 1fr auto; }
.article-search input { min-width: 0; height: 46px; padding: 0 13px; color: #edf4ff; background: rgba(3,7,18,.72); border: 1px solid rgba(148,163,184,.22); border-right: 0; border-radius: 5px 0 0 5px; }
.article-search button { min-width: 82px; color: #fff; background: #0891b2; border: 0; border-radius: 0 5px 5px 0; cursor: pointer; font-weight: 700; }
.article-channel-tabs { width: min(1180px, calc(100% - 40px)); margin: 0 auto; display: flex; gap: 28px; border-bottom: 1px solid rgba(125,211,252,.12); }
.article-channel-tabs a { min-height: 70px; padding: 15px 2px 12px; display: grid; align-content: center; gap: 2px; color: #8291aa; border-bottom: 2px solid transparent; }
.article-channel-tabs a.active { color: #effbff; border-bottom-color: #22d3ee; }
.article-channel-tabs strong { font-size: 13px; }
.article-channel-tabs span { font-size: 10px; }
.article-feed-shell { width: min(1180px, calc(100% - 40px)); margin: 36px auto 0; }
.article-feed-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.article-feed-heading h2 { margin: 4px 0 0; font-size: 24px; }
.article-feed-heading > span { color: #71819a; font-size: 11px; }
.article-feed-actions { display: flex; align-items: center; gap: 14px; color: #71819a; font-size: 11px; }
.article-layout-switch { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid rgba(34,211,238,.25); border-radius: 5px; }
.article-layout-switch a { min-width: 54px; padding: 7px 10px; color: #8291aa; text-align: center; }
.article-layout-switch a.active { color: #06111b; background: #67e8f9; }
.article-tags { margin: 20px 0 24px; display: flex; flex-wrap: wrap; gap: 7px; }
.article-tags a { padding: 6px 9px; color: #8fa0ba; background: rgba(15,23,42,.7); border: 1px solid rgba(148,163,184,.16); border-radius: 4px; font-size: 10px; }
.article-tags a:hover, .article-tags a.active { color: #dff9ff; background: rgba(8,145,178,.12); border-color: rgba(34,211,238,.4); }
.article-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.article-grid.layout-list { grid-template-columns: 1fr; }
.article-grid.layout-list .editorial-card { grid-template-columns: 150px minmax(0, 1fr); }
.article-grid.layout-list .editorial-cover { min-height: 160px; }
.editorial-card { min-width: 0; display: grid; grid-template-columns: 180px minmax(0, 1fr); overflow: hidden; background: rgba(10,16,33,.8); border: 1px solid rgba(125,211,252,.12); border-radius: 7px; }
.editorial-card.featured { border-color: rgba(34,211,238,.34); }
.editorial-cover { position: relative; min-height: 220px; padding: 12px; display: flex; align-items: flex-start; justify-content: space-between; overflow: hidden; background-color: #0d1b2b; }
.editorial-cover > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.editorial-cover > span { width: 48px; height: 48px; display: grid; place-items: center; color: #b9f4ff; background: rgba(6,182,212,.14); border: 1px solid rgba(34,211,238,.25); font: 700 15px/1 "Fira Code", monospace; }
.editorial-cover > strong { position: relative; z-index: 1; margin-left: auto; padding: 4px 6px; color: #04101a; background: #67e8f9; border-radius: 3px; font-size: 9px; }
.editorial-body { min-width: 0; padding: 18px; display: flex; flex-direction: column; }
.editorial-meta, .editorial-body footer { display: flex; justify-content: space-between; gap: 12px; color: #71819a; font-size: 9px; }
.editorial-meta span { color: #67e8f9; }
.editorial-body h2 { margin: 10px 0 8px; font-size: 17px; line-height: 1.42; }
.editorial-body h2 a { color: #eef7ff; }
.editorial-body > p { margin: 0; display: -webkit-box; overflow: hidden; color: #91a0b8; font-size: 12px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.editorial-tags { margin: 13px 0; display: flex; flex-wrap: wrap; gap: 5px; }
.editorial-tags a { color: #89a0bc; font-size: 9px; }
.editorial-tags a::before { content: "#"; color: #22d3ee; }
.editorial-body footer { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(148,163,184,.1); }
.article-empty { grid-column: 1 / -1; }
.article-pagination { margin-top: 28px; }

.article-detail-shell { width: min(900px, calc(100% - 40px)); margin: 54px auto 0; }
.article-detail-head { padding-bottom: 30px; border-bottom: 1px solid rgba(125,211,252,.14); }
.article-back { color: #67e8f9; font: 700 11px/1.4 "Fira Code", monospace; }
.article-back::before { content: "← "; }
.article-detail-head h1 { margin: 18px 0 14px; color: #f8fbff; font-size: clamp(31px, 5vw, 54px); line-height: 1.15; }
.article-detail-head > p { max-width: 760px; margin: 0; color: #9baac0; font-size: 16px; line-height: 1.7; }
.article-byline { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 20px; color: #71819a; font-size: 11px; }
.article-source { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px 12px; color: #71819a; font-size: 11px; }
.article-source a { color: #67e8f9; overflow-wrap: anywhere; }
.article-source strong { color: #aebdd0; }
.detail-tags { margin-bottom: 0; }
.article-hero-image { width: 100%; max-height: 520px; margin: 30px 0 0; object-fit: cover; border: 1px solid rgba(125,211,252,.14); border-radius: 6px; }
.article-prose { padding: 38px 0; color: #c6d2e2; font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
.article-prose > :first-child { margin-top: 0; }
.article-prose h1, .article-prose h2, .article-prose h3, .article-prose h4 { margin: 1.8em 0 .65em; color: #f2f8ff; line-height: 1.35; }
.article-prose h2 { padding-bottom: 8px; border-bottom: 1px solid rgba(125,211,252,.15); font-size: 26px; }
.article-prose h3 { font-size: 21px; }
.article-prose a { color: #67e8f9; text-decoration: underline; text-underline-offset: 3px; }
.article-prose img { max-width: 100%; height: auto; border-radius: 5px; }
.article-prose pre { max-width: 100%; padding: 16px; overflow-x: auto; color: #d5f6ff; background: #030711; border: 1px solid rgba(125,211,252,.14); border-radius: 5px; }
.article-prose code { padding: 2px 5px; color: #a5f3fc; background: rgba(34,211,238,.08); border-radius: 3px; font-family: "Fira Code", monospace; }
.article-prose pre code { padding: 0; background: none; }
.article-prose blockquote { margin: 24px 0; padding: 4px 0 4px 18px; color: #aebdd0; border-left: 3px solid #22d3ee; }
.article-prose table { width: 100%; display: block; overflow-x: auto; border-collapse: collapse; }
.article-prose th, .article-prose td { padding: 9px 11px; border: 1px solid rgba(148,163,184,.18); text-align: left; }
.article-copyright { margin: 4px 0 30px; padding: 16px 18px; color: #8190a8; background: rgba(10,16,33,.72); border: 1px solid rgba(125,211,252,.12); border-left: 3px solid #22d3ee; border-radius: 5px; }
.article-copyright strong { color: #dff8ff; font-size: 12px; }
.article-copyright p { margin: 6px 0 0; font-size: 12px; line-height: 1.7; }
.related-articles { width: min(1180px, calc(100% - 40px)); margin: 18px auto 0; padding-top: 26px; border-top: 1px solid rgba(125,211,252,.12); }
.related-articles h2 { margin: 4px 0 18px; }
.related-articles > div { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.related-articles > div > a { min-width: 0; padding: 15px; display: grid; gap: 8px; color: #dce8f7; background: rgba(10,16,33,.72); border: 1px solid rgba(125,211,252,.12); border-radius: 6px; }
.related-articles span, .related-articles small { color: #71819a; font-size: 9px; }
.related-articles span { color: #67e8f9; }

.article-form-shell { width: min(1320px, calc(100% - 40px)); margin: 34px auto 0; }
.article-form-head { margin-bottom: 18px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.article-form-head h1 { margin: 4px 0 0; }
.article-form-head > a { color: #67e8f9; font-size: 11px; }
.article-editor-form { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 16px; }
.article-editor-main, .article-editor-side { padding: 20px; display: grid; gap: 14px; background: rgba(10,16,33,.82); border: 1px solid rgba(125,211,252,.14); border-radius: 7px; }
.article-editor-form .form-message { grid-column: 1 / -1; }
.article-editor-form label { display: grid; gap: 7px; color: #91a0b8; font-size: 11px; }
.article-editor-form input, .article-editor-form select, .article-editor-form textarea { width: 100%; min-width: 0; padding: 10px 12px; color: #edf4ff; background: #050a17; border: 1px solid rgba(148,163,184,.22); border-radius: 5px; font: inherit; }
.article-editor-form input, .article-editor-form select { height: 43px; }
.article-editor-form input:focus, .article-editor-form select:focus, .article-editor-form textarea:focus { border-color: #22d3ee; box-shadow: 0 0 0 3px rgba(34,211,238,.08); outline: none; }
.article-editor-row { display: grid; grid-template-columns: 1fr 180px; gap: 12px; }
.article-content-field textarea { min-height: 520px; resize: vertical; font: 13px/1.65 "Fira Code", monospace; }
.article-editor-side { position: sticky; top: 132px; }
.article-editor-form .editor-check { grid-template-columns: 18px 1fr; align-items: center; }
.article-editor-form .editor-check input { width: 18px; height: 18px; padding: 0; accent-color: #22d3ee; }
.article-editor-side .primary-button, .editor-cancel { display: grid; place-items: center; }
.article-preview-panel { overflow: hidden; border: 1px solid rgba(125,211,252,.14); border-radius: 6px; }
.article-preview-panel > header { min-height: 46px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(125,211,252,.12); }
.article-preview-panel button { min-height: 32px; padding: 0 10px; color: #67e8f9; background: transparent; border: 1px solid rgba(34,211,238,.25); border-radius: 4px; cursor: pointer; }
.article-preview-panel .article-prose { min-height: 180px; padding: 20px; }
.preview-placeholder { color: #71819a; }
.article-category-form-shell textarea { min-width: 0; padding: 10px 13px; color: #edf4ff; background: rgba(3,7,18,.72); border: 1px solid rgba(148,163,184,.2); border-radius: 5px; font: inherit; }
.article-category-form-shell .editor-check { display: flex; align-items: center; gap: 9px; }
.article-category-form-shell .editor-check input { width: 18px; height: 18px; accent-color: #22d3ee; }
.article-admin-title { min-width: 240px; display: grid; gap: 4px; }
.article-admin-title small { color: #71819a; font-size: 9px; }
.article-category-error { margin: 12px; }

html[data-theme="light"] .article-channel-head { background: radial-gradient(circle at 75% 15%, rgba(8,127,115,.09), transparent 30%), #eef5f5; border-color: var(--line); }
html[data-theme="light"] .article-channel-inner h1, html[data-theme="light"] .article-detail-head h1, html[data-theme="light"] .editorial-body h2 a, html[data-theme="light"] .article-prose h1, html[data-theme="light"] .article-prose h2, html[data-theme="light"] .article-prose h3, html[data-theme="light"] .article-prose h4 { color: #17334a; }
html[data-theme="light"] .article-channel-inner > div > p:last-child, html[data-theme="light"] .article-detail-head > p, html[data-theme="light"] .article-prose { color: #52657a; }
html[data-theme="light"] .article-search input, html[data-theme="light"] .article-editor-form input, html[data-theme="light"] .article-editor-form select, html[data-theme="light"] .article-editor-form textarea, html[data-theme="light"] .article-category-form-shell textarea { color: #17334a; background: #fff; border-color: #cbd8e1; }
html[data-theme="light"] .article-channel-tabs, html[data-theme="light"] .article-detail-head, html[data-theme="light"] .related-articles { border-color: var(--line); }
html[data-theme="light"] .article-channel-tabs a { color: #66778a; }
html[data-theme="light"] .article-channel-tabs a.active { color: #17334a; border-bottom-color: #087f73; }
html[data-theme="light"] .article-layout-switch { border-color: #9ccbc3; }
html[data-theme="light"] .article-layout-switch a { color: #66778a; }
html[data-theme="light"] .article-layout-switch a.active { color: #fff; background: #087f73; }
html[data-theme="light"] .article-tags a, html[data-theme="light"] .editorial-card, html[data-theme="light"] .related-articles > div > a, html[data-theme="light"] .article-editor-main, html[data-theme="light"] .article-editor-side { background: #fff; border-color: var(--line); box-shadow: 0 10px 28px rgba(26,67,91,.06); }
html[data-theme="light"] .editorial-body > p { color: #52657a; }
html[data-theme="light"] .article-prose pre { color: #d5f6ff; }
html[data-theme="light"] .article-prose code { color: #087f73; background: #e7f4f2; }
html[data-theme="light"] .article-prose pre code { color: inherit; background: none; }
html[data-theme="light"] .article-source strong { color: #52657a; }
html[data-theme="light"] .article-copyright { color: #66778a; background: #f7fafb; border-color: var(--line); border-left-color: #087f73; }
html[data-theme="light"] .article-copyright strong { color: #17334a; }

@media (max-width: 900px) {
  .article-channel-inner { grid-template-columns: 1fr; gap: 26px; }
  .article-grid { grid-template-columns: 1fr; }
  .related-articles > div { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .article-editor-form { grid-template-columns: 1fr; }
  .article-editor-side { position: static; }
}

@media (max-width: 600px) {
  .article-channel-head { padding: 34px 14px 30px; }
  .article-channel-tabs, .article-feed-shell, .article-detail-shell, .related-articles, .article-form-shell { width: min(100% - 28px, 1180px); }
  .article-channel-tabs { gap: 18px; overflow-x: auto; }
  .article-feed-heading { align-items: flex-start; flex-direction: column; }
  .article-feed-actions { width: 100%; justify-content: space-between; }
  .editorial-card { grid-template-columns: 116px minmax(0, 1fr); }
  .article-grid.layout-list .editorial-card { grid-template-columns: 96px minmax(0, 1fr); }
  .article-grid.layout-list .editorial-cover { min-height: 150px; }
  .editorial-cover { min-height: 190px; }
  .editorial-body { padding: 14px; }
  .editorial-body h2 { font-size: 15px; }
  .editorial-meta time, .editorial-body footer span:last-child { display: none; }
  .article-detail-shell { margin-top: 34px; }
  .article-prose { padding: 28px 0; font-size: 15px; }
  .related-articles > div { grid-template-columns: 1fr; }
  .article-form-head { align-items: flex-start; flex-direction: column; }
  .article-editor-main, .article-editor-side { padding: 15px; }
  .article-editor-row { grid-template-columns: 1fr; }
  .article-content-field textarea { min-height: 420px; }
}

@media (max-width: 1180px) {
  .analysis-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analysis-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .analysis-run-picker { width: 100%; min-width: 0; }
  .analysis-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-panel > header { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  #product-results { transition: none; }
  #product-results.is-loading::after { animation: none; }
}
