@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Orbitron:wght@700&display=swap');

:root {
    --bg-color: #FFFFFF;
    --card-bg: #F8F9FA;
    --text-main: #212529;
    --text-sub: #6C757D;
    --link-color: #0052D4;
    --disabled-color: #ADB5BD;
    --accent-gradient: linear-gradient(135deg, #0052D4 0%, #65C7F7 100%);
    --menu-hover-glow: linear-gradient(90deg, rgba(10,228,255,0.15) 0%, transparent 100%);
    --active-border: #0AE4FF;
    
    --font-title: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6, .sys-title {
    font-family: var(--font-title);
    font-weight: 700;
}

a {
    color: var(--link-color);
    text-decoration: none;
}

/* 按钮通用样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 2px;
    box-shadow: 0 0.5px 2px rgba(0,0,0,0.1);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
}

.btn-primary:hover::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.15);
}

.btn:disabled {
    background: var(--disabled-color);
    cursor: not-allowed;
    box-shadow: none;
}

/* 表单输入框 */
.input-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 2px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.3s;
    background-color: #fff;
    color: var(--text-main);
}
.input-control:focus {
    border-color: var(--link-color);
}

/* 弹窗通用样式 */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: var(--bg-color);
    border-radius: 4px;
    padding: 20px;
    min-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 消息提示框 (Toast) */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}
.toast {
    background: var(--card-bg);
    border-left: 4px solid var(--link-color);
    padding: 12px 24px;
    margin-bottom: 10px;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}
.toast.error { border-left-color: #dc3545; }
.toast.success { border-left-color: #28a745; }

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

/* 布局：侧边栏与主内容 */
.layout-wrapper {
    display: flex;
    height: 100vh;
    overflow: hidden;
}
.sidebar {
    width: 240px;
    background: var(--card-bg);
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    transition: width 0.3s;
}
.sidebar.collapsed {
    width: 60px;
}
.sidebar-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e9ecef;
}
.sys-title {
    font-size: 18px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar.collapsed .sys-title {
    display: none;
}
.user-info {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}
.user-info .username {
    font-weight: 500;
    margin-bottom: 5px;
}
.user-info .expire {
    font-size: 12px;
    color: var(--text-sub);
}
.sidebar.collapsed .user-info {
    display: none;
}

.menu-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    padding: 10px 0;
}
.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.3s;
    position: relative;
}
.menu-item i {
    margin-right: 15px;
    font-size: 18px;
}
.sidebar.collapsed .menu-item {
    justify-content: center;
    padding: 12px 0;
}
.sidebar.collapsed .menu-item i {
    margin-right: 0;
}
.sidebar.collapsed .menu-item span {
    display: none;
}

.menu-item:hover {
    background: var(--menu-hover-glow);
}
.menu-item.active {
    background: rgba(10,228,255,0.05);
}
.menu-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--active-border);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.top-header {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.tabs-nav {
    display: flex;
    background: var(--card-bg);
    border-bottom: 1px solid #e9ecef;
    padding: 0 10px;
    overflow-x: auto;
}
.tab-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.tab-item.active {
    border-bottom-color: var(--link-color);
    color: var(--link-color);
    background: #fff;
}
.tab-close {
    margin-left: 8px;
    font-size: 12px;
    color: var(--text-sub);
}
.tab-close:hover {
    color: #dc3545;
}

.tab-content-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: #fff;
}
.tab-pane {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}
.tab-pane.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

/* 登录页面专属 */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
}
.login-box {
    width: 400px;
    background: #fff;
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.login-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.form-group {
    margin-bottom: 20px;
}
.captcha-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.captcha-img {
    height: 40px;
    cursor: pointer;
    border-radius: 2px;
    border: 1px solid #dee2e6;
}
.login-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* 列表顶部工具栏 */
.toolbar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--card-bg);
    border-bottom: 1px solid #e9ecef;
}
.toolbar-title {
    font-weight: 500;
}
.table-container {
    padding: 20px;
    height: calc(100% - 130px);
    overflow: auto;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.data-table th, .data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}
.data-table th {
    background: var(--card-bg);
    font-weight: 500;
}
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    background: #fff;
}
