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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: #1a1a2e;
    color: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 22px;
}

header nav a {
    color: #adb5bd;
    text-decoration: none;
    margin-left: 20px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}

header nav a:hover,
header nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.stat-card h3,
.stat-card h4 {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
}

.stat-card.income .stat-value {
    color: #28a745;
}

.stat-card.expense .stat-value {
    color: #dc3545;
}

.section {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.section h2 {
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

tr:hover {
    background: #f8f9fa;
}

.chain-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.chain-badge.TRC20 {
    background: #e8f5e9;
    color: #2e7d32;
}

.chain-badge.ERC20 {
    background: #e3f2fd;
    color: #1565c0;
}

.direction {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.direction.in {
    background: #e8f5e9;
    color: #28a745;
}

.direction.out {
    background: #fce4ec;
    color: #dc3545;
}

.addr {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
    color: #666;
}

.addr a {
    color: #0366d6;
    text-decoration: none;
}

.addr a:hover {
    text-decoration: underline;
}

.amount {
    font-weight: 600;
    font-family: 'SF Mono', monospace;
}

.empty {
    text-align: center;
    padding: 40px;
    color: #999;
}

.report-form {
    display: flex;
    align-items: center;
    gap: 10px 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.report-form label {
    font-weight: 500;
    white-space: nowrap;
}

/* 每个「标签+输入」为一组，避免换行时标签与输入被拆散 */
.report-form .filter-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.report-form input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.report-form button {
    padding: 8px 20px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.report-form button:hover {
    background: #2d2d4e;
}

footer {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
}


/* ---- 钱包筛选栏 ---- */

.wallet-filter {
    background: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 16px;
}

.wallet-filter-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wallet-filter-form label {
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.wallet-filter-form select,
.wallet-filter-form input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.wallet-filter-form select {
    max-width: 500px;
    flex: 1;
}


/* ---- 钱包管理表单 ---- */

.wallet-add-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.wallet-add-form form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-row label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-row input,
.form-row select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-row input[type="text"] {
    min-width: 280px;
}

.form-msg {
    margin-top: 8px;
    font-size: 13px;
}

.msg-ok {
    color: #28a745;
}

.msg-err {
    color: #dc3545;
}

.btn-primary {
    padding: 8px 20px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.btn-primary:hover {
    background: #2d2d4e;
}

.btn-primary:disabled {
    background: #888;
    cursor: not-allowed;
}

.btn-enter {
    display: inline-block;
    padding: 6px 18px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.btn-enter:hover {
    background: linear-gradient(135deg, #43A047, #1B5E20);
    color: #fff;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.45);
    transform: translateY(-1px);
}

.btn-enter:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(76, 175, 80, 0.3);
}


/* ========== 使用指南 ========== */

.guide-section {
    margin-top: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.guide-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    background: #f9fafc;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s;
}

.guide-toggle:hover {
    background: #f0f4ff;
}

.guide-toggle h3 {
    margin: 0;
    font-size: 17px;
    color: #1976d2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guide-toggle .arrow {
    font-size: 12px;
    transition: transform 0.3s;
    color: #888;
}

.guide-body {
    padding: 24px 28px;
    font-size: 14px;
    line-height: 1.9;
    color: #444;
    display: none;
}

.guide-body.show {
    display: block;
}

.guide-body h4 {
    font-size: 16px;
    color: #1976d2;
    margin: 22px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e3f2fd;
}

.guide-body h4:first-child {
    margin-top: 0;
}

.guide-body .hl {
    font-weight: 700;
    color: #e65100;
}

.guide-body .hl-blue {
    font-weight: 700;
    color: #1565c0;
}

.guide-body .hl-green {
    font-weight: 700;
    color: #2e7d32;
}

.guide-body .hl-red {
    font-weight: 700;
    color: #c62828;
}

.guide-body .hl-orange {
    font-weight: 700;
    color: #e65100;
}

.guide-body .badge-step {
    display: inline-block;
    background: #1976d2;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 4px;
    font-weight: 600;
    vertical-align: middle;
}

.guide-body .badge-tip {
    display: inline-block;
    background: #fff3e0;
    color: #e65100;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 4px;
    font-weight: 600;
    border: 1px solid #ffe0b2;
    vertical-align: middle;
}

.guide-body .badge-risk {
    display: inline-block;
    background: #ffebee;
    color: #c62828;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 4px;
    font-weight: 600;
    border: 1px solid #ffcdd2;
    vertical-align: middle;
}

.guide-body ul,
.guide-body ol {
    margin: 8px 0 8px 22px;
}

.guide-body li {
    margin-bottom: 6px;
}

.guide-body code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    color: #d32f2f;
    border: 1px solid #eee;
    font-weight: 700;
}

/* ---- 代码块一键复制按钮 ---- */
.code-copy-wrap {
    position: relative;
}
.code-copy-wrap pre code {
    background: transparent;
    padding: 0;
    border: none;
    color: inherit;
}
.code-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #e6edf3;
    background: #32383f;
    border: 1px solid #4b5563;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: background 0.15s, border-color 0.15s, transform 0.08s;
}
.code-copy-btn:hover {
    background: #3d444d;
    border-color: #6b7280;
}
.code-copy-btn:active {
    transform: scale(0.96);
}
.code-copy-btn .ic {
    width: 14px;
    height: 14px;
    display: inline-block;
    vertical-align: middle;
    opacity: 0.9;
}
.code-copy-btn.copied {
    color: #fff;
    background: #2e7d32;
    border-color: #2e7d32;
}

/* ---- 复制成功提示（轻量 toast） ---- */
.copy-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%) translateY(20px);
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    color: #fff;
    background: rgba(38, 50, 56, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}
.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.copy-toast .ic {
    width: 16px;
    height: 16px;
    color: #66bb6a;
}

.guide-body .kv-row {
    display: flex;
    gap: 12px;
    margin: 4px 0;
    align-items: baseline;
}

.guide-body .kv-key {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 12px;
    color: #333;
    white-space: nowrap;
}

.guide-body .kv-val {
    color: #333;
}

/* 飞书权限教程弹窗内的参数/字段同样加粗 */
#feishuHelpModal code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    color: #d32f2f;
    border: 1px solid #eee;
    font-weight: 700;
}

.guide-body .flow-box {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 10px 0;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px dashed #ccc;
}

.guide-body .flow-box span {
    background: #e3f2fd;
    color: #1565c0;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.guide-body .flow-box .flow-arr {
    background: none;
    color: #888;
    padding: 0 2px;
    font-size: 16px;
}

.btn-danger {
    padding: 6px 14px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
}

.btn-small:hover {
    background: #f0f0f0;
}

/* 突出显示的「查看教程」按钮 */
.btn-help-guide {
    margin-left: 8px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #fff !important;
    background: linear-gradient(135deg, #1976d2, #1565c0) !important;
    border: 1px solid #1565c0 !important;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(25, 118, 210, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-help-guide:hover {
    background: linear-gradient(135deg, #1e88e5, #1976d2) !important;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.45);
    transform: translateY(-1px);
}
.btn-help-guide:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(25, 118, 210, 0.4);
}

.btn-danger.btn-small {
    border-color: #dc3545;
    color: #fff;
    background: #dc3545;
}

.btn-danger.btn-small:hover {
    background: #c82333;
}

.btn-danger-small {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #e6a817;
    color: #856404;
    background: #fff3cd;
    cursor: pointer;
    margin-left: 4px;
}

.btn-danger-small:hover {
    background: #e6a817;
    color: #fff;
}

.btn-sync {
    border-color: #17a2b8;
    color: #17a2b8;
}

.btn-sync:hover {
    background: #17a2b8;
    color: #fff;
}

.btn-sync-range {
    border-color: #6f42c1;
    color: #6f42c1;
}

.btn-sync-range:hover {
    background: #6f42c1;
    color: #fff;
}

.btn-sync-count {
    border-color: #e67e22;
    color: #e67e22;
}

.btn-sync-count:hover {
    background: #e67e22;
    color: #fff;
}

.wallet-table {
    width: 100%;
}

.wallet-table .wallet-addr {
    font-family: 'SFMono', 'Consolas', 'Fira Code', monospace;
    font-size: 12px;
    color: #1565c0;
    font-weight: 600;
    background: #e3f2fd;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #90caf9;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}
.wallet-table .wallet-note {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    font-weight: 400;
    word-break: break-all;
}


/* ---- 多维表格关联状态 ---- */

.bitable-linked {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #e8f5e9;
    color: #2e7d32;
}

.bitable-none {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: #f5f5f5;
    color: #999;
}

.btn-bitable {
    margin-left: 8px;
    background: transparent;
    border: 1px solid #3370ff;
    color: #3370ff;
    font-weight: 700;
}

.btn-bitable:hover {
    background: rgba(51, 112, 255, .06);
    border-color: #245bdb;
    color: #245bdb;
}

.bitable-status {
    text-align: center;
}

.bitable-check {
    color: #2e7d32;
    font-size: 18px;
    font-weight: bold;
}

.bitable-unsynced {
    color: #999;
    font-size: 12px;
}

.btn-sync-single {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 3px;
    border: 1px solid #17a2b8;
    color: #17a2b8;
    background: #fff;
    cursor: pointer;
}

.btn-sync-single:hover {
    background: #17a2b8;
    color: #fff;
}

.btn-sync-single:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* ---- 表单提示 ---- */

.form-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #888;
}

.form-hint code {
    background: #f0f0f0;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 11px;
}

.earliest-tx {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 8px;
    font-size: 11px;
    line-height: 1.5;
    color: #555;
    background: #fafafa;
    border-left: 3px solid #4a90e2;
    border-radius: 3px;
}

.sync-opt-earliest {
    display: none;
    margin-top: 8px;
    width: 100%;
}

.earliest-tx-empty {
    border-left-color: #c0c4cc;
    color: #888;
}


/* ---- 弹窗 ---- */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 400px;
    max-width: 600px;
}

.modal-content h3 {
    margin-bottom: 16px;
    font-size: 16px;
}

.modal-content .form-row {
    margin-bottom: 12px;
}

.modal-content .form-row input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
}

/* ---- 同步日期范围选择器 ---- */
.sync-range-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.range-preset {
    padding: 6px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    transition: all 0.15s;
}
.range-preset:hover {
    border-color: #1976d2;
    color: #1976d2;
    background: #f0f7ff;
}
.range-preset.active {
    background: #1976d2;
    border-color: #1976d2;
    color: #fff;
    box-shadow: 0 2px 6px rgba(25, 118, 210, 0.25);
}
.sync-range-fields {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}
.sync-range-fields .form-row {
    flex: 0 0 75%;
    max-width: 75%;
    min-width: 0;
    margin-bottom: 0;
}
.sync-range-fields .form-row:first-child { flex-basis: 75%; }
.sync-range-fields .form-row:last-child { flex-basis: 75%; }
.range-sep {
    padding-bottom: 10px;
    color: #aaa;
    font-size: 16px;
}
.modal-content .form-row input[type="date"] {
    cursor: pointer;
}
.modal-content .form-row input[type="date"]:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.15);
}

/* ---- Flatpickr 微调（Material 主题，主色蓝 #1976d2） ---- */
.flatpickr-calendar {
    font-family: inherit !important;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #1976d2 !important;
    border-color: #1976d2 !important;
}
.flatpickr-day.inRange {
    background: #e3f2fd !important;
}
.flatpickr-day:hover {
    background: rgba(25,118,210,0.08) !important;
}
.flatpickr-day.selected:hover {
    background: #1565c0 !important;
}
.flatpickr-day.today {
    border-color: #1976d2 !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    font-weight: 600;
}


.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}


