:root {
    --grad-cfg-primary: #720AA4;
    --grad-cfg-primary-soft: rgba(114, 10, 164, 0.08);
    --grad-cfg-dark: #0f172a;
    --grad-cfg-border: rgba(114, 10, 164, 0.14);
    --grad-cfg-gold: #e8a317;
    --grad-cfg-radius: 18px;
}

.grad-pub-builder,
.grad-promo-builder {
    border-radius: var(--grad-cfg-radius);
    border: 1px solid var(--grad-cfg-border);
    background: linear-gradient(165deg, #fdfbff 0%, #f8fafc 45%, #fff 100%);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.07);
    padding: 1.35rem 1.5rem 1.5rem;
    margin-bottom: 1rem;
}

.grad-pub-builder__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.grad-pub-builder__title {
    font-weight: 800;
    color: var(--grad-cfg-dark);
    margin-bottom: 0.35rem;
}

.grad-pub-builder__lead {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
    max-width: 42rem;
}

.grad-pub-builder__badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--grad-cfg-primary), #9333ea);
    color: #fff;
    box-shadow: 0 8px 20px rgba(114, 10, 164, 0.25);
}

.grad-pub-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.grad-pub-step {
    flex: 1 1 140px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.grad-pub-step span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
}

.grad-pub-step.is-active {
    border-color: rgba(114, 10, 164, 0.35);
    background: var(--grad-cfg-primary-soft);
    color: var(--grad-cfg-primary);
    box-shadow: 0 8px 24px rgba(114, 10, 164, 0.1);
}

.grad-pub-step.is-active span {
    background: var(--grad-cfg-primary);
    color: #fff;
}

.grad-pub-panel {
    display: none;
    animation: gradCfgIn 0.35s ease;
}

.grad-pub-panel.is-active {
    display: block;
}

@keyframes gradCfgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.grad-pub-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 0.65rem;
    display: block;
}

.grad-pub-slider-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.grad-pub-range {
    flex: 1;
    accent-color: var(--grad-cfg-primary);
    height: 6px;
}

.grad-pub-num-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 110px;
}

.grad-pub-num {
    width: 72px;
    text-align: center;
    font-weight: 700;
    border-radius: 10px;
    border-color: #cbd5e1;
}

.grad-pub-num-suffix {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
}

