/* Jerarquía matriz privilegios — tonos suaves (claro / noche) */
.users-page {
    --priv-dept-bg: #e8f5ee;
    --priv-dept-fg: #1f6b3a;
    --priv-mod-bg: #faf3d6;
    --priv-mod-bg-hover: #f5ebc0;
    --priv-mod-fg: #8a6d14;
    --priv-leaf-bg: #ffffff;
    --priv-leaf-bg-hover: #f4f6f5;
}

html[data-theme="dark"] .users-page,
[data-theme="dark"] .users-page {
    --priv-dept-bg: rgba(61, 186, 117, 0.14);
    --priv-dept-fg: #8fd9a8;
    --priv-mod-bg: rgba(224, 168, 46, 0.14);
    --priv-mod-bg-hover: rgba(224, 168, 46, 0.22);
    --priv-mod-fg: #e6c56a;
    --priv-leaf-bg: var(--surface);
    --priv-leaf-bg-hover: var(--hover);
}

.users-page .page-header {
    margin-bottom: 12px;
}

.user-dni-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.user-presence {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    line-height: 0;
}

.user-presence svg {
    width: 10px;
    height: 10px;
    display: block;
}

.user-presence.is-online {
    color: #16a34a;
}

.user-presence.is-warn {
    color: #d97706;
}

.user-presence.is-offline {
    color: #b42318;
}

.user-presence svg circle {
    fill: currentColor;
}

.users-page .page-title {
    margin: 0;
}

.users-editor {
    display: grid;
    gap: 12px;
    min-width: 0;
    margin-bottom: 16px;
}

.users-editor.is-idle [data-panel] {
    opacity: 0.72;
    filter: grayscale(0.08);
}

.users-editor.is-idle [data-panel] {
    pointer-events: none;
}

.users-editor.is-idle .select-picker,
.users-editor.is-idle .field-control,
.users-editor.is-idle .field-select {
    cursor: not-allowed;
}

.perfil-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.user-who {
    display: grid;
    gap: 2px;
    min-width: 0;
    margin-bottom: 10px;
}

.user-who strong {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.user-who small {
    font-size: 11px;
    color: var(--text-muted);
}

.user-flow-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.user-flow-btn {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.user-flow-btn:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
}

.user-flow-btn.is-save {
    background: var(--primary);
    border-color: transparent;
    color: #fff;
}

.user-flow-btn.is-ghost {
    color: var(--text-muted);
}

.user-id-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    column-gap: 16px;
    align-items: center;
}

.user-id-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 12px;
    align-items: start;
    min-width: 0;
}

.user-foto-field {
    justify-self: center;
    align-self: center;
    margin: 0;
}

