:root {
    --bg: #f6f8fb;
    --card: #ffffff;
    --muted: #8b95a6;
    --accent: #4f46e5;
    --success: #06b6a4;
    --danger: #ef4444;
    --shadow: 0 6px 18px rgba(37, 51, 75, 0.08);
    --radius: 12px;
    --gap: 18px;
}

.wrap {
    margin: 0 auto;
}

/* OneDash 静态控件 — 背景色（摘自 bootstrap-extended.css） */
.bg-primary { background-color: #3461ff !important; }
.bg-orange  { background-color: #ff6632 !important; }
.bg-success { background-color: #12bf24 !important; }
.bg-purple  { background-color: #8932ff !important; }
.radius-10  { border-radius: 10px; }

/* 一行四列统计卡片 */
.od-stat-row {
    margin: 0 -8px;
}

.od-stat-row > [class*="col-"] {
    padding: 0 8px 16px;
}

.od-stat-card {
    border: 0;
    margin-bottom: 0;
    height: 100%;
    border-radius: 12px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
    transition: transform .18s ease, box-shadow .18s ease;
}

.od-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
}

.od-stat-card .card-body {
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.od-stat-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 8px;
}

.od-stat-title {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    letter-spacing: 0.02em;
    flex: 1;
}

.od-stat-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
}

.od-stat-metrics {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex: 1;
}

.od-stat-metric-box {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 12px 10px;
}

.od-stat-metric-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-bottom: 6px;
    white-space: nowrap;
}

.od-stat-num {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.5px;
    width: 100%;
}

.od-stat-divider {
    margin: 14px 0 10px;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
}

.od-stat-yesterday {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

/* 增长率徽章（彩色卡片内浅色样式） */
.od-stat-card .delta {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.od-stat-card .delta.up {
    background: rgba(255, 255, 255, 0.28);
}

.od-stat-card .delta.down {
    background: rgba(0, 0, 0, 0.18);
}

/* 数字弹出动画 */
@keyframes pop {
    0%   { transform: scale(0.6); opacity: 0; }
    60%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}

.od-stat-card .m-value,
.od-stat-card .od-stat-num {
    animation: pop 0.5s ease-out;
}

#card-group   .m-value { animation-delay: 0.1s; }
#card-service .m-value { animation-delay: 0.2s; }
#card-channel .m-value { animation-delay: 0.3s; }
#card-short   .m-value { animation-delay: 0.4s; }

/* OneDash 图表卡片 */
.od-chart-panel {
    margin-top: 28px;
    border: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.od-chart-panel .card-body {
    padding: 20px 22px 12px;
}

.od-chart-title {
    font-size: 15px;
    font-weight: 600;
    color: #444;
}

.od-filter-wrap {
    margin-top: 24px;
}

/* OneDash 数据表格 */
.od-table-panel {
    margin-top: 28px;
    border: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.od-table-panel .card-body {
    padding: 20px 22px;
}

.od-table-head {
    margin-bottom: 14px;
}

.od-table-ico {
    margin-right: 8px;
    color: #3461ff;
    font-size: 16px;
    vertical-align: -2px;
}

.od-table-wrap {
    margin: 0;
    border-radius: 10px;
    border: 1px solid #eef0f4;
}

.od-data-table {
    width: 100%;
    margin-bottom: 0;
    font-size: 14px;
    color: #4a5568;
}

.od-data-table thead th {
    background: #f4f6fa;
    color: #5a6478;
    font-weight: 600;
    font-size: 13px;
    padding: 14px 16px;
    border-bottom: 1px solid #e8ecf2;
    border-top: none;
    white-space: nowrap;
    vertical-align: middle;
}

.od-data-table tbody td {
    padding: 13px 16px;
    border-top: 1px solid #f0f2f6;
    vertical-align: middle;
    white-space: nowrap;
}

.od-data-table tbody tr {
    transition: background 0.15s ease;
}

.od-data-table tbody tr:hover {
    background: #f8faff;
}

.od-data-table tbody tr:first-child td {
    border-top: none;
}

.od-data-table.pv-table thead th,
.od-data-table.pv-table tbody td {
    text-align: center;
}

.od-th-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: 1px;
}

.od-c-qun      { background: #3461ff; }
.od-c-kf       { background: #ff6632; }
.od-c-channel  { background: #12bf24; }
.od-c-dwz      { background: #8932ff; }

/* 兼容 JS 动态插入的空数据行 */
.pv-table td[colspan] {
    text-align: center;
    color: #9aa3b2;
    padding: 28px 16px !important;
}

.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    margin-top: 30px;
}

button.filter-btn {
    width: 100px;
    background: rgb(78 109 227);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    padding: 6px 10px;
    cursor: pointer;
    transition: 0.2s;
}

button.filter-btn:hover {
    background: rgb(32 66 197);
}

button.filter-btn.active {
    background: rgb(32 66 197);
}

.custom-range {
    display: flex;
}

.custom-range input[type="date"] {
    height: 33px;
    margin-bottom: 0;
    border-radius: 8px;
    border: 1px solid rgb(78 109 227);
    font-size: 15px;
    padding: 15px;
}

.custom-range .range-to {
    width: 30px;
    height: 33px;
    line-height: 38px;
    text-align: center;
    font-size: 14px;
    color: #999;
}

.custom-range .applyRange {
    height: 33px;
    border-radius: 8px;
    font-size: 15px;
    background: rgb(78 109 227);
    padding: 0 15px;
    border: none;
    color: #fff;
    margin-left: 15px;
}

#pvChart,
#pvChart2 {
    min-height: 360px;
}

.od-pagination,
.pagination {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
    padding-top: 4px;
}

.page-btn {
    padding: 6px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #3461ff;
    background: #fff;
    color: #3461ff;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, opacity 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: #3461ff;
    color: #fff;
}

.page-btn:disabled {
    background: #f4f6fa;
    border-color: #e2e6ee;
    color: #b0b8c8;
    cursor: not-allowed;
}

@media (min-width: 1200px) {
    .od-stat-title {
        font-size: 28px;
    }

    .od-stat-num {
        font-size: 30px;
    }
}

@media (max-width: 991px) {
    .od-stat-title {
        font-size: 22px;
    }

    .od-stat-num {
        font-size: 24px;
    }
}

/* ========== 公告弹窗（动态蓝顶栏 + 内容自适应） ========== */
body.notice-modal-open .modal-backdrop.show {
    opacity: 1;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#NoticeModal .notice-modal-dialog {
    max-width: 520px;
    width: auto;
    margin: 1.25rem auto;
}

#NoticeModal .notice-modal-content {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
    background: #fff;
    width: fit-content;
    min-width: 320px;
    max-width: 100%;
}

/* 动态蓝顶栏 */
#NoticeModal .notice-modal-hero {
    position: relative;
    padding: 32px 28px 26px;
    text-align: center;
    overflow: hidden;
    color: #fff;
}

#NoticeModal .notice-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1d4ed8 0%, #3461ff 35%, #60a5fa 70%, #3b82f6 100%);
    background-size: 300% 300%;
    animation: noticeBlueFlow 10s ease infinite;
    z-index: 0;
}

@keyframes noticeBlueFlow {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

#NoticeModal .notice-hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.45;
    z-index: 0;
    animation: noticeBlobFloat 12s ease-in-out infinite;
}

#NoticeModal .notice-hero-blob-1 {
    width: 180px;
    height: 180px;
    background: #93c5fd;
    top: -60px;
    left: -40px;
}

#NoticeModal .notice-hero-blob-2 {
    width: 140px;
    height: 140px;
    background: #2563eb;
    bottom: -50px;
    right: -30px;
    animation-delay: -6s;
}

@keyframes noticeBlobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%       { transform: translate(12px, -8px) scale(1.08); }
}

