* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; }
html, body { height: 100%; overflow: hidden; background-color: #f0f2f5; color: #333; font-size: 14px; }

.navbar { background: linear-gradient(90deg, #1e293b, #334155); color: white; padding: 0 24px; display: flex; justify-content: space-between; align-items: center; height: 60px; flex-shrink: 0; }
.container { display: flex; height: calc(100vh - 60px); width: 100vw; }
.sidebar { width: 220px; background: #fff; padding: 20px 0; z-index: 10; overflow-y: auto; flex-shrink: 0; }
.sidebar a { display: block; padding: 14px 24px; color: #475569; text-decoration: none; cursor: pointer; font-weight: 500; border-left: 4px solid transparent; }
.sidebar a.active, .sidebar a:hover { background: #f8fafc; color: #2563eb; border-left-color: #2563eb; }

.content { flex: 1; padding: 20px; display: flex; flex-direction: column; overflow: hidden; }
.card { background: #fff; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 20px; }
.card h3 { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #e2e8f0; color: #1e293b; font-size: 18px; flex-shrink: 0; }

/* 表格容器：这里设置为 flex 撑满剩余空间，并允许内部滚动 */
.table-container { flex: 1; overflow-y: auto; overflow-x: auto; position: relative; border: 1px solid #e2e8f0; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid #e2e8f0; word-wrap: break-word; vertical-align: middle; }
th { background: #f8fafc; font-weight: 600; color: #475569; position: sticky; top: 0; z-index: 5; box-shadow: 0 1px 0 #e2e8f0; }
tbody tr:hover { background-color: #f1f5f9; }

/* 针对单行省略的列 */
.nowrap-col { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

button { background: #2563eb; color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; flex-shrink: 0; }
button:hover { background: #1d4ed8; }
button:disabled { background: #94a3b8; cursor: not-allowed; }
.btn-danger { background: #ef4444; }
.btn-danger:hover { background: #dc2626; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #334155; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; outline: none; }
.input-group { display: flex; gap: 10px; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.6); z-index: 1000; }
.modal-content { background: #fff; width: 90%; max-width: 600px; margin: 80px auto; border-radius: 8px; display: flex; flex-direction: column; }
.modal-header { padding: 16px 24px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; gap: 12px; }
.btn-cancel { background: #fff; color: #475569; border: 1px solid #cbd5e1; }

.detail-table { width: 100%; margin-bottom: 20px; border: 1px solid #e2e8f0; }
.detail-table th { width: 140px; background: #f8fafc; white-space: nowrap;}
.detail-table td { white-space: normal; }

.pagination-wrapper { display: flex; justify-content: center; align-items: center; margin-top: 15px; flex-shrink: 0; }

/* P1 修复：补全登录框样式 */
.login-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 380px;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}
.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1e293b;
    font-size: 24px;
}