.grad-pub-hint {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

.grad-dur-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.grad-dur-preset {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.grad-dur-preset:hover,
.grad-dur-preset.is-active {
    border-color: var(--grad-cfg-primary);
    background: var(--grad-cfg-primary-soft);
    color: var(--grad-cfg-primary);
}

.grad-geo-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.grad-geo-search {
    flex: 1 1 200px;
    border-radius: 12px;
    border-color: #cbd5e1;
    font-size: 0.9rem;
}

.grad-geo-mode {
    display: flex;
    gap: 0.35rem;
}

.grad-geo-mode-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 10px;
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.grad-geo-mode-btn.is-active {
    border-color: var(--grad-cfg-primary);
    color: var(--grad-cfg-primary);
    background: var(--grad-cfg-primary-soft);
}

.grad-geo-table-wrap {
    max-height: 380px;
    overflow: auto;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.grad-geo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.grad-geo-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f1f5f9;
    padding: 0.65rem 0.75rem;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.grad-geo-th-check {
    width: 42px;
}

.grad-geo-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.grad-geo-federal td {
    background: linear-gradient(90deg, rgba(114, 10, 164, 0.06), transparent);
    font-weight: 800;
    color: var(--grad-cfg-primary);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.grad-geo-region td {
    background: #fafbfc;
}

.grad-geo-region-name {
    font-weight: 700;
    color: #1e293b;
}

.grad-geo-expand {
    border: none;
    background: transparent;
    color: var(--grad-cfg-primary);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0;
    margin-left: 0.5rem;
    cursor: pointer;
}

.grad-geo-region-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    background: rgba(114, 10, 164, 0.1);
    color: var(--grad-cfg-primary);
    font-weight: 600;
}

.grad-geo-city td {
    padding-left: 2rem;
    color: #475569;
}

.grad-geo-city.is-hidden {
    display: none;
}

.grad-geo-region.grad-geo-search-hidden,
.grad-geo-city.grad-geo-search-hidden {
    display: none !important;
}

.grad-geo-table-wrap {
    max-height: min(52vh, 420px);
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.grad-geo-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-height: 0;
}

.grad-geo-selected:empty {
    display: none;
}

.grad-geo-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem 0.35rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(114, 10, 164, 0.1), rgba(114, 10, 164, 0.04));
    border: 1px solid rgba(114, 10, 164, 0.18);
    font-size: 0.82rem;
    font-weight: 600;
    color: #3b0764;
}

.grad-geo-chip button {
    border: none;
    background: rgba(114, 10, 164, 0.12);
    color: #720AA4;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    line-height: 1;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
}

.grad-geo-chip button:hover {
    background: #720AA4;
    color: #fff;
}

.grad-geo-unified .grad-geo-region .grad-geo-check-cell,
.grad-geo-unified .grad-geo-city .grad-geo-check-cell,
.grad-geo-unified .grad-geo-check,
.grad-geo-unified .grad-geo-check-label {
    visibility: visible;
    pointer-events: auto !important;
}

.grad-geo-unified .grad-geo-city.grad-geo-row-selectable,
.grad-geo-unified .grad-geo-region.grad-geo-row-selectable {
    pointer-events: auto;
}

.grad-geo-unified .grad-geo-check.is-region-locked {
    accent-color: var(--grad-cfg-primary);
}

.grad-geo-unified .grad-geo-city:has(.grad-geo-check.is-region-locked) td {
    color: #334155;
}

.grad-geo-check-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
    min-width: 1.1rem;
    min-height: 1.1rem;
}

.grad-geo-check.is-geo-blocked {
    pointer-events: none;
    opacity: 0.45;
}

/* Мастер create-ad: гео всегда кликабельно (fieldset disabled больше не используется) */
.listing-wizard-form .pub-custom-builder,
.listing-wizard-form .pub-custom-builder .grad-geo-table-wrap,
.listing-wizard-form .pub-custom-builder .grad-geo-table-wrap input,
.listing-wizard-form .pub-custom-builder .grad-geo-table-wrap label,
.listing-wizard-form .pub-custom-builder .grad-geo-table-wrap button,
.listing-wizard-form .pub-custom-builder .grad-geo-table-wrap td {
    pointer-events: auto !important;
}

.listing-wizard-form .pub-custom-builder .grad-geo-check:disabled,
.listing-wizard-form .pub-custom-builder .grad-geo-check[disabled] {
    pointer-events: auto !important;
    opacity: 1;
}

.listing-wizard-form .pub-custom-builder .grad-geo-city .grad-geo-check.is-geo-blocked,
.listing-wizard-form .pub-custom-builder .grad-geo-city .grad-geo-name-cell,
.listing-wizard-form .pub-custom-builder .grad-geo-city .grad-geo-check-cell,
.listing-wizard-form .pub-custom-builder .grad-geo-city .grad-geo-check-label {
    pointer-events: auto !important;
    cursor: pointer;
}

.listing-wizard-form .pub-custom-builder .grad-geo-city .grad-geo-check.is-geo-blocked {
    opacity: 1;
}

.ca-hub-fs.ca-hub-inactive {
    pointer-events: none;
    opacity: 0.55;
}

.grad-geo-row-selectable .grad-geo-name-cell {
    cursor: pointer;
    user-select: none;
}

.grad-geo-unified .grad-geo-region .grad-geo-name-cell {
    cursor: pointer;
}

