/* --- Общие --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #1a1a1a;
    background: linear-gradient(145deg, #e8eef3 0%, #d4dce4 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-logo-bar {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 1.25rem 1rem 0;
}

.site-logo {
    max-height: 60px;
    width: auto;
    display: block;
}

.dashboard-page .site-logo-bar { display: none; }
.catalog-page .site-logo-bar { display: none; }

/* --- Hi-tech: соты по бокам (кабинет партнёра) --- */
.page-hitech-bg {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

body.partner-dashboard-home .page-hitech-bg {
    overflow: visible;
}

/* Соты по бокам — только главная /dashboard/ */
.partner-dashboard-home .page-hitech-bg {
    display: block;
}

.partner-dashboard-home .page {
    position: relative;
    z-index: 1;
}

/* Футер на всю ширину, цвет как шапка (.dash-topbar #1b5e3b) — только /dashboard/ */
body.partner-dashboard-home .site-footer {
    position: relative;
    z-index: 2;
    background: #1b5e3b;
    color: #f1f5f9;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

body.partner-dashboard-home .site-footer__inner {
    background: transparent;
    border-top: none;
}

body.partner-dashboard-home .site-footer__bottom {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    background: transparent;
    border-top-color: rgba(255, 255, 255, 0.12);
}

body.partner-dashboard-home .site-footer__tagline,
body.partner-dashboard-home .site-footer__heading,
body.partner-dashboard-home .site-footer__subheading,
body.partner-dashboard-home .site-footer__hint {
    color: rgba(255, 255, 255, 0.72);
}

body.partner-dashboard-home .site-footer__address {
    color: rgba(255, 255, 255, 0.85);
}

body.partner-dashboard-home .site-footer__copy {
    color: rgba(255, 255, 255, 0.7);
}

body.partner-dashboard-home .site-footer__copy a {
    color: rgba(255, 255, 255, 0.88);
}

body.partner-dashboard-home .site-footer__copy a:hover {
    color: #fff;
}

body.partner-dashboard-home .site-footer__social-link:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

body.partner-dashboard-home {
    /* Как у контентной колонки (.dash main), чтобы бока совпадали с телом страницы */
    background: #f1f5f9;
}

.partner-dashboard-home .dash {
    position: relative;
    z-index: 1;
    background: transparent;
}

.partner-dashboard-home .dash main {
    background: #f1f5f9;
    position: relative;
    z-index: 1;
}

.partner-dashboard-home .dash-topbar {
    position: relative;
    z-index: 2;
}

.page-hitech-bg__rail {
    position: absolute;
    top: 0;
    bottom: 0;
    width: min(20vw, 320px);
    max-width: 100%;
    pointer-events: none;
}

.page-hitech-bg__rail--left {
    left: 0;
    -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 55%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 0%, #000 55%, transparent 100%);
}

.page-hitech-bg__rail--right {
    right: 0;
    -webkit-mask-image: linear-gradient(270deg, #000 0%, #000 55%, transparent 100%);
    mask-image: linear-gradient(270deg, #000 0%, #000 55%, transparent 100%);
}

.page-hitech-bg__stack {
    position: absolute;
    inset: -12% -8%;
    will-change: transform;
}

.page-hitech-bg__hex {
    position: absolute;
    inset: 0;
    background-repeat: repeat;
    opacity: 0.92;
}

/* Сетка шестиугольников — зелень как в шапке (#1b5e3b) */
.page-hitech-bg__hex--a {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='90' viewBox='0 0 52 90'%3E%3Cg fill='none' stroke='%231b5e3b' stroke-width='0.55' opacity='0.4'%3E%3Cpath d='M26 1 L50 15.5 V44.5 L26 59 L2 44.5 V15.5 Z'/%3E%3Cpath d='M26 31 L50 45.5 V74.5 L26 89 L2 74.5 V45.5 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 52px 90px;
    animation: page-hitech-hex-drift-a 36s linear infinite;
}

.page-hitech-bg__hex--b {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='90' viewBox='0 0 52 90'%3E%3Cg fill='none' stroke='%2315803d' stroke-width='0.45' opacity='0.36'%3E%3Cpath d='M26 1 L50 15.5 V44.5 L26 59 L2 44.5 V15.5 Z'/%3E%3Cpath d='M26 31 L50 45.5 V74.5 L26 89 L2 74.5 V45.5 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 38px 66px;
    opacity: 0.72;
    animation: page-hitech-hex-drift-b 22s linear infinite reverse;
}

.page-hitech-bg__hex--c {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='90' viewBox='0 0 52 90'%3E%3Cg fill='none' stroke='%23166534' stroke-width='0.38' opacity='0.38'%3E%3Cpath d='M26 1 L50 15.5 V44.5 L26 59 L2 44.5 V15.5 Z'/%3E%3Cpath d='M26 31 L50 45.5 V74.5 L26 89 L2 74.5 V45.5 Z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 24px 42px;
    opacity: 0.58;
    animation: page-hitech-hex-drift-c 14s linear infinite;
}

.page-hitech-bg__scan {
    display: none;
}

@keyframes page-hitech-hex-drift-a {
    0% { background-position: 0 0; }
    100% { background-position: 52px 90px; }
}

@keyframes page-hitech-hex-drift-b {
    0% { background-position: 12px 8px; }
    100% { background-position: -26px 74px; }
}

@keyframes page-hitech-hex-drift-c {
    0% { background-position: 0 0; }
    100% { background-position: 24px 42px; }
}

/* --- Подвал (данные с emilink.pro) --- */
.site-footer {
    flex-shrink: 0;
    background: #0f172a;
    color: #e2e8f0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.25rem 1.5rem 1.75rem;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 0.95fr);
    gap: 2rem 2.5rem;
    align-items: start;
}

.site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.site-footer__logo-link {
    display: inline-block;
    line-height: 0;
}

.site-footer__logo {
    height: 36px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.95;
}

.site-footer__tagline {
    margin: 0;
    font-size: .84rem;
    line-height: 1.45;
    color: #94a3b8;
    max-width: 18rem;
}

.site-footer__site-link {
    font-size: .88rem;
    font-weight: 600;
    color: #86efac;
    text-decoration: none;
}

.site-footer__site-link:hover {
    text-decoration: underline;
}

.site-footer__heading {
    margin: 0 0 .85rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
}

.site-footer__subheading {
    margin: 1.25rem 0 .65rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.site-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem 1.25rem;
}

.site-footer__links a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: .84rem;
    line-height: 1.4;
    transition: color 0.15s;
}

.site-footer__links a:hover {
    color: #86efac;
}

.site-footer__contacts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__contacts li {
    margin-bottom: .5rem;
    font-size: .88rem;
}

.site-footer__contacts a {
    color: #f8fafc;
    font-weight: 600;
    text-decoration: none;
}

.site-footer__contacts a:hover {
    text-decoration: underline;
    color: #86efac;
}

.site-footer__hint {
    font-weight: 400;
    color: #94a3b8;
    font-size: .78rem;
}

.site-footer__address {
    margin: .85rem 0 0;
    font-size: .84rem;
    line-height: 1.45;
    color: #cbd5e1;
}

.site-footer__social {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.site-footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.site-footer__social-link:hover {
    background: #1b5e3b;
    color: #fff;
    transform: translateY(-2px);
}

.site-footer__social-link--max {
    width: auto;
    min-width: 40px;
    padding: 0 .65rem;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 1.5rem;
    text-align: center;
}

.site-footer__copy {
    margin: 0;
    font-size: .78rem;
    color: #64748b;
    line-height: 1.5;
}

.site-footer__copy a {
    color: #94a3b8;
    text-decoration: none;
}

.site-footer__copy a:hover {
    color: #86efac;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .site-footer__inner {
        grid-template-columns: 1fr 1fr;
        gap: 1.75rem;
    }
    .site-footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .site-footer__inner {
        grid-template-columns: 1fr;
        padding: 1.75rem 1rem 1.25rem;
    }
    .site-footer__links {
        grid-template-columns: 1fr;
    }
}

.page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-height: 0;
}

/* --- Страницы входа --- */
.auth-page .page {
    align-items: center;
}

.auth-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 2rem;
}

.auth-card h1 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.auth-hint {
    margin: 0 0 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

.auth-form label {
    display: block;
    margin-bottom: 1rem;
}

.auth-form label span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.auth-form input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-form .btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.7rem 1rem;
}

.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #2563eb;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* --- Кнопки --- */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
}

.btn-outline {
    background: transparent;
    color: #2563eb;
    border: 1px solid #2563eb;
}

.btn-outline:hover {
    background: #eff6ff;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 0.85rem 1.5rem;
    font-size: 1.05rem;
}

/* --- Оповещения --- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* --- Кабинет партнёра --- */
/* ========== Dashboard v2 — B2B tile layout ========== */
.dashboard-page .page {
    align-items: flex-start;
    padding: 0;
    max-width: 100%;
}

.dash {
    width: 100%;
    min-height: 100vh;
    background: #f1f5f9;
}

/* --- Top bar --- */
.dash-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem 2rem;
    background: #1b5e3b;
    color: #fff;
}
.dash-topbar__brand { display: flex; align-items: center; gap: .6rem; }
.dash-logo-img {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
}
.dash-logo-sub {
    font-size: .82rem;
    color: rgba(255,255,255,.65);
    font-weight: 400;
}
.dash-logo-pro {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: .05em;
}
.dash-topbar__user {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.dash-topbar__home {
    font-size: .82rem;
    font-weight: 500;
    color: rgba(255,255,255,.92);
    text-decoration: none;
    padding: .35rem .65rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.35);
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.dash-topbar__home:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.55);
}
.dash-user-name-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    padding: .25rem .5rem;
    border-radius: 6px;
    transition: background .15s;
}
.dash-user-name-btn:hover { background: rgba(255,255,255,.15); }

