* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

.container {
    display: flex;
    height: 100vh;
}

/* 左侧导航栏 */
.sidebar {
    width: 204px;
    background: linear-gradient(135deg, #1a1f3a 0%, #0f1729 100%);
    color: #fff;
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    z-index: 999;
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.sidebar-header-logo {
    width: 40px;
    height: 40px;
    background: #1e90ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.sidebar-header-text {
    flex: 1;
}

.sidebar-header-text h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.sidebar-header-text p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-menu {
    padding: 20px 0;
    list-style: none;
}

.menu-item {
    margin: 0;
    padding: 0;
}

.menu-item-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.menu-item-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.menu-item-link.active {
    color: #fff;
    background: rgba(30, 144, 255, 0.2);
    border-left: 3px solid #1e90ff;
    padding-left: 13px;
    font-weight: 600;
}

.menu-item-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.submenu {
    list-style: none;
    padding: 0;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.submenu.collapsed {
    max-height: 0;
    opacity: 0;
}

.menu-item.has-children > .menu-item-link::after {
    content: '';
    position: absolute;
    right: 16px;
    width: 6px;
    height: 6px;
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    transform: rotate(-45deg);
    transition: transform 0.3s ease;
}

.menu-item.has-children.expanded > .menu-item-link::after {
    transform: rotate(45deg);
}

.submenu-item {
    list-style: none;
}

.submenu-item-link {
    display: flex;
    align-items: center;
    padding: 8px 16px 8px 48px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submenu-item-link:hover,
.submenu-item-link.active {
    color: rgba(255, 255, 255, 0.9);
}

.submenu-item-link.active {
    color: #1e90ff;
    font-weight: 600;
}

/* 主内容区域 */
.main-content {
    margin-left: 204px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f5f7fa;
}

.header {
    background: #fff;
    border-bottom: 1px solid #e8eaed;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #666;
    font-size: 14px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #999;
    font-size: 13px;
}

.breadcrumb a {
    color: #1e90ff;
    text-decoration: none;
    cursor: pointer;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    color: #ccc;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: #1e90ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a1f3a;
    margin-bottom: 0;
}

/* 按钮样式 */
.btn-primary {
    background: #1e90ff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: #1a7ce6;
}

.btn-default {
    background: #fff;
    color: #666;
    border: 1px solid #d9d9d9;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.btn-default:hover {
    border-color: #1e90ff;
    color: #1e90ff;
}

/* 筛选区域 */
.filter-area {
    background: #f5f7fa;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 24px;
}

.filter-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

.filter-select,
.filter-input {
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    min-width: 180px;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #1e90ff;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.1);
}

.filter-actions {
    display: flex;
    gap: 8px;
}

/* 表格样式 */
.table-wrapper {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    background: #f5f7fa;
    border-bottom: 1px solid #e8eaed;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e8eaed;
    color: #666;
}

.data-table tbody tr:hover {
    background: #fafbfc;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.tag-gray {
    color: #999;
    font-size: 13px;
}

.link-blue {
    color: #1e90ff;
    text-decoration: none;
    cursor: pointer;
    margin-right: 12px;
    font-size: 13px;
}

.link-blue:hover {
    text-decoration: underline;
}

.link-red {
    color: #f5222d;
    text-decoration: none;
    cursor: pointer;
    font-size: 13px;
}

.link-red:hover {
    text-decoration: underline;
}

.pagination {
    padding: 12px 16px;
    background: #f5f7fa;
    border-top: 1px solid #e8eaed;
    font-size: 12px;
    color: #999;
    text-align: right;
}

/* 模态框样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e8eaed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1f3a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e8eaed;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.form-group label .required {
    color: #f5222d;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 13px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #1e90ff;
    box-shadow: 0 0 0 2px rgba(30, 144, 255, 0.1);
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.radio-group {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.radio-item input[type="radio"] {
    cursor: pointer;
}

.radio-item label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
}

/* 滚动条美化 */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.content::-webkit-scrollbar {
    width: 8px;
}

.content::-webkit-scrollbar-track {
    background: transparent;
}

.content::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover {
    background: #999;
}