/* ---- 同步日志 ---- */

#syncLogWrap {
    margin: 12px 0;
}

#syncLog {
    background: #1e1e1e;
    color: #d4d4d4;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.6;
    height: 280px;
    overflow-y: auto;
    padding: 10px 12px;
    border-radius: 6px;
    white-space: pre-wrap;
    word-break: break-all;
}

.sync-log-line {
    padding: 1px 0;
}


/* ---- 自定义确认/提示弹窗 ---- */

.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.dialog-box {
    background: #fff;
    padding: 28px 32px 22px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    min-width: 320px;
    max-width: 420px;
    text-align: center;
    animation: dialogIn 0.2s ease-out;
}

@keyframes dialogIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.dialog-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.dialog-msg {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 20px;
    word-break: break-word;
}

.dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}


/* ---- 危险区域 ---- */

.danger-zone {
    background: #fff5f5;
    border: 1px solid #fdd;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.danger-zone h4 {
    color: #dc3545;
    margin-bottom: 8px;
    font-size: 14px;
}

.danger-zone p {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}


/* ---- 颜色工具类 ---- */

.text-green {
    color: #28a745 !important;
}

.text-red {
    color: #dc3545 !important;
}

/* ---- 同步数据选项菜单 ---- */

.sync-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0 4px;
}

