/* Стили для модуля Certificates */
#certificates-table {
    border-collapse: collapse;
}

#certificates-table td {
    padding: 2px 8px;
    border: 1px solid var(--main-delimiter-light);
    text-align: center;
}

#certificates-table th {
    padding: 2px 8px;
    text-align: center;
    background: var(--main-background);
    font-weight: 600;
    border: 1px solid var(--main-delimiter-light);
    position: sticky;
    left: 259px;
    top: -1px;
    z-index: 1;
}

.cert-header {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

.sort-link {
    display: block;
    color: var(--main-text-color);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
}

.sort-link:hover {
    background: var(--main-text-sub-color-beauty);
    text-decoration: none;
}

.sort-link.active {
    background: var(--color-blue);
    color: white;
}

#certificates-table tbody tr:nth-child(even) {
    background: var(--main-sub-background);
}

.cert-cell {
    position: relative;
}

.cert-cell a {
    color: inherit;
    text-decoration: none;
    display: block;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.cert-cell a:hover {
    background: var(--main-hover-interact);
    text-decoration: underline;
    opacity: 1;
}

.cert-cell a.has-file {
    text-decoration: underline;
}

.cert-expired {
    /*background-color: rgba(220, 53, 69, 0.1) !important;*/
    color: var(--red) !important;
}

.cert-expiring {
    /*background-color: rgba(255, 193, 7, 0.1) !important;*/
    color: var(--orange) !important;
}

.cert-valid {
    /*background-color: rgba(40, 167, 69, 0.1) !important;*/
    color: var(--green) !important;
}

.cert-none {
    color: var(--main-text-sub-color-beauty);
}

.cert-date-dash {
    color: var(--main-text-sub-color-advanced);
}

.cert-file-dash {
    color: var(--main-text-sub-color-advanced);
}

.cert-cell {
    position: relative;
}

/* Стили для столбца "Должность" */
#certificates-table th:nth-child(3),
#certificates-table td:nth-child(3) {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
    text-align: left;
    padding-left: 12px;
    padding-right: 12px;
}

#certificates-table td:nth-child(3) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cert-edit-btn {
    position: absolute;
    top: 53%;
    right: 0;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 3px;
    padding: 0;
    cursor: pointer;
    z-index: 10;
    text-decoration: none;
    display: inline-block;
    background: none;
    border: none;
}

.cert-cell:hover .cert-edit-btn {
    opacity: 1;
}

.secondary.active {
    background: var(--main-color) !important;
    color: white !important;
}