/* ================================================================
   АДМІН-ПАНЕЛЬ
   ================================================================ */
.admin-wrap {
    display: flex;
    min-height: calc(100vh - 160px);
    margin: -32px -20px;  /* скасовуємо padding site-content */
}

/* Бокова панель */
.admin-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #1e1e1e;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.admin-logo {
    padding: 20px 16px 16px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    border-bottom: 1px solid #333;
}

.admin-nav {
    flex: 1;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-nav-btn {
    background: none;
    border: none;
    color: #bbb;
    font-size: 14px;
    text-align: left;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.15s, color 0.15s;
    line-height: 1.4;
}
.admin-nav-btn:hover  { background: #2a2a2a; color: #fff; }
.admin-nav-btn.active { background: #8B4513; color: #fff; }

.admin-sidebar-footer {
    padding: 16px;
    border-top: 1px solid #333;
}

.admin-back-link { color: #888; font-size: 13px; }
.admin-back-link:hover { color: #ccc; opacity: 1; }

/* Контент-область */
.admin-content {
    flex: 1;
    padding: 28px 32px;
    background: #fafafa;
    overflow-y: auto;
}

.admin-module-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: #2c2c2c;
}

/* --- Зв'язок: вкладки E-mail/SMS --- */
.comm-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}
.comm-tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #999;
    font-size: 14px;
    padding: 10px 16px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.comm-tab-btn:hover  { color: #2c2c2c; }
.comm-tab-btn.active { color: #8B4513; border-bottom-color: #8B4513; font-weight: bold; }

/* --- Зв'язок: розгортна панель "Налаштування" (перший пункт вкладки) --- */
.comm-settings-block {
    max-width: 520px;
    margin-bottom: 20px;
}
.comm-settings-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: #2c2c2c;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
}
.comm-settings-toggle:hover { background: #f9f6f2; }
/* Відкритий стан — підсвічуємо і стрілку розвертаємо вниз, щоб було видно,
   що повторний клік згорне панель (а не просто "ще щось відкриє") */
.comm-settings-toggle.open {
    background: #f9f6f2;
    border-color: #8B4513;
    color: #8B4513;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
}
.comm-settings-arrow {
    display: inline-block;
    transition: transform 0.15s;
    font-size: 11px;
}
.comm-settings-toggle.open .comm-settings-arrow { transform: rotate(90deg); }

.comm-settings-panel {
    background: #fff;
    border: 1px solid #eee;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 18px 16px;
}
.comm-verify-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.comm-verify-label { font-size: 14px; color: #2c2c2c; }
.comm-verify-mode-toggle { display: flex; gap: 10px; }
.comm-verify-mode-btn.active,
.comm-notify-mode-btn.active { background: #8B4513; color: #fff; border-color: #8B4513; }
.comm-settings-panel .cf-hint { display: block; margin: 10px 0 0; }

/* --- Зв'язок: під-вкладки списку (Авторизація/Менеджерам) --- */
.comm-subtabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}
.comm-subtab-btn {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    color: #777;
    font-size: 13px;
    padding: 7px 16px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.comm-subtab-btn:hover  { border-color: #ccc; }
.comm-subtab-btn.active { background: #8B4513; border-color: #8B4513; color: #fff; }

.comm-archive-toggle { margin-bottom: 16px; padding-bottom: 0; }

/* --- Зв'язок: список повідомлень --- */
.comm-msg-list { display: flex; flex-direction: column; gap: 2px; }

.comm-row {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.comm-row:hover { border-color: #ccc; }

.comm-row-main {
    display: grid;
    grid-template-columns: 1fr 130px 160px 110px;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
}
.comm-row-address { color: #2c2c2c; font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-row-status  { font-size: 12px; color: #8B4513; }
.comm-row-date    { font-size: 12px; color: #aaa; }

.comm-row-detail {
    padding: 14px 16px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    font-size: 13px;
    color: #444;
}
.comm-detail-inner { display: flex; flex-direction: column; gap: 12px; }
.comm-detail-user-title { font-weight: bold; color: #2c2c2c; margin-bottom: 4px; }
.comm-detail-user > div,
.comm-detail-guest { line-height: 1.6; }
.comm-detail-msg {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px 12px;
}
.comm-detail-subj { font-weight: bold; color: #2c2c2c; margin-bottom: 6px; }
.comm-detail-body { color: #555; line-height: 1.5; white-space: pre-line; }
.comm-detail-actions { align-self: flex-start; }

/* --- Зв'язок: пагінація стрілками (простіше за .mgr-pages — без номерів сторінок) --- */
.comm-pager {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
}
.comm-pager-info { font-size: 12px; color: #999; }

@media (max-width: 768px) {
    .comm-row-main { grid-template-columns: 1fr; row-gap: 4px; }
    .comm-row-send-btn, .comm-row-archive-btn { justify-self: start; }
}

.admin-stub {
    color: #999;
    font-size: 14px;
    font-style: italic;
    background: #fff;
    border: 1px dashed #ddd;
    border-radius: 6px;
    padding: 24px;
    text-align: center;
}

.admin-loading {
    color: #aaa;
    font-size: 14px;
    padding: 40px;
    text-align: center;
}

/* Мобіла */
@media (max-width: 768px) {
    .admin-wrap { flex-direction: column; margin: -20px -12px; }
    .admin-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .admin-logo { padding: 12px 16px; border-bottom: none; border-right: 1px solid #333; }
    .admin-nav { flex-direction: row; flex: none; padding: 6px 8px; gap: 4px; flex-wrap: wrap; }
    .admin-nav-btn { padding: 6px 12px; font-size: 13px; border-radius: 4px; }
    .admin-sidebar-footer { padding: 8px 12px; margin-left: auto; }
    .admin-content { padding: 20px 16px; }
}

/* ================================================================
   АДМІН — МОДУЛЬ СТОРІНОК
   ================================================================ */
.pages-list { display: flex; flex-direction: column; gap: 2px; margin-bottom: 24px; }

.pages-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    transition: border-color 0.15s;
}
.pages-list-item:hover { border-color: #ccc; }

.pages-list-label  { flex: 1; font-size: 15px; color: #2c2c2c; }
.pages-list-pointer { font-size: 12px; color: #aaa; font-family: monospace; }

/* Кнопки адмінки */
.admin-btn {
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
}
.admin-btn:hover { border-color: #2c2c2c; background: #f5f5f5; }
.admin-btn-primary { background: #2c2c2c; color: #fff; border-color: #2c2c2c; }
.admin-btn-primary:hover { background: #444; border-color: #444; }

/* Форма редагування */
.page-edit-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-top: 8px;
}

.page-edit-header { margin-bottom: 12px; }
.page-edit-header h3 { font-size: 16px; margin-bottom: 6px; }

.format-hint { font-size: 12px; color: #aaa; font-family: monospace; }

.page-edit-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    overflow: auto;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.page-edit-textarea:focus { border-color: #2c2c2c; }

.page-edit-actions { display: flex; gap: 10px; margin-top: 12px; align-items: center; }
.page-edit-error { color: #c0392b; font-size: 13px; margin-top: 8px; min-height: 18px; }

/* Поле "Заголовок" + підказка — для шаблонів верифікації (email/SMS) */
.page-edit-label-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.page-edit-label-row label { font-size: 13px; color: #666; white-space: nowrap; }
.page-edit-label-input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.page-edit-label-input:focus { border-color: #2c2c2c; }
.page-edit-label-counter { font-size: 12px; color: #aaa; white-space: nowrap; }
.page-edit-label-counter.over-limit { color: #c0392b; font-weight: 600; }

.page-edit-hint { font-size: 12px; color: #888; margin-bottom: 10px; }

/* ================================================================
   WYSIWYG РЕДАКТОР
   ================================================================ */
.wysiwyg-wrap { border: 1px solid #ccc; border-radius: 4px; overflow: hidden; }
.wysiwyg-wrap:focus-within { border-color: #2c2c2c; }

.wysiwyg-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
}

.wysiwyg-btn {
    min-width: 30px;
    height: 28px;
    padding: 0 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1;
}
.wysiwyg-btn:hover  { background: #e8e8e8; border-color: #bbb; }
.wysiwyg-btn:active { background: #ddd; }

.wysiwyg-sep { width: 1px; height: 20px; background: #ddd; margin: 0 4px; }

.wysiwyg-editor {
    min-height: 120px;
    max-height: 500px;
    overflow-y: auto;
    padding: 12px 14px;
    font-size: 15px;
    line-height: 1.6;
    outline: none;
    background: #fff;
}

/* Placeholder */
.wysiwyg-editor.is-empty:before {
    content: attr(data-placeholder);
    color: #bbb;
    pointer-events: none;
    display: block;
}

.wysiwyg-btn.active { background: #2c2c2c; color: #fff; border-color: #2c2c2c; }

/* ================================================================
   АДМІН — КАТАЛОГ
   ================================================================ */
.catalog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.catalog-header .admin-module-title { margin-bottom: 0; }

/* Список товарів */
.catalog-list { display: flex; flex-direction: column; gap: 4px; }

.catalog-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    transition: border-color 0.15s;
}
.catalog-list-row:hover { border-color: #ccc; }

/* Підгрупа в списку груп — відступ, щоб було видно вкладеність */
.catalog-list-row.group-row-child { margin-left: 32px; background: #fafcfe; }

.catalog-list-thumb {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f0f0f0;
}
.catalog-list-nophoto { display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 18px; }

.catalog-list-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.catalog-list-title { font-size: 15px; color: #2c2c2c; }
.catalog-list-price { font-size: 13px; color: #888; }

.catalog-status { font-size: 11px; padding: 2px 8px; border-radius: 10px; flex-shrink: 0; }
.status-on  { background: #e8f5e9; color: #2e7d32; }
.status-off { background: #f5f5f5; color: #999; }

/* Форма товару */
.catalog-form-header { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.catalog-form-header .admin-module-title { margin-bottom: 0; }

.catalog-form { max-width: 680px; display: flex; flex-direction: column; gap: 20px; }

/* Перемикач публікації */
.catalog-publish-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid #eee;
    border-radius: 8px;
    transition: border-color 0.2s;
    user-select: none;
}
.catalog-publish-toggle:hover { border-color: #ccc; }
.catalog-publish-toggle input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; accent-color: #2c2c2c; }
.catalog-publish-toggle input:checked ~ .publish-label { color: #2c2c2c; font-weight: bold; }
.publish-label { font-size: 15px; color: #999; }

/* Поля форми */
.cf-field { display: flex; flex-direction: column; gap: 6px; }
.cf-field label { font-size: 13px; color: #777; }
.cf-hint { font-size: 11px; color: #bbb; margin-left: 4px; }

.cf-field input[type="text"],
.cf-field input[type="number"] {
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}
.cf-field input:focus { border-color: #2c2c2c; }
.cf-field-short { max-width: 200px; }

.cf-error { color: #c0392b; font-size: 13px; min-height: 16px; }

.cf-actions { display: flex; align-items: center; gap: 12px; }

/* Підказка про фото */
.cf-images-hint {
    padding: 16px 20px;
    background: #fffbf5;
    border: 1px dashed #e0c9a0;
    border-radius: 6px;
    font-size: 13px;
    color: #a0845a;
}

/* Блок зображень */
/* Превью нового фото */
#cf-upload-preview {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
}
#cf-preview-img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #ddd;
    object-fit: cover;
    max-height: 240px;
}
.cf-preview-actions { display: flex; gap: 10px; }

/* Кнопка зберегти внизу */
.cf-save-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Радіо головного фото */
.cf-img-main {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.15s;
}
.cf-img-thumb:hover .cf-img-main { opacity: 1; }
.cf-img-main input { display: none; }
/* Вибране головне фото — зірочка завжди видима */
.cf-img-main:has(input:checked) { opacity: 1; background: rgba(139,69,19,0.85); }

/* Сітка фото — ПК: 2 в ряд */
.cf-images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

/* Мобіла: 1 в ряд */
@media (max-width: 600px) {
    .cf-images-grid { grid-template-columns: 1fr; }
}

.cf-img-thumb {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    transition: border-color 0.2s;
    background: #f5f5f5;
}

/* Виділяємо головне фото рамкою */
.cf-img-thumb.is-main { border-color: #8B4513; }

.cf-img-thumb img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

/* Кнопки під фото */
.cf-img-actions {
    display: flex;
    gap: 6px;
    padding: 7px 8px;
    background: #fff;
    border-top: 1px solid #eee;
}

.cf-img-actions button {
    flex: 1;
    padding: 5px 4px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fafafa;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.cf-img-actions button:hover { background: #f0f0f0; border-color: #bbb; }

/* Кнопка "Головна" коли активна */
.cf-img-thumb.is-main .cf-img-main-btn {
    background: #8B4513;
    color: #fff;
    border-color: #8B4513;
}
.cf-img-thumb.is-main .cf-img-main-btn:hover { background: #a0522d; }

/* Кнопка Видалити */
.cf-img-delete { color: #c0392b; }
.cf-img-delete:hover { background: #fff0f0 !important; border-color: #c0392b !important; }

/* Кнопка вибору фото */
.cf-upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 320px;
    padding: 24px 20px;
    background: #fdf6ee;
    border: 2px dashed #c8a882;
    border-radius: 8px;
    font-size: 14px;
    color: #8B6340;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-align: center;
}
.cf-upload-btn:hover {
    background: #f5e9d8;
    border-color: #8B4513;
    color: #8B4513;
}

.cf-upload-btn::before {
    content: '📷';
    font-size: 32px;
    line-height: 1;
}

.cf-upload-hint {
    font-size: 11px;
    color: #bbb;
    margin-top: 6px;
    text-align: center;
}

.cf-img-rotate { color: #555; font-size: 15px; }
.cf-img-rotate:hover { background: #f0f0f0 !important; }

/* Зображення групи */
.gf-img-wrap {
    width: 140px;
    height: 140px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 14px;
    background: #f5f5f5;
}
.gf-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Readonly поле */
.input-readonly {
    background: #f5f5f5 !important;
    color: #888 !important;
    cursor: default !important;
}

/* ── Підменю каталогу в сайдбарі ── */
.admin-subnav {
    display: flex;
    flex-direction: column;
    padding: 4px 0 8px 0;
    border-bottom: 1px solid #333;
    margin-bottom: 4px;
}

.admin-subnav-btn {
    background: none;
    border: none;
    color: #8aa8c0;
    font-size: 13px;
    text-align: left;
    padding: 7px 16px 7px 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s, color 0.15s;
}
.admin-subnav-btn:hover  { background: #2a3a50; color: #fff; }
.admin-subnav-btn.active { color: #fff; background: #1a3a5a; }

.subnav-count {
    font-size: 11px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 1px 7px;
    min-width: 22px;
    text-align: center;
    flex-shrink: 0;
}
.admin-subnav-btn.active .subnav-count { background: rgba(255,255,255,0.25); }

.subnav-toggle { font-size: 10px; margin-right: 2px; display: inline-block; width: 10px; }

.admin-subnav-children {
    display: flex;
    flex-direction: column;
}
.admin-subnav-child { padding-left: 44px; }

/* Мобіла — підменю під горизонтальним сайдбаром */
@media (max-width: 768px) {
    .admin-subnav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 6px 8px;
        background: #172030;
        width: 100%;
        gap: 4px;
        border-bottom: none;
        border-top: 1px solid #2a4060;
    }
    .admin-subnav-btn {
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 12px;
        background: #1e2e40;
    }
    /* На мобілі рядок і так переноситься — підгрупи просто завжди видні,
       без згортання (тумблер там не потрібен) */
    .admin-subnav-group, .admin-subnav-children { display: contents !important; }
    .subnav-toggle { display: none; }
}

/* Кнопки сортування груп */
.group-order-btns {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.group-order-btn {
    width: 3em;
    height: 3em;
    background: #fff;
    border: 1px solid #d0dce8;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    color: #5a7a9a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    padding: 0;
    line-height: 1;
}
.group-order-btn:hover:not(:disabled) { background: #e8f0f8; color: #1a3a5a; border-color: #7aaad0; }
.group-order-btn:disabled { opacity: 0.25; cursor: default; }

.cf-img-photo {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;          /* ← ключове */
    background: #f0ede8;
    flex-shrink: 0;
}
.cf-img-photo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ================================================================
   АДМІН — КОРИСТУВАЧІ
   ================================================================ */
.users-filter-row,
.users-row {
    display: grid;
    grid-template-columns: 130px 150px 130px 190px 120px 110px;
    gap: 10px;
    align-items: center;
}

.users-filter-row {
    padding: 0 12px 10px;
    margin-bottom: 6px;
    border-bottom: 2px solid #e0e0e0;
}

.users-filter-row input {
    padding: 7px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.users-filter-row input:focus { border-color: #2c2c2c; }

.users-col-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.users-list { display: flex; flex-direction: column; gap: 2px; }

.users-row {
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.15s;
}
.users-row:hover { border-color: #ccc; }

.users-row-link { cursor: pointer; }
.users-row-link:hover { border-color: #8B4513; background: #fffaf5; }

.users-col-login { color: #2c2c2c; font-weight: bold; }
.users-col-name,
.users-col-tel,
.users-col-email { color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.users-col-status { font-size: 12px; color: #8B4513; }
.users-col-date   { font-size: 12px; color: #aaa; }

/* Селект статусу в формі редагування користувача */
#ue-status {
    padding: 9px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}
#ue-status:focus { border-color: #2c2c2c; }

/* Мобіла — збірка в 2 колонки, фільтр-рядок теж перебудовується */
@media (max-width: 768px) {
    .users-filter-row,
    .users-row {
        grid-template-columns: 1fr 1fr;
        row-gap: 6px;
    }
    .users-col-label:nth-child(5) { display: none; } /* Статус лейбл зайва в фільтрі */
    .users-col-status { grid-column: 1 / -1; }
    .users-col-date   { grid-column: 1 / -1; }
}

/* ================================================================
   АДМІН — ОПТОВІ ЦІНИ ТОВАРУ
   ================================================================ */
.cf-field-row {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.cf-opt-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding-bottom: 9px; /* вирівнюється з input ціни по низу */
    font-size: 14px;
    color: #555;
    user-select: none;
}
.cf-opt-toggle input { width: 18px; height: 18px; cursor: pointer; accent-color: #8B4513; }

.cf-opt-title { font-size: 15px; color: #2c2c2c; margin-bottom: 12px; }

.cf-opt-mode-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}
.cf-opt-mode-option {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    user-select: none;
}
.cf-opt-mode-option:has(input:checked) {
    border-color: #8B4513;
    background: #fdf6ee;
    color: #8B4513;
    font-weight: bold;
}
.cf-opt-mode-option input { accent-color: #8B4513; cursor: pointer; }

.cf-opt-tier {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.cf-opt-tier:last-of-type { border-bottom: none; }

.cf-opt-label { font-size: 13px; color: #888; white-space: nowrap; }

.cf-opt-pcs, .cf-opt-price {
    width: 90px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.cf-opt-pcs:focus, .cf-opt-price:focus { border-color: #2c2c2c; }

@media (max-width: 600px) {
    .cf-opt-tier { gap: 6px; }
    .cf-opt-pcs, .cf-opt-price { width: 76px; }
}

/* ================================================================
   АДМІН — НАЛАШТУВАННЯ
   ================================================================ */
.settings-subtabs { display: flex; gap: 10px; margin-bottom: 20px; }

/* --- Оплата онлайн: опції продакшну (2026-08-17) --- */
.bankpay-prod-options { display: flex; flex-direction: column; gap: 10px; }

.settings-block {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px 22px;
    margin-bottom: 20px;
    max-width: 520px;
}
.settings-block-title { font-size: 15px; color: #2c2c2c; margin-bottom: 10px; }
.settings-block .admin-stub { text-align: left; padding: 0; border: none; background: none; font-style: normal; margin-bottom: 4px; }

#stg-vat-value-row { align-items: flex-end; gap: 12px; }
#stg-vat-value-row .cf-field-short { max-width: 140px; margin-bottom: 0; }
#stg-vat-save-status { padding-bottom: 9px; font-size: 13px; }

/* --- Розширення: список карток (core/plugins/*, окрема вкладка меню,
   2026-08-23) --- */
.admin-plugin-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 10px;
    max-width: 640px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}
.admin-plugin-title { font-weight: 600; color: #2c2c2c; }
.admin-plugin-desc { font-size: 13px; color: #888; margin-top: 2px; }

/* --- Оптові умови: режим "Менеджери" --- */
.opt-managers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
}
.opt-manager-row { padding-bottom: 0; }

/* --- Користувачі: ручне підтвердження пошти/телефону --- */
.ue-verify-badge { font-size: 13px; font-weight: bold; white-space: nowrap; cursor: pointer; flex-shrink: 0; margin-right: 8px; }
.ue-verify-ok    { color: #2e7d32; }
.ue-verify-ok:hover { color: #1b5e20; text-decoration: line-through; }
.ue-verify-need  { color: #c0392b; text-decoration: underline; }
.ue-verify-need:hover { color: #96281b; }

/* --- Оптові умови: режим "Особливі" --- */
.opt-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.opt-contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.opt-contact-row:last-child { border-bottom: none; }
.opt-contact-row-saved .opt-contact-name { font-weight: bold; color: #2c2c2c; min-width: 140px; }
.opt-contact-row-saved .opt-contact-phone { color: #555; flex: 1; }
.opt-contact-del {
    border: none;
    background: none;
    color: #c0392b;
    cursor: pointer;
    font-size: 15px;
    padding: 4px 8px;
}
.opt-contact-del:hover { color: #a02a1f; }
.opt-contact-row-new .opt-contact-input-name,
.opt-contact-row-new .opt-contact-input-phone {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.opt-contact-row-new .opt-contact-input-name { flex: 1; min-width: 120px; }
.opt-contact-row-new .opt-contact-input-phone { flex: 1; min-width: 120px; }
.opt-contact-row-new .opt-contact-input-name:focus,
.opt-contact-row-new .opt-contact-input-phone:focus { border-color: #2c2c2c; }
.opt-contact-save {
    border: none;
    background: #2e7d32;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 12px;
}
.opt-contact-save:hover { background: #256428; }