/* Основные стили */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    line-height: 1.6;
    color: #333;
}

h1, h2, h3, h4 {
    color: #333;
    margin-top: 0;
}

/* Контейнеры секций */
.section-block {
    border: 1px solid #c5d4e8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    background-color: #eef2f7;
    box-shadow: 0 2px 4px rgba(44, 82, 130, 0.06);
}

.section-title {
    color: #007bff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.result-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.result-item:hover {
    background-color: #f0f0f0;
}

.result-item label {
    flex-grow: 1;
    cursor: pointer;
    margin: 0;
    padding: 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-item input[type="checkbox"] {
    margin-right: 10px;
    flex-shrink: 0;
    cursor: pointer;
}

button {
    background-color: #007bff;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    margin-right: 10px;
    margin-bottom: 10px;
}

button:hover {
    background-color: #0056b3;
}

/* Стили для выбранных элементов */
.selected-segments, .selected-infopovods {
    margin-top: 15px;
    display: none; /* Сначала скрываем */
}

.selected-segment, .selected-infopovod {
    display: inline-block;
    background-color: #e0e0e0;
    padding: 5px 10px;
    border-radius: 15px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.remove-segment, .remove-infopovod {
    margin-left: 5px;
    cursor: pointer;
    color: #666;
}

.remove-segment:hover, .remove-infopovod:hover {
    color: #f00;
}

/* KPI секция */
.kpi-section {
    text-align: center;
    margin: 25px 0 15px;
}

.kpi-title {
    font-size: 28px;
    color: #007bff;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Одна полоска сверху вместо цепочки alert(); антиспам — повтор того же текста только продлевает показ */
#site-toast.site-toast {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10050;
    max-width: min(560px, 94vw);
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.18);
    font-size: 15px;
    line-height: 1.4;
    display: none;
    text-align: center;
    box-sizing: border-box;
}

#site-toast.site-toast--success {
    background: #1e7e34;
    color: #fff;
}

#site-toast.site-toast--error {
    background: #c82333;
    color: #fff;
}

#site-toast.site-toast--info {
    background: #117a8b;
    color: #fff;
}

/* Подтверждения вместо window.confirm (клик вне панели = отмена) */
.app-confirm-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
}

.app-confirm-modal {
    width: 100%;
    max-width: 420px;
    background: #1e1e24;
    color: #f0f0f5;
    border-radius: 14px;
    padding: 22px 22px 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    line-height: 1.45;
}

.app-confirm-modal__title {
    margin: 0 0 10px;
    font-size: 1.15rem;
    font-weight: 600;
}

.app-confirm-modal__message {
    margin: 0 0 20px;
    font-size: 0.95rem;
    opacity: 0.92;
}

.app-confirm-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.app-confirm-modal__btn {
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.app-confirm-modal__btn:focus {
    outline: 2px solid #6eb5ff;
    outline-offset: 2px;
}

.app-confirm-modal__btn--secondary {
    background: #3a3a44;
    color: #f0f0f5;
}

.app-confirm-modal__btn--secondary:hover {
    background: #4a4a56;
}

.app-confirm-modal__btn--primary {
    background: #2e6fd6;
    color: #fff;
}

.app-confirm-modal__btn--primary:hover {
    background: #255cb0;
}

.app-confirm-modal__btn--danger {
    background: #c62828;
    color: #fff;
}

.app-confirm-modal__btn--danger:hover {
    background: #9e1e1e;
}

