/* ============================================================
   SETTINGS PREMIUM — модуль «Налаштування системи»
   ------------------------------------------------------------
   Продовження єдиного мотиву CRM (premium-theme.css):
   тепла канва, один зелений акцент, e-Ukraine Head / Manrope, м'які тіні.
   Замість різнокольорових градієнтних плиток — одна картка-тайл
   `.st-card` з приглушеною родинною іконкою, великим числом
   і повністю клікабельною площею.

   Префікс класів: .st-*   Скоуп: html[data-module="settings"]
   ============================================================ */

html[data-module="settings"] {
    --st-r-xl: 22px;
    --st-r-lg: 18px;
    --st-r-md: 12px;
    --st-r-sm: 9px;
    --st-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --st-ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

    /* Приглушені «родинні» тони для іконок — не веселка, а земляна палітра
       того ж мотиву, що й LDChart. Смисл: зелений — власні довідники,
       синій — геодані й адмінустрій, бурштин — податкове, сірий — системне. */
    --st-tone-accent-bg: rgba(47, 107, 79, 0.09);
    --st-tone-accent-fg: #2F6B4F;
    --st-tone-blue-bg: rgba(52, 96, 122, 0.10);
    --st-tone-blue-fg: #34607A;
    --st-tone-amber-bg: rgba(156, 117, 38, 0.11);
    --st-tone-amber-fg: #9C7526;
    --st-tone-slate-bg: rgba(110, 115, 108, 0.12);
    --st-tone-slate-fg: #6E736C;
    --st-tone-clay-bg: rgba(168, 64, 47, 0.09);
    --st-tone-clay-fg: #A8402F;
}

html.dark[data-module="settings"] {
    --st-tone-accent-bg: rgba(121, 200, 158, 0.14);
    --st-tone-accent-fg: #79C89E;
    --st-tone-blue-bg: rgba(127, 167, 191, 0.14);
    --st-tone-blue-fg: #7FA7BF;
    --st-tone-amber-bg: rgba(201, 162, 94, 0.14);
    --st-tone-amber-fg: #C9A25E;
    --st-tone-slate-bg: rgba(183, 188, 178, 0.12);
    --st-tone-slate-fg: #B7BCB2;
    --st-tone-clay-bg: rgba(208, 138, 123, 0.14);
    --st-tone-clay-fg: #D08A7B;
}

/* ------------------------------------------------------------
   1. КАРКАС СТОРІНКИ
   ------------------------------------------------------------ */
.st-page {
    max-width: 1320px;
    margin: 0 auto;
    padding: 4px 0 40px;
}

/* Панель дій під банером: пошук + лічильник знайденого.
   Липне під топбар — його реальна висота лежить у --ld-topbar-h (topbar.js). */
.st-bar {
    position: sticky;
    top: var(--ld-topbar-h, 60px);
    z-index: 25;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
    padding: 9px 12px;
    border-radius: var(--st-r-lg);
    background: color-mix(in srgb, var(--pt-surface) 84%, transparent);
    border: 1px solid var(--pt-line);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    transition: box-shadow 0.3s var(--st-ease-soft), border-color 0.3s var(--st-ease-soft);
}
.st-bar.is-stuck { box-shadow: var(--pt-shadow-md); border-color: var(--pt-line-2); }

@media (max-width: 768px) { .st-bar { position: static; } }

.st-search { position: relative; flex: 1 1 260px; max-width: 420px; }
.st-search > i {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12.5px;
    color: var(--pt-ink-3);
    pointer-events: none;
}
.st-search input {
    width: 100%;
    height: 40px;
    padding: 0 34px 0 34px;
    border-radius: var(--st-r-md);
    border: 1px solid var(--pt-line-2);
    background: var(--pt-surface);
    color: var(--pt-ink);
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 13.5px;
    transition: border-color 0.2s var(--st-ease-soft), box-shadow 0.2s var(--st-ease-soft);
}
.st-search input::placeholder { color: var(--pt-ink-3); }
.st-search input:focus {
    outline: none;
    border-color: var(--pt-accent-line);
    box-shadow: 0 0 0 3px var(--pt-accent-soft);
}
.st-search__clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 0;
    background: transparent;
    color: var(--pt-ink-3);
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.18s var(--st-ease-soft), color 0.18s var(--st-ease-soft);
}
.st-search.has-value .st-search__clear { display: grid; }
.st-search__clear:hover { background: var(--pt-sunken); color: var(--pt-ink); }

