/* 导航菜单样式已抽至 nav-menu.css（与运费结算子系统共用），本文件 @import 引入。
   注意 @import 必须位于样式表顶部，否则无效。 */
@import url('nav-menu.css?v=20261129dyn1');

/* ==================== 项目明细表头列筛选 ==================== */
.detail-table thead .thead-labels th {
    border-bottom: none;
    padding-bottom: 0.25rem;
    white-space: nowrap;
    font-size: 0.875rem;
}
.detail-table thead .thead-filters th {
    padding-top: 0;
    padding-bottom: 0.5rem;
    font-weight: normal;
    vertical-align: top;
    background-color: #f9fafb;
}
.detail-table .col-filter {
    font-size: 0.75rem;
    min-width: 3.5rem;
    padding: 0.2rem 0.35rem;
}
.detail-table .col-filter::placeholder {
    color: #9ca3af;
    font-size: 0.7rem;
}

/* ==================== 全局样式 ==================== */
body {
    background-color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
}

/* ==================== 登录页 ==================== */
.login-wrapper {
    /* 主题强调色（淡色系） */
    --la1: #6366f1;
    --la2: #8b5cf6;
    --la-glow: rgba(99, 102, 241, 0.25);
    --lt: #a5b4fc;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 50%, #fef3f2 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* 登录宣传主题配色 - 淡色系 */
.login-theme-indigo { --la1: #6366f1; --la2: #8b5cf6; --la-glow: rgba(99,102,241,0.25); --lt: #a5b4fc; }
.login-theme-teal   { --la1: #14b8a6; --la2: #06b6d4; --la-glow: rgba(20,184,166,0.25); --lt: #5eead4; }
.login-theme-gold   { --la1: #f59e0b; --la2: #f97316; --la-glow: rgba(245,158,11,0.25); --lt: #fcd34d; }
.login-theme-neon   { --la1: #ec4899; --la2: #8b5cf6; --la-glow: rgba(236,72,153,0.25); --lt: #f9a8d4; }

.login-stage {
    width: 100%;
    max-width: 1120px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 48px;
}

/* ---------- 左侧品牌宣传区 ---------- */
.login-hero {
    color: #1e293b;
    padding: 10px 0;
    animation: heroFade 0.8s ease both;
}

@keyframes heroFade {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 999px;
    color: #4f46e5;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(6px);
    margin-bottom: 22px;
}

.login-hero-title {
    font-size: 2.9rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 18px;
    background: linear-gradient(90deg, #1e293b 0%, #334155 35%, var(--la1) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 30px var(--la-glow);
}

.login-hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #475569;
    margin-bottom: 26px;
}

.login-hero-subtitle b { color: #1e293b; }

.login-hero-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.login-hero-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    color: #334155;
    padding: 8px 0;
}

.login-hero-features li i {
    flex: 0 0 34px;
    height: 34px;
    width: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(135deg, var(--la1), var(--la2));
    box-shadow: 0 6px 16px var(--la-glow);
}

.login-hero-stats {
    display: flex;
    gap: 14px;
}

.login-hero-stats > div {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.15);
    backdrop-filter: blur(8px);
}

.login-hero-stats span {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
}

.login-hero-stats small { color: #64748b; }

/* ---------- 右侧登录卡片 ---------- */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 42px 40px;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    border: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.1);
    animation: heroFade 0.9s ease both;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #fff;
    background: linear-gradient(135deg, var(--la1) 0%, var(--la2) 100%);
    box-shadow: 0 12px 28px var(--la-glow);
}

.login-card .form-label {
    font-weight: 600;
    color: #374151;
}

.login-card .input-group-text {
    background: #f9fafb;
    border-right: none;
    color: #9ca3af;
}

.login-card .form-control {
    border-left: none;
    padding: 11px 12px;
}

.login-card .form-control:focus {
    border-color: var(--la1);
    box-shadow: 0 0 0 0.2rem var(--la-glow);
}

.login-card .input-group:focus-within .input-group-text {
    border-color: var(--la1);
}

.login-card .btn-primary {
    background: linear-gradient(135deg, var(--la1) 0%, var(--la2) 100%);
    border: none;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 4px 12px var(--la-glow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.login-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--la-glow);
    filter: brightness(1.05);
}

.login-tip {
    line-height: 1.7;
    border-top: 1px dashed #e5e7eb;
    padding-top: 14px;
}

/* ---------- 登录页响应式 ---------- */
@media (max-width: 991px) {
    .login-stage {
        grid-template-columns: 1fr;
        max-width: 460px;
        gap: 30px;
    }
    .login-hero {
        text-align: center;
    }
    .login-hero-features {
        display: inline-block;
        text-align: left;
    }
    .login-hero-title { font-size: 2.2rem; }
}

/* ==================== 导航栏 ====================
   navbar 基础规则（阴影/品牌字号/active 加粗）已移入 nav-menu.css
   「顶部导航」段——运费结算子系统外壳共用，保持两边观感一致。 */

/* ==================== 统计卡片（工作看板 KPI） ====================
   统一规范：四卡等高、标题用次要灰（不随卡片染色）、数字等宽深色、
   图标收敛到 2rem 且降透明度，避免与数字争夺视觉重心。 */
.stat-card {
    border: none;
    border-radius: 12px;
    transition: transform .2s, box-shadow .2s;
    overflow: hidden;
    min-height: 108px;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .10);
}

.stat-card .card-body {
    padding: 16px 18px;
    height: 100%;
    display: flex;
    align-items: center;
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: .55;
    flex: none;
    margin-left: 8px;
}

/* 标签：统一次要灰、600 字重，不再跟随卡片染色（原彩色标题对比度低且抢数字） */
.stat-card p.text-muted {
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.35;
    color: #64748b !important;
    margin-bottom: 3px;
}

/* 数字：等宽 + 700 字重，长金额自动换行不压图标 */
.stat-card h3 {
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0;
    word-break: break-all;
}

.stat-card small.text-muted {
    font-size: .75rem;
    color: #64748b !important;
}

/* 四色底：同色系深浅渐变，accent 取深色保证文字对比度 */
.stat-blue   { background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%); color: #3730a3; }
.stat-blue   .stat-icon { color: #4f46e5; }

.stat-green  { background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); color: #047857; }
.stat-green  .stat-icon { color: #059669; }

.stat-orange { background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%); color: #c2410c; }
.stat-orange .stat-icon { color: #ea580c; }

.stat-purple { background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%); color: #6d28d9; }
.stat-purple .stat-icon { color: #7c3aed; }

/* ==================== 项目卡片 ==================== */
.project-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* ==================== 表格 ==================== */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    vertical-align: middle;
}

/* 充值审核：操作列固定在右侧，避免被宽表挤出可视区 */
.recharge-review-table {
    overflow-x: auto;
}
.recharge-review-table .table-op-col {
    position: sticky;
    right: 0;
    z-index: 2;
    min-width: 150px;
    white-space: nowrap;
    background: #fff;
    box-shadow: -6px 0 8px -4px rgba(99, 102, 241, 0.08);
}
.recharge-review-table thead .table-op-col {
    background: #f9fafb;
    z-index: 3;
}
.recharge-review-table tbody tr:hover .table-op-col {
    background: #f9fafb;
}

/* ==================== Tab 样式 ==================== */
.nav-tabs .nav-link {
    color: #6b7280;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: #6366f1;
    font-weight: 600;
}

/* ==================== 卡片 ==================== */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.06);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #f3f4f6;
    border-radius: 12px 12px 0 0 !important;
}

/* ==================== 按钮 ==================== */
.btn {
    border-radius: 8px;
    font-weight: 500;
}

.btn-primary {
    background-color: #6366f1;
    border-color: #6366f1;
}

.btn-primary:hover {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

/* ==================== Alert ==================== */
.alert {
    border-radius: 10px;
    border: none;
}

/* ==================== Badge ==================== */
.badge {
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .stat-card h3 {
        font-size: 1.3rem;
    }

    .login-card {
        margin: 20px;
        padding: 30px;
    }
}

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f9fafb;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* 计税工具条的「年份」选择器：避免 flex 压缩后中文被拆成竖排。
   特异性高于页面内联的 .th-year-pick，无需改模板即可生效。 */
.th-toolbar .th-year-pick { flex-shrink: 0; }
.th-toolbar .th-year-pick label,
.th-toolbar .th-year-count { white-space: nowrap; }

/* ==================== 全站数据表：表头吸顶 ==================== */
/* 配合 static/js/table-sticky.js 使用。脚本会给「该吸顶的落点」加 .ts-sticky：
   - 裸表格（没有 .table-responsive 包裹）→ 加在 table 上；
   - 用 .table-responsive 包裹且表格放得下 → 加在容器上，同时放开 overflow
     （sticky 会被祖先 overflow 截断，不放开就粘不住）。
   宽表保留横向滚动、不吸顶，避免撑破卡片。
   背景色由脚本按单元格实际计算值写进 --ts-bg，防止透明后数据透上来。 */
.ts-sticky {
    overflow: visible;
}

.ts-sticky > thead > tr > th,
.ts-sticky > table > thead > tr > th {
    position: sticky;
    top: var(--ts-top, 0px);
    z-index: 3;
    background-color: var(--ts-bg, #f8f9fa);
    background-clip: padding-box;
    /* border-collapse: collapse 时 th 的下边框会随内容滚走，用内阴影补一条 */
    box-shadow: inset 0 -1px 0 #cfd4da;
}

/* ==================== 财务中心首页（/finance/） ==================== */
/* 菜单树的最上级页：当月数字 + 状态待办 + 5 组入口（入口数据与顶部菜单/左侧栏同源） */

a.fin-side-title { text-decoration: none; }
a.fin-side-title:hover,
a.fin-side-title.current { color: var(--app-primary, #2563eb); }

.fin-home .card { border-color: var(--app-border, #e2e8f0); box-shadow: var(--app-shadow); }
.fin-kpi-l {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: 2px;
    font-size: 11.5px;
    color: var(--app-text-3, #94a3b8);
}
.fin-kpi-l i { opacity: .9; }
.fin-kpi-v {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
    color: var(--app-text, #0f172a);
}

.fin-home-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    padding: 9px 13px;
    font-size: 12.5px;
    color: var(--app-text-2, #475569);
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, #e2e8f0);
    border-radius: 10px;
    box-shadow: var(--app-shadow);
}
.fin-home-bar-item { display: inline-flex; align-items: center; gap: .4rem; }
.fin-home-bar-item > i { color: var(--app-text-3, #94a3b8); }

.fin-chip {
    display: inline-flex;
    align-items: center;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    text-decoration: none;
    background: var(--app-surface-2, #f1f5f9);
    color: var(--app-text-2, #475569);
}
.fin-chip.ok { background: rgba(5, 150, 105, .13); color: var(--app-ok, #059669); }
.fin-chip.warn { background: rgba(217, 119, 6, .15); color: var(--app-warn, #d97706); }
.fin-chip.danger { background: rgba(220, 38, 38, .13); color: var(--app-danger, #dc2626); }

/* 5 组固定五列（1600 屏一屏看全 20 个入口），窄屏依次降级为 3 / 2 / 1 列 */
.fin-home-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}
@media (max-width: 1399.98px) { .fin-home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991.98px) { .fin-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fin-home-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--app-surface, #fff);
    border: 1px solid var(--app-border, #e2e8f0);
    border-top: 3px solid var(--tone, var(--app-primary, #2563eb));
    border-radius: 12px;
    box-shadow: var(--app-shadow);
}
.fin-home-card-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    background: var(--tone-soft, var(--app-surface-2, #f1f5f9));
    border-bottom: 1px solid var(--tone-border, var(--app-border, #e2e8f0));
}
.fin-home-card-t {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tone, var(--app-text, #0f172a));
}
.fin-home-card-t i { color: var(--tone, var(--app-primary, #2563eb)); }
.fin-home-card-n {
    padding: 0 7px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--tone, var(--app-text-3, #94a3b8));
    background: var(--app-surface, #fff);
    border: 1px solid var(--tone-border, var(--app-border, #e2e8f0));
    border-radius: 999px;
}
.fin-home-links { display: flex; flex-direction: column; gap: 1px; padding: 6px; }
.fin-home-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: 6px 8px;
    border-radius: 7px;
    font-size: 12.5px;
    color: var(--app-text-2, #475569);
    text-decoration: none;
    transition: background-color .12s ease, color .12s ease;
}
.fin-home-link > i { flex: none; width: 1rem; font-size: 13px; text-align: center; color: var(--tone, inherit); opacity: .9; }
.fin-home-link-t { flex: none; }
/* 五列时每条只有 250px 左右，说明文字会互相挤压；改在 3 列以内再显示，
   五列下靠 title 提示。 */
.fin-home-hint {
    margin-left: auto;
    font-size: 10.5px;
    color: var(--app-text-3, #94a3b8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
}
@media (max-width: 1399.98px) and (min-width: 992px) {
    .fin-home-hint { display: block; }
}
.fin-home-link:hover { background: var(--tone-soft, var(--app-primary-soft, #eff6ff)); color: var(--tone, var(--app-primary, #2563eb)); }
.fin-home-link:hover > i { opacity: 1; }
.fin-home-link:hover .fin-home-hint { color: var(--tone, var(--app-primary, #2563eb)); opacity: .8; }
.fin-home-link.active {
    font-weight: 600;
    color: var(--tone, var(--app-primary, #2563eb));
    background: var(--tone-soft, var(--app-primary-soft, #eff6ff));
    box-shadow: inset 2.5px 0 0 var(--tone, var(--app-primary, #2563eb));
}
.fin-home-link.active > i { opacity: 1; }

@media (max-width: 575.98px) {
    .fin-home-hint { display: none; }
    .fin-home-grid { grid-template-columns: 1fr; }
}
.fin-kpi-s {
    margin-top: 2px;
    font-size: 10.5px;
    color: var(--app-text-3, #94a3b8);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