#NoticeModal .notice-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s, transform 0.15s;
}

#NoticeModal .notice-modal-close:hover {
    color: #fff;
    transform: scale(1.1);
}

#NoticeModal .notice-hero-icon {
    position: relative;
    z-index: 1;
    font-size: 36px;
    margin-bottom: 10px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

#NoticeModal .notice-hero-title {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* 正文区：高度随内容自适应 */
#NoticeModal .notice-modal-body {
    padding: 22px 26px 8px;
    border: none;
    flex: 0 0 auto;
}

#NoticeModal .NoticeView .Notice_title {
    font-size: 16px;
    font-weight: 600;
    color: #f97316;
    margin: 0 0 12px;
    line-height: 1.5;
}

#NoticeModal .NoticeView .Notice_title:empty {
    display: none;
}

#NoticeModal .NoticeView .Notice_content {
    font-size: 14px;
    line-height: 1.8;
    color: #334155;
    word-break: break-word;
    white-space: normal;
}

#NoticeModal .NoticeView .Notice_content:empty::before {
    content: '暂无公告内容';
    color: #94a3b8;
}

#NoticeModal .NoticeView .Notice_content p {
    margin-bottom: 0.6em;
}

#NoticeModal .NoticeView .Notice_content p:last-child {
    margin-bottom: 0;
}

#NoticeModal .NoticeView .Notice_time {
    font-size: 12px;
    color: #94a3b8;
    text-align: right;
    margin: 12px 0 0;
    padding: 0;
}

#NoticeModal .NoticeView .Notice_time:empty {
    display: none;
}

/* 底部双按钮 */
#NoticeModal .notice-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 14px 22px 22px;
    border: none;
    flex-wrap: wrap;
}

#NoticeModal .notice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
    border: none;
    white-space: nowrap;
}

#NoticeModal .notice-btn-ghost {
    background: #ede9fe;
    color: #7c3aed;
}

#NoticeModal .notice-btn-ghost:hover {
    background: #ddd6fe;
    color: #6d28d9;
}

#NoticeModal .notice-btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

#NoticeModal .notice-btn-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.42);
}

@media (max-width: 480px) {
    #NoticeModal .notice-modal-content {
        min-width: 0;
        width: 100%;
    }

    #NoticeModal .notice-modal-footer {
        justify-content: stretch;
    }

    #NoticeModal .notice-btn {
        flex: 1;
    }
}