.st-bar__hint {
    margin-left: auto;
    font-size: 12.5px;
    color: var(--pt-ink-3);
    font-variant-numeric: tabular-nums;
}
.st-bar__hint b { color: var(--pt-ink-2); font-weight: 600; }

/* ------------------------------------------------------------
   2. СЕКЦІЯ
   ------------------------------------------------------------ */
.st-sec { margin-bottom: 34px; }
.st-sec[hidden] { display: none; }

.st-sec__head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 14px;
}
.st-sec__title {
    margin: 0;
    font-family: 'e-Ukraine Head', 'Manrope', system-ui, sans-serif;
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--pt-ink);
    white-space: nowrap;
}
.st-sec__count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--pt-sunken);
    border: 1px solid var(--pt-line);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--pt-ink-3);
    font-variant-numeric: tabular-nums;
}
.st-sec__rule { flex: 1; height: 1px; background: var(--pt-line); }
.st-sec__lede {
    margin: -6px 0 14px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--pt-ink-3);
    max-width: 72ch;
}

/* ------------------------------------------------------------
   3. СІТКА ТА КАРТКА-ТАЙЛ
   ------------------------------------------------------------ */
.st-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(304px, 1fr));
    gap: 14px;
    align-items: stretch;
}
/* auto-fit (а не auto-fill): порожні треки схлопуються, тож два регістри
   заповнюють рядок, а не лишають «діру» справа. */
.st-grid--wide { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }

@media (max-width: 620px) {
    .st-grid, .st-grid--wide { grid-template-columns: 1fr; }
}

/* Уся площа картки — одна дія (як у списках угод і ділянок). */
.st-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    padding: 18px 18px 15px;
    text-align: left;
    border-radius: var(--st-r-lg);
    border: 1px solid var(--pt-line);
    background: var(--pt-surface);
    box-shadow: var(--pt-shadow-sm);
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.32s var(--st-ease),
                box-shadow 0.32s var(--st-ease-soft),
                border-color 0.24s var(--st-ease-soft);
}
.st-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--pt-shadow-md);
    border-color: var(--pt-accent-line);
}
.st-card:focus-visible {
    outline: none;
    border-color: var(--pt-accent);
    box-shadow: 0 0 0 3px var(--pt-accent-soft), var(--pt-shadow-md);
}
.st-card:active { transform: translateY(-1px); }
.st-card[hidden] { display: none; }

.st-card__top { display: flex; align-items: flex-start; gap: 13px; }

.st-card__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--st-tone-accent-bg);
    color: var(--st-tone-accent-fg);
    font-size: 16.5px;
    transition: transform 0.32s var(--st-ease);
}
.st-card:hover .st-card__icon { transform: scale(1.06); }
.st-card__icon.is-blue  { background: var(--st-tone-blue-bg);  color: var(--st-tone-blue-fg); }
.st-card__icon.is-amber { background: var(--st-tone-amber-bg); color: var(--st-tone-amber-fg); }
.st-card__icon.is-slate { background: var(--st-tone-slate-bg); color: var(--st-tone-slate-fg); }
.st-card__icon.is-clay  { background: var(--st-tone-clay-bg);  color: var(--st-tone-clay-fg); }

.st-card__head { flex: 1; min-width: 0; padding-top: 1px; }
.st-card__title {
    display: block;
    font-family: 'e-Ukraine Head', 'Manrope', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.012em;
    line-height: 1.25;
    color: var(--pt-ink);
}
.st-card__desc {
    display: block;
    margin-top: 4px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--pt-ink-3);
}

/* Число праворуч угорі — головна цифра довідника */
.st-card__num {
    flex: 0 0 auto;
    text-align: right;
    padding-top: 1px;
}
.st-card__num b {
    display: block;
    font-family: 'e-Ukraine Head', 'Manrope', system-ui, sans-serif;
    font-size: 1.42rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--pt-ink);
    font-variant-numeric: tabular-nums;
}
.st-card__num span {
    display: block;
    margin-top: 3px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--pt-ink-3);
}

