/* Единые стили приложения */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1e293b;
    background: #f1f5f9;
}
.body-with-nav .page-content {
    padding: 20px 24px;
    max-width: 100%;
    box-sizing: border-box;
}
@media (min-width: 1200px) {
    .body-with-nav .page-content {
        min-width: 1500px;
    }
}
.box {
    background: #fff;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    margin-bottom: 20px;
}
h1 {
    margin: 0 0 12px;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
}
h2 {
    margin: 16px 0 8px;
    color: #334155;
    font-size: 1.2rem;
    font-weight: 600;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}
th, td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}
th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
}
.pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
}
.pill.active {
    background: #dcfce7;
    color: #166534;
}
.pill.blocked {
    background: #fee2e2;
    color: #b91c1c;
}
.pill.stop {
    background: #fee2e2;
    color: #b91c1c;
}
.btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.3;
}
.btn:hover {
    background: #1d4ed8;
}
.btn.gray {
    background: #64748b;
}
.btn.gray:hover {
    background: #475569;
}
.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}
.alert-error {
    margin-top: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    color: #b91c1c;
    font-size: 14px;
}
.alert-success {
    margin-top: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    color: #166534;
    font-size: 14px;
}
label, .field-label {
    font-weight: 600;
    color: #475569;
    display: block;
    margin-top: 10px;
    margin-bottom: 4px;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], select, textarea {
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: inherit;
}
textarea {
    min-height: 80px;
    resize: vertical;
}
.muted {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}
.link-default {
    color: #2563eb;
    text-decoration: none;
}
.link-default:hover {
    text-decoration: underline;
}
.list-plain {
    list-style: none;
    padding: 0;
    margin: 0;
}
.list-plain li {
    margin-top: 6px;
}
.flag-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 8px;
    background: #ffedd5;
    color: #c2410c;
    font-size: 12px;
}
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.action-row .btn, .action-row form {
    margin: 0;
}
.action-row-form {
    display: inline;
}
.action-row-form button {
    vertical-align: middle;
}
.table-wrap {
    overflow: visible;
    margin-top: 8px;
}
.table-wrap table {
    width: 100%;
    margin-top: 0;
    table-layout: fixed;
}
/* Колонки: ФИО, Логин, E-mail, Телефон, Статус, Действия — без полосы прокрутки */
.table-wrap table th:nth-child(1),
.table-wrap table td:nth-child(1) { width: 22%; }
.table-wrap table th:nth-child(2),
.table-wrap table td:nth-child(2) { width: 10%; }
.table-wrap table th:nth-child(3),
.table-wrap table td:nth-child(3) { width: 14%; }
.table-wrap table th:nth-child(4),
.table-wrap table td:nth-child(4) { width: 11%; }
.table-wrap table th:nth-child(5),
.table-wrap table td:nth-child(5) { width: 11%; }
.table-wrap table th:nth-child(6),
.table-wrap table td:nth-child(6) { width: 32%; white-space: nowrap; }
.table-wrap table td:nth-child(1) .flag-badge { margin-left: 4px; white-space: nowrap; }
.table-wrap .action-row { display: flex; flex-wrap: nowrap; gap: 3px; align-items: center; }
.table-wrap .action-row > * { flex-shrink: 0; }
.table-wrap .action-row .btn, .table-wrap .action-row button { padding: 3px 5px; font-size: 11px; }
.table-wrap table td { overflow: hidden; text-overflow: ellipsis; }
.table-wrap table td:nth-child(6) { overflow: visible; }
.org-block {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #f8fafc;
    border-left: 4px solid #2563eb;
}
.org-block.is-archived {
    border-left-color: #64748b;
}
.org-block-title {
    font-weight: 600;
}
.org-block-meta {
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
}
.scheduled-warn {
    font-size: 12px;
    color: #b91c1c;
    margin-top: 4px;
}
.filters {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.filters-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}
.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.filter-group label {
    margin-bottom: 4px;
    font-size: 13px;
}
.filter-group input,
.filter-group select {
    min-width: 140px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
}
.filter-group input[type="text"] {
    min-width: 180px;
}
.filter-actions {
    justify-content: flex-end;
    align-items: flex-end;
}
.filter-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}
.filter-buttons .btn {
    min-width: 100px;
    text-align: center;
}
@media (max-width: 600px) {
    .body-with-nav .page-content {
        padding: 12px 16px;
    }
    .box {
        padding: 14px 16px;
    }
    .action-row {
        gap: 4px;
    }
    .filter-group input,
    .filter-group select {
        min-width: 120px;
    }
}
