/* ============================================
   汇联智付 / 鼎薪通 风格管理后台 CSS
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; color: #1D2129; background: #F5F7FA; }
a { text-decoration: none; color: inherit; }
input, button { outline: none; font-family: inherit; }

/* ============= Layout ============= */
.app { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
    width: 220px; flex-shrink: 0;
    background: linear-gradient(180deg, #001529 0%, #002543 100%);
    color: #C8D0D7;
    display: flex; flex-direction: column;
    overflow-y: auto;
}
.sidebar-logo {
    height: 64px;
    display: flex; align-items: center; gap: 10px;
    padding: 0 20px;
    color: #fff; font-weight: 600; font-size: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-logo .logo-badge {
    width: 34px; height: 34px; border-radius: 8px;
    background: linear-gradient(135deg, #1677FF, #4096FF);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: bold;
}

.menu-group-title {
    padding: 20px 20px 8px;
    font-size: 12px;
    color: #6E7C8A;
    letter-spacing: 1px;
}
.menu-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all .15s;
    position: relative;
}
.menu-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.menu-item.active {
    background: linear-gradient(90deg, rgba(22,119,255,0.2), transparent);
    color: #4096FF;
}
.menu-item.active::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: #1677FF;
}
.menu-item .mi-icon {
    width: 18px; font-size: 16px; text-align: center; flex-shrink: 0;
}
.menu-sub { padding-left: 44px; }
.menu-sub .menu-item { padding: 10px 20px 10px 12px; font-size: 13px; color: #96A2AE; }
.menu-sub .menu-item.active { color: #1677FF; background: transparent; }
.menu-sub .menu-item.active::before { display: none; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.header {
    height: 64px; flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid #E5E6EB;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.header-left { display: flex; align-items: center; gap: 16px; }
.breadcrumb { font-size: 14px; color: #4E5969; }
.breadcrumb .cur { color: #1D2129; font-weight: 500; }
.header-right { display: flex; align-items: center; gap: 20px; }
.admin-info { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 12px; border-radius: 6px; transition: background .15s; }
.admin-info:hover { background: #F2F3F5; }
.admin-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, #1677FF, #0958D9);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 13px;
}
.logout-btn { font-size: 13px; color: #86909C; cursor: pointer; padding: 4px 8px; border-radius: 4px; }
.logout-btn:hover { color: #F53F3F; background: #fff1f0; }

.content {
    flex: 1; overflow: auto; padding: 20px 24px 24px;
}

/* ============= Account Info Bar (图1顶部) ============= */
.account-bar {
    background: #fff;
    border-radius: 8px;
    padding: 18px 24px;
    display: flex; align-items: center; gap: 28px;
    border-left: 4px solid #1677FF;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    margin-bottom: 16px;
}
.account-bar .alipay-logo {
    display: flex; align-items: center; gap: 10px;
    padding-right: 24px; border-right: 1px solid #F2F3F5;
}
.account-bar .alipay-logo .logo-icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: linear-gradient(135deg, #1677FF, #4096FF);
    color: #fff; font-size: 18px; font-weight: bold;
    display: flex; align-items: center; justify-content: center;
}
.account-bar .alipay-logo .logo-text .title {
    color: #1677FF; font-weight: 600; font-size: 16px;
}
.account-bar .alipay-logo .logo-text .sub {
    font-size: 12px; color: #86909C;
}
.account-stat { display: flex; flex-direction: column; }
.account-stat .label { font-size: 12px; color: #86909C; margin-bottom: 4px; }
.account-stat .value { font-size: 18px; font-weight: 600; color: #1D2129; }
.account-stat .value.blue { color: #1677FF; }
.account-stat .value.green { color: #00B42A; }

.tab-actions { display: flex; gap: 10px; margin-left: auto; }
.tab-btn {
    padding: 8px 18px; border-radius: 6px;
    background: #fff; color: #4E5969;
    border: 1px solid #E5E6EB;
    cursor: pointer; font-size: 13px; font-weight: 500;
    transition: all .15s;
}
.tab-btn:hover { border-color: #1677FF; color: #1677FF; }
.tab-btn.primary {
    background: linear-gradient(135deg, #1677FF, #4096FF); color: #fff; border: none;
}
.tab-btn.primary:hover { opacity: .9; color: #fff; }
.tab-btn.warn { background: linear-gradient(135deg, #FF7D00, #FFA940); color: #fff; border: none; }

/* ============= Card / Form ============= */
.card {
    background: #fff; border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 22px 24px;
    margin-bottom: 16px;
}
.card-title {
    font-size: 15px; font-weight: 600; color: #1D2129;
    padding-bottom: 14px; margin-bottom: 18px;
    border-bottom: 1px solid #F2F3F5;
    display: flex; justify-content: space-between; align-items: center;
}
.form-row {
    display: flex; align-items: center; margin-bottom: 16px;
}
.form-row:last-child { margin-bottom: 0; }
.form-label {
    width: 100px; flex-shrink: 0;
    font-size: 13px; color: #4E5969; text-align: right;
    padding-right: 16px;
}
.form-control {
    flex: 1; max-width: 520px;
    height: 40px; padding: 0 12px;
    border: 1px solid #E5E6EB; border-radius: 6px;
    font-size: 13px;
    transition: all .15s;
}
.form-control:focus { border-color: #1677FF; box-shadow: 0 0 0 2px rgba(22,119,255,0.1); }
textarea.form-control { height: auto; padding: 8px 12px; min-height: 70px; resize: vertical; }
.form-required::before { content: '*'; color: #F53F3F; margin-right: 4px; }

.btn {
    height: 40px; padding: 0 22px;
    border-radius: 6px; border: none; cursor: pointer;
    font-size: 13px; font-weight: 500;
    transition: all .15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: linear-gradient(135deg, #1677FF, #4096FF); color: #fff;
    padding: 0 30px; height: 44px; font-size: 14px;
}
.btn-primary:hover { opacity: .9; }
.btn-primary[disabled] { background: #C9CDD4; cursor: not-allowed; }
.btn-success { background: #00B42A; color: #fff; }
.btn-warning { background: #FF7D00; color: #fff; }
.btn-danger  { background: #F53F3F; color: #fff; }
.btn-default { background: #fff; color: #4E5969; border: 1px solid #E5E6EB; }
.btn-default:hover { border-color: #1677FF; color: #1677FF; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; }
.btn-lg { height: 48px; padding: 0 40px; font-size: 15px; }

/* ============= Search Bar ============= */
.search-bar {
    display: flex; gap: 12px; align-items: center;
    margin-bottom: 14px; flex-wrap: wrap;
}
.search-bar .form-control { max-width: 240px; }
.stat-chips { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.stat-chip {
    padding: 6px 14px; border-radius: 6px;
    background: #F5F7FA; border: 1px solid #E5E6EB;
    font-size: 12px; color: #4E5969;
}
.stat-chip .num { font-weight: 600; color: #1677FF; margin-left: 6px; }
.stat-chip .num.green { color: #00B42A; }
.bar-actions { display: flex; gap: 8px; margin-left: auto; }
.icon-btn {
    width: 32px; height: 32px; border-radius: 6px;
    background: #F5F7FA; border: 1px solid #E5E6EB;
    cursor: pointer; color: #4E5969;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    transition: all .15s;
}
.icon-btn:hover { background: #1677FF; color: #fff; border-color: #1677FF; }

/* ============= Table ============= */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th {
    background: #FAFAFA;
    padding: 12px 14px;
    text-align: left; color: #4E5969; font-weight: 500;
    border-bottom: 1px solid #F2F3F5;
    white-space: nowrap;
}
.table thead th.num-col,
.table tbody td.num-col { text-align: right; }
.table thead th.center-col,
.table tbody td.center-col { text-align: center; }
.table tbody td {
    padding: 14px;
    border-bottom: 1px solid #F7F8FA;
    color: #1D2129;
    vertical-align: middle;
}
.table tbody tr:hover { background: #FAFBFC; }
.table tbody tr.selected { background: #EAF3FF; }
.table .payee-acc { font-family: monospace; color: #1D2129; }
.table .amount { font-weight: 600; color: #1D2129; font-variant-numeric: tabular-nums; }
.table .amount.success { color: #00B42A; }
.status-tag {
    display: inline-block;
    padding: 3px 10px; border-radius: 12px;
    font-size: 12px; font-weight: 500;
}
.status-tag.success  { background: #E8FFEA; color: #00B42A; }
.status-tag.waiting  { background: #EAF3FF; color: #1677FF; }
.status-tag.warning  { background: #FFF3E8; color: #FF7D00; }
.status-tag.partial  { background: #FFECE8; color: #FF7D00; }
.status-tag.danger   { background: #FFECE8; color: #F53F3F; }
.status-tag.canceled { background: #F2F3F5; color: #86909C; }

.table-actions { display: flex; gap: 8px; }
.link-btn {
    color: #1677FF; cursor: pointer; font-size: 12px;
    padding: 2px 6px; border-radius: 4px;
}
.link-btn:hover { background: #EAF3FF; }
.link-btn.danger { color: #F53F3F; }
.link-btn.danger:hover { background: #FFECE8; }

.pagination {
    display: flex; justify-content: flex-end; align-items: center;
    gap: 10px; padding: 18px 2px 0;
    font-size: 12px; color: #4E5969;
}
.pagination .page-btn {
    min-width: 32px; height: 32px; padding: 0 10px;
    border-radius: 6px; background: #fff;
    border: 1px solid #E5E6EB; color: #4E5969;
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.pagination .page-btn.active { background: #1677FF; color: #fff; border-color: #1677FF; }
.pagination select {
    height: 32px; padding: 0 8px;
    border-radius: 6px; border: 1px solid #E5E6EB;
    color: #4E5969; font-size: 12px;
}

/* ============= 控制台 Dashboard 卡片 ============= */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px; margin-bottom: 20px;
}
.stat-card {
    background: #fff; border-radius: 8px; padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    display: flex; gap: 16px;
    align-items: center;
    border-left: 4px solid #1677FF;
}
.stat-card.c2 { border-left-color: #00B42A; }
.stat-card.c3 { border-left-color: #FF7D00; }
.stat-card.c4 { border-left-color: #722ED1; }
.stat-card .icon-circle {
    width: 56px; height: 56px; border-radius: 14px;
    background: #EAF3FF; color: #1677FF;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; flex-shrink: 0;
}
.stat-card.c2 .icon-circle { background: #E8FFEA; color: #00B42A; }
.stat-card.c3 .icon-circle { background: #FFF3E8; color: #FF7D00; }
.stat-card.c4 .icon-circle { background: #F3E8FF; color: #722ED1; }
.stat-card .data { flex: 1; }
.stat-card .data .label { font-size: 12px; color: #86909C; margin-bottom: 6px; }
.stat-card .data .value { font-size: 24px; font-weight: 700; color: #1D2129; }
.stat-card .data .sub { font-size: 12px; color: #86909C; margin-top: 4px; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}
.panel {
    background: #fff; border-radius: 8px; padding: 20px 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.panel-title {
    font-size: 15px; font-weight: 600; color: #1D2129;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}

/* ============= 上传区 ============= */
.upload-box {
    border: 1px dashed #C9CDD4;
    border-radius: 8px;
    padding: 28px;
    text-align: center;
    transition: all .15s;
    margin-bottom: 18px;
}
.upload-box:hover { border-color: #1677FF; background: #FAFCFF; }
.upload-box .icon { font-size: 42px; color: #86909C; margin-bottom: 10px; }
.upload-box .title { font-size: 14px; color: #1D2129; margin-bottom: 6px; }
.upload-box .sub   { font-size: 12px; color: #86909C; margin-bottom: 14px; }
.upload-box .links { font-size: 12px; color: #1677FF; cursor: pointer; }
.upload-box .links:hover { text-decoration: underline; }

/* ============= 统计卡片（任务列表） ============= */
.task-stats-row {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
    padding: 16px 12px; background: #F9FAFB; border-radius: 8px;
    margin-bottom: 14px;
}
.task-stat {
    text-align: center; padding: 12px 10px;
    background: #fff; border-radius: 6px;
}
.task-stat .amount {
    color: #1677FF; font-size: 20px; font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-bottom: 4px;
}
.task-stat .count  { font-size: 14px; font-weight: 600; color: #1D2129; margin-bottom: 4px; }
.task-stat .label  { font-size: 11px; color: #86909C; }

/* ============= Modal ============= */
.modal-mask {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center; justify-content: center;
    z-index: 999;
}
.modal-mask.show { display: flex; }
.modal {
    width: 520px; max-width: 92vw; max-height: 90vh;
    background: #fff; border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    display: flex; flex-direction: column;
}
.modal.wide { width: 720px; }
.modal-sm { width: 400px; }
.modal-header {
    padding: 18px 22px; border-bottom: 1px solid #F2F3F5;
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header .title { font-size: 16px; font-weight: 600; color: #1D2129; }
.modal-header .close {
    width: 32px; height: 32px; border-radius: 6px;
    cursor: pointer; color: #86909C;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.modal-header .close:hover { background: #F5F7FA; color: #1D2129; }
.modal-body { padding: 22px; overflow: auto; }
.modal-footer {
    padding: 14px 22px; border-top: 1px solid #F2F3F5;
    display: flex; justify-content: flex-end; gap: 10px;
}

/* ============= 下发成功弹窗 ============= */
.success-tick {
    width: 40px; height: 40px; border-radius: 50%;
    background: #00B42A; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px; margin-right: 10px;
}
.dispatch-ok-title {
    font-size: 17px; font-weight: 600; color: #00B42A;
    display: flex; align-items: center; margin-bottom: 16px;
}
.dispatch-info {
    background: #F7F9FC; border-radius: 8px; padding: 14px 18px;
    margin-bottom: 18px;
}
.dispatch-info .row {
    display: flex; justify-content: space-between;
    padding: 6px 0; font-size: 13px;
}
.dispatch-info .label { color: #86909C; }
.dispatch-info .value { color: #1D2129; font-weight: 500; }
.dispatch-info .value.blue { color: #1677FF; font-family: monospace; }
.dispatch-info .value.red { color: #F53F3F; font-weight: 600; }

.pay-link-box {
    border: 1px solid #E5E6EB; border-radius: 8px;
    padding: 14px 16px; margin-bottom: 16px;
    background: #fff;
}
.pay-link-label { font-size: 12px; color: #86909C; margin-bottom: 8px; }
.pay-link {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; color: #1677FF; word-break: break-all;
    padding: 8px 12px; background: #EAF3FF; border-radius: 6px;
    font-family: monospace;
}
.qr-wrap { display: flex; gap: 20px; align-items: center; justify-content: center; margin: 10px 0 20px; }
.qr-code {
    width: 180px; height: 180px; border-radius: 10px; padding: 10px;
    background: #fff; border: 1px solid #F2F3F5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.qr-code img { width: 100%; height: 100%; }
.qr-tip {
    font-size: 13px; color: #4E5969; line-height: 1.8;
}

/* ============= Toast ============= */
.toast-wrap {
    position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8); color: #fff;
    padding: 10px 22px; border-radius: 6px;
    font-size: 13px; z-index: 9999; display: none;
    animation: toastIn .2s ease-out;
}
.toast-wrap.success { background: #00B42A; }
.toast-wrap.error   { background: #F53F3F; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Checkbox */
.cb { width: 16px; height: 16px; cursor: pointer; }

/* Misc */
.text-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; display: inline-block; vertical-align: middle; }
.tabs-row { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid #F2F3F5; }
.tab-chip {
    padding: 10px 18px;
    font-size: 13px; color: #4E5969; cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tab-chip.active { color: #1677FF; border-bottom-color: #1677FF; font-weight: 500; }

/* 登录页 */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0052D9 0%, #1677FF 50%, #4096FF 100%);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.login-page::before, .login-page::after {
    content: ''; position: absolute; border-radius: 50%;
    background: rgba(255,255,255,0.06);
}
.login-page::before { width: 500px; height: 500px; top: -150px; left: -100px; }
.login-page::after { width: 400px; height: 400px; bottom: -120px; right: -80px; }
.login-box {
    width: 400px; background: #fff;
    border-radius: 14px; padding: 40px 38px 32px;
    position: relative; z-index: 2;
    box-shadow: 0 24px 64px rgba(0, 48, 112, 0.25);
}
.login-logo {
    text-align: center; margin-bottom: 28px;
}
.login-logo .brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 20px; font-weight: 700; color: #1D2129;
}
.login-logo .brand .logo-badge {
    width: 42px; height: 42px; border-radius: 10px;
    background: linear-gradient(135deg, #1677FF, #4096FF); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; font-size: 18px;
}
.login-logo .slogan {
    font-size: 12px; color: #86909C; margin-top: 8px;
}
.login-form .form-row { margin-bottom: 18px; }
.login-form .form-label { display: none; }
.login-form .form-control {
    max-width: none; height: 46px; padding: 0 14px; font-size: 14px;
}
.login-form .btn-primary {
    width: 100%; height: 46px; font-size: 15px; margin-top: 10px;
}
.login-foot {
    display: flex; justify-content: space-between;
    margin-top: 18px;
    font-size: 12px; color: #86909C;
}
.login-foot .link { color: #1677FF; cursor: pointer; }