/* Рядок дрібних фактів (Доходи / Витрати тощо) */
.st-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}
.st-fact {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--pt-sunken);
    border: 1px solid var(--pt-line);
    font-size: 11.5px;
    color: var(--pt-ink-3);
    white-space: nowrap;
}
.st-fact b {
    font-weight: 600;
    color: var(--pt-ink-2);
    font-variant-numeric: tabular-nums;
}
.st-fact.is-pos b { color: var(--pt-accent); }
.st-fact.is-neg b { color: #A8402F; }
html.dark .st-fact.is-neg b { color: #D08A7B; }

/* Підвал картки: дія + стрілка */
.st-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--pt-line);
}
.st-card__action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--pt-ink-2);
    transition: color 0.2s var(--st-ease-soft);
}
.st-card__action i { font-size: 11px; color: var(--pt-ink-3); transition: color 0.2s var(--st-ease-soft); }
.st-card:hover .st-card__action,
.st-card:hover .st-card__action i { color: var(--pt-accent); }

.st-card__go {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--pt-sunken);
    color: var(--pt-ink-3);
    font-size: 10.5px;
    transition: background-color 0.24s var(--st-ease-soft),
                color 0.24s var(--st-ease-soft),
                transform 0.28s var(--st-ease);
}
.st-card:hover .st-card__go {
    background: var(--pt-accent);
    color: #fff;
    transform: translateX(3px);
}
html.dark .st-card:hover .st-card__go { color: #0d1410; }

/* Горизонтальний варіант тієї ж картки — для широких секцій
   (регістри, інструменти): іконка · назва · число · дія в один рядок. */
.st-card--row { flex-direction: row; align-items: center; gap: 18px; padding: 15px 18px; }
.st-card--row .st-card__top { flex: 1 1 auto; align-items: center; min-width: 0; }
.st-card--row .st-card__head { display: flex; flex-direction: column; }
.st-card--row .st-card__num { margin-left: auto; padding-left: 12px; }
.st-card--row .st-facts { margin-top: 9px; }
.st-card--row .st-card__foot {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border-top: 0;
    gap: 12px;
}

@media (max-width: 720px) {
    .st-card--row { flex-direction: column; align-items: stretch; padding: 18px 18px 15px; }
    .st-card--row .st-card__num { margin-left: 0; }
    .st-card--row .st-card__foot { padding-top: 12px; border-top: 1px solid var(--pt-line); justify-content: space-between; }
}

/* ------------------------------------------------------------
   4. ШИРОКА КАРТКА-ФІЧА (конструктор автоматизацій)
   ------------------------------------------------------------ */
.st-feature {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px 26px;
    padding: 20px 22px 20px 26px;
    border-radius: var(--st-r-xl);
    border: 1px solid var(--pt-line);
    background:
        radial-gradient(120% 160% at 100% 0%, var(--pt-accent-soft) 0%, transparent 58%),
        var(--pt-surface);
    box-shadow: var(--pt-shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.32s var(--st-ease-soft), border-color 0.24s var(--st-ease-soft);
}
.st-feature:hover { box-shadow: var(--pt-shadow-md); border-color: var(--pt-accent-line); }
.st-feature::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--pt-accent);
}

.st-feature__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 17px;
    background: var(--st-tone-accent-bg);
    color: var(--st-tone-accent-fg);
    font-size: 21px;
}
.st-feature__body { flex: 1 1 340px; min-width: 0; }
.st-feature__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0;
    font-family: 'e-Ukraine Head', 'Manrope', system-ui, sans-serif;
    font-size: 1.06rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--pt-ink);
}
.st-feature__desc {
    margin: 6px 0 0;
    font-size: 12.8px;
    line-height: 1.5;
    color: var(--pt-ink-3);
    max-width: 68ch;
}
.st-feature__metrics { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.st-feature__side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    flex: 0 0 auto;
    margin-left: auto;
}

/* Бейдж-мітка «ВСЕ В ОДНОМУ» */
.st-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--pt-accent-soft);
    border: 1px solid var(--pt-accent-line);
    color: var(--pt-accent);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Метрика-пігулка */
.st-metric {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--pt-sunken);
    border: 1px solid var(--pt-line);
    font-size: 12px;
    color: var(--pt-ink-2);
}
.st-metric i { font-size: 10.5px; color: var(--pt-ink-3); }
.st-metric b { font-weight: 600; color: var(--pt-ink); font-variant-numeric: tabular-nums; }
.st-metric.is-accent { background: var(--pt-accent-soft); border-color: var(--pt-accent-line); color: var(--pt-accent); }
.st-metric.is-accent i, .st-metric.is-accent b { color: var(--pt-accent); }

