/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding: 0;
    background-color: #f4f4f4;
}

.hidden {
    display: none !important;
}

/* 表单相关样式 */
.form-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

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

input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}

select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 按钮样式 */
button {
    background: #2d742f;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #1a451c;
}

.secondary-btn {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.secondary-btn:hover {
    background: #e0e0e0;
}

.danger-btn {
    background: #e74c3c;
}

.danger-btn:hover {
    background: #c0392b;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f8f8;
}

table input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

/* 布局相关 */
.layout {
    display: flex;
    height: 100vh;
}

.section {
    padding: 0px 0 10px;
    min-height: 100vh;
}

/* 头部样式 */
.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-container h2 {
    margin: 0 0 10px 0;
}

/* 侧边栏样式 */
.sidebar {
    width: 200px;
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu {
    flex: 1;
}

.menu-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.menu-item:hover {
    background: #34495e;
}

.menu-item.active {
    background: #3498db;
}

/* Element UI 组件样式覆盖 */
.el-container {
    height: 100vh;
}

.el-aside {
    height: 100vh;
    position: relative;
}

.el-menu {
    height: 100%;
}

.el-menu-vertical {
    border-right: none;
}

.el-header {
    background-color: #fff;
    border-bottom: 1px solid #e6e6e6;
    position: relative;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-left h3 {
    margin: 0;
    color: #303133;
    font-size: 18px;
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
}

.el-main {
    padding: 0;
    height: calc(100vh - 50px);
    position: relative;
    z-index: 1;
}

/* 内容区域样式 */
.content {
    flex: 1;
    padding: 20px;
    background: #f5f6fa;
}

/* iframe 样式 */
#mainFrame {
    width: 100%;
    height: 100%;
    border: none;
}

/* 表格容器样式 */
.table-container {
    margin: 20px 0;
    overflow-x: auto;
    padding-top: 45px;
    margin-bottom: 60px;
}

.table-user-container {
    margin: 20px 0;
    overflow-x: auto;
    padding-top: 100px;
    margin-bottom: 60px;
}

/* API表格特殊样式 */
#apiTable td {
    max-width: 150px;
    word-wrap: break-word;
    white-space: normal;
}

#apiTable td:nth-child(4) {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}

/* 操作按钮样式 */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.edit-btn, .renew-btn, .delete-btn {
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 5px;
    color: white;
}

.edit-btn {
    background-color: #4CAF50;
}

.renew-btn {
    background-color: #2196F3;
}

.delete-btn {
    background-color: #f44336;
}

.edit-btn:hover, .renew-btn:hover, .delete-btn:hover {
    opacity: 0.8;
}

/* 搜索相关样式 */
.search-input {
    padding: 12px;
    margin-left: 10px;
    width: 200px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-group {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 分页样式 */
.pagination-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 10px 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.pagination button {
    padding: 5px 10px;
    background: #545252;
    margin-left: 10px;
}

.pagination button.active {
    background: #f0ad05;
}

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

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 5px;
    width: 600px;
}

/* 空数据样式 */
.empty-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.empty-data img {
    width: 180px;
    height: auto;
    margin-bottom: 20px;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

.empty-data p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

.empty-data .empty-desc {
    color: #adb5bd;
    font-size: 14px;
    margin-top: 8px;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* 用户状态样式 */
.expired-status, .normal-status {
    padding: 2px 8px;
    border-radius: 4px;
}

.expired-status {
    color: #ff4d4f;
    background: #fff2f0;
    border: 1px solid #ffccc7;
}

.normal-status {
    color: #52c41a;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
}

/* 导入导出按钮样式 */
.import-export-actions {
    display: flex;
    gap: 10px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid #ddd;
}

.import-btn, .export-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    color: white;
}

.import-btn {
    background-color: #67c23a;
}

.export-btn {
    background-color: #409eff;
}

.import-btn:hover {
    background-color: #85ce61;
}

.export-btn:hover {
    background-color: #66b1ff;
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    background: #fafafa;
    cursor: pointer;
    transition: all 0.3s;
}

.upload-area.dragover {
    border-color: #409eff;
    background: #f0f9ff;
}

.upload-tip {
    color: #666;
}

.upload-button {
    color: #409eff;
    cursor: pointer;
}

.upload-button:hover {
    text-decoration: underline;
}

/* 其他工具样式 */
.clear-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    padding: 0 5px;
}

.clear-btn:hover {
    color: #666;
}

/* 筛选按钮样式 */
.filter-section {
    margin-top: 5px;
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 5px;
    border-radius: 4px;
}

.filter-buttons {
    display: flex;
    gap: 10px;
}

.filter-btn {
    padding: 6px 15px;
    background: #409eff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.filter-btn:hover {
    background: #66b1ff;
}

.clear-filter-btn {
    padding: 6px 15px;
    background: #909399;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.clear-filter-btn:hover {
    background: #a6a9ad;
}

/* 搜索框图标垂直居中 */
.el-input__prefix {
    display: flex;
    align-items: center;
}

.el-input__prefix i {
    line-height: normal;
}

/* 表格头部样式 */
.el-table th {
    background-color: #f5f7fa !important;
    color: #606266 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

/* 表格单元格样式 */
.el-table td {
    color: #606266 !important;
    font-size: 14px !important;
}

.page-footer {
    width: 100%;
    padding: 20px 0;
    background-color: #f5f7fa;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: #606266;
    font-size: 14px;
}