/* Дополнения к AdminLTE под задачи CRM. */

.text-sm .table td,
.text-sm .table th { padding: .35rem .5rem; }

.btn-xs { padding: .1rem .35rem; font-size: .75rem; line-height: 1.4; border-radius: .2rem; }

/* Сетка расценок: первая колонка не уезжает при горизонтальной прокрутке */
.rates-grid th:first-child,
.rates-grid td:first-child {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
}
.rates-grid tr.table-secondary td:first-child { background: #e2e6ea; }

.payroll-table tbody tr:hover { background: #f6f9fc; }

/* ---------------------------------------------------------------- фотографии */
.photo-strip { gap: 6px; }

.photo-thumb-wrap { position: relative; }

.photo-thumb {
    display: block;
    width: 84px;
    height: 84px;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    background: #f4f6f9;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-del {
    position: absolute;
    top: -6px;
    right: -6px;
    border-radius: 50%;
    padding: 0 .3rem;
    line-height: 1.3;
}

/* Просмотрщик фото: увеличение и пролистывание */
.lb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}
.lb-stage {
    max-width: 100vw;
    max-height: 100vh;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lb-img {
    max-width: 100vw;
    max-height: 100vh;
    transition: transform .15s ease-out;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}
.lb-img.zoomed { max-width: none; max-height: none; cursor: grab; }

.lb-btn {
    position: absolute;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 48px;
    text-align: center;
    cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-prev { left: 12px; top: 50%; margin-top: -24px; }
.lb-next { right: 12px; top: 50%; margin-top: -24px; }
.lb-close { right: 12px; top: 12px; }
.lb-zoom { left: 12px; top: 12px; }
.lb-counter {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 14px;
    opacity: .85;
}

/* ------------------------------------------------- личный кабинет на телефоне */
.worker-ui .card-title { font-size: 1rem; }
.worker-ui .content-wrapper { background: #f4f6f9; }

@media (max-width: 575.98px) {
    .worker-ui .photo-thumb { width: 72px; height: 72px; }
    .worker-ui .btn-lg { padding: .75rem 1rem; font-size: 1.05rem; }
    .lb-btn { width: 56px; height: 56px; line-height: 56px; }
}

/* select2 внутри AdminLTE */
.select2-container--bootstrap4 .select2-selection { min-height: calc(1.5em + .5rem + 2px); }