.grad-geo-unified .grad-geo-region .grad-geo-region-badge {
    display: inline-block;
    margin-left: 0.35rem;
}

.grad-geo-expand {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.grad-geo-expand:hover {
    color: #5d0883;
}

.grad-geo-row--picked td {
    background: rgba(34, 197, 94, 0.08);
}

.grad-geo-row--picked.grad-geo-region td {
    background: rgba(34, 197, 94, 0.1);
}

.grad-geo-row--address-default td {
    background: rgba(114, 10, 164, 0.07);
}

.grad-geo-row--address-default.grad-geo-region td {
    background: rgba(114, 10, 164, 0.1);
}

.grad-geo-section-row td {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #720AA4;
    background: rgba(114, 10, 164, 0.06);
    border-bottom: 1px solid rgba(114, 10, 164, 0.12);
}

.grad-geo-row-selectable .grad-geo-name-cell,
.grad-geo-check-cell {
    cursor: pointer;
}

.grad-geo-check-cell {
    width: 42px;
    text-align: center;
}

.grad-geo-check-cell .form-check-input {
    cursor: pointer;
    margin: 0;
}

.grad-geo-unified .grad-geo-city .grad-geo-check-cell,
.grad-geo-unified .grad-geo-region .grad-geo-check-cell {
    visibility: visible;
    pointer-events: auto;
}

.grad-geo-check-cell--region-only .grad-geo-check {
    transform: scale(1.1);
}

.pub-custom-geo-default-hint {
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

.grad-geo-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    box-shadow: 0 1px 0 #e2e8f0;
}

.grad-pub-price-panel {
    margin-top: 1.25rem;
    padding: 1.1rem 1.2rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
    color: #e2e8f0;
}

.grad-pub-price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.grad-pub-price-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    margin-bottom: 0.2rem;
}

.grad-pub-price-accent {
    color: #c4b5fd;
}

.pub-custom-catalog-per-ad {
    color: #94a3b8;
    text-decoration: line-through;
    text-decoration-color: rgba(148, 163, 184, 0.7);
    font-weight: 600;
}

.pub-custom-unit-per-ad {
    color: #fde68a;
    font-size: 1.15rem;
}

.pub-custom-savings-total {
    color: #86efac;
    font-weight: 800;
}

.grad-pub-price-total {
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.grad-pub-balance {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.5rem;
}

.grad-pub-balance-warn {
    color: #fca5a5;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.pub-custom-insufficient .grad-pub-price-panel {
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.5);
}

.grad-promo-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.65rem;
}

.grad-promo-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 2px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
}

.grad-promo-feature-card:has(input:checked) {
    border-color: var(--grad-cfg-primary);
    background: linear-gradient(135deg, rgba(114, 10, 164, 0.06), #fff);
    box-shadow: 0 10px 28px rgba(114, 10, 164, 0.12);
}

.grad-promo-feature-card input {
    margin-top: 0.35rem;
    flex-shrink: 0;
}

.grad-promo-feature-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--grad-cfg-primary-soft);
    color: var(--grad-cfg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.grad-promo-feature-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.grad-promo-feature-card__body strong {
    font-size: 0.88rem;
    color: #1e293b;
}

.grad-promo-feature-card__body small {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
}

.grad-promo-feature-card__price {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--grad-cfg-gold);
    margin-top: 0.15rem;
}

.grad-tarify-configurator {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--grad-cfg-border);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
    margin-bottom: 2rem;
}

.grad-tarify-configurator__head {
    padding: 1.5rem 1.75rem;
    background: linear-gradient(135deg, #720AA4, #4c1d95);
    color: #fff;
}

.grad-tarify-configurator__body {
    padding: 1.5rem;
    background: #fafbff;
}

.listing-wizard-shell .package-card--legacy {
    opacity: 0.92;
}

.listing-wizard-shell .package-card--legacy .text-primary {
    font-size: 0.75rem;
    color: #64748b !important;
}
