@charset "utf-8";

/* ═══════════════════════════════════════════════════════════
   通用表格 (来自 index.css)
   ═══════════════════════════════════════════════════════════ */

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

th,
td {
    padding: 4px 6px;
    font-size: 12px;
    white-space: nowrap;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

tbody tr {
    white-space: nowrap;
    transition: background-color var(--transition);
}

tbody tr:hover {
    background-color: var(--primary-soft);
    transition: background-color var(--transition);
}

th {
    background-color: var(--bg-secondary);
    color: var(--text-dark);
    font-weight: bold;
}

thead th {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

thead th:nth-child(3) {
    width: 60px;
}

tr {
    user-select: none;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════
   #AccessRecords 专用表格 (来自 control.css)
   ═══════════════════════════════════════════════════════════ */

#AccessRecords {
    display: block;
    margin-left: auto;
    margin-right: auto;
    padding: 1px;
    background-color: #FFF28B;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--c-accent-1) var(--bg-secondary);
}

#AccessRecords table th,
#AccessRecords table td,
#AccessRecords tr {
    white-space: nowrap;
    font-size: 12px;
    padding: 3px 4px;
    text-align: center;
    border: 1px solid var(--c-accent-1);
    color: var(--c-accent-1);
}

#AccessRecords table th {
    font-weight: bold;
}

#AccessRecords tr:last-child td {
    border-bottom: none;
}

#AccessRecords td:nth-child(2) {
    max-width: 200px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

#AccessRecords .checkbox-cell {
    text-align: center;
}

#AccessRecords tr#total-salary-row td {
    color: var(--success-color);
}

#AccessRecords::-webkit-scrollbar {
    height: 3px;
}

#AccessRecords::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

#AccessRecords::-webkit-scrollbar-thumb {
    background: var(--c-accent-1);
    border-radius: 4px;
}

#AccessRecords::-webkit-scrollbar-thumb:hover {
    background: var(--danger-dark);
}

.ui-sortable-helper {
    background-color: #fffacd !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
    z-index: 1;
    border: 1px dashed var(--accent-gold);
    display: table;
}

.ui-sortable-placeholder {
    background-color: #f0f8ff;
    visibility: visible !important;
    height: 40px !important;
}

/* ═══════════════════════════════════════════════════════════
   令牌表格 (.token-table) (来自 control.css)
   ═══════════════════════════════════════════════════════════ */

.token-table {
    width: 100%;
    border-collapse: collapse;
}

.token-table thead tr {
    background: var(--bg-secondary);
}

.token-table th {
    padding: 6px 8px;
    font-size: 12px;
    white-space: nowrap;
    text-align: left;
    border-bottom: 2px solid var(--c-border);
    color: var(--c-label);
    font-weight: 600;
}

.token-table tbody tr {
    border-bottom: 1px solid var(--c-border);
    white-space: nowrap;
}

.token-table tbody tr:hover {
    background: var(--c-surface);
}

.token-table td {
    padding: 6px 8px;
    font-size: 12px;
    white-space: nowrap;
    border: none;
    color: inherit;
}

/* ═══════════════════════════════════════════════════════════
   响应式
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
    #AccessRecords {
        max-width: 360px;
    }
}

@media (min-width: 601px) {
    #AccessRecords {
        max-width: 560px;
    }
}

@media (min-width: 1200px) {
    #AccessRecords {
        max-width: 900px;
    }
}