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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
}

.container {
    display: flex;
    height: 100vh;
}

/* 左侧菜单栏样式 */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    flex-shrink: 0;
}

.logo {
    padding: 20px;
    border-bottom: 1px solid #34495e;
    text-align: center;
}

.logo h2 {
    color: white;
    font-size: 18px;
}

.menu {
    padding: 10px 0;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-title {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

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

.arrow {
    transition: transform 0.3s;
    font-size: 12px;
}

.arrow.rotated {
    transform: rotate(-90deg);
}

.submenu {
    background-color: #34495e;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.submenu.expanded {
    max-height: 200px;
}

.submenu-item {
    padding: 10px 40px;
    cursor: pointer;
    transition: background-color 0.3s;
    border-left: 3px solid transparent;
}

.submenu-item:hover {
    background-color: #3d566e;
    border-left-color: #3498db;
}

/* 中央内容区域样式 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: white;
}

.tab-bar {
    background-color: #ecf0f1;
    border-bottom: 1px solid #bdc3c7;
    display: flex;
    padding: 0 10px;
    min-height: 40px;
    align-items: end;
}

.tab {
    padding: 8px 16px;
    background-color: #bdc3c7;
    border: 1px solid #95a5a6;
    border-bottom: none;
    margin-right: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    min-width: 100px;
    border-radius: 4px 4px 0 0;
    position: relative;
}

.tab.active {
    background-color: white;
    border-color: #bdc3c7;
    border-bottom: 1px solid white;
    margin-bottom: -1px;
}

.tab span {
    margin-right: 8px;
}

.tab .close-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.tab .close-btn:hover {
    background-color: #e74c3c;
    color: white;
}

.content-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.tab-content p {
    color: #7f8c8d;
    line-height: 1.6;
}

/* 页面内容样式 */
.page-content {
    width: 100%;
}

.page-content h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 14px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-right: 10px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}

/* 搜索区域样式 */
.search-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.search-section .form-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.search-section label {
    min-width: 80px;
    margin-bottom: 0;
}

.search-input {
    flex: 1;
    max-width: 300px;
}

.btn-search {
    background-color: #27ae60;
    color: white;
}

.btn-search:hover {
    background-color: #219a52;
}

/* 开关按钮样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

input:checked + .slider {
    background-color: #27ae60;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* 链接按钮样式 */
.btn-link {
    background: none;
    border: none;
    color: #27ae60;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    padding: 0;
}

.btn-link:hover {
    color: #219a52;
    text-decoration: underline;
}

/* 商户表格特殊样式 */
.merchant-table td {
    vertical-align: middle;
}