/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
    background-color: #0078d4;
    color: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

h1, h2, h3 {
    margin-bottom: 10px;
}

button {
    background-color: #0078d4;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #005a9e;
}

button:active {
    background-color: #004c85;
}

.main-content {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

/* 面板样式 */
.panel {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px;
}

.users-panel {
    flex: 1;
    max-width: 300px;
}

.permissions-panel {
    flex: 3;
}

.log-panel {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px;
}

/* 用户列表样式 */
.user-list {
    margin-bottom: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.user {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.user:hover {
    background-color: #f0f0f0;
}

.user.selected {
    background-color: #e6f2fa;
    border-left: 3px solid #0078d4;
}

.user-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

/* 权限表格样式 */
.permission-tables {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.permission-section {
    margin-bottom: 10px;
}

.permission-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.permission-table th, 
.permission-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.permission-table th {
    background-color: #f5f5f5;
}

.permission-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.db-selector, .object-selector {
    margin-bottom: 10px;
}

select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-right: 10px;
    min-width: 150px;
}

.action-buttons {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 用户信息样式 */
.user-info {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.role-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 日志样式 */
#log-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.log-entry {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.log-entry:last-child {
    border-bottom: none;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 100;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 4px;
    width: 80%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

.modal-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .users-panel {
        max-width: 100%;
    }
}

/* 复选框样式 */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
} 