.sync-opt {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
}

.sync-opt:hover {
    border-color: #17a2b8;
    background: #f0fdff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.15);
}

.sync-opt-icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
}

.sync-opt-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sync-opt-text strong {
    font-size: 14px;
    color: #1a1a2e;
}

.sync-opt-text small {
    font-size: 12px;
    color: #888;
}

/* ---- 同步某个月：年/月选择 ---- */
.sync-month-picker {
    display: flex;
    gap: 16px;
    margin: 14px 0 4px;
}
.sync-month-picker .form-row {
    flex: 1;
    margin-bottom: 12px;
}
.sync-month-picker .form-row select {
    width: 100%;
    cursor: pointer;
}
}


/* ---- 删除确认弹窗 ---- */

.confirm-addr {
    font-family: 'SFMono', 'Consolas', 'Fira Code', monospace;
    font-size: 12px;
    color: #1565c0;
    font-weight: 600;
    word-break: break-all;
    background: #e3f2fd;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #90caf9;
    margin: 6px 0;
}

.dialog-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'SFMono', 'Consolas', 'Fira Code', monospace;
    outline: none;
    box-sizing: border-box;
}

.dialog-input:focus {
    border-color: #17a2b8;
}

.btn-danger:disabled {
    background: #e9a8ad;
    cursor: not-allowed;
    opacity: 0.7;
}


