/* 全局样式 */
:root {
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
}

.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* 侧边栏样式 */
.sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: #343a40;
    color: #fff;
    transition: all 0.3s;
    min-height: 100vh;
}

.sidebar.active {
    min-width: var(--sidebar-collapsed-width);
    max-width: var(--sidebar-collapsed-width);
    text-align: center;
}

.sidebar.active .sidebar-header h3 {
    display: none;
}

.sidebar.active .sidebar-header strong {
    display: block;
}

.sidebar ul li a {
    padding: 15px;
    display: flex;
    align-items: center;
    color: #ced4da;
    text-decoration: none;
    transition: 0.3s;
}

.sidebar ul li a:hover {
    color: #fff;
    background: #495057;
}

.sidebar ul li.active a {
    color: #fff;
    background: #007bff;
}

.sidebar.active ul li a {
    padding: 15px 10px;
    text-align: center;
    justify-content: center;
}

.sidebar.active ul li a i {
    margin-right: 0;
    display: block;
    font-size: 1.5em;
    margin-bottom: 5px;
}

.sidebar.active ul li a span {
    display: none;
}

.sidebar .sidebar-header {
    padding: 20px;
    background: #212529;
}

.sidebar .components {
    padding: 20px 0;
}

.sidebar ul li a i {
    margin-right: 10px;
}

/* 内容区域样式 */
#content {
    width: 100%;
    transition: all 0.3s;
    overflow-y: auto;
}

.navbar {
    padding: 15px 10px;
    border: none;
    border-radius: 0;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar-light {
    background-color: #fff;
}

.navbar-btn {
    box-shadow: none;
    outline: none !important;
    border: none;
}

.current-page-title {
    font-size: 1.2em;
    font-weight: 500;
}

/* 卡片样式 */
.card {
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 15px 20px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    font-weight: 500;
}

.card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
    padding: 15px 20px;
}

/* 表格样式 */
.table th {
    background-color: #f8f9fa;
    font-weight: 500;
}

.table td, .table th {
    vertical-align: middle;
}

/* 表单样式 */
.form-label {
    font-weight: 500;
    margin-bottom: 5px;
}

/* 按钮样式 */
.btn {
    border-radius: 5px;
    font-weight: 500;
}

/* 分页样式 */
.pagination {
    margin-top: 20px;
}

/* 徽章样式 */
.badge {
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        min-width: var(--sidebar-collapsed-width);
        max-width: var(--sidebar-collapsed-width);
        text-align: center;
    }
    
    .sidebar .sidebar-header h3 {
        display: none;
    }
    
    .sidebar .sidebar-header strong {
        display: block;
    }
    
    .sidebar ul li a {
        padding: 15px 10px;
        text-align: center;
        justify-content: center;
    }
    
    .sidebar ul li a i {
        margin-right: 0;
        display: block;
        font-size: 1.5em;
        margin-bottom: 5px;
    }
    
    .sidebar ul li a span {
        display: none;
    }
}

/* 登录页面样式 */
#login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #f8f9fa;
}

#login-page .card {
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#login-page .card-header {
    background-color: #007bff;
    color: white;
    text-align: center;
    padding: 20px;
}

/* 图片缩放样式 */
.img-thumbnail {
    cursor: pointer;
    transition: transform 0.3s;
}

.img-thumbnail:hover {
    transform: scale(1.05);
}

/* 操作按钮样式 */
.action-btn {
    margin: 0 3px;
}

/* 模态框样式 */
.modal-dialog {
    max-width: 80%;
}

.modal-content {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 15px 20px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 15px 20px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* 状态标签样式 */
.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.status-pending {
    background-color: #ffc107;
    color: #212529;
}

.status-approved {
    background-color: #28a745;
    color: white;
}

.status-rejected {
    background-color: #dc3545;
    color: white;
}

/* 表格内容样式 */
.table-value {
    font-weight: normal;
}

.table-id {
    font-family: monospace;
    font-size: 0.9em;
}

/* 加载动画 */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}
