/* ============================================================
   全站统一视觉 V3（2026-11-25）
   目标：在 V2 基础上继续“装修”所有有入口可打开的页面：
   列表页、编辑页、详情页、筛选栏、空状态、分页、弹窗、公开页。
   约束：纯视觉覆盖，不改业务逻辑；打印/PDF 由 app.py 跳过注入。
   ============================================================ */
@media screen {
    :root {
        --ui-v3-primary: #2457d6;
        --ui-v3-primary-2: #4f8cff;
        --ui-v3-ink: #0b1730;
        --ui-v3-slate: #5b6b84;
        --ui-v3-line: #e6edf8;
        --ui-v3-soft: #f5f8ff;
        --ui-v3-radius: 18px;
        --ui-v3-shadow: 0 12px 34px rgba(20, 48, 100, .08);
        --ui-v3-shadow-lg: 0 22px 56px rgba(20, 48, 100, .13);
    }

    body {
        background-color: #f4f7fc;
        background-image:
            radial-gradient(900px 420px at 8% -8%, rgba(79, 140, 255, .11), transparent 62%),
            radial-gradient(760px 380px at 100% 0%, rgba(30, 180, 150, .07), transparent 58%);
        background-attachment: fixed;
    }

    .main-content {
        padding: 26px 30px 34px !important;
    }
    .main-content > .container,
    .main-content > .container-fluid {
        max-width: 1480px;
    }

    /* ---------- 页头 / 面包屑 ---------- */
    .breadcrumb-box {
        background: linear-gradient(120deg, #ffffff 0%, #f4f8ff 55%, #eef6ff 100%) !important;
        border: 1px solid #e2ebf8 !important;
        box-shadow: 0 8px 26px rgba(36, 87, 214, .06);
        position: relative;
        overflow: hidden;
    }
    .breadcrumb-box::before {
        content: "";
        position: absolute;
        left: 0;
        top: 12%;
        bottom: 12%;
        width: 4px;
        border-radius: 0 4px 4px 0;
        background: linear-gradient(180deg, #4f8cff, #2457d6);
    }
    .breadcrumb-item a { color: #3c5a8a !important; text-decoration: none; }
    .breadcrumb-item a:hover { color: var(--ui-v3-primary) !important; }

    .main-content > h3,
    .main-content > h4,
    .main-content > .container > h3,
    .main-content > .container > h4,
    .main-content > .container-fluid > h3,
    .main-content > .container-fluid > h4 {
        margin-top: 4px;
        margin-bottom: 16px;
        padding-left: 13px;
        border-left: 4px solid #4f8cff;
        line-height: 1.25;
    }

    /* ---------- 卡片：更轻的边框、顶部高光、悬停浮起 ---------- */
    .card {
        border-color: rgba(222, 232, 246, .95) !important;
        border-radius: var(--ui-v3-radius) !important;
        box-shadow: var(--ui-v3-shadow);
        transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
        overflow: hidden;
    }
    .card:hover {
        border-color: #d7e4fb !important;
        box-shadow: var(--ui-v3-shadow-lg);
    }
    .card > .card-header:first-child {
        background:
            linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
        position: relative;
    }
    .card > .card-header:first-child::after {
        content: "";
        position: absolute;
        left: 22px;
        right: 22px;
        bottom: -1px;
        height: 1px;
        background: linear-gradient(90deg, rgba(79, 140, 255, .35), rgba(79, 140, 255, 0));
    }
    .card-header .card-title,
    .card-header h5,
    .card-header h6 { margin-bottom: 0; }

    /* 详情页 / 编辑页里的分组小标题 */
    .card-body > h5,
    .card-body > h6,
    .card-body > .section-title,
    .detail-section-title {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 2px 0 14px;
        padding-bottom: 9px;
        border-bottom: 1px dashed #e4ecf9;
        font-size: 16.5px !important;
        color: #173a72;
    }
    .card-body > h5::before,
    .card-body > h6::before,
    .detail-section-title::before {
        content: "";
        width: 7px;
        height: 18px;
        border-radius: 5px;
        background: linear-gradient(180deg, #4f8cff, #2457d6);
        flex: 0 0 auto;
    }

    /* ---------- 详情页：dl / 信息网格 / 键值行 ---------- */
    dl.row {
        margin-bottom: 0;
        row-gap: 13px;
    }
    dl.row dt {
        color: #6a7b93;
        font-size: 14.5px;
        font-weight: 600;
        margin-bottom: 4px;
    }
    dl.row dd {
        color: #14233d;
        font-size: 16px;
        font-weight: 650;
        margin-bottom: 0;
        word-break: break-word;
    }
    .detail-item,
    .info-item,
    .kv-item {
        background: linear-gradient(180deg, #ffffff, #f9fbff);
        border: 1px solid #e8effa;
        border-radius: 12px;
        padding: 12px 14px;
        min-height: 72px;
    }
    .detail-item .label,
    .info-item .label,
    .kv-item .label,
    .detail-label {
        color: #71829a;
        font-size: 13.5px;
        font-weight: 600;
        margin-bottom: 5px;
    }
    .detail-value,
    .info-item .value,
    .kv-item .value {
        color: #10213b;
        font-size: 16px;
        font-weight: 650;
        word-break: break-word;
    }
    .detail-item .value.money,
    .detail-value.money {
        color: #b45309;
        font-variant-numeric: tabular-nums;
    }

    /* ---------- 列表页筛选栏 ---------- */
    .main-content form.row,
    .card-body form.row {
        align-items: flex-end;
        row-gap: 10px;
    }
    .main-content form.row .form-control,
    .main-content form.row .form-select,
    .card-body form.row .form-control,
    .card-body form.row .form-select {
        min-height: 42px;
        background: #fbfdff;
    }
    .main-content form.row .btn,
    .card-body form.row .btn { min-height: 42px; }
    .filter-bar,
    .search-bar {
        background: linear-gradient(180deg, #fbfdff, #f5f9ff);
        border: 1px solid #e5eefb;
        border-radius: 14px;
        padding: 14px 16px;
    }

    /* ---------- 表格：表头渐层、首列强调、数字对齐 ---------- */
    .table-responsive {
        border: 1px solid #edf2fa;
        border-radius: 14px;
        background: #fff;
    }
    .table thead th {
        background: linear-gradient(180deg, #f7faff, #eef5ff) !important;
        color: #40536f !important;
        letter-spacing: .2px;
        border-bottom: 1px solid #dfe9f7 !important;
        position: sticky;
        top: 0;
        z-index: 2;
    }
    .table tbody tr:nth-child(even) > * { background: #fcfdff; }
    .table tbody tr:hover > * {
        background: #f2f7ff !important;
    }
    .table tbody td:first-child { color: #16243c; font-weight: 600; }
    .table td .badge { vertical-align: middle; }
    .table .btn + .btn,
    .table .btn + form,
    .table form + form { margin-left: 3px; }
    .table td .btn-sm { white-space: nowrap; }
    .table tfoot td { background: #fbfdff; font-weight: 650; }

    /* ---------- 空状态 / 加载 / 无数据 ---------- */
    .table tbody td.text-center.text-muted,
    .empty-state,
    .no-data {
        padding: 34px 18px !important;
        color: #8494ab !important;
        font-size: 15px;
        background: linear-gradient(180deg, #ffffff, #fafcff);
    }
    .empty-state::before,
    .no-data::before {
        content: "◇";
        display: block;
        font-size: 26px;
        line-height: 1;
        color: #b9cbe7;
        margin-bottom: 8px;
    }

    /* ---------- 按钮补充态 ---------- */
    .btn {
        transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
    }
    .btn:active { transform: translateY(0) scale(.985); }
    .btn-outline-success {
        color: #0b7d57;
        border-color: #9fe0c6;
        background: #fff;
    }
    .btn-outline-success:hover, .btn-outline-success:focus {
        color: #fff;
        background: #0f9f6e;
        border-color: #0f9f6e;
    }
    .btn-outline-danger {
        color: #b91c1c;
        border-color: #f3b4b4;
        background: #fff;
    }
    .btn-outline-danger:hover, .btn-outline-danger:focus {
        color: #fff;
        background: #dc2626;
        border-color: #dc2626;
    }
    .btn-link {
        text-decoration: none;
        font-weight: 650;
        color: #2457d6;
        box-shadow: none !important;
    }
    .btn-link:hover { color: #163f9f; text-decoration: underline; }

    /* ---------- 表单：编辑页分组与必填感 ---------- */
    .card-body .row.g-3 > [class*="col-"] { min-width: 0; }
    .form-label { color: #31445f; }
    .form-label::after {
        content: "";
    }
    .form-control:disabled,
    .form-control[readonly],
    .form-select:disabled {
        background: #f4f7fb;
        color: #6d7d94;
        cursor: not-allowed;
    }
    textarea.form-control { background: #fbfdff; }
    .form-check-input:checked {
        background-color: #2457d6;
        border-color: #2457d6;
    }
    .form-switch .form-check-input { width: 2.4em; height: 1.25em; }
    .input-group:focus-within {
        border-radius: 11px;
        box-shadow: 0 0 0 4px rgba(36, 87, 214, .10);
    }

    /* ---------- 提示条：左侧色条 + 更清晰的层级 ---------- */
    .alert {
        border-left-width: 4px !important;
        box-shadow: 0 6px 18px rgba(20, 48, 100, .04);
    }
    .alert-info { border-left-color: #3b82f6 !important; background: #f2f8ff; color: #1e3a68; }
    .alert-success { border-left-color: #0f9f6e !important; background: #f0fbf6; color: #145c43; }
    .alert-warning { border-left-color: #d97706 !important; background: #fff9ed; color: #70420a; }
    .alert-danger { border-left-color: #dc2626 !important; background: #fff5f5; color: #7f1d1d; }
    .alert b, .alert strong { font-weight: 750; }

    /* ---------- 标签页 / 分段筛选 ---------- */
    .nav-tabs {
        gap: 4px;
        border-bottom: 1px solid #e4ecf8;
    }
    .nav-tabs .nav-link {
        border: 1px solid transparent;
        margin-bottom: -1px;
    }
    .nav-tabs .nav-link.active {
        border-color: #dce8fb #dce8fb #fff;
        box-shadow: 0 -6px 16px rgba(36, 87, 214, .06);
        font-weight: 750;
    }
    .nav-pills {
        background: #edf3fc;
        padding: 4px;
        border-radius: 12px;
        display: inline-flex;
        gap: 4px;
    }
    .nav-pills .nav-link { color: #53657f; }
    .nav-pills .nav-link.active {
        background: #fff;
        color: #1746b8;
        box-shadow: 0 4px 12px rgba(36, 87, 214, .12);
    }

    /* ---------- 分页 / 计数 ---------- */
    .pagination {
        margin-top: 18px;
        margin-bottom: 2px;
    }
    .page-item .page-link {
        border-color: #e1eaf6;
        box-shadow: 0 2px 6px rgba(20, 48, 100, .04);
    }
    .page-item.active .page-link {
        background: linear-gradient(135deg, #4f8cff, #2457d6);
        border-color: #2457d6;
    }
    .pagination-info,
    .page-info { color: #6c7d95; font-size: 14px; }

    /* ---------- 弹窗 / 抽屉 / 下拉 ---------- */
    .modal-header {
        background: linear-gradient(180deg, #ffffff, #f7faff);
        border-radius: 18px 18px 0 0;
    }
    .modal-footer { background: #fbfdff; border-radius: 0 0 18px 18px; }
    .dropdown-menu { padding: 8px; }
    .dropdown-header { font-size: 13px; color: #8494aa; font-weight: 700; letter-spacing: .3px; }

    /* ---------- 首页 / 数据卡 ---------- */
    .metric-card,
    .stat-card,
    .dashboard-card {
        background: linear-gradient(150deg, #ffffff 0%, #f8fbff 100%);
        border: 1px solid #e7effb;
        border-radius: 16px;
        box-shadow: var(--ui-v3-shadow);
    }
    .metric-value,
    .stat-mini .mini-value { font-variant-numeric: tabular-nums; color: #133a76; }
    .quick-link,
    .todo-item {
        border-radius: 12px;
        transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
    }
    .quick-link:hover,
    .todo-item:hover {
        background: #f4f8ff;
        transform: translateY(-1px);
    }

    /* ---------- 侧边栏 / 顶栏细节 ---------- */
    .sidebar { box-shadow: 8px 0 34px rgba(8, 24, 55, .16); }
    .submenu li a {
        border-radius: 9px;
        margin: 2px 8px;
    }
    .submenu li a:hover { background: rgba(255, 255, 255, .09); }
    .submenu li a.active,
    .submenu li a.router-link-active {
        background: linear-gradient(90deg, rgba(79, 140, 255, .28), rgba(79, 140, 255, .08));
        box-shadow: inset 3px 0 0 #6ea4ff;
    }
    .top-header {
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, .92) !important;
    }

    /* ---------- 独立页 / 公开页 / H5 ---------- */
    .public-page,
    .h5-page {
        background-image: radial-gradient(760px 380px at 50% -10%, rgba(79, 140, 255, .16), transparent 60%);
    }
    .public-page .hero,
    .trial-page .card,
    .login-card {
        box-shadow: 0 24px 64px rgba(13, 38, 84, .14);
    }
    .public-page .price,
    .h5-page .price-total { color: #c2410c; font-weight: 800; }

    /* ---------- 小屏：保持可点、可读 ---------- */
    @media (max-width: 768px) {
        .main-content { padding: 16px 14px 24px !important; }
        .card-body { padding: 16px !important; }
        .card-header { padding: 14px 16px !important; }
        .table > :not(caption) > * > * { padding: 9px 10px; }
        .main-content form.row > [class*="col-"] { flex: 1 1 100%; }
        dl.row dd { font-size: 15.5px; }
    }
}