/* ---- 顶部用户导航栏 ---- */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 10px 18px;
    margin-bottom: 18px;
    font-size: 14px;
}
.topbar-user { font-weight: 600; color: #1a1a2e; }
.topbar-user small { font-weight: 400; color: #888; margin-left: 4px; }
.topbar-links a {
    margin-left: 14px;
    color: #1a1a1a;
    text-decoration: none;
}
.topbar-links a:hover { color: #000; text-decoration: underline; }

/* ---- 管理员模拟登录提示条 ---- */
.impersonate-bar {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #7a5b00;
    padding: 8px 14px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 13px;
}
.impersonate-bar a {
    margin-left: 10px;
    color: #b26a00;
    font-weight: 600;
    text-decoration: underline;
}


/* ---- 登录 / 注册 ---- */
.auth-wrap {
    max-width: 420px;
    margin: 60px auto;
    padding: 0 16px;
}
.auth-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 32px 28px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
}
.auth-title { font-size: 22px; text-align: center; color: #1a1a2e; margin-bottom: 4px; }
.auth-sub { text-align: center; color: #888; font-size: 13px; margin: 6px 0 24px; }
.auth-foot { text-align: center; margin-top: 20px; font-size: 13px; color: #666; }
.auth-foot a { color: #1976d2; text-decoration: none; }
/* 登录/注册表单元素上下边距，避免拥挤 */
.auth-card form .form-row { margin-bottom: 16px; }
.auth-card form .btn-primary { margin-top: 8px; }


/* ---- 个人设置：选项卡 ---- */
.profile-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.profile-tabs button {
    background: none;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    cursor: pointer;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s, border-color .15s;
}
.profile-tabs button:hover { color: #1976d2; }
.profile-tabs button.active {
    color: #1976d2;
    font-weight: 600;
    border-bottom-color: #1976d2;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* 个人设置表单：行间距与按钮上边距 */
.profile-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.profile-form .form-row {
    gap: 6px;
}
.profile-form .btn-primary {
    margin-top: 8px;
    align-self: flex-start;
}


/* ---- 用户状态徽章 ---- */
.badge-status { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-pending  { background: #fff4e5; color: #e08600; }
.badge-approved { background: #e6f7ec; color: #1e8e3e; }
.badge-disabled { background: #fdeaea; color: #c62828; }


@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 12px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    table {
        display: block;
        overflow-x: auto;
    }
}