/* ------------------------------------------------------------
   5. КНОПКИ
   ------------------------------------------------------------ */
.st-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: var(--st-r-md);
    border: 1px solid var(--pt-accent);
    background: var(--pt-accent);
    color: #fff;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transition: background-color 0.2s var(--st-ease-soft),
                border-color 0.2s var(--st-ease-soft),
                transform 0.2s var(--st-ease),
                box-shadow 0.2s var(--st-ease-soft);
}
.st-btn:hover { background: var(--pt-accent-deep); border-color: var(--pt-accent-deep); transform: translateY(-1px); box-shadow: var(--pt-shadow); }
.st-btn:active { transform: translateY(0); }
.st-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--pt-accent-soft); }
html.dark .st-btn { color: #0d1410; }

.st-btn--ghost {
    background: var(--pt-surface);
    border-color: var(--pt-line-2);
    color: var(--pt-ink-2);
    box-shadow: none;
}
.st-btn--ghost:hover {
    background: var(--pt-sunken);
    border-color: var(--pt-accent-line);
    color: var(--pt-accent);
    box-shadow: none;
}
html.dark .st-btn--ghost { color: var(--pt-ink-2); }
html.dark .st-btn--ghost:hover { color: var(--pt-accent); }

.st-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: var(--st-r-md);
    background: var(--pt-sunken);
    border: 1px solid var(--pt-line);
    font-size: 11.5px;
    color: var(--pt-ink-3);
    white-space: nowrap;
}
.st-note i { color: var(--pt-ink-3); font-size: 10.5px; }

/* ------------------------------------------------------------
   6. СТАТУС-ІНДИКАТОР (CNA.UA API тощо)
   ------------------------------------------------------------ */
.st-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 11px 4px 9px;
    border-radius: 999px;
    background: var(--pt-sunken);
    border: 1px solid var(--pt-line);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--pt-ink-2);
    white-space: nowrap;
}
.st-status__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pt-ink-3);
    box-shadow: 0 0 0 3px rgba(140, 145, 138, 0.16);
}
.st-status.is-ok { color: var(--pt-accent); border-color: var(--pt-accent-line); background: var(--pt-accent-soft); }
.st-status.is-ok .st-status__dot { background: var(--pt-accent); box-shadow: 0 0 0 3px var(--pt-accent-soft); }
.st-status.is-warn { color: #9C7526; border-color: rgba(156, 117, 38, 0.28); background: rgba(156, 117, 38, 0.09); }
.st-status.is-warn .st-status__dot { background: #9C7526; box-shadow: 0 0 0 3px rgba(156, 117, 38, 0.16); }
.st-status.is-err { color: #A8402F; border-color: rgba(168, 64, 47, 0.28); background: rgba(168, 64, 47, 0.08); }
.st-status.is-err .st-status__dot { background: #A8402F; box-shadow: 0 0 0 3px rgba(168, 64, 47, 0.16); }
html.dark .st-status.is-warn { color: #C9A25E; }
html.dark .st-status.is-warn .st-status__dot { background: #C9A25E; }
html.dark .st-status.is-err { color: #D08A7B; }
html.dark .st-status.is-err .st-status__dot { background: #D08A7B; }

.st-status__time { font-size: 11px; font-weight: 500; color: var(--pt-ink-3); margin-left: 6px; }

/* ------------------------------------------------------------
   7. ПРО СИСТЕМУ
   ------------------------------------------------------------ */
.st-about {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0;
    padding: 4px 0;
    border-radius: var(--st-r-lg);
    border: 1px solid var(--pt-line);
    background: var(--pt-surface);
    box-shadow: var(--pt-shadow-sm);
    overflow: hidden;
}
.st-about__row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px 20px;
    border-right: 1px solid var(--pt-line);
}
.st-about__row:last-child { border-right: 0; }
.st-about__label {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pt-ink-3);
}
.st-about__value {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--pt-ink);
}
.st-about__value code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12.5px;
    color: var(--pt-ink);
}
@media (max-width: 620px) {
    .st-about__row { border-right: 0; border-bottom: 1px solid var(--pt-line); }
    .st-about__row:last-child { border-bottom: 0; }
}

/* ------------------------------------------------------------
   8. ПОРОЖНІЙ СТАН ПОШУКУ
   ------------------------------------------------------------ */
.st-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 46px 20px;
    border-radius: var(--st-r-lg);
    border: 1px dashed var(--pt-line-2);
    background: var(--pt-sunken);
    text-align: center;
}
.st-empty.is-shown { display: flex; }
.st-empty i { font-size: 22px; color: var(--pt-ink-3); }
.st-empty p { margin: 0; font-size: 13.5px; color: var(--pt-ink-2); }
.st-empty span { font-size: 12.5px; color: var(--pt-ink-3); }

/* ------------------------------------------------------------
   9. ПІДЕКРАНИ НАЛАШТУВАНЬ — спільне полірування
   Розділи (Категорії, Ставки, НГО, Геодані…) лишаються на своїй
   розмітці; тут лише знімаємо «дефолтний Tailwind» і підводимо
   панелі/заголовки під мотив.
   ------------------------------------------------------------ */
html[data-module="settings"] #settings-content .bg-white,
html[data-module="settings"] #settings-content .bg-gray-50,
html[data-module="settings"] #settings-content .bg-slate-50 {
    background: var(--pt-surface) !important;
}
html[data-module="settings"] #settings-content .rounded-lg,
html[data-module="settings"] #settings-content .rounded-xl { border-radius: var(--st-r-md); }
html[data-module="settings"] #settings-content .rounded-2xl { border-radius: var(--st-r-lg); }

html[data-module="settings"] #settings-content .shadow,
html[data-module="settings"] #settings-content .shadow-md,
html[data-module="settings"] #settings-content .shadow-lg,
html[data-module="settings"] #settings-content .shadow-xl,
html[data-module="settings"] #settings-content .shadow-2xl {
    box-shadow: var(--pt-shadow) !important;
}

/* Заголовки підекранів — тим самим шрифтом і ритмом, що й секції */
html[data-module="settings"] #settings-content h1 {
    font-family: 'e-Ukraine Head', 'Manrope', system-ui, sans-serif;
    font-size: 1.55rem !important;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--pt-ink);
}
html[data-module="settings"] #settings-content h2 { letter-spacing: -0.02em; }