.user-foto-preview {
    position: relative;
    width: 200px;
    height: 220px;
    padding: 0;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: var(--input-bg, var(--surface));
    color: var(--text-muted);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-foto-preview img,
.user-foto-mark {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.user-foto-preview img {
    object-fit: cover;
    object-position: center;
    display: block;
}

.user-foto-mark {
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-foto-preview.has-photo {
    background: transparent;
    border-color: var(--primary);
}

.user-foto-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-foto-icon svg {
    width: 72px;
    height: 72px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#lblFotoIniciales {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text);
}

.user-foto-preview img[hidden],
.user-foto-mark[hidden],
.user-foto-icon[hidden],
#lblFotoIniciales[hidden] {
    display: none !important;
}

.user-avatar.has-photo {
    padding: 0;
    overflow: hidden;
    background: transparent;
}

.user-avatar.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mini foto en tabla de usuarios */
.user-foto-col {
    width: 52px;
    min-width: 52px;
    max-width: 56px;
    text-align: center;
    vertical-align: middle;
}

.user-foto-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    flex: 0 0 36px;
    box-sizing: border-box;
    background: color-mix(in srgb, var(--primary, #16a34a) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--primary, #16a34a) 35%, #d1d5db);
    color: color-mix(in srgb, var(--primary, #16a34a) 75%, #166534);
    vertical-align: middle;
}

.user-foto-thumb.has-photo {
    background: var(--surface, #fff);
    border-color: color-mix(in srgb, var(--primary, #16a34a) 28%, var(--border, #e5e7eb));
    padding: 0;
}

.user-foto-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 36px;
    max-height: 36px;
    object-fit: cover;
    object-position: center;
}

.user-foto-thumb-fallback {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    user-select: none;
}

[data-theme="dark"] .user-foto-thumb {
    background: color-mix(in srgb, var(--primary, #16a34a) 18%, #0f172a);
    border-color: color-mix(in srgb, var(--primary, #16a34a) 40%, #334155);
    color: color-mix(in srgb, var(--primary, #4ade80) 80%, #bbf7d0);
}

[data-theme="dark"] .user-foto-thumb.has-photo {
    background: #0f172a;
    border-color: color-mix(in srgb, var(--primary, #16a34a) 35%, #334155);
}

.priv-hint {
    margin: -4px 0 12px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Módulos (Logística, Control unidades…) → fondo amarillo suave */
html body .priv-table tbody tr.priv-area td {
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--priv-mod-fg) !important;
    background: var(--priv-mod-bg) !important;
    background-color: var(--priv-mod-bg) !important;
    cursor: pointer;
    user-select: none;
}

html body .priv-table tbody tr.priv-area:hover td,
html body .priv-table tbody tr.priv-area.is-open td {
    background: var(--priv-mod-bg-hover) !important;
    background-color: var(--priv-mod-bg-hover) !important;
    color: var(--priv-mod-fg) !important;
}

/* Módulo hoja (p. ej. Control de unidades) → mismo fondo amarillo */
html body .priv-table tbody tr.priv-module td {
    background: var(--priv-mod-bg) !important;
    background-color: var(--priv-mod-bg) !important;
    color: var(--priv-mod-fg) !important;
}

html body .priv-table tbody tr.priv-module:hover td {
    background: var(--priv-mod-bg-hover) !important;
    background-color: var(--priv-mod-bg-hover) !important;
}

html body .priv-table tbody tr.priv-module td:first-child {
    color: var(--priv-mod-fg) !important;
    font-weight: 700;
}

.priv-area-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.priv-area-label::before {
    content: "";
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 5px solid currentColor;
    transition: transform 0.15s ease;
}

.priv-area.is-open .priv-area-label::before {
    transform: rotate(90deg);
}

.user-tabs {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

.user-tabs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.user-tab {
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--text-muted);
    min-height: 34px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.user-tab:hover {
    background: var(--hover);
    color: var(--text);
}

.user-tab.is-on {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.user-card {
    padding: 14px 16px 16px;
}

.user-card-head {
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
}

.user-section {
    display: grid;
    gap: 10px;
}

.user-section + .user-section {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.user-section-head {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
}

.user-card-contact {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.perfil-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.perfil-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--input-bg);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.perfil-chip:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.perfil-chip input {
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
}

.perfil-chips.is-locked .perfil-chip {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.gme-areas-hint {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

#gmeAreasBox .perfil-chip span small {
    margin-left: 4px;
    opacity: 0.7;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.priv-section {
    margin: 0 0 14px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--border);
}

.priv-section:last-of-type {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.priv-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px;
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.priv-access-line {
    padding-bottom: 10px;
}

.priv-access-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
}

.priv-access-block {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.priv-access-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.priv-access-sep {
    color: var(--border);
    font-weight: 600;
    user-select: none;
    line-height: 1;
}

.priv-mod-bar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.priv-check-row,
.priv-mod-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.priv-limpiar-btn {
    flex: 0 0 auto;
    margin-left: auto;
    align-self: center;
}

.priv-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--input-bg, var(--surface));
    color: var(--text-muted);
    min-height: 30px;
    padding: 0 10px 0 8px;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    user-select: none;
}

.priv-check input {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    margin: 0;
    flex: 0 0 auto;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    cursor: pointer;
}

.priv-check input:checked {
    border-color: var(--primary);
    background-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6.2 5 8.7 9.5 3.5'/%3E%3C/svg%3E");
    background-size: 10px 10px;
    background-position: center;
    background-repeat: no-repeat;
}

.priv-check:hover:not(:has(input:disabled)) {
    color: var(--text);
    background: var(--hover);
}

.priv-check.is-on {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark, var(--primary));
}

.priv-check.is-suggest:not(.is-on) {
    border-color: color-mix(in srgb, var(--primary) 50%, var(--border));
    color: var(--text);
}

.priv-check:has(input:disabled) {
    opacity: 0.4;
    cursor: not-allowed;
}

.priv-chip-ico {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

.priv-pack-actions {
    display: none;
}

.priv-advanced-toggle {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 10px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    text-align: left;
}

.priv-advanced-toggle span {
    font-size: 12px;
    font-weight: 700;
}

.priv-advanced-toggle small {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.priv-advanced-toggle[aria-expanded="true"] {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom-color: transparent;
    background: var(--hover);
}

.priv-advanced-body {
    border: 1px solid var(--border);
    border-top: 0;
    border-radius: 0 0 10px 10px;
    padding: 8px;
    background: var(--surface);
}

.priv-advanced-body .priv-wrap {
    max-height: min(52vh, 420px);
}

.sede-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.sede-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.sede-card {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--input-bg);
}

.sede-card.is-on {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.sede-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
}

.sede-card-head input,
.fundo-row input,
.sub-list label input {
    accent-color: var(--primary);
    cursor: pointer;
}

.sede-card-head input:disabled,
.fundo-row input:disabled,
.sub-list label input:disabled {
    cursor: not-allowed;
}

.sede-fundos {
    display: grid;
    gap: 6px;
    margin-top: 8px;
    padding-left: 4px;
}

.fundo-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
}

.sub-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin: 2px 0 4px 22px;
    font-size: 11px;
    color: var(--text-secondary);
}

.priv-wrap {
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--border) 70%, transparent) transparent;
}

.priv-wrap::-webkit-scrollbar {
    width: 3px;
    height: 3px;
}

.priv-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.priv-wrap::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--border) 80%, transparent);
    border-radius: 99px;
}

.priv-wrap::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.priv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.priv-table th,
.priv-table td {
    padding: 7px 8px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    white-space: nowrap;
}

.priv-table th {
    font-size: var(--font-size-table-head, 10px);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
}

.priv-table th:first-child,
.priv-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text);
}

/* Departamentos → fondo verde suave */
html body .priv-table tbody tr.priv-group td {
    padding-top: 10px;
    padding-bottom: 8px;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--priv-dept-fg) !important;
    background: var(--priv-dept-bg) !important;
    background-color: var(--priv-dept-bg) !important;
    cursor: default;
}

html body .priv-table tbody tr.priv-group:hover td {
    background: var(--priv-dept-bg) !important;
    background-color: var(--priv-dept-bg) !important;
}

/* Submódulos (Dashboard, Facturas, Pagos…) → fondo base */
html body .priv-table tbody tr[data-mod-row]:not(.priv-module) td {
    background: var(--priv-leaf-bg) !important;
    background-color: var(--priv-leaf-bg) !important;
    color: var(--text) !important;
}

html body .priv-table tbody tr[data-mod-row]:not(.priv-module):hover td {
    background: var(--priv-leaf-bg-hover) !important;
    background-color: var(--priv-leaf-bg-hover) !important;
}

html body .priv-table tbody tr[data-mod-row]:not(.priv-module) td:first-child {
    color: var(--text) !important;
}

/* Checks legibles en claro y noche */
.priv-table input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    margin: 0;
    vertical-align: middle;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    background: var(--input-bg, var(--surface));
    background-color: var(--input-bg, var(--surface));
    box-shadow: inset 0 0 0 1px transparent;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.priv-table input[type="checkbox"]:hover:not(:disabled) {
    border-color: var(--primary);
}

.priv-table input[type="checkbox"]:checked {
    border-color: var(--primary);
    background-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6.2 5 8.7 9.5 3.5'/%3E%3C/svg%3E");
    background-size: 11px 11px;
    background-position: center;
    background-repeat: no-repeat;
}

.priv-table input[type="checkbox"]:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.users-page .table-card {
    padding: 16px;
    overflow: visible;
}

.users-page table th,
.users-page table td {
    text-align: center;
}

@media (max-width: 760px) {
    .user-tabs {
        flex-wrap: wrap;
    }

    .perfil-line {
        flex-wrap: wrap;
    }

    .users-page .list-toolbar {
        flex-wrap: wrap;
    }

    .user-id-wrap {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .user-id-grid {
        width: 100%;
        grid-template-columns: 1fr;
    }

    .user-foto-preview {
        width: 100%;
        max-width: 200px;
    }
}

.modal-card-wide.auditoria-acceso-card {
    width: min(1320px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    max-height: min(88vh, 820px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px 18px;
}

.auditoria-acceso-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    min-width: 0;
}

.auditoria-acceso-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.auditoria-acceso-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.auditoria-acceso-heading .modal-title {
    margin: 0;
    font-size: 17px;
    white-space: nowrap;
}

.auditoria-acceso-text {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.auditoria-acceso-presence {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.presence-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.presence-badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.presence-badge.is-online {
    color: #0f7a3a;
    background: rgba(34, 160, 83, 0.14);
}

.presence-badge.is-warn {
    color: #b45309;
    background: rgba(217, 119, 6, 0.14);
}

.presence-badge.is-offline {
    color: #b42318;
    background: rgba(180, 35, 24, 0.12);
}

.otp-trust-devices-card {
    width: min(860px, 96vw);
}

.otp-trust-devices-table th:nth-child(6),
.otp-trust-devices-table td:nth-child(6) {
    width: 72px;
    text-align: center;
}

.auditoria-acceso-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.auditoria-acceso-filters {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

.auditoria-bulk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 34px;
    min-height: 34px;
    margin: 0;
    padding: 0 14px;
    border: none;
    border-radius: 8px;
    background: var(--danger, #b42318);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
}

.auditoria-bulk-btn:hover {
    color: #fff;
    background: var(--danger, #b42318);
    filter: brightness(0.92);
}

.auditoria-bulk-btn[hidden] {
    display: none !important;
}

.auditoria-acceso-card .items-modal-close {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    align-self: flex-end;
}

.otp-trust-devices-card .auditoria-acceso-actions {
    align-items: center;
}

.otp-trust-devices-card .items-modal-close {
    align-self: center;
}

.auditoria-acceso-field {
    margin: 0;
    min-width: 0;
    width: 148px;
}

.auditoria-acceso-field .field-label {
    margin-bottom: 4px;
    font-size: 11px;
    line-height: 1.1;
}

.auditoria-acceso-field .date-picker-trigger,
.auditoria-acceso-field .field-control {
    min-height: 34px;
    height: 34px;
    font-size: 12px;
    padding: 0 10px;
}

.auditoria-acceso-field .date-picker-trigger svg {
    width: 15px;
    height: 15px;
}

.auditoria-acceso-wrap {
    flex: 0 1 auto;
    width: 100%;
    max-height: calc((1.9rem * 20) + 2.4rem);
    overflow-x: auto;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(120, 160, 120, 0.45) transparent;
}

.auditoria-acceso-wrap::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.auditoria-acceso-wrap::-webkit-scrollbar-thumb {
    background: rgba(120, 160, 120, 0.45);
    border-radius: 999px;
}

.auditoria-acceso-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.auditoria-acceso-card .auditoria-acceso-table,
.modal-card-wide .auditoria-acceso-table {
    width: 100% !important;
    min-width: 1100px;
    table-layout: fixed;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.auditoria-acceso-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.auditoria-acceso-table th,
.auditoria-acceso-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 8px 12px;
    height: auto;
    box-sizing: border-box;
}

.auditoria-acceso-table th {
    font-size: var(--font-size-table-head, 10px);
}

.auditoria-acceso-table td {
    font-size: var(--font-size-table-row, 12px);
}

.auditoria-acceso-table th:nth-child(1),
.auditoria-acceso-table td:nth-child(1) {
    width: 56px;
}

.auditoria-acceso-table th:nth-child(2),
.auditoria-acceso-table td:nth-child(2) {
    width: 78px;
    text-align: center;
}

.auditoria-acceso-table th:nth-child(3),
.auditoria-acceso-table td:nth-child(3) {
    width: 100px;
}

.auditoria-acceso-table th:nth-child(4),
.auditoria-acceso-table td:nth-child(4),
.auditoria-acceso-table th:nth-child(5),
.auditoria-acceso-table td:nth-child(5) {
    width: 148px;
}

.auditoria-acceso-table th:nth-child(6),
.auditoria-acceso-table td:nth-child(6) {
    width: 100px;
}

.auditoria-acceso-table th:nth-child(7),
.auditoria-acceso-table td:nth-child(7) {
    width: 140px;
}

.auditoria-acceso-table th:nth-child(8),
.auditoria-acceso-table td:nth-child(8) {
    width: 130px;
}

.auditoria-acceso-table th:nth-child(9),
.auditoria-acceso-table td:nth-child(9) {
    width: 120px;
}

.auditoria-acceso-table th:nth-child(10),
.auditoria-acceso-table td:nth-child(10) {
    width: 72px;
}

.auditoria-acceso-table .badge-muted {
    background: rgba(120, 120, 120, 0.14);
    color: var(--text-muted);
}

.auditoria-acceso-table .badge-warn {
    background: rgba(180, 120, 20, 0.14);
    color: #9a6700;
}

.auditoria-accion-cell {
    width: 72px;
    text-align: center;
    overflow: visible !important;
}

.auditoria-cerrar-btn {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .auditoria-acceso-toolbar {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .auditoria-acceso-heading {
        width: calc(100% - 44px);
    }

    .auditoria-acceso-actions {
        order: 3;
        width: 100%;
        justify-content: flex-end;
    }

    .auditoria-acceso-filters {
        flex: 1 1 auto;
        width: auto;
    }
}
