/* 商户系统样式 */

/* Body样式重置 */
body {
    padding-top: 0px !important;
}

/* 登录页面样式 */
.merchant-login-page {
    background-color: #f1f4fd;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.merchant-login-screen {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.merchant-login-well {
    border-radius: 3px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 1);
    border: none;
    padding: 0;
    overflow: visible;
}

.merchant-login-head {
    background: #899fe1;
    border-radius: 3px 3px 0 0;
    padding: 20px 20px 60px 20px;
    text-align: center;
    position: relative;
}

.language-selector {
    position: absolute;
    top: 15px;
    right: 15px;
}

.language-selector .btn-group {
    position: relative;
}

.language-selector .btn {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    padding: 5px 10px;
}

.language-selector .btn:hover,
.language-selector .btn:focus,
.language-selector .btn:active {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.language-selector .dropdown-menu {
    min-width: 140px;
    margin-top: 5px;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.language-selector .dropdown-menu li.active a {
    background-color: #f5f5f5;
    color: #333;
    font-weight: 500;
}

.language-selector .dropdown-menu li a {
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    display: block;
}

.language-selector .dropdown-menu li a:hover {
    background-color: #f5f5f5;
    color: #333;
}

.merchant-login-head .system-title {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.merchant-login-head .system-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin: 10px 0 0 0;
}

.merchant-login-form {
    padding: 40px 30px;
    position: relative;
    z-index: 99;
    overflow: visible;
}

.merchant-login-form #errtips {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 4px;
    word-wrap: break-word;
    word-break: break-all;
}

.merchant-login-form #errtips.alert {
    margin-bottom: 15px;
}

.merchant-login-form .form-group {
    position: relative;
    overflow: visible;
}

.merchant-login-form .msg-box {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 10px;
    white-space: normal;
    max-width: 200px;
    min-width: 150px;
    word-wrap: break-word;
    word-break: break-all;
    z-index: 100;
    line-height: 40px;
    font-size: 12px;
    color: #a94442;
}

.merchant-login-form .input-group > .msg-box.n-right {
    position: absolute;
    left: 100%;
    margin-left: 10px;
    top: 0;
    z-index: 100;
}

.merchant-login-form .profile-img-card {
    width: 100px;
    height: 100px;
    display: block;
    border-radius: 50%;
    margin: -93px auto 30px;
    border: 5px solid #fff;
}

.merchant-login-form .profile-name-card {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.merchant-login-form .input-group {
    margin-bottom: 15px;
    position: relative;
    overflow: visible;
}

.merchant-login-form .form-group {
    position: relative;
    overflow: visible;
    margin-bottom: 15px;
}

.merchant-login-form .form-control {
    font-size: 13px;
    height: 40px;
}

.merchant-login-form .input-group-addon {
    background-color: #f5f5f5;
    border-color: #ddd;
    min-width: 40px;
    text-align: center;
}

.merchant-login-form .password-toggle {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
}

.merchant-login-form .password-toggle:hover {
    background-color: #e6e6e6;
}

.merchant-login-form .ga-code-tip {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    margin-left: 40px;
}

.merchant-login-form .checkbox {
    margin-top: 15px;
    margin-bottom: 15px;
}

.merchant-login-form .checkbox label {
    font-weight: normal;
    cursor: pointer;
}

.merchant-login-form .btn-login {
    background: #708eea;
    border-color: #708eea;
    color: #fff;
    font-size: 16px;
    padding: 10px;
    height: 45px;
    transition: all 0.3s ease;
}

.merchant-login-form .btn-login:hover {
    background: #5a7de8;
    border-color: #5a7de8;
}

@media (max-width: 767px) {
    .merchant-login-screen {
        padding: 0;
        max-width: 100%;
    }
    
    .merchant-login-form {
        padding: 30px 20px;
    }
    
    .merchant-login-form .msg-box {
        position: static;
        display: block;
        margin-left: 0;
        margin-top: 5px;
        max-width: 100%;
        min-width: auto;
    }
    
    .merchant-login-form .input-group > .msg-box.n-right {
        position: static;
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }
}

/* 基础布局 */
.merchant-layout {
    display: flex;
    min-height: 100vh;
    background-color: #f4f4f4;
}

/* 左侧导航栏 */
.merchant-sidebar {
    width: 230px;
    background-color: #2c3e50;
    color: #ecf0f1;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    left: 0;
    top: 0;
    z-index: 1000;
    box-shadow: 2px 0 4px rgba(0,0,0,0.1);
}

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

.merchant-sidebar .sidebar-header h3 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}