/* Поля вводу підекранів */
html[data-module="settings"] #settings-content input[type="text"],
html[data-module="settings"] #settings-content input[type="search"],
html[data-module="settings"] #settings-content input[type="number"],
html[data-module="settings"] #settings-content input[type="date"],
html[data-module="settings"] #settings-content select,
html[data-module="settings"] #settings-content textarea {
    border-radius: var(--st-r-md);
    border-color: var(--pt-line-2);
    background: var(--pt-surface);
    color: var(--pt-ink);
}
html[data-module="settings"] #settings-content input:focus,
html[data-module="settings"] #settings-content select:focus,
html[data-module="settings"] #settings-content textarea:focus {
    outline: none;
    border-color: var(--pt-accent-line);
    box-shadow: 0 0 0 3px var(--pt-accent-soft);
}

/* ------------------------------------------------------------
   10. МОДАЛКА «ІМПОРТ ГЕОДАНИХ»
   Оверлей лишається на патерні «fixed inset-0 bg-black…» —
   розмиття і фейд дає premium-theme. Сама картка — власна
   розмітка без легасі-Tailwind: шапка з родинною іконкою
   (is-blue, як картка «Геодані» в огляді), дроп-зона, номери
   в JetBrains Mono, fa-статуси замість емодзі бекенда.
   ------------------------------------------------------------ */
.st-imp {
    display: flex;
    flex-direction: column;
    width: min(660px, calc(100vw - 32px));
    max-height: min(88vh, 780px);
    border-radius: 20px;
    border: 1px solid var(--pt-line-2);
    background: var(--pt-surface);
    box-shadow: 0 30px 90px -24px rgba(18, 34, 24, 0.55), 0 10px 24px -10px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    animation: pt-modal-pop 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.st-imp__head {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--pt-line);
}
.st-imp__ico {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--st-r-md);
    background: var(--st-tone-blue-bg, rgba(52, 96, 122, 0.10));
    color: var(--st-tone-blue-fg, #34607A);
    font-size: 16px;
}
.st-imp__headtext { flex: 1 1 auto; min-width: 0; }
.st-imp__title {
    font-family: 'e-Ukraine Head', 'Manrope', system-ui, sans-serif;
    font-size: 17.5px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--pt-ink);
}
.st-imp__sub { margin-top: 2px; font-size: 12.5px; color: var(--pt-ink-3); }
.st-imp__x {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--pt-ink-3);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s var(--st-ease-soft), color 0.2s var(--st-ease-soft);
}
.st-imp__x:hover { background: var(--pt-sunken); color: var(--pt-ink); }

