/* 通用样式 - 简约风格 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
}

/* 汉堡菜单按钮 - PC端隐藏 */
.hamburger-btn {
    display: none;
}

/* 侧边栏遮罩 - PC端隐藏 */
.sidebar-overlay {
    display: none;
}

/* 退出按钮图标 - PC端隐藏 */
.logout-icon {
    display: none;
}

.logout-text {
    display: inline;
}

/* 通用按钮样式 */
.btn {
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.2s;
    display: inline-block;
}

.btn:hover {
    color: #1890ff;
    border-color: #1890ff;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #1890ff;
    color: #fff;
    border-color: #1890ff;
}

.btn-primary:hover {
    background: #40a9ff;
    border-color: #40a9ff;
    color: #fff;
}

.btn-danger {
    background: #ff4d4f;
    color: #fff;
    border-color: #ff4d4f;
}

.btn-danger:hover {
    background: #ff7875;
    border-color: #ff7875;
    color: #fff;
}

.btn-small {
    padding: 4px 12px;
    font-size: 13px;
}

/* 通用输入框样式 */
.form-input,
.search-input,
.filter-select {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
    background: #fafafa;
}

.form-input:focus,
.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #1890ff;
    background: #fff;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

/* 通用标签样式 */
.badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
}

.badge-success {
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #d9f7be;
}

.badge-warning {
    background: #fff2e8;
    color: #fa8c16;
    border: 1px solid #ffd591;
}

.badge-error {
    background: #fff1f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

.badge-info {
    background: #e6f7ff;
    color: #1890ff;
    border: 1px solid #91d5ff;
}

/* 通用工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #fafafa;
    border-radius: 6px;
    margin-bottom: 16px;
}

.toolbar-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

/* 通用表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.data-table th {
    background: #fafafa;
    font-weight: 500;
    color: #666;
}

.data-table tr:hover {
    background: #fafafa;
}

.data-table td {
    color: #333;
}

/* 操作按钮组 */
.action-buttons {
    display: flex;
    gap: 8px;
}

/* 通用卡片 */
.card {
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    padding: 20px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.modal-close {
    cursor: pointer;
    font-size: 20px;
    color: #999;
    background: none;
    border: none;
    padding: 0;
    width: 24px;
    height: 24px;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

.loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f0f0f0;
    border-top-color: #1890ff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* 消息提示 */
.message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 20px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    display: none;
}

.message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.message-success {
    color: #52c41a;
    border-left: 3px solid #52c41a;
}

.message-error {
    color: #ff4d4f;
    border-left: 3px solid #ff4d4f;
}

.message-warning {
    color: #fa8c16;
    border-left: 3px solid #fa8c16;
}

.message-info {
    color: #1890ff;
    border-left: 3px solid #1890ff;
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 16px;
    background: #fafafa;
    border-radius: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.pagination-btn:hover:not(:disabled) {
    color: #1890ff;
    border-color: #1890ff;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

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

.tooltip-text {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 5px 10px;
    border-radius: 4px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
}
