/* Users Menu - меню пользователей с карточками и валидацией */

.sidebar-section .section-header.users-header {
    padding: 6px 8px;
    gap: 8px;
}

.sidebar-section .section-header.users-header .users-counter {
    font-size: 10px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.sidebar-section .section-header.users-header .search-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-section .section-header.users-header input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 24px 4px 8px;
    font-size: 11px;
    outline: none;
    background: white;
    width: 100%;
}

.sidebar-section .section-header.users-header input:focus {
    border-color: #1976d2;
}

.sidebar-section .section-header.users-header .clear-search {
    position: absolute;
    right: 4px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 12px;
    line-height: 1;
    display: none;
    transition: color 0.2s;
}

.sidebar-section .section-header.users-header .clear-search:hover {
    color: #333;
}

.sidebar-section .section-header.users-header .arrow {
    cursor: pointer;
    padding: 4px;
}

.users-container {
    margin-bottom: 0;
}

.users-section {
    background: #fff;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.users-list-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.users-list {
    padding: 0;
}

.user-card {
    background: white;
    border-bottom: 1px solid #e8e8e8;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.15s;
}

.user-card:hover {
    background: #f5f5f5;
}

.user-card.selected {
    background: #e3f2fd;
    border-left: 3px solid #1976d2;
    padding-left: 7px;
}

.user-card.validated-success {
    border-left: 3px solid #4caf50;
    padding-left: 7px;
}

.user-card.validated-success.selected {
    background: #e3f2fd;
    border-left: 3px solid #4caf50;
}

.user-card.validated-error {
    border-left: 3px solid #f44336;
    padding-left: 7px;
}

.user-card.validated-error.selected {
    background: #e3f2fd;
    border-left: 3px solid #f44336;
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.user-card-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-tariff {
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: 600;
    margin-left: 6px;
}

.user-card-source {
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: 700;
    margin-left: 6px;
    letter-spacing: 0.3px;
}

.user-card-source.source-legacy {
    background: #9e9e9e;
    color: white;
}

.user-card-source.source-v2 {
    background: #1565c0;
    color: white;
}

.user-card-source.source-both {
    background: #2e7d32;
    color: white;
}

.user-card.source-v2 {
    border-left: 2px solid #1565c0;
}

.user-card.source-both {
    border-left: 2px solid #2e7d32;
}

.user-card-cabinet {
    font-size: 9px;
    color: #1565c0;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card-tariff.tariff-plus {
    background: #4caf50;
    color: white;
}

.user-card-tariff.tariff-pro {
    background: #2196f3;
    color: white;
}

.user-card-tariff.tariff-free {
    background: #999;
    color: white;
}

.user-card-inn {
    font-size: 9px;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-card-last-date {
    font-size: 8px;
    color: #bbb;
    font-weight: 400;
}

.user-card-last-date.warning {
    background: #fff3cd;
    color: #856404;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 500;
}

.user-card-validation {
    margin-top: 4px;
}

.users-search {
    margin-top: 0;
    padding: 8px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
    display: flex;
    gap: 6px;
    align-items: center;
}

.users-search input[type="month"] {
    flex: 1;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
}

.users-search button {
    padding: 5px 12px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.users-search button:hover {
    background: #1565c0;
}

.users-search button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.users-search button#validateAllBtn {
    background: #ff9800;
}

.users-search button#validateAllBtn:hover:not(:disabled) {
    background: #f57c00;
}

/* Строка с результатами валидации */
.user-validation-row {
    background: #fff8e1;
    cursor: default !important;
}

.user-validation-row td {
    padding: 12px 16px !important;
    text-align: left !important;
}

.user-validation-content {
    font-size: 12px;
}

.user-validation-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 8px;
}

.user-validation-status.success {
    background: #d4edda;
    color: #155724;
}

.user-validation-status.error {
    background: #f8d7da;
    color: #721c24;
}

.user-validation-status.loading {
    background: #fff3cd;
    color: #856404;
}

.validation-error-item {
    margin: 4px 0;
    padding: 6px 10px;
    background: white;
    border-left: 3px solid #f44336;
    border-radius: 3px;
    font-size: 11px;
}
