/* Мониторинг цен WBCON — стиль как у aicalc.wbcon.ru */
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
    background-color: #f8fafc; color: #1e293b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 24px 16px;
}
.container { width: 100%; max-width: 1120px; margin: 0 auto; }

.svc-rail { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
/* Пять плиток в ряд: остальные доступны стрелками влево-вправо */
.svc-nav { flex: 1; min-width: 0; display: grid; grid-auto-flow: column; gap: 6px;
    grid-auto-columns: calc((100% - 24px) / 5); overflow-x: auto; scroll-behavior: smooth;
    scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 2px; }
.svc-nav::-webkit-scrollbar { display: none; }
.svc-tile { scroll-snap-align: start; }
.rail-btn { flex: none; width: 28px; height: 52px; padding: 0; border: 1px solid #e2e8f0;
    border-radius: 10px; background: #fff; color: #64748b; font-size: 20px; line-height: 1;
    font-family: inherit; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.rail-btn:hover:not(:disabled) { border-color: #5857ff; color: #5857ff; }
.rail-btn:disabled { opacity: .3; cursor: default; }
.svc-tile {
    display: flex; align-items: center; gap: 9px; padding: 9px 10px; text-align: left; text-decoration: none;
    background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.03);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.svc-tile:hover { border-color: #5857ff; box-shadow: 0 4px 16px rgba(88,87,255,.12); }
.svc-icon { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
    border-radius: 10px; background: #f1f5f9; color: #5857ff; }
.svc-text { display: flex; flex-direction: column; min-width: 0; }
.svc-name { font-size: 13.5px; font-weight: 700; color: #0f172a; line-height: 1.25; }
.svc-sub { font-size: 11.5px; color: #64748b; line-height: 1.3; }
.svc-tile.active { background: #eeefff; border-color: #5857ff; }
.svc-tile.active .svc-icon { background: #5857ff; color: #fff; }
.svc-tile.active .svc-name { color: #5857ff; }

.hero { text-align: center; margin-bottom: 20px; }
.header-badge { display: inline-block; padding: 4px 14px; background: #eeefff; color: #5857ff;
    font-size: 13px; font-weight: 600; border-radius: 20px; margin-bottom: 12px; }
.title { font-size: 28px; font-weight: 700; margin-bottom: 10px; color: #0f172a; letter-spacing: -.02em; line-height: 1.25; }
.subtitle { font-size: 14px; color: #64748b; line-height: 1.5; max-width: 720px; margin: 0 auto; }

.market-switch { display: flex; gap: 4px; padding: 4px; margin-bottom: 16px; background: #fff;
    border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 4px 20px rgba(0,0,0,.04); }
.market-switch button { flex: 1; min-width: 0; padding: 11px 12px; font-size: 15px; font-weight: 700;
    font-family: inherit; color: #64748b; background: transparent; border: none; border-radius: 10px; cursor: pointer;
    transition: background-color .15s ease, color .15s ease; }
.market-switch button:hover { color: #5857ff; }
.market-switch button[data-m="wb"]:hover { color: #a73afd; }
.market-switch button[data-m="ozon"]:hover { color: #005bff; }
.market-switch button[data-m="ym"]:hover { color: #fc3f1d; }
.market-switch button.active { background: #5857ff; color: #fff; }
.market-switch button[data-m="wb"].active { background: #a73afd; color: #fff; }
.market-switch button[data-m="ozon"].active { background: #005bff; color: #fff; }
.market-switch button[data-m="ym"].active { background: #fc3f1d; color: #fff; }

.card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,.04);
    text-align: left; overflow: hidden; margin-bottom: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9; flex-wrap: wrap; }
.card-title { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #64748b; }
.card-body { padding: 18px 20px; }
.status-badge { background: #dcfce7; color: #15803d; font-size: 12px; font-weight: 700; padding: 4px 10px;
    border-radius: 20px; text-transform: uppercase; letter-spacing: .03em; }
.status-badge.free { background: #eeefff; color: #5857ff; }

.search-box { display: flex; align-items: center; gap: 10px; box-shadow: 0 4px 24px rgba(0,0,0,.06);
    border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; transition: all .2s ease; overflow: hidden; }
.search-box:focus-within { border-color: #5857ff; box-shadow: 0 4px 28px rgba(88,87,255,.18); }
.search-input { flex-grow: 1; width: 100%; padding: 15px 18px; font-size: 16px; border: none; outline: none;
    background: transparent; color: #0f172a; font-family: inherit; }
.search-input::placeholder { color: #94a3b8; }
.search-btn { background-color: #5857ff; color: #fff; border: none; padding: 11px 20px; margin-right: 6px;
    border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: background-color .2s ease, transform .1s ease; display: flex; align-items: center; gap: 8px; }
.search-btn:hover { background-color: #4342e6; }
.search-btn:active { transform: scale(.98); }
.search-btn:disabled { background-color: #cbd5e1; cursor: not-allowed; transform: none; }
.composer-note { margin-top: 8px; font-size: 12px; color: #94a3b8; }

.items { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; gap: 14px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px;
    background: #fff; transition: border-color .15s ease, box-shadow .15s ease; }
.item:hover { border-color: #dcdbff; box-shadow: 0 4px 16px rgba(88,87,255,.08); }
.item-img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #f1f5f9; flex: none; }
.item-main { flex: 1; min-width: 0; }
.item-title { font-size: 15px; font-weight: 600; color: #0f172a; line-height: 1.35; text-decoration: none; display: block; }
.item-title:hover { color: #5857ff; }
.item-meta { margin-top: 3px; font-size: 12.5px; color: #64748b; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mp-tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; color: #fff; }
.mp-wb { background: #a73afd; }
.mp-ozon { background: #005bff; }
.mp-ym { background: #fc3f1d; }
.item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.price { font-size: 19px; font-weight: 700; color: #0f172a; white-space: nowrap; }
.item-actions { display: flex; gap: 6px; }
.icon-btn { border: 1px solid #e2e8f0; background: #fff; color: #64748b; border-radius: 8px; padding: 5px 9px;
    font-size: 12px; cursor: pointer; font-family: inherit; transition: all .15s ease; }
.icon-btn:hover { border-color: #5857ff; color: #5857ff; background: #f8fafc; }
.icon-btn.danger:hover { border-color: #fecaca; color: #b91c1c; background: #fef2f2; }
.expire { font-size: 11.5px; color: #b45309; }

.empty { text-align: center; padding: 26px 16px; color: #94a3b8; font-size: 14px; }
.empty b { color: #475569; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat-box { background: #f8fafc; border: 1px solid #f1f5f9; border-radius: 10px; padding: 12px 10px; text-align: center; }
.stat-value { font-size: 20px; font-weight: 700; color: #0f172a; margin-bottom: 3px; }
.stat-label { font-size: 12px; color: #64748b; }

.limit-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.limit-progress { flex: 1; min-width: 160px; height: 8px; border-radius: 8px; background: #f1f5f9; overflow: hidden; }
.limit-progress i { display: block; height: 100%; background: #5857ff; border-radius: 8px; transition: width .3s ease; }
.limit-text { font-size: 13px; color: #64748b; }

.tag-item { font-size: 13px; color: #334155; background: #fff; border: 1px solid #e2e8f0; font-family: inherit;
    padding: 6px 13px; border-radius: 20px; cursor: pointer; transition: all .15s ease; text-align: left;
    text-decoration: none; display: inline-block; }
.tag-item:hover { border-color: #5857ff; color: #5857ff; background: #f8fafc; }
.tag-item.primary { background: #eeefff; border-color: #dcdbff; color: #5857ff; font-weight: 600; }
.tag-item.primary:hover { background: #5857ff; color: #fff; border-color: #5857ff; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 600; color: #475569; }
.field input { padding: 11px 14px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 15px;
    font-family: inherit; color: #0f172a; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.field input:focus { border-color: #5857ff; box-shadow: 0 0 0 3px rgba(88,87,255,.12); }
.hint { font-size: 12px; color: #94a3b8; line-height: 1.5; }

.summary-text { font-size: 14px; line-height: 1.6; color: #334155; background: #f8fafc;
    border-left: 4px solid #5857ff; padding: 12px 14px; border-radius: 0 10px 10px 0; }
.summary-text.warn { border-left-color: #f59e0b; background: #fff7ed; color: #9a3412; }
.summary-text.err { border-left-color: #ef4444; background: #fef2f2; color: #991b1b; }

.chart-wrap { margin-top: 12px; }
.chart { width: 100%; height: 200px; display: block; }
.chart-legend { display: flex; justify-content: space-between; font-size: 12px; color: #64748b; margin-top: 6px; }

.table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 10px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid #f1f5f9; text-align: right; white-space: nowrap; }
.table th:first-child, .table td:first-child { text-align: left; }
.table tbody tr:last-child td { border-bottom: none; }
.table code { font-size: 12.5px; background: #f1f5f9; padding: 2px 6px; border-radius: 6px; }

.footer { margin-top: 34px; font-size: 13px; color: #64748b; display: flex; flex-direction: column;
    gap: 10px; align-items: center; }
.footer a { color: #64748b; text-decoration: none; transition: color .15s ease; }
.footer a:hover { color: #5857ff; text-decoration: underline; }
.footer-links, .footer-contacts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.footer-highlight { font-weight: 600; color: #5857ff !important; }
.dot { color: #cbd5e1; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
    background: #0f172a; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px;
    opacity: 0; pointer-events: none; transition: all .25s ease; max-width: min(92vw, 520px); z-index: 50; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: #991b1b; }

.modal { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: none; align-items: center;
    justify-content: center; padding: 16px; z-index: 60; }
.modal.show { display: flex; }
.modal-card { background: #fff; border-radius: 16px; width: 100%; max-width: 420px; padding: 22px;
    box-shadow: 0 24px 64px rgba(15,23,42,.24); text-align: left; }
.modal-card h3 { font-size: 18px; color: #0f172a; margin-bottom: 6px; }
.modal-card p { font-size: 13.5px; color: #64748b; line-height: 1.55; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; margin-top: 6px; }
.modal-actions .search-btn { margin-right: 0; justify-content: center; }
.link-btn { background: none; border: none; color: #5857ff; font-size: 13px; font-weight: 600;
    cursor: pointer; font-family: inherit; padding: 0; }

@media (max-width: 860px) {
    .svc-nav { grid-auto-columns: calc((100% - 6px) / 2); }
}

@media (max-width: 600px) {
    .svc-nav { grid-auto-columns: calc((100% - 6px) / 2); gap: 6px; }
    .svc-tile { flex-direction: column; align-items: center; gap: 5px; padding: 9px 4px; text-align: center; }
    .svc-icon { width: 30px; height: 30px; }
    .svc-name { font-size: 12.5px; }
    .svc-sub { display: none; }
    body { padding: 16px 10px; }
    .title { font-size: 23px; }
    .card-body { padding: 14px; }
    .card-head { padding: 12px 14px; }
    .item { padding: 10px; flex-wrap: wrap; }
    .item-img { width: 52px; height: 52px; }
    .item-main { flex: 1 1 calc(100% - 66px); }
    .item-side { flex-direction: row; align-items: center; justify-content: space-between;
        width: 100%; gap: 8px; }
    .item-actions { flex-wrap: nowrap; justify-content: flex-end; }
    .footer .dot { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .search-btn span { display: none; }
    .price { font-size: 17px; }
    .table th, .table td { padding: 8px; font-size: 13px; }
}



/* ------------------------------------------------ массовая загрузка и архив */
.bulk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bulk-box { display: flex; flex-direction: column; gap: 8px; background: #f8fafc; border: 1px solid #f1f5f9;
    border-radius: 12px; padding: 14px; }
.bulk-title { font-size: 14px; font-weight: 700; color: #0f172a; }
.bulk-box .hint { flex: 1; }
.bulk-box .icon-btn, .bulk-box .search-btn { align-self: flex-start; margin-right: 0; text-decoration: none;
    display: inline-flex; align-items: center; }
.import-result { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f1f5f9; }
.import-head { font-size: 14px; color: #0f172a; margin-bottom: 6px; }
.import-result .table-wrap { margin-top: 8px; }
.import-result .table td { white-space: normal; }

.account-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.key-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0;
    border-bottom: 1px dashed #f1f5f9; }
.key-row:last-child { border-bottom: none; }
.key-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: #0f172a;
    background: #f1f5f9; border-radius: 6px; padding: 4px 8px; max-width: 100%; overflow-wrap: anywhere; }
.auth-switch { display: flex; gap: 6px; margin-bottom: 14px; }
.modal-card.modal-lg { max-width: 780px; }
.modal-card h3 + p { margin-top: 4px; }
.modal-card .market-switch { box-shadow: none; }

@media (max-width: 860px) {
    .bulk-grid { grid-template-columns: 1fr; }
    .bulk-box .icon-btn, .bulk-box .search-btn { align-self: stretch; justify-content: center; }
}

/* ------------------------------------------------ нумерованные разделы */
.card-title { display: inline-flex; align-items: center; gap: 8px; }
.card-num { display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 20px; height: 20px; border-radius: 6px; background: #eeefff; color: #5857ff;
    font-size: 12px; font-weight: 800; letter-spacing: 0; }

/* ------------------------------------------------ демо-артикулы */
.demo-tag { display: inline-block; padding: 1px 7px; border-radius: 6px; font-size: 11px;
    font-weight: 700; color: #5857ff; background: #eeefff; }
.item.demo { background: #fbfbff; }

/* ------------------------------------------------ тариф */
.plan-offer { display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    padding: 14px 16px; margin-bottom: 16px; border: 1px solid #dcdbff; border-radius: 14px;
    background: linear-gradient(120deg, #eeefff, #f8fafc); }
.plan-price { display: flex; flex-direction: column; }
.plan-sum { font-size: 26px; font-weight: 800; color: #5857ff; letter-spacing: -.02em; line-height: 1.15; }
.plan-list { flex: 1; min-width: 220px; list-style: none; display: flex; flex-direction: column;
    gap: 4px; font-size: 13.5px; color: #334155; }
.plan-list li::before { content: '✓'; margin-right: 8px; color: #16a34a; font-weight: 700; }
.plan-cta { margin-right: 0; text-decoration: none; }

/* ------------------------------------------------ почта */
.spam-note { margin-top: 10px; padding: 10px 12px; border: 1px solid #fed7aa; border-radius: 10px;
    background: #fff7ed; font-size: 12.5px; line-height: 1.5; color: #9a3412; }

/* ------------------------------------------------ select в формах */
.field select { padding: 11px 14px; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 15px;
    font-family: inherit; color: #0f172a; background: #fff; outline: none;
    transition: border-color .15s ease, box-shadow .15s ease; }
.field select:focus { border-color: #5857ff; box-shadow: 0 0 0 3px rgba(88,87,255,.12); }

@media (max-width: 600px) {
    .plan-offer { flex-direction: column; align-items: stretch; gap: 12px; }
    .plan-cta { justify-content: center; }
    .rail-btn { width: 24px; height: 58px; }
}

/* ------------------------------------------------ карточка товара в демо */
.card-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.item-brand { font-weight: 600; color: #475569; }
.item-rating { color: #b45309; font-weight: 700; }
.item-stamp { color: #94a3b8; }
.monitor-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px;
    border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; font-size: 12px;
    color: #475569; cursor: pointer; white-space: nowrap; transition: all .15s ease; }
.monitor-toggle:hover { border-color: #5857ff; color: #5857ff; }
.monitor-toggle input { width: 15px; height: 15px; accent-color: #5857ff; cursor: pointer; }
.item-actions .icon-btn { display: inline-flex; align-items: center; justify-content: center; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn:disabled:hover { border-color: #e2e8f0; color: #64748b; background: #fff; }

@media (max-width: 600px) {
    .item-actions { flex-wrap: wrap; }
    .monitor-toggle { padding: 3px 7px; font-size: 11.5px; }
}

/* ------------------------------------------------ токен доступа */
.token-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid #f1f5f9; }
.token-box .search-box { box-shadow: none; }
.token-box .search-input { padding: 12px 14px; font-size: 14px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.demo-switch { margin-bottom: 12px; }