/* Profile modal */
.modal-box--profile {
    width: 95%;
    max-width: 440px;
}
.profile-table {
    width: 100%;
    border-collapse: collapse;
}
.profile-table tr { border-bottom: 1px solid #f1f5f9; }
.profile-table tr:last-child { border-bottom: none; }
.profile-label {
    padding: .65rem .75rem;
    font-size: .82rem;
    font-weight: 600;
    color: #64748b;
    width: 140px;
    vertical-align: top;
}
.profile-value {
    padding: .65rem .75rem;
    font-size: .88rem;
    color: #1e293b;
}
.profile-value code {
    background: #f1f5f9;
    padding: .15rem .4rem;
    border-radius: 4px;
    font-size: .82rem;
}
.profile-badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 600;
    background: #dbeafe;
    color: #1e40af;
    margin: .1rem .25rem .1rem 0;
}
.profile-badge--price {
    background: #dcfce7;
    color: #166534;
}
.profile-badge--off {
    background: #fee2e2;
    color: #991b1b;
}
.profile-api-hours {
    display: block;
    margin-bottom: .25rem;
}
.profile-api-now {
    display: inline-block;
    font-size: .78rem;
    font-weight: 600;
    padding: .12rem .45rem;
    border-radius: 8px;
    margin-right: .35rem;
}
.profile-api-now--on {
    background: #dcfce7;
    color: #166534;
}
.profile-api-now--off {
    background: #fef3c7;
    color: #92400e;
}
.profile-api-timezone {
    font-size: .75rem;
    color: #64748b;
}
.dash-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.25);
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background .15s;
}
.dash-btn-icon:hover { background: rgba(255,255,255,.15); }
.dash-btn-logout { border-color: rgba(255,255,255,.15); opacity: .7; }
.dash-btn-logout:hover { opacity: 1; }

/* --- Grid --- */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    padding: 2rem;
    max-width: 960px;
    margin: 0 auto;
}

/* --- Cards --- */
.dash-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: box-shadow .2s, transform .15s;
    text-decoration: none;
    color: inherit;
}
.dash-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
    transform: translateY(-2px);
}
.dash-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: 1rem;
    color: #1b5e3b;
}
.dash-card__header-main {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}
.dash-card__header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.dash-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    border-radius: 12px;
    background: #ecfdf5;
    color: #1b5e3b;
    flex-shrink: 0;
}
.dash-card__body { flex: 1; min-width: 0; }
.dash-card__title {
    margin: 0 0 .25rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1b5e3b;
}
.dash-card__desc {
    margin: 0;
    font-size: .82rem;
    color: #64748b;
    line-height: 1.45;
}
.dash-card__arrow {
    flex-shrink: 0;
    color: #94a3b8;
    transition: transform .2s;
}
.dash-card:hover .dash-card__arrow { transform: translateX(3px); }

/* Catalog card */
.dash-card--catalog {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, #1b5e3b 0%, #2d7a50 100%);
    color: #fff;
    border: none;
}
.dash-card--catalog .dash-card__icon {
    background: rgba(255,255,255,.15);
    color: #fff;
}
.dash-card--catalog .dash-card__title { color: #fff; font-size: 1.2rem; }
.dash-card--catalog .dash-card__desc { color: rgba(255,255,255,.75); }
.dash-card--catalog .dash-card__arrow { color: rgba(255,255,255,.5); }
.dash-card--catalog:hover .dash-card__arrow { color: #fff; }

/* Баннер «Выгрузка номенклатуры» на главной кабинета */
.dash-banner-upload {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.75rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 55%, #fff 100%);
    border: 1px solid #a7f3d0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 12px rgba(27,94,59,.06);
    transition: box-shadow .2s, transform .15s, border-color .15s;
}
.dash-banner-upload:hover {
    box-shadow: 0 6px 24px rgba(27,94,59,.12);
    transform: translateY(-2px);
    border-color: #1b5e3b;
}
.dash-banner-upload__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #1b5e3b;
    color: #fff;
    flex-shrink: 0;
}
.dash-banner-upload__text {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
    flex: 1;
}
.dash-banner-upload__title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #14532d;
}
.dash-banner-upload__hint {
    font-size: .82rem;
    color: #64748b;
    line-height: 1.4;
}
.dash-banner-upload__arrow {
    flex-shrink: 0;
    color: #1b5e3b;
    transition: transform .2s;
}
.dash-banner-upload:hover .dash-banner-upload__arrow {
    transform: translateX(4px);
}

.dash-grid--upload-page {
    max-width: 1100px;
}

