/* 商户中心样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #333333;
    --bg-color: #f5f5f5;
    --text-color: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --card-bg: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* 登录/注册容器 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-color);
}

.auth-box {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.auth-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.auth-tabs button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.auth-tabs button.active {
    color: var(--text-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.auth-form label i {
    margin-right: 0.5rem;
    color: var(--text-light);
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-code {
    padding: 0.75rem 1rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.875rem;
}

.btn-code:hover:not(:disabled) {
    background: var(--border-color);
}

.btn-code:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #222222;
}

.error-message {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #e8e8e8;
    color: var(--text-color);
    border-radius: 6px;
    font-size: 0.875rem;
}

/* 商户后台 */
.merchant-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.merchant-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-color);
}

.btn-logout:hover {
    background: var(--bg-color);
}

.merchant-main {
    display: flex;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 2rem;
}

.merchant-sidebar {
    width: 200px;
    padding: 2rem 0;
    border-right: 1px solid var(--border-color);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav a {
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav a:hover {
    background: var(--bg-color);
}

.sidebar-nav a.active {
    background: var(--bg-color);
    font-weight: 600;
}

.merchant-content {
    flex: 1;
    padding: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border-radius: 8px;
    font-size: 1.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
}

.table-container {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-color);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    background: #e8e8e8;
    color: var(--text-color);
}

.status-badge.success {
    background: #e8e8e8;
}

.status-badge.warning {
    background: #e8e8e8;
}

.page-settings h1 {
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.settings-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.settings-section h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

#settings-form .form-group {
    margin-bottom: 1.5rem;
}

#settings-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

#settings-form input,
#settings-form select,
#settlement-form input,
#settlement-form select,
#fee-mode-form input,
#fee-mode-form select,
#recharge-form input,
#recharge-form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background: var(--card-bg);
    color: var(--text-color);
    box-sizing: border-box;
}

#settings-form input:focus,
#settings-form select:focus,
#settlement-form input:focus,
#settlement-form select:focus,
#fee-mode-form input:focus,
#fee-mode-form select:focus,
#recharge-form input:focus,
#recharge-form select:focus {
    outline: none;
    border-color: var(--primary-color);
}

#settings-form input::placeholder,
#settlement-form input::placeholder,
#fee-mode-form input::placeholder,
#recharge-form input::placeholder {
    color: var(--text-light);
}

/* 选择框自定义样式 */
#settings-form select,
#settlement-form select,
#fee-mode-form select,
#recharge-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

#settings-form select::-ms-expand,
#settlement-form select::-ms-expand,
#fee-mode-form select::-ms-expand,
#recharge-form select::-ms-expand {
    display: none;
}

.info-box {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.info-box .warning {
    color: var(--text-color);
    font-weight: 500;
    margin-top: 0.5rem;
}

.code-block {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
}

.code-block pre {
    background: #2c2c2c;
    color: #fff;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 0.5rem;
}

code {
    background: var(--bg-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', monospace;
    font-size: 0.875rem;
}

.text-md {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-left: 0.25rem;
}

.panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.panel-heading {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.panel-body {
    padding: 1.5rem;
}

.table-responsive {
    overflow-x: auto;
}

/* 通知栏 */
.notification-bar {
    background-color: #fff3cd;
    border-bottom: 1px solid #ffc107;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.notification-content i {
    color: #856404;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #856404;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-close:hover {
    opacity: 0.7;
}

/* 通知弹窗 */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.notification-modal-content {
    background: var(--card-bg);
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.notification-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.notification-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-modal-close:hover {
    color: var(--text-color);
}

.notification-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.notification-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* 设置页面二级菜单 */
.settings-nav {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 2rem;
    background: var(--bg-color);
    padding: 0.25rem;
    border-radius: 8px;
}

.settings-nav-item {
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: var(--text-light);
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.settings-nav-item:hover {
    color: var(--text-color);
    background: var(--card-bg);
}

.settings-nav-item.active {
    color: var(--primary-color);
    background: var(--card-bg);
    font-weight: 500;
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.audit-notice {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audit-notice.pending {
    background: #fef3c7;
    color: #92400e;
}

.audit-notice.rejected {
    background: #fee2e2;
    color: #991b1b;
}

.required {
    color: #c33;
}

#settings-form .form-group small,
.auth-form .form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.col-md-6 {
    flex: 1;
}

.h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-light);
    font-size: 0.875rem;
}