.st-imp__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 22px;
    overflow-y: auto;
}

/* Дроп-зона */
.st-imp__drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 24px 18px 20px;
    border-radius: var(--st-r-lg);
    border: 1.5px dashed var(--pt-line-2);
    background: var(--pt-sunken);
    text-align: center;
    transition: border-color 0.2s var(--st-ease-soft), background-color 0.2s var(--st-ease-soft);
}
.st-imp__drop:hover, .st-imp__drop.is-drag {
    border-color: var(--pt-accent-line);
    background: var(--pt-accent-soft);
}
.st-imp__cloud {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 6px;
    border-radius: 50%;
    background: var(--pt-surface);
    border: 1px solid var(--pt-line);
    color: var(--pt-accent);
    font-size: 17px;
    box-shadow: var(--pt-shadow);
}
.st-imp__droptext { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--pt-ink-2); }
.st-imp__dropor { margin: 0; font-size: 11.5px; color: var(--pt-ink-3); }
.st-imp__pick { margin-top: 8px; }
.st-imp__formats { margin: 10px 0 0; font-size: 11px; letter-spacing: 0.04em; color: var(--pt-ink-3); }

/* Секції модалки: підпис + вміст */
.st-imp__sec { display: flex; flex-direction: column; gap: 8px; }
.st-imp__sec.hidden { display: none; }
.st-imp__label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pt-ink-3);
}

/* Рядок вибраного файлу */
.st-imp__filelist { display: flex; flex-direction: column; gap: 7px; }
.st-imp__file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border-radius: var(--st-r-md);
    border: 1px solid var(--pt-line);
    background: var(--pt-surface);
}
.st-imp__file > i { color: var(--pt-accent); font-size: 13px; }
.st-imp__fname {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 600;
    color: var(--pt-ink);
}
.st-imp__fsize { font-size: 11.5px; color: var(--pt-ink-3); font-variant-numeric: tabular-nums; }

/* Список превʼю / результатів */
.st-imp__list {
    border: 1px solid var(--pt-line);
    border-radius: var(--st-r-md);
    background: var(--pt-surface);
    max-height: 210px;
    overflow-y: auto;
}
.st-imp__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border-top: 1px solid var(--pt-line);
}
.st-imp__row:first-child { border-top: 0; }
.st-imp__cad {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    color: var(--pt-ink);
}
.st-imp__meta { font-size: 12px; color: var(--pt-ink-3); }
.st-imp__geo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--pt-accent-soft);
    border: 1px solid var(--pt-accent-line);
    color: var(--pt-accent);
    font-size: 10.5px;
    font-weight: 700;
}
.st-imp__none {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    font-size: 12.5px;
    color: var(--pt-ink-3);
}

/* Підсумок імпорту + статуси рядків */
.st-imp__sum {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 11px 13px;
    background: var(--pt-accent-soft);
    border-bottom: 1px solid var(--pt-line);
    color: var(--pt-accent);
    font-size: 13px;
    font-weight: 700;
}
.st-imp__sum.is-err { background: rgba(168, 64, 47, 0.08); color: #A8402F; }
html.dark .st-imp__sum.is-err { background: rgba(208, 138, 123, 0.12); color: #D08A7B; }
.st-imp__st { width: 15px; text-align: center; font-size: 12.5px; }
.st-imp__st.is-ok { color: var(--pt-accent); }
.st-imp__st.is-upd { color: var(--st-tone-blue-fg, #34607A); }
.st-imp__st.is-err { color: #A8402F; }
html.dark .st-imp__st.is-err { color: #D08A7B; }

/* Футер */
.st-imp__foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid var(--pt-line);
    background: var(--pt-sunken);
}
.st-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.st-btn:disabled:hover { background: var(--pt-accent); border-color: var(--pt-accent); }

@media (max-width: 560px) {
    .st-imp__head, .st-imp__body, .st-imp__foot { padding-left: 16px; padding-right: 16px; }
}

/* ------------------------------------------------------------
   11. ДОСТУПНІСТЬ
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    html[data-module="settings"] *,
    html[data-module="settings"] *::before,
    html[data-module="settings"] *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
    .st-card:hover { transform: none; }
}