.merchant-sidebar .sidebar-item {
    display: block;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.merchant-sidebar .sidebar-parent {
    cursor: pointer;
    user-select: none;
}

.merchant-sidebar .sidebar-item:hover {
    background-color: #34495e;
    color: #fff;
    text-decoration: none;
}

.merchant-sidebar .sidebar-item.active,
.merchant-sidebar .sidebar-item.active:hover {
    background-color: #34495e;
    border-left-color: #3498db;
    color: #3498db;
}

.merchant-sidebar .sidebar-parent {
    cursor: pointer;
    user-select: none;
}

.merchant-sidebar .sidebar-item i {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

/* 子菜单样式 */
.merchant-sidebar .sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #1a252f;
    display: none;
    overflow: hidden;
}

.merchant-sidebar .sidebar-menu-item.active .sidebar-submenu {
    display: block;
}

.merchant-sidebar .sidebar-menu-item.active > .sidebar-parent {
    background-color: #34495e;
    border-left-color: #3498db;
}

.merchant-sidebar .sidebar-parent .fa-angle-left {
    transition: transform 0.3s ease;
    float: right;
    margin-top: 3px;
}

.merchant-sidebar .sidebar-menu-item.active > .sidebar-parent .fa-angle-left {
    transform: rotate(-90deg);
}

.merchant-sidebar .sidebar-sub-item {
    padding-left: 40px !important;
    font-size: 13px;
    display: block;
    padding: 12px 20px 12px 40px;
    color: #bdc3c7;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.merchant-sidebar .sidebar-sub-item:hover {
    background-color: #2c3e50;
    color: #fff;
    text-decoration: none;
}

.merchant-sidebar .sidebar-sub-item.active {
    background-color: #34495e;
    border-left-color: #3498db;
    color: #3498db;
    font-weight: 500;
}

/* 主内容区 */
.merchant-main {
    margin-left: 230px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部导航栏 */
.merchant-header {
    background-color: #fff;
    height: 60px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.merchant-header .logo-section {
    display: flex;
    align-items: center;
    margin-right: 30px;
}

.merchant-header .logo-section i {
    font-size: 24px;
    color: #1890ff;
    margin-right: 10px;
}

.merchant-header .logo-section .system-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.merchant-header .user-section {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1001;
}

.merchant-header .user-section .username {
    margin-right: 15px;
    color: #666;
    font-size: 14px;
}

.merchant-header .user-section .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #1890ff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1002;
    user-select: none;
}

.merchant-header .user-section .user-avatar:hover {
    background-color: #40a9ff;
}

.merchant-header .user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    min-width: 160px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1003;
    padding: 5px 0;
    display: none;
    list-style: none;
    margin: 0;
}

.merchant-header .user-section.open .user-dropdown-menu {
    display: block;
}

.merchant-header .user-dropdown-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.merchant-header .user-dropdown-menu .dropdown-item {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.merchant-header .user-dropdown-menu .dropdown-item:hover {
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.merchant-header .user-dropdown-menu .dropdown-item i {
    margin-right: 8px;
    color: #999;
    width: 16px;
    text-align: center;
}

.merchant-header .user-dropdown-menu .divider {
    height: 1px;
    margin: 5px 0;
    overflow: hidden;
    background-color: #e5e5e5;
    padding: 0;
}

/* 标签页导航 */
.merchant-tabs {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
}

.merchant-tab {
    padding: 8px 15px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #666;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: -1px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.merchant-tab:hover {
    color: #1890ff;
}

.merchant-tab.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
    font-weight: 500;
}

.merchant-tab .close {
    margin-left: 8px;
    cursor: pointer;
    opacity: 0.6;
    font-size: 12px;
    transition: opacity 0.3s ease;
}

.merchant-tab .close:hover {
    opacity: 1;
}

/* 内容区域 */
.merchant-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f4f4f4;
}

/* 统计卡片 */
.merchant-stats-card {
    background-color: #fff;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.merchant-stats-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.merchant-stats-card .stats-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.2;
}

.merchant-stats-card .stats-label {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.merchant-stats-card .stats-compare {
    color: #999;
    font-size: 12px;
}

/* 面板样式 */
.merchant-panel {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.merchant-panel .panel-heading {
    background-color: #fafafa;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 20px;
    border-radius: 4px 4px 0 0;
}

.merchant-panel .panel-heading .panel-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.merchant-panel .panel-heading .tab-buttons {
    display: flex;
    gap: 5px;
}

.merchant-panel .panel-heading .tab-buttons .btn {
    padding: 4px 12px;
    font-size: 12px;
}

.merchant-panel .panel-heading .tab-buttons .btn-primary {
    background-color: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.merchant-panel .panel-heading .tab-buttons .btn-primary:hover,
.merchant-panel .panel-heading .tab-buttons .btn-primary:focus {
    background-color: #40a9ff;
    border-color: #40a9ff;
    color: #fff;
}

.merchant-panel .panel-heading .tab-buttons .btn-primary.active {
    background-color: #096dd9;
    border-color: #096dd9;
    color: #fff;
}

.merchant-panel .panel-body {
    padding: 20px;
}

/* 表格样式 */
.merchant-table {
    width: 100%;
    border-collapse: collapse;
}

.merchant-table thead {
    background-color: #fafafa;
}

.merchant-table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 500;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    font-size: 14px;
}

.merchant-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
    font-size: 14px;
}

.merchant-table tbody tr:hover {
    background-color: #fafafa;
}

.merchant-table tbody tr:last-child td {
    border-bottom: none;
}

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

.merchant-empty i {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

.merchant-empty .empty-text {
    font-size: 14px;
}

/* 商户信息面板 */
.merchant-info-item {
    margin-bottom: 15px;
}

.merchant-info-item:last-child {
    margin-bottom: 0;
}

.merchant-info-label {
    color: #999;
    font-size: 12px;
    margin-bottom: 5px;
}

.merchant-info-value {
    color: #333;
    font-size: 14px;
}

.merchant-info-value.large {
    font-size: 16px;
    font-weight: bold;
}

.merchant-info-value .label {
    margin-left: 5px;
}

/* 按钮样式 */
.merchant-btn-view {
    width: 100%;
}

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

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

.merchant-btn-view:not(.btn-primary) {
    border-color: #d9d9d9;
    color: #666;
}

.merchant-btn-view:not(.btn-primary):hover {
    border-color: #1890ff;
    color: #1890ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .merchant-sidebar {
        width: 200px;
    }
    
    .merchant-main {
        margin-left: 200px;
    }
    
    .merchant-content {
        padding: 15px;
    }
    
    .merchant-stats-card {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .merchant-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .merchant-sidebar.show {
        transform: translateX(0);
    }
    
    .merchant-main {
        margin-left: 0;
    }
    
    .merchant-header {
        padding: 0 15px;
    }
    
    .merchant-content {
        padding: 10px;
    }
}

/* 滚动条样式 */
.merchant-sidebar::-webkit-scrollbar {
    width: 6px;
}

.merchant-sidebar::-webkit-scrollbar-track {
    background: #2c3e50;
}

.merchant-sidebar::-webkit-scrollbar-thumb {
    background: #34495e;
    border-radius: 3px;
}

.merchant-sidebar::-webkit-scrollbar-thumb:hover {
    background: #3d566e;
}

.merchant-content::-webkit-scrollbar {
    width: 8px;
}

.merchant-content::-webkit-scrollbar-track {
    background: #f4f4f4;
}

.merchant-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.merchant-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