/* Export card */
.dash-card--export {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.dash-export-articuls-input {
    display: flex;
    gap: .5rem;
    align-items: stretch;
}
.dash-export-articuls-field {
    flex: 1;
    min-width: 0;
    padding: .5rem .65rem;
    font-size: .85rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #334155;
}
.dash-export-articuls-field:focus {
    outline: none;
    border-color: #1b5e3b;
    box-shadow: 0 0 0 2px rgba(27, 94, 59, .12);
}
.dash-export-articuls-ok {
    flex-shrink: 0;
    padding: .5rem 1rem;
    font-size: .85rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: #1b5e3b;
    color: #fff;
    cursor: pointer;
    transition: background .15s;
}
.dash-export-articuls-ok:hover { background: #15803d; }
.dash-export-articuls-active {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: 0;
    padding: .55rem .75rem;
    font-size: .85rem;
    font-weight: 500;
    color: #1b5e3b;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}
.dash-export-articuls-change {
    flex-shrink: 0;
    padding: 0;
    font-size: .8rem;
    font-weight: 500;
    border: none;
    background: none;
    color: #64748b;
    cursor: pointer;
    text-decoration: underline;
}
.dash-export-articuls-change:hover { color: #1b5e3b; }
.dash-export-btns {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}
.dash-export-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .55rem .6rem;
    font-size: .8rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.dash-export-btn:hover { background: #f8fafc; border-color: #1b5e3b; color: #1b5e3b; }
.dash-export-opts {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}
.dash-check {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .82rem;
    color: #475569;
    cursor: pointer;
}
.dash-check input { accent-color: #1b5e3b; }
.dash-export-full {
    width: 100%;
    padding: .65rem;
    font-size: .88rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: #16a34a;
    color: #fff;
    cursor: pointer;
    transition: background .15s;
}
.dash-export-full:hover { background: #15803d; }

.dash-export-result {
    font-size: .85rem;
    padding: .5rem .75rem;
    border-radius: 6px;
    min-height: 0;
}
.dash-export-result:empty { display: none; }

/* API card */
.dash-card--api {
    display: flex;
    flex-direction: column;
}
.dash-card-action {
    margin-top: auto;
    padding: .55rem 1rem;
    font-size: .85rem;
    font-weight: 500;
    border: 1px solid #1b5e3b;
    border-radius: 8px;
    background: transparent;
    color: #1b5e3b;
    cursor: pointer;
    transition: background .15s, color .15s;
    text-align: center;
}
.dash-card-action:hover { background: #1b5e3b; color: #fff; }

/* Map card */
.dash-card--map {
    grid-column: 1 / -1;
    padding: 0;
    overflow: hidden;
}
.dash-card--map .dash-card__header {
    padding: 1rem 1.5rem;
    margin-bottom: 0;
}
.dash-map-address {
    margin-left: auto;
    font-size: .82rem;
    font-weight: 400;
    color: #64748b;
}
.dash-map-points {
    display: flex;
    gap: 1.5rem;
    padding: 0 1.5rem .75rem;
    flex-wrap: wrap;
}
.dash-map-point {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .82rem;
    color: #334155;
}
.dash-map-point svg { color: #1b5e3b; flex-shrink: 0; }
.dash-map-wrap {
    width: 100%;
    height: 260px;
    background: #e2e8f0;
}

/* ========== Главная кабинета — B2B-портал ========== */
.dash-home {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.75rem 1.5rem 3rem;
}

/* Карусель сразу под .dash-topbar — меньше зазор сверху */
.dash-home.dash-home--b2b {
    padding-top: 1.1rem;
}

.dash-home__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
    gap: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
    animation: dash-home-fade-up 0.65s ease-out both;
}

.dash-home__hero-main {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.45rem 1.6rem 1.4rem;
    box-shadow: 0 4px 28px rgba(15, 23, 42, 0.06);
}

.dash-home__hero-eyebrow {
    margin: 0 0 .65rem;
    font-size: .8rem;
    line-height: 1.45;
    color: #64748b;
}

.dash-home__hero-eyebrow a {
    color: #1b5e3b;
    font-weight: 700;
    text-decoration: none;
}

.dash-home__hero-eyebrow a:hover {
    text-decoration: underline;
}

.dash-home__hero-title {
    margin: 0 0 .55rem;
    font-size: clamp(1.35rem, 3.2vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    line-height: 1.2;
}

.dash-home__hero-lead {
    margin: 0 0 .75rem;
    font-size: .95rem;
    line-height: 1.55;
    color: #334155;
    font-weight: 500;
}

.dash-home__hero-text {
    margin: 0 0 1.05rem;
    font-size: .87rem;
    line-height: 1.55;
    color: #64748b;
}

.dash-home__hero-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.15rem;
}

.dash-home__hero-partner-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    background: #1b5e3b;
    color: #fff;
    text-decoration: none;
    border: 1px solid #14532d;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.dash-home__hero-partner-btn:hover {
    background: #15803d;
    border-color: #166534;
    color: #fff;
}

.dash-home__hero-partner-btn:focus-visible {
    outline: 2px solid #1b5e3b;
    outline-offset: 2px;
}

.dash-home__hero-aside {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.dash-home__hero-hotline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.4rem;
    background: linear-gradient(165deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 1rem 1.15rem;
    flex: 1;
    min-height: 0;
}

.dash-home__hero-hotline-label {
    display: block;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #64748b;
    margin: 0;
}

.dash-home__hero-hotline-phone {
    display: block;
    font-size: 1.12rem;
    font-weight: 800;
    color: #14532d;
    text-decoration: none;
    letter-spacing: -0.02em;
    margin: 0;
    cursor: pointer;
}

.dash-home__hero-hotline-phone:hover {
    text-decoration: underline;
    color: #1b5e3b;
}

.dash-home__hero-hotline-phone:focus-visible {
    outline: 2px solid #1b5e3b;
    outline-offset: 2px;
    border-radius: 4px;
}

.dash-home__hero-hotline-cta-wrap {
    display: flex;
    justify-content: center;
    margin: 0;
}

.dash-home__hero-hotline-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    color: #fff;
    background: #1b5e3b;
    border: 2px solid #14532d;
    border-radius: 50%;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.dash-home__hero-hotline-cta:hover {
    background: #15803d;
    border-color: #166534;
    color: #fff;
    transform: scale(1.04);
}

.dash-home__hero-hotline-cta:focus-visible {
    outline: 2px solid #1b5e3b;
    outline-offset: 3px;
}

.dash-home__hero-hotline-cta-icon {
    flex-shrink: 0;
    transform-origin: center;
    animation: dash-home-hotline-phone-pulse 2.2s ease-in-out infinite;
}

@keyframes dash-home-hotline-phone-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.14); }
}

@media (prefers-reduced-motion: reduce) {
      .dash-home__hero-hotline-cta:hover {
          transform: none;
      }
  }

.dash-home__hero-hotline-note {
    display: block;
    font-size: .76rem;
    line-height: 1.45;
    color: #64748b;
    margin: 0;
    max-width: 16rem;
}

.dash-home__hero-hotline-note a {
    color: #1b5e3b;
    font-weight: 600;
    text-decoration: none;
}

.dash-home__hero-hotline-note a:hover {
    text-decoration: underline;
}

.dash-home__primary {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    animation: dash-home-fade-up 0.7s ease-out 0.14s both;
}

/* Блок «Наши решения» — данные с emilink.pro/about/ */
.dash-home__solutions {
    margin-bottom: 1.5rem;
    animation: dash-home-fade-up 0.68s ease-out 0.06s both;
}

.dash-home__section-label {
    margin: 0 0 .9rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #64748b;
}

.dash-home__section-label a {
    text-transform: none;
    letter-spacing: normal;
    color: #1b5e3b;
    font-weight: 700;
    text-decoration: none;
}

.dash-home__section-label a:hover {
    text-decoration: underline;
}

.dash-home-solutions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dash-home-solution {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.15rem 1.2rem;
    transition: box-shadow 0.2s, transform 0.2s;
}

.dash-home-solution:hover {
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.dash-home-solution--ntss { border-top: 3px solid #0d9488; }
.dash-home-solution--koscab { border-top: 3px solid #16a34a; }

.dash-home-solution__title {
    margin: 0 0 .5rem;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.dash-home-solution__title a {
    color: #0f172a;
    text-decoration: none;
}

.dash-home-solution__title a:hover {
    color: #1b5e3b;
}

.dash-home-solution__text {
    margin: 0;
    font-size: .81rem;
    line-height: 1.48;
    color: #64748b;
}

.dash-home__geo-note {
    margin: 1rem 0 0;
    font-size: .82rem;
    line-height: 1.55;
    color: #475569;
    padding: .9rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.dash-home__geo-note strong {
    color: #334155;
}

.dash-home__geo-source {
    font-weight: 400;
}

.dash-home__geo-source a {
    color: #1b5e3b;
    font-weight: 600;
    text-decoration: none;
}

.dash-home__geo-source a:hover {
    text-decoration: underline;
}

/* Три спотлайта: акции, новинки, сотрудничество */
.dash-home__spotlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    animation: dash-home-fade-up 0.72s ease-out 0.1s both;
}

.dash-spotlight {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 100%;
    padding: 1.25rem 1.2rem;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8f0;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.dash-spotlight:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.dash-spotlight__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: .9rem;
}

.dash-spotlight__kicker {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    opacity: .85;
    margin-bottom: .25rem;
}

.dash-spotlight__title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: .35rem;
    line-height: 1.25;
    color: #0f172a;
}

.dash-spotlight__desc {
    font-size: .82rem;
    color: #64748b;
    line-height: 1.4;
    flex: 1;
    margin-bottom: .85rem;
}

.dash-spotlight__link {
    font-size: .82rem;
    font-weight: 700;
    margin-top: auto;
}

.dash-spotlight--promo {
    border-color: #fed7aa;
    background: linear-gradient(165deg, #fffbeb 0%, #fff 55%);
}

.dash-spotlight--promo .dash-spotlight__icon {
    background: linear-gradient(145deg, #c2410c, #ea580c);
    color: #fff;
}

.dash-spotlight--promo .dash-spotlight__link { color: #c2410c; }

.dash-spotlight--new {
    border-color: #99f6e4;
    background: linear-gradient(165deg, #f0fdfa 0%, #fff 50%);
}

.dash-spotlight--new .dash-spotlight__icon {
    background: linear-gradient(145deg, #0d9488, #14b8a6);
    color: #fff;
}

.dash-spotlight--new .dash-spotlight__link { color: #0f766e; }

.dash-spotlight--coop {
    border-color: #bfdbfe;
    background: linear-gradient(165deg, #eff6ff 0%, #fff 50%);
}

.dash-spotlight--coop .dash-spotlight__icon {
    background: linear-gradient(145deg, #1d4ed8, #2563eb);
    color: #fff;
}

.dash-spotlight--coop .dash-spotlight__link { color: #1d4ed8; }

/* Закупки и интеграция */
.dash-home__services {
    margin-bottom: 1.75rem;
    animation: dash-home-fade-up 0.74s ease-out 0.04s both;
}

.dash-home-services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.dash-home-svc {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e2e8f0;
    background: #fff;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.dash-home-svc:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.dash-home-svc__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #1b5e3b;
}

.dash-home-svc__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.dash-home-svc__title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.dash-home-svc__desc {
    font-size: .84rem;
    line-height: 1.45;
    color: #64748b;
}

.dash-home-svc__go {
    flex-shrink: 0;
    font-size: 1.15rem;
    font-weight: 400;
    color: #94a3b8;
    align-self: center;
    transition: transform 0.2s, color 0.2s;
}

.dash-home-svc:hover .dash-home-svc__go {
    transform: translateX(4px);
    color: #1b5e3b;
}

.dash-home-svc--catalog {
    background: #f1f5f9;
    border-color: #e2e8f0;
    cursor: default;
    pointer-events: none;
}

.dash-home-svc--catalog:hover {
    transform: none;
    box-shadow: none;
}

.dash-home-svc--catalog .dash-home-svc__icon {
    background: #e2e8f0;
    color: #94a3b8;
}

.dash-home-svc--catalog .dash-home-svc__title {
    color: #94a3b8;
}

.dash-home-svc--catalog .dash-home-svc__desc {
    color: #a8b4c4;
}

.dash-home-svc--data {
    background: linear-gradient(145deg, #ecfdf5 0%, #fff 45%);
    border-color: #86efac;
}

.dash-home-svc--data .dash-home-svc__icon {
    background: #1b5e3b;
    color: #fff;
}

.dash-home-svc--data .dash-home-svc__title { color: #14532d; }

/* Блок сотрудничества */
.dash-home__partnership {
    animation: dash-home-fade-up 0.76s ease-out 0.16s both;
}

.dash-home-partnership {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 1.5rem;
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #fff 40%, #f0fdf4 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(27, 94, 59, 0.06);
}

.dash-home-partnership__title {
    margin: 0 0 .65rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.dash-home-partnership__lead {
    margin: 0 0 1rem;
    font-size: .9rem;
    line-height: 1.55;
    color: #475569;
}

.dash-home-partnership__list {
    margin: 0;
    padding-left: 1.15rem;
    font-size: .86rem;
    line-height: 1.55;
    color: #334155;
}

.dash-home-partnership__list li { margin-bottom: .45rem; }

.dash-home-partnership__cta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    padding: 1.15rem 1.25rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}

.dash-home-partnership__intro {
    margin: 0 0 1rem;
    font-size: .87rem;
    line-height: 1.55;
    color: #334155;
    font-weight: 500;
}

.dash-home-partnership__hint {
    margin: 0 0 .35rem;
    font-size: .84rem;
    line-height: 1.5;
    color: #64748b;
}

.dash-home-partnership__hint--email {
    margin: 0 0 1rem;
}

.dash-home-partnership__hint a {
    color: #1b5e3b;
    font-weight: 600;
}

.dash-home-partnership__hint a:hover {
    text-decoration: underline;
}

.dash-home-partnership__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .65rem 1.2rem;
    font-size: .88rem;
    font-weight: 700;
    color: #fff;
    background: #1b5e3b;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.15s;
}

.dash-home-partnership__btn:hover {
    background: #15803d;
}

/* Карусель баннеров */
.dash-home__carousel-wrap {
    margin-bottom: 1.75rem;
    animation: dash-home-fade-up 0.75s ease-out 0.08s both;
}

/* Плитки разделов каталога (NTSS / KOSCAB), равномерная сетка без «дыр» в ряду */
.dash-home__catalog-tiles {
    margin-bottom: 1.75rem;
    animation: dash-home-fade-up 0.72s ease-out 0.1s both;
}

.dash-home__catalog-heading {
    margin: 0 0 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #334155;
    letter-spacing: -0.02em;
    line-height: 1.35;
}

/* Плитки каталога: flex — последний ряд без пустых «ячеек» (у grid auto-fit это не везде срабатывает) */
.dash-home-catalog-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    background: #d8e0e8;
    border: 1px solid #d8e0e8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.dash-home-catalog-tile {
    flex: 1 1 220px;
    min-width: min(100%, 220px);
    max-width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 132px;
    padding: 1.15rem 0.9rem;
    background: #fff;
    color: #1b5e3b;
    text-decoration: none;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    transition: color 0.22s ease, box-shadow 0.22s ease;
    box-sizing: border-box;
}

.dash-home-catalog-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(187, 247, 208, 0.55) 0%,
        rgba(220, 252, 231, 0.28) 42%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
    z-index: 0;
}

.dash-home-catalog-tile:hover {
    color: #14532d;
    box-shadow: inset 0 0 0 1px rgba(27, 94, 59, 0.12);
    z-index: 1;
}

.dash-home-catalog-tile:hover::before {
    opacity: 1;
}

.dash-home-catalog-tile:focus-visible {
    outline: 2px solid #1b5e3b;
    outline-offset: -2px;
}

.dash-home-catalog-tile__icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    color: #1b5e3b;
    opacity: 0.95;
}

.dash-home-catalog-tile:hover .dash-home-catalog-tile__icon {
    color: #14532d;
}

.dash-home-catalog-tile__label {
    position: relative;
    z-index: 1;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    line-height: 1.38;
    color: #334155;
    max-width: 14rem;
}

.dash-home-catalog-tile:hover .dash-home-catalog-tile__label {
    color: #14532d;
}

.dash-home-carousel {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.dash-home-carousel__strip {
    display: flex;
    width: 300%;
    animation: dash-home-carousel-slide 9s ease-in-out infinite;
}

.dash-home-carousel__slide {
    position: relative;
    flex: 0 0 33.333%;
    min-height: 280px;
    padding: 2rem 2.25rem;
    display: flex;
    align-items: flex-end;
    box-sizing: border-box;
    overflow: hidden;
}

/* Анимированные текстуры поверх базового градиента */
.dash-home-carousel__slide::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.85;
    mix-blend-mode: soft-light;
    background-repeat: repeat;
}

.dash-home-carousel__slide::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 180%;
    height: 180%;
    margin-left: -90%;
    margin-top: -90%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.22;
    mix-blend-mode: overlay;
}

.dash-home-carousel__slide--a::before {
    background-image:
        repeating-linear-gradient(
            -32deg,
            rgba(255, 255, 255, 0) 0px,
            rgba(255, 255, 255, 0) 11px,
            rgba(255, 255, 255, 0.07) 11px,
            rgba(255, 255, 255, 0.07) 12px
        ),
        repeating-linear-gradient(
            58deg,
            rgba(0, 0, 0, 0) 0px,
            rgba(0, 0, 0, 0) 18px,
            rgba(0, 0, 0, 0.11) 18px,
            rgba(0, 0, 0, 0.11) 19px
        ),
        radial-gradient(ellipse 80% 60% at 20% 30%, rgba(255, 255, 255, 0.18), transparent 55%);
    background-size: 220px 220px, 180px 180px, 200% 200%;
    background-position: 0 0, 0 0, 0% 0%;
    animation: dash-home-tex-grid-a 14s linear infinite;
}

.dash-home-carousel__slide--a::after {
    background: conic-gradient(
        from 210deg at 50% 50%,
        rgba(255, 255, 255, 0) 0deg,
        rgba(255, 255, 255, 0.12) 45deg,
        rgba(255, 255, 255, 0) 95deg,
        rgba(0, 0, 0, 0.08) 160deg,
        rgba(255, 255, 255, 0) 360deg
    );
    animation: dash-home-tex-rotate-a 22s linear infinite;
}

.dash-home-carousel__slide--b::before {
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0) 0px,
            rgba(255, 255, 255, 0) 7px,
            rgba(255, 255, 255, 0.06) 7px,
            rgba(255, 255, 255, 0.06) 8px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(0, 0, 0, 0) 0px,
            rgba(0, 0, 0, 0) 13px,
            rgba(0, 0, 0, 0.07) 13px,
            rgba(0, 0, 0, 0.07) 14px
        ),
        radial-gradient(circle at 75% 65%, rgba(255, 255, 255, 0.2), transparent 45%);
    background-size: 100% 140px, 160px 100%, 150% 150%;
    background-position: 0 0, 0 0, 100% 50%;
    animation: dash-home-tex-grid-b 11s linear infinite;
}

.dash-home-carousel__slide--b::after {
    background: conic-gradient(
        from 90deg at 40% 60%,
        rgba(255, 255, 255, 0) 0deg,
        rgba(167, 243, 208, 0.15) 70deg,
        rgba(255, 255, 255, 0) 140deg,
        rgba(255, 255, 255, 0.1) 220deg,
        rgba(255, 255, 255, 0) 360deg
    );
    animation: dash-home-tex-rotate-b 18s linear infinite reverse;
}

.dash-home-carousel__slide--c::before {
    background-image:
        repeating-linear-gradient(
            125deg,
            rgba(255, 255, 255, 0) 0px,
            rgba(255, 255, 255, 0) 9px,
            rgba(255, 255, 255, 0.065) 9px,
            rgba(255, 255, 255, 0.065) 10px
        ),
        repeating-radial-gradient(
            circle at 30% 40%,
            rgba(255, 255, 255, 0.06),
            rgba(255, 255, 255, 0.06) 2px,
            transparent 3px,
            transparent 14px
        ),
        linear-gradient(180deg, rgba(15, 23, 42, 0.15), transparent 40%, rgba(56, 189, 248, 0.12));
    background-size: 200px 200px, 24px 24px, 100% 100%;
    background-position: 0 0, 0 0, 0 0;
    animation: dash-home-tex-grid-c 16s linear infinite;
}

.dash-home-carousel__slide--c::after {
    background: conic-gradient(
        from 0deg at 55% 45%,
        rgba(255, 255, 255, 0) 0deg,
        rgba(147, 197, 253, 0.2) 55deg,
        rgba(255, 255, 255, 0) 110deg,
        rgba(30, 58, 138, 0.12) 200deg,
        rgba(255, 255, 255, 0) 360deg
    );
    animation: dash-home-tex-rotate-c 26s linear infinite;
}

@keyframes dash-home-tex-grid-a {
    0% { background-position: 0 0, 0 0, 0% 20%; }
    100% { background-position: 220px 110px, -180px 90px, 100% 80%; }
}

@keyframes dash-home-tex-grid-b {
    0% { background-position: 0 0, 0 0, 0% 40%; }
    100% { background-position: 0 140px, 160px 0, 100% 60%; }
}

@keyframes dash-home-tex-grid-c {
    0% { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: -200px 160px, 24px 24px, 0 0; }
}

@keyframes dash-home-tex-rotate-a {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes dash-home-tex-rotate-b {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes dash-home-tex-rotate-c {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(-360deg) scale(1.02); }
}

.dash-home-carousel__slide--a {
    background: linear-gradient(135deg, #7c2d12 0%, #c2410c 40%, #b45309 100%);
    color: #fff;
}

.dash-home-carousel__slide--b {
    background: linear-gradient(135deg, #134e4a 0%, #0d9488 45%, #14b8a6 100%);
    color: #fff;
}

.dash-home-carousel__slide--c {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #38bdf8 100%);
    color: #fff;
}

.dash-home-carousel__glow {
    position: absolute;
    inset: -40% -20% auto auto;
    width: 70%;
    height: 140%;
    z-index: 1;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.22) 0%, transparent 65%);
    pointer-events: none;
    animation: dash-home-glow-drift 8s ease-in-out infinite alternate;
}

.dash-home-carousel__slide--b .dash-home-carousel__glow {
    animation-delay: -3s;
}

.dash-home-carousel__slide--c .dash-home-carousel__glow {
    animation-delay: -5s;
}

.dash-home-carousel__content {
    position: relative;
    z-index: 2;
    max-width: 28rem;
}

.dash-home-carousel__tag {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: .28rem .65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-bottom: .85rem;
}

.dash-home-carousel__headline {
    margin: 0 0 .55rem;
    font-size: clamp(1.35rem, 3.5vw, 1.75rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.dash-home-carousel__text {
    margin: 0 0 1.1rem;
    font-size: .92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.88);
}

.dash-home-carousel__cta {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .62rem 1.2rem;
    font-size: .88rem;
    font-weight: 600;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.dash-home-carousel__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.dash-home-carousel__cta--ghost {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: none;
}

.dash-home-carousel__cta--ghost:hover {
    background: rgba(255, 255, 255, 0.28);
}

.dash-home-carousel__dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: .45rem;
    z-index: 2;
}

.dash-home-carousel__dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    animation: dash-home-dot-pulse 9s ease-in-out infinite;
}

.dash-home-carousel__dots span:nth-child(2) { animation-delay: 3s; }
.dash-home-carousel__dots span:nth-child(3) { animation-delay: 6s; }

/* Полный цикл 9s ≈ 3s на слайд */
@keyframes dash-home-carousel-slide {
    0%, 27% { transform: translateX(0); }
    33%, 60% { transform: translateX(-33.333%); }
    66%, 93% { transform: translateX(-66.666%); }
    100% { transform: translateX(0); }
}

@keyframes dash-home-glow-drift {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(-12%, 8%) rotate(4deg); }
}

@keyframes dash-home-dot-pulse {
    0%, 24% { opacity: 1; transform: scale(1.2); }
    27%, 57% { opacity: 0.5; transform: scale(1); }
    60%, 90% { opacity: 0.5; transform: scale(1); }
    93%, 100% { opacity: 1; transform: scale(1.2); }
}

@keyframes dash-home-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Карточки метрик (сайдбар / компактно) */
.dash-home-stat {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.1rem 1rem 1rem;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.2s;
}

.dash-home-stat--compact {
    padding: .85rem .9rem .8rem;
    border-radius: 12px;
}

.dash-home-stat--compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(27, 94, 59, 0.07);
}

.dash-home-stat--compact .dash-home-stat__icon {
    width: 38px;
    height: 38px;
    margin-bottom: .55rem;
    border-radius: 10px;
}

.dash-home-stat--compact .dash-home-stat__value {
    font-size: 1.15rem;
}

.dash-home-stat--compact .dash-home-stat__value--price {
    font-size: .95rem;
}

.dash-home-stat--compact .dash-home-stat__chart {
    height: 32px;
    margin-bottom: .5rem;
}

.dash-home-stat__chart--sm {
    height: 28px;
}

.dash-home-stat__ring--sm {
    width: 40px;
    height: 40px;
    margin-bottom: .4rem;
}

.dash-home-stat__dual--sm {
    min-height: 28px;
    margin-bottom: .45rem;
}

.dash-home-aside__stats .dash-home-stat:hover {
    box-shadow: 0 10px 30px rgba(27, 94, 59, 0.08);
    transform: translateY(-2px);
}

.dash-home-stat--accent {
    background: linear-gradient(145deg, #ecfdf5 0%, #fff 50%);
    border-color: #bbf7d0;
}

.dash-home-stat__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #1b5e3b;
    margin-bottom: .75rem;
}

.dash-home-stat__icon--accent {
    background: #1b5e3b;
    color: #fff;
}

.dash-home-stat__icon--pulse {
    animation: dash-home-icon-pulse 2.6s ease-in-out infinite;
}

@keyframes dash-home-icon-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(27, 94, 59, 0); }
    50% { box-shadow: 0 0 0 8px rgba(27, 94, 59, 0.12); }
}

.dash-home-stat__chart {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 40px;
    margin-bottom: .65rem;
}

.dash-home-stat__bar {
    flex: 1;
    border-radius: 4px;
    background: linear-gradient(180deg, #34d399 0%, #1b5e3b 100%);
    height: 0;
    animation: dash-home-bar-grow 1.1s ease-out 0.4s forwards;
}

.dash-home-stat__bar:nth-child(1) { animation-delay: 0.35s; }
.dash-home-stat__bar:nth-child(2) { animation-delay: 0.45s; }
.dash-home-stat__bar:nth-child(3) { animation-delay: 0.55s; }
.dash-home-stat__bar:nth-child(4) { animation-delay: 0.65s; }

@keyframes dash-home-bar-grow {
    to { height: var(--h, 70%); }
}

.dash-home-stat__ring {
    width: 48px;
    height: 48px;
    margin-bottom: .5rem;
}

.dash-home-stat__ring-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.dash-home-stat__ring-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 3;
}

.dash-home-stat__ring-fill {
    fill: none;
    stroke: #1b5e3b;
    stroke-width: 3;
    stroke-linecap: round;
    animation: dash-home-ring-spin 1.4s ease-out 0.3s both;
}

@keyframes dash-home-ring-spin {
    from { stroke-dasharray: 0, 100; }
    to { stroke-dasharray: 88, 100; }
}

.dash-home-stat__dual {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .6rem;
    min-height: 36px;
}

.dash-home-stat__line {
    flex: 1;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #1b5e3b, #34d399);
    transform: scaleX(0);
    transform-origin: left;
    animation: dash-home-line-grow 0.9s ease-out 0.5s forwards;
}

@keyframes dash-home-line-grow {
    to { transform: scaleX(1); }
}

.dash-home-stat__pin {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1b5e3b;
    animation: dash-home-pin 1.8s ease-in-out infinite;
}

.dash-home-stat__pin--2 {
    animation-delay: 0.5s;
}

@keyframes dash-home-pin {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.75; }
}

.dash-home-stat__value {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.dash-home-stat__value--price {
    font-size: 1.1rem;
    color: #14532d;
    word-break: break-word;
}

.dash-home-stat__label {
    font-size: .78rem;
    color: #64748b;
    line-height: 1.35;
    margin-top: .2rem;
    display: block;
}

/* Процесс */
.dash-home__flow {
    margin-bottom: 0;
    animation: dash-home-fade-up 0.8s ease-out 0.18s both;
}

.dash-home__section-title {
    text-align: center;
    margin: 0 0 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #334155;
}

.dash-home__section-title--left {
    text-align: left;
    margin-bottom: 1rem;
}

.dash-home-flow {
    list-style: none;
    margin: 0;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.dash-home-flow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 8%;
    right: 8%;
    height: 3px;
    background: linear-gradient(90deg, #1b5e3b, #94a3b8, #1b5e3b);
    opacity: 0.25;
    border-radius: 2px;
    transform: translateY(-50%);
    pointer-events: none;
}

.dash-home-flow__step {
    flex: 1;
    min-width: 120px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.dash-home-flow__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 auto .55rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    background: linear-gradient(145deg, #1b5e3b, #22c55e);
    color: #fff;
    box-shadow: 0 4px 12px rgba(27, 94, 59, 0.35);
    animation: dash-home-step-pop 0.55s ease-out both;
}

.dash-home-flow__step:nth-child(1) .dash-home-flow__num { animation-delay: 0.1s; }
.dash-home-flow__step:nth-child(2) .dash-home-flow__num { animation-delay: 0.2s; }
.dash-home-flow__step:nth-child(3) .dash-home-flow__num { animation-delay: 0.3s; }
.dash-home-flow__step:nth-child(4) .dash-home-flow__num { animation-delay: 0.4s; }

@keyframes dash-home-step-pop {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.dash-home-flow__label {
    font-size: .8rem;
    font-weight: 600;
    color: #475569;
    line-height: 1.35;
}

.dash-home__map-section {
    animation: dash-home-fade-up 0.85s ease-out 0.26s both;
}

.dash-home-map-card {
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

.dash-home-map-card .dash-map-wrap {
    height: 300px;
}

@media (max-width: 900px) {
    .dash-home__spotlights {
        grid-template-columns: 1fr;
    }
    .dash-home-solutions-grid {
        grid-template-columns: 1fr;
    }
    .dash-home-services-grid {
        grid-template-columns: 1fr;
    }
    .dash-home-partnership {
        grid-template-columns: 1fr;
    }
    .dash-home-flow::before { display: none; }
}

@media (max-width: 720px) {
    .dash-home__top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .dash-topbar { padding: .6rem 1rem; }
    .dash-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    .dash-user-info { display: none; }
    .dash-home {
        padding: 1.25rem 1rem 2rem;
    }
    .dash-home.dash-home--b2b {
        padding-top: 0.85rem;
    }
    .dash-home-carousel__slide {
        min-height: 300px;
        padding: 1.5rem 1.25rem;
    }
    .dash-home-svc {
        flex-wrap: wrap;
    }
    .dash-home-svc__go {
        align-self: flex-end;
    }
    .dash-home-flow {
        flex-direction: column;
        align-items: stretch;
    }
    .dash-home-flow__step {
        display: flex;
        align-items: center;
        gap: .85rem;
        text-align: left;
    }
    .dash-home-flow__num {
        margin: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dash-home-carousel__strip,
    .dash-home-carousel__glow,
    .dash-home-carousel__dots span,
    .dash-home-carousel__slide::before,
    .dash-home-carousel__slide::after,
    .dash-home-stat__icon--pulse,
    .dash-home__hero-hotline-cta-icon,
    .dash-home-stat__bar,
    .dash-home-stat__ring-fill,
    .dash-home-stat__line,
    .dash-home-stat__pin,
    .dash-home-flow__num {
        animation: none !important;
    }
    .dash-home-stat__bar {
        height: var(--h, 70%);
    }
    .dash-home-stat__ring-fill {
        stroke-dasharray: 88, 100;
    }
    .dash-home-stat__line {
        transform: scaleX(1);
    }
    .dash-home__top,
    .dash-home__carousel-wrap,
    .dash-home__catalog-tiles,
    .dash-home__solutions,
    .dash-home__primary,
    .dash-home__spotlights,
    .dash-home__services,
    .dash-home__flow,
    .dash-home__partnership,
    .dash-home__map-section {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .dash-home-svc:hover,
    .dash-spotlight:hover,
    .dash-home-solution:hover,
    .dash-home-catalog-tile:hover {
        transform: none;
    }
    .dash-home-carousel__strip {
        transform: translateX(0);
    }
    .partner-dashboard-home .page-hitech-bg__hex {
        animation: none !important;
    }
}

.export-result--success { background: #dcfce7; color: #166534; }
.export-result--error   { background: #fee2e2; color: #991b1b; }
.export-result--loading { background: #fef9c3; color: #854d0e; }

.btn-api { display: none; }

.price-type-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #dbeafe;
    color: #1e40af;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Варианты по типу */
.price-type-badge--retail  { background: #dbeafe; color: #1e40af; }
.price-type-badge--rrc_10 { background: #fef9c3; color: #854d0e; }
.price-type-badge--rrc_20 { background: #dcfce7; color: #166534; }
.price-type-badge--rrc_30 { background: #fce7f3; color: #9d174d; }
.price-type-badge--ntss_rrc_10 { background: #e0e7ff; color: #3730a3; }
.price-type-badge--ntss_rrc_20 { background: #ede9fe; color: #5b21b6; }
.price-type-badge--ntss_rrc_30 { background: #f5f3ff; color: #6d28d9; }
.price-type-badge--ntss { background: #e0e7ff; color: #3730a3; }

.brand-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    vertical-align: middle;
    background: #e2e8f0;
    color: #334155;
}
.brand-badge--koscab { background: #dbeafe; color: #1e40af; }
.brand-badge--ntss   { background: #e0f2fe; color: #0369a1; }
.brand-badge--other  { background: #ede9fe; color: #6d28d9; }

.brand-checkboxes {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.brand-checkbox-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.95rem;
}
.brand-checkbox-option input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--accent, #2563eb);
    cursor: pointer;
}

/* --- Строки выгрузки --- */
.export-block {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.export-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.export-row--inline {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.export-row--inline .btn-export {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    font-size: .85rem;
    padding: .5rem .6rem;
}

.export-row--full {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e5e7eb;
}

.btn-export--full {
    background: #16a34a;
    width: 100%;
}

.btn-export--full:hover:not(:disabled) {
    background: #15803d;
}

/* --- Чекбоксы типов цен --- */
.export-checkboxes {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2563eb;
}

.export-result {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.export-result--loading {
    background: #f0f9ff;
    color: #0369a1;
}

.export-result--success {
    background: #f0fdf4;
    color: #15803d;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.btn-download-export {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: .4rem .9rem;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
}
.btn-download-export:hover {
    background: #15803d;
}

.export-result--error {
    background: #fef2f2;
    color: #b91c1c;
}

/* --- Кабинет партнёра: модалка API --- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal[hidden] {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-box {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.modal-box--api {
    max-width: 560px;
}

.modal-header__actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-structure {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #7c3aed;
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s, color .15s;
}
.btn-structure:hover {
    background: #ede9fe;
    color: #5b21b6;
}

.modal--structure {
    z-index: 1050;
}
.modal-box--structure {
    max-width: 540px;
    max-height: 85vh;
}

.structure-hint {
    margin: 0 0 .75rem;
    font-size: .88rem;
    color: #475569;
}
.structure-hint code {
    font-size: .82rem;
    background: #f1f5f9;
    padding: .1rem .35rem;
    border-radius: 4px;
}

.structure-toolbar {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}
.structure-toolbar__btns {
    display: flex;
    gap: .35rem;
    flex-shrink: 0;
}

.structure-filter {
    flex: 1;
    min-width: 160px;
    padding: .45rem .7rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: .9rem;
}
.structure-filter:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}

.structure-status {
    font-size: .82rem;
    color: #64748b;
    margin-bottom: .5rem;
}

.structure-list {
    max-height: 40vh;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: .25rem 0;
}

.structure-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .75rem;
    font-size: .9rem;
    cursor: pointer;
    user-select: none;
    transition: background .1s;
}
.structure-item:hover {
    background: #f8fafc;
}
.structure-item input {
    width: 16px;
    height: 16px;
    accent-color: #7c3aed;
    cursor: pointer;
    flex-shrink: 0;
}
.structure-item span {
    min-width: 0;
    word-break: break-word;
}
.structure-item[hidden] { display: none; }

.structure-footer {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid #e5e7eb;
}

.structure-counter {
    font-size: .85rem;
    color: #64748b;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header--with-options {
    align-items: flex-start;
    gap: 0.75rem;
}

.modal-header__title-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    min-width: 0;
    flex: 1;
}

.modal-header__title-block h2 {
    margin: 0;
}

.admin-api-only-photo {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.admin-api-only-photo input {
    width: 16px;
    height: 16px;
    accent-color: #7c3aed;
    cursor: pointer;
    flex-shrink: 0;
}

.admin-api-header-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.1rem;
    margin-top: 0.35rem;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 8px;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.modal-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
}

.api-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.api-toggle-label {
    font-weight: 500;
    color: #334155;
}

.api-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.api-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.api-toggle__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: 0.2s;
}

.api-toggle__slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: 0.2s;
}

.api-toggle input:checked + .api-toggle__slider {
    background: #16a34a;
}

.api-toggle input:checked + .api-toggle__slider::before {
    transform: translateX(22px);
}

.api-toggle-hint {
    font-size: 0.9rem;
    color: #64748b;
}

.api-demo-hint {
    margin: 0 0 1rem;
    padding: 0.5rem 0.75rem;
    background: #f0f9ff;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #0369a1;
}

.api-methods h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
}

.api-method {
    margin: 0 0 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.api-method:last-of-type {
    border-bottom: none;
}

.api-method dt {
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.api-method dt code {
    font-size: 0.85rem;
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
}

.api-method dd {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
}

.api-auth-hint {
    margin: 1rem 0 0;
    font-size: 0.85rem;
    color: #64748b;
}

.api-token-block {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.api-token-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #334155;
}

.api-token-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.api-token-name {
    flex: 1;
    min-width: 140px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
}

.btn-api-generate {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.btn-api-generate:hover:not(:disabled) {
    background: #15803d;
}

.btn-api-generate:disabled {
    opacity: 0.7;
    cursor: wait;
}

.api-token-display {
    margin-top: 0.75rem;
}

.api-token-warning {
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    color: #b91c1c;
}

.api-token-value-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.api-token-value {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
    background: #fff;
}

.btn-copy {
    flex-shrink: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid #94a3b8;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-copy:hover {
    background: #f1f5f9;
}

.api-token-masked {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.api-token-masked-label {
    color: #64748b;
    margin-right: 0.35rem;
}

.api-token-masked code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.api-token-name-display {
    color: #64748b;
    margin-left: 0.35rem;
}

/* --- Админка --- */
.admin-page .page {
    align-items: flex-start;
    justify-content: flex-start;
    padding: 2rem;
}

.admin-layout {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.admin-header__logout {
    flex-shrink: 0;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.admin-main {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
}

/* Плитки KOSCAB / NTSS (Databases) */
.db-tiles {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.db-tile {
    flex: 1 1 280px;
    min-width: 0;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.db-tile__title {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.db-tile__section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.75rem;
}

.db-tile__section:first-of-type {
    margin-top: 0;
}

.db-tile__label {
    font-size: 0.8rem;
    color: #64748b;
}

.db-tile__value {
    font-weight: 500;
    color: #1e293b;
}

.db-tile__value--missing {
    color: #b91c1c;
    font-weight: 500;
}

.db-tile__meta {
    font-size: 0.9rem;
    color: #475569;
}

.db-tile__dates {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    margin-top: 0.15rem;
}

.db-tile__meta--updated {
    font-size: 0.85rem;
    color: #64748b;
}

.db-tile__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.db-tile__head .db-tile__title {
    margin: 0;
    border: none;
    padding: 0;
}

.db-tile__head-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.db-tile__api-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}

.db-tile__api-status--ok {
    background: #dcfce7;
    color: #16a34a;
    animation: api-pulse-ok 2s ease-in-out infinite;
}

.db-tile__api-status--off {
    background: #fee2e2;
    color: #dc2626;
    animation: api-pulse-off 1.5s ease-in-out infinite;
}

.db-tile__export-props {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: #7c3aed;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(124, 58, 237, 0.35);
}
.db-tile__export-props:hover {
    background: #6d28d9;
}
.db-tile__export-props:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}
.db-tile__export-props-icon {
    animation: db-tile-gear-spin 2.4s linear infinite;
}
@keyframes db-tile-gear-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.export-props-list {
    max-height: min(60vh, 520px);
}

@keyframes api-pulse-ok {
    0%, 100% { opacity: 1; }
    50%      { opacity: .45; }
}

@keyframes api-pulse-off {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
}

.db-tile__refresh {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}
.db-tile__refresh:hover {
    color: #0f172a;
    background: #e2e8f0;
}
.db-tile__refresh:disabled {
    opacity: 0.6;
    cursor: wait;
}

.db-tile__purge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: #fee2e2;
    color: #dc2626;
    cursor: pointer;
}
.db-tile__purge:hover:not(:disabled) {
    background: #fecaca;
    color: #b91c1c;
}
.db-tile__purge:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.db-purge-input {
    width: 100%;
    min-height: 8rem;
    resize: vertical;
    margin-top: 0.35rem;
    margin-bottom: 1rem;
    font-family: inherit;
}

.db-purge-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.db-purge-confirm-text {
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.db-purge-status {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

.db-purge-status--info {
    color: #1d4ed8;
}

.db-purge-status--ok {
    color: #047857;
}

.db-purge-status--error {
    color: #b91c1c;
}

.price-articuls-panel {
    margin-top: 0;
}

.price-articuls-file-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin: 0.85rem 0 1rem;
}

.price-articuls-file-btn {
    margin: 0;
    cursor: pointer;
}

.price-articuls-file-name {
    font-size: 0.88rem;
    color: #64748b;
}

.price-articuls-count {
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.price-articuls-result {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
    color: #166534;
}

.modal-box--confirm {
    max-width: 28rem;
}

/* Плитки KOSCAB / NTSS (Databases) */
.db-tiles {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.db-tile {
    flex: 1 1 280px;
    min-width: 0;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}

.db-tile__title {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.db-tile__section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.75rem;
}

.db-tile__section:first-of-type {
    margin-top: 0;
}

.db-tile__label {
    font-size: 0.8rem;
    color: #64748b;
}

.db-tile__value {
    font-weight: 500;
    color: #1e293b;
}

.db-tile__value--missing {
    color: #b91c1c;
    font-weight: 500;
}

.db-tile__meta {
    font-size: 0.9rem;
    color: #475569;
}

.no-price-badge {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.78rem;
}

.no-price-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid #dc2626;
    background: transparent;
    color: #dc2626;
    font-size: 0.7rem;
    font-weight: 700;
    font-style: italic;
    font-family: serif;
    cursor: pointer;
    margin-left: 4px;
    padding: 0;
    vertical-align: middle;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.no-price-info-btn:hover {
    background: #dc2626;
    color: #fff;
}

.no-price-list {
    max-height: 55vh;
    overflow-y: auto;
}

.no-price-item {
    padding: 5px 10px;
    font-size: 0.88rem;
    font-family: monospace;
    border-bottom: 1px solid #f1f5f9;
}

.no-price-item:last-child {
    border-bottom: none;
}

.no-price-more {
    padding: 10px;
    font-size: 0.82rem;
    color: #64748b;
    font-style: italic;
    border-top: 1px dashed #e2e8f0;
    margin-top: 4px;
}

.no-price-total {
    font-size: 0.82rem;
    color: #64748b;
    white-space: nowrap;
}

.toolbar {
    margin-bottom: 1rem;
}

.toolbar--wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.admin-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Кнопка «Сохранить все базы данных»: градиент во время сборки архива */
.btn-save-all-db {
    position: relative;
    overflow: hidden;
    font: inherit;
    font-weight: inherit;
}
.btn-save-all-db__label {
    position: relative;
    z-index: 2;
}
.btn-save-all-db.is-loading {
    cursor: wait;
}
.btn-save-all-db.is-loading::after {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 1;
    border-radius: 7px;
    background: linear-gradient(
        105deg,
        rgba(239, 246, 255, 0) 0%,
        rgba(191, 219, 254, 0.55) 22%,
        rgba(96, 165, 250, 0.75) 50%,
        rgba(191, 219, 254, 0.55) 78%,
        rgba(239, 246, 255, 0) 100%
    );
    background-size: 220% 100%;
    animation: admin-save-db-gradient 1.25s linear infinite;
    pointer-events: none;
}
@keyframes admin-save-db-gradient {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.modal-box--save-db {
    max-width: 780px;
}

.save-db-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 700px) {
    .save-db-tiles {
        grid-template-columns: 1fr;
    }
}

.save-db-tile {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.save-db-tile--auto {
    background: #faf5ff;
    border-color: #e9d5ff;
}

.save-db-tile__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
}

.save-db-tile__text {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #475569;
    flex: 1;
}

.save-db-tile__warn {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    padding: 0.45rem 0.55rem;
}

.save-db-tile__action {
    align-self: flex-start;
    margin-top: 0.15rem;
}

.save-db-auto-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.save-db-auto-row--folder {
    align-items: center;
}

.save-db-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: #475569;
    min-width: 7rem;
}

.save-db-time {
    padding: 0.38rem 0.55rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.92rem;
    font-family: inherit;
    background: #fff;
}

.save-db-folder-hint {
    font-size: 0.84rem;
    color: #64748b;
    word-break: break-word;
}

.save-db-check {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: #334155;
    cursor: pointer;
    margin: 0.15rem 0 0;
}

.save-db-check input {
    margin-top: 0.2rem;
}

.modal-box--restore-db {
    max-width: 32rem;
}

.restore-db-hint {
    margin: 0 0 1rem;
    line-height: 1.5;
    color: #4b5563;
}

.restore-db-file {
    display: block;
    margin-bottom: 0.35rem;
}

.restore-db-file__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.35rem;
}

.restore-db-file__input {
    display: block;
    width: 100%;
    max-width: 100%;
    font: inherit;
}

.restore-db-file-name {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    color: #6b7280;
    word-break: break-all;
}

.restore-db-status {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

.restore-db-status--info {
    color: #1d4ed8;
}

.restore-db-status--ok {
    color: #047857;
}

.restore-db-status--error {
    color: #b91c1c;
}

.btn-restore-db.is-loading {
    cursor: wait;
    opacity: 0.75;
}

.upload-inline {
    display: inline-flex;
    align-items: center;
}

.upload-inline__input {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table tbody tr {
    font-size: 0.7rem;
}

.data-table th {
    font-weight: 600;
    color: #374151;
    font-size: 0.7rem;
	text-align: center;
}

.data-table .actions {
    white-space: nowrap;
}

.data-table .actions .btn,
.data-table .actions .inline-form {
    margin-right: 0.5rem;
}

.data-table .actions .inline-form {
    display: inline;
}

.empty-state {
    color: #666;
    margin: 0;
}

.empty-state a {
    color: #2563eb;
}

/* --- Форма в админке --- */
.form-page .card-form {
    max-width: 400px;
}

.card-form label {
    display: block;
    margin-bottom: 1rem;
}

.card-form label span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.card-form input[type="text"],
.card-form input[type="password"],
.card-form select.form-select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.card-form input:focus,
.card-form select:focus {
    outline: none;
    border-color: #2563eb;
}

.form-readonly {
    display: block;
    padding: 0.6rem 0;
    font-weight: 500;
    color: #374151;
}

/* --- Группа полей (блок тип цен) --- */
.field-group {
    margin-bottom: 1rem;
}

.field-group__label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

.radio-group {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.field-group--inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}

.field-group--inline .field-group__label {
    margin-bottom: 0;
    flex-shrink: 0;
}

.price-type-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.75rem 1rem;
    min-width: 0;
}

.price-type-option {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.field-hint {
    margin: 0.35rem 0 0.75rem;
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.45;
}

.api-hours-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.api-hours-counter {
    font-size: 0.82rem;
    color: #475569;
}

.api-hours-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.4rem;
    max-width: 36rem;
}

.api-hour-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.35rem 0.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 0.8rem;
    user-select: none;
}

.api-hour-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.api-hour-option:has(input:checked) {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
    font-weight: 600;
}

@media (max-width: 720px) {
    .api-hours-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
}

.radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #2563eb;
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
}

.flash-messages .alert {
    margin-bottom: 1rem;
}

/* --- Кнопка и модалка тестирования API --- */
.btn-api-test {
    background: #7c3aed;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}
.btn-api-test:hover { background: #6d28d9; }

.modal-box--apitest {
    max-width: 700px;
}

.apitest-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.apitest-summary {
    font-size: 0.9rem;
    color: #475569;
}

.apitest-progress {
    margin-bottom: 1rem;
}
.apitest-progress__bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}
.apitest-progress__fill {
    height: 100%;
    width: 0%;
    background: #2563eb;
    border-radius: 3px;
    transition: width 0.3s;
}

.apitest-results {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.apitest-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.88rem;
    line-height: 1.45;
}
.apitest-row:last-child { border-bottom: none; }

.apitest-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 1px;
}
.apitest-icon--pass { background: #dcfce7; color: #16a34a; }
.apitest-icon--fail { background: #fee2e2; color: #dc2626; }
.apitest-icon--run  { background: #dbeafe; color: #2563eb; }
.apitest-icon--skip { background: #f1f5f9; color: #94a3b8; }

.apitest-body {
    flex: 1;
    min-width: 0;
}
.apitest-name {
    font-weight: 500;
    color: #1e293b;
}
.apitest-detail {
    color: #64748b;
    font-size: 0.82rem;
    margin-top: 2px;
    word-break: break-all;
}
.apitest-time {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: #94a3b8;
    min-width: 50px;
    text-align: right;
    margin-top: 2px;
}

.admin-api-docs {
    margin-bottom: 1rem;
    max-height: 220px;
    overflow: auto;
    padding-right: .25rem;
}

.admin-api-docs-list .api-method dd {
    margin-bottom: .5rem;
}

.admin-api-docs-badge {
    display: inline-block;
    margin-left: .35rem;
    padding: .1rem .4rem;
    border-radius: 4px;
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    vertical-align: middle;
    background: #fef3c7;
    color: #92400e;
}

/* ERP API sync panel (/admin/partners/) */
.erp-api-panel {
    margin: 2rem 0 1.5rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.erp-api-panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.erp-api-panel__title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.erp-api-panel__title {
    margin: 0;
    font-size: 1.15rem;
    color: #0f172a;
}

.erp-api-groups-dd {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.erp-api-groups-dd__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, transform .15s;
}

.erp-api-groups-dd__toggle:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.erp-api-groups-dd__toggle[aria-expanded="true"] {
    background: #e2e8f0;
    border-color: #64748b;
    color: #0f172a;
}

.erp-api-groups-dd__toggle[aria-expanded="true"] .erp-api-groups-dd__chevron {
    transform: rotate(180deg);
}

.erp-api-groups-dd__chevron {
    transition: transform .15s ease;
}

.erp-api-groups-dd__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 40;
    width: min(420px, 92vw);
    max-height: min(420px, 70vh);
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.erp-api-groups-dd__panel[hidden] {
    display: none !important;
}

.erp-api-groups-dd__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.erp-api-groups-dd__head-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: #0f172a;
}

.erp-api-groups-dd__counter {
    font-size: 0.8rem;
    color: #64748b;
    white-space: nowrap;
}

.erp-api-groups-dd__hint {
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: #64748b;
}

.erp-api-groups-dd__search {
    width: 100%;
    margin: 0 0 0.5rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.85rem;
}

.erp-api-groups-dd__toolbar {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.erp-api-groups-dd__item[hidden] {
    display: none !important;
}

.erp-api-groups-dd__empty--filter {
    display: none;
}

.erp-api-groups-dd__list.is-filtered-empty .erp-api-groups-dd__empty--filter {
    display: block;
}

.erp-api-groups-dd__list {
    flex: 1 1 auto;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    max-height: 240px;
    padding: 0.25rem;
}

.erp-api-groups-dd__empty {
    padding: 0.75rem;
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: center;
}

.erp-api-groups-dd__item {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.35rem 0.45rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #1e293b;
    line-height: 1.3;
}

.erp-api-groups-dd__item:hover {
    background: #e2e8f0;
}

.erp-api-groups-dd__item input {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.erp-api-groups-dd__footer {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.55rem;
}

.erp-api-groups-dd__save-status {
    font-size: 0.8rem;
    color: #64748b;
}

.erp-api-groups-dd__save-status--ok { color: #166534; }
.erp-api-groups-dd__save-status--error { color: #b91c1c; }

.erp-api-panel__status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.erp-api-panel__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.erp-api-panel__dot--ok { background: #16a34a; }
.erp-api-panel__dot--syncing { background: #ca8a04; animation: erp-api-pulse 1.2s ease-in-out infinite; }
.erp-api-panel__dot--error { background: #dc2626; }
.erp-api-panel__dot--off { background: #94a3b8; }

.erp-api-panel__status--ok { color: #16a34a; }
.erp-api-panel__status--syncing { color: #ca8a04; }
.erp-api-panel__status--error { color: #dc2626; }
.erp-api-panel__status--off { color: #64748b; }

@keyframes erp-api-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

@keyframes erp-api-btn-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.75);
        background-color: #fef3c7;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
        background-color: #fde68a;
        transform: scale(1.03);
    }
}

@keyframes erp-api-btn-pulse-violet {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.65);
        background-color: #ede9fe;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(124, 58, 237, 0);
        background-color: #ddd6fe;
        transform: scale(1.03);
    }
}

@keyframes erp-api-btn-pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.65);
        background-color: #dcfce7;
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(22, 163, 74, 0);
        background-color: #bbf7d0;
        transform: scale(1.03);
    }
}

.erp-api-btn--syncing {
    animation: erp-api-btn-pulse 1s ease-in-out infinite !important;
    border-color: #f59e0b !important;
    border-width: 2px !important;
    color: #b45309 !important;
    font-weight: 700 !important;
    pointer-events: none;
    opacity: 1 !important;
}

.erp-api-delta-btn.erp-api-btn--syncing {
    animation-name: erp-api-btn-pulse-violet;
    border-color: #7c3aed !important;
    color: #6d28d9 !important;
}

.erp-api-new-catalog__btn.erp-api-btn--syncing {
    animation-name: erp-api-btn-pulse-green;
    border-color: #16a34a !important;
    color: #15803d !important;
    background: #f0fdf4;
}

@media (prefers-reduced-motion: reduce) {
    .erp-api-btn--syncing,
    .erp-api-panel__dot--syncing {
        animation: none;
        box-shadow: 0 0 0 2px currentColor;
    }
}

.erp-api-panel__hint {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.45;
}

.erp-api-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.erp-api-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.erp-api-field--url {
    grid-column: 1 / -1;
}

.erp-api-field__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.erp-api-field__row .form-input {
    flex: 1 1 auto;
    min-width: 0;
}

.erp-api-field__ok {
    flex: 0 0 auto;
    min-width: 3.25rem;
    padding-left: 0.9rem;
    padding-right: 0.9rem;
}

.erp-api-field__label {
    font-size: 0.8rem;
    color: #475569;
}

.erp-api-panel__schedules {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.erp-api-schedule {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.erp-api-schedule__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    flex-shrink: 0;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.erp-api-schedule__icon:hover {
    background: #dbeafe;
    transform: scale(1.04);
}

.erp-api-schedule__icon:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.erp-api-schedule__icon--prices {
    background: #fef3c7;
    color: #d97706;
}

.erp-api-schedule__icon--prices:hover {
    background: #fde68a;
}

.erp-api-schedule__body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.erp-api-schedule__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.erp-api-schedule__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.erp-api-schedule__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.erp-api-schedule__title {
    font-weight: 600;
    font-size: 0.92rem;
    color: #0f172a;
}

.erp-api-schedule__hint {
    font-size: 0.78rem;
    color: #64748b;
}

.erp-api-schedule__input-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.erp-api-schedule__input-label,
.erp-api-schedule__unit {
    font-size: 0.82rem;
    color: #64748b;
    white-space: nowrap;
}

.erp-api-schedule__input {
    width: 5.5rem;
    min-width: 4rem;
    text-align: center;
    font-weight: 600;
}

.erp-api-schedule__human {
    font-size: 0.78rem;
    color: #16a34a;
    font-weight: 500;
    white-space: nowrap;
    text-align: right;
    margin-left: auto;
}

.erp-api-schedule--off {
    opacity: 0.72;
    background: #f8fafc;
}

.erp-api-schedule--off .erp-api-schedule__human {
    color: #94a3b8;
}

.erp-api-panel__meta {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.erp-api-console-wrap {
    margin-bottom: 0.85rem;
}

.erp-api-console__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.erp-api-console__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.erp-api-console__clear {
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    line-height: 1.3;
}

.erp-api-console {
    font-family: ui-monospace, "Cascadia Code", "Consolas", monospace;
    font-size: 0.78rem;
    line-height: 1.35;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 6px;
    padding: 0.5rem 0.65rem;
    max-height: calc(1.35em * 5 + 1rem);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-color: #475569 #0f172a;
    scrollbar-width: thin;
}

.erp-api-console::-webkit-scrollbar {
    width: 8px;
}

.erp-api-console::-webkit-scrollbar-track {
    background: #0f172a;
}

.erp-api-console::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.erp-api-console__line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.erp-api-console__line--empty {
    color: #64748b;
}

.erp-api-console--active {
    box-shadow: 0 0 0 1px #ca8a04;
}

.erp-api-panel__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.erp-api-toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-right: 0.5rem;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    background: #2563eb;
}

.erp-api-toggle__label {
    font-size: 0.88rem;
    font-weight: 500;
    color: #fff;
    user-select: none;
}

.erp-api-toggle__state {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    min-width: 2.1rem;
    user-select: none;
}

.erp-api-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.erp-api-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.erp-api-switch__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 26px;
    transition: background 0.2s ease;
}

.erp-api-switch__slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
}

.erp-api-switch input:checked + .erp-api-switch__slider {
    background: #86efac;
}

.erp-api-switch input:checked + .erp-api-switch__slider::before {
    transform: translateX(20px);
}

.erp-api-switch input:focus-visible + .erp-api-switch__slider {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Планировщики: отдельный компактный переключатель на светлом фоне */
.erp-api-switch--schedule {
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.erp-api-switch--schedule .erp-api-switch__slider {
    background: #cbd5e1;
    border-radius: 24px;
}

.erp-api-switch--schedule .erp-api-switch__slider::before {
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
}

.erp-api-switch--schedule input:checked + .erp-api-switch__slider {
    background: #2563eb;
}

.erp-api-switch--schedule input:checked + .erp-api-switch__slider::before {
    transform: translateX(20px);
}

#erpApiPricesSchedule .erp-api-switch--schedule input:checked + .erp-api-switch__slider {
    background: #d97706;
}

.erp-api-switch--schedule input:focus-visible + .erp-api-switch__slider {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.erp-api-reconcile-limit {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: #475569;
}

.erp-api-stop-btn {
    border-color: #dc2626;
    color: #dc2626;
    font-weight: 600;
}

.erp-api-stop-btn:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #b91c1c;
    color: #b91c1c;
}

.erp-api-stop-btn:disabled {
    opacity: 0.72;
}

.erp-api-stop-btn[hidden] {
    display: none;
}

.erp-api-delta-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.35rem 0.55rem;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    background: #f8fafc;
}

.erp-api-delta-group__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-right: 0.15rem;
}

.erp-api-delta-btn {
    border-color: #7c3aed;
    color: #6d28d9;
}

.erp-api-delta-btn:hover:not(:disabled) {
    background: #ede9fe;
    border-color: #6d28d9;
    color: #5b21b6;
}

.erp-api-new-catalog {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    padding: 0.2rem 0.55rem;
    border-radius: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.erp-api-new-catalog__label {
    font-size: 0.82rem;
    font-weight: 500;
    color: #166534;
}

.erp-api-new-catalog__select {
    width: auto;
    min-width: 6.5rem;
    padding: 0.3rem 0.45rem;
    font-size: 0.85rem;
}

.erp-api-new-catalog__btn {
    white-space: nowrap;
}

.erp-api-reconcile-limit__input {
    width: 4.5rem;
    padding: 0.25rem 0.4rem;
    text-align: center;
}

.erp-api-reconcile-dl[hidden] {
    display: none !important;
}

.erp-api-advanced {
    display: inline-block;
    font-size: 0.85rem;
}

.erp-api-advanced__summary {
    cursor: pointer;
    color: #64748b;
    user-select: none;
}

.erp-api-advanced__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
}

.erp-api-panel__error {
    margin: 0.75rem 0 0;
    color: #dc2626;
    font-size: 0.88rem;
}

.erp-api-panel__ping {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    font-size: 0.88rem;
    line-height: 1.45;
    background: #ecfdf5;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.erp-api-panel__ping--error {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}
