/* ======================================================
 * 宜荣财达智慧物流大数据看板样式
 * www.yrcdw.com | 2026-8
 ========================================================= */

/* ========== 基础重置 & 深色主题 ========== */
body.yrc-bigdata-page {
    background: #0a0e27 !important;
    color: #c8d6e5;
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}
body.yrc-bigdata-page * {
    box-sizing: border-box;
}

/* 背景网格动画 */
body.yrc-bigdata-page::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image:
        linear-gradient(rgba(0, 168, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 168, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* ========== 顶部信息栏 ========== */
.yrc-data-header {
    position: relative;
    z-index: 10;
    background: linear-gradient(180deg, rgba(10, 20, 60, 0.95) 0%, rgba(10, 14, 39, 0.9) 100%);
    border-bottom: 1px solid rgba(0, 168, 255, 0.2);
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(0, 168, 255, 0.1);
}
.data-header-inner {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

/* 左侧：日期时间 */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 300px;
}
.header-left .icon-calendar { font-size: 18px; }
.solar-date {
    font-size: 16px;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}
.lunar-date {
    font-size: 13px;
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}
.week-day {
    font-size: 13px;
    color: #00ff88;
    font-weight: 600;
}
.ganzhi {
    font-size: 12px;
    color: #ff9f43;
    background: rgba(255, 159, 67, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}
.shengxiao {
    font-size: 12px;
    color: #ff6b6b;
}
.live-clock {
    font-size: 22px;
    font-weight: 700;
    color: #00d4ff;
    font-family: "Courier New", monospace;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    letter-spacing: 2px;
    margin-left: 10px;
    animation: clockPulse 1s ease-in-out infinite alternate;
}
@keyframes clockPulse {
    from { text-shadow: 0 0 10px rgba(0, 212, 255, 0.3); }
    to { text-shadow: 0 0 20px rgba(0, 212, 255, 0.8); }
}

/* 中间：标题 */
.header-center {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
    min-width: 300px;
}

/* ========== 宜荣品牌导航下拉菜单 ========== */
.yrc-brand-nav {
    display: inline-flex;
    align-items: center;
    position: relative;
}
.nav-brand-menu {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.nav-brand-current {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 4px;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
    transition: all 0.3s;
}
.nav-brand-current:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.5);
}
.nav-arrow {
    color: #fff;
    font-size: 10px;
    margin-left: 6px;
    vertical-align: middle;
    transition: transform 0.3s;
}
.nav-brand-menu:hover .nav-arrow {
    transform: rotate(180deg);
}
.nav-brand-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 140px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    list-style: none;
    padding: 0;
    margin: 4px 0 0 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.25s ease;
    z-index: 1000;
    overflow: hidden;
}
.nav-brand-menu:hover .nav-brand-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-brand-item {
    display: block;
    padding: 10px 16px;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}
.nav-brand-item:last-child {
    border-bottom: none;
}
.nav-brand-item a {
    display: block;
    color: inherit;
    text-decoration: none;
    margin: -10px -16px;
    padding: 10px 16px;
}
.nav-brand-item:hover,
.nav-brand-item.active {
    background: #1a73e8;
    color: #fff;
}
.nav-brand-item:hover a,
.nav-brand-item.active a {
    color: #fff;
}
.title-suffix {
    font-size: 18px;
    font-weight: 700;
    color: #00d4ff;
    letter-spacing: 2px;
    margin-left: 8px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.header-center .icon-truck {
    font-size: 24px;
    animation: truckMove 2s ease-in-out infinite;
}
@keyframes truckMove {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}
.data-title {
    font-size: 22px;
    font-weight: 700;
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    letter-spacing: 3px;
    background: linear-gradient(90deg, #00d4ff, #00ff88, #00d4ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleShine 3s linear infinite;
}
@keyframes titleShine {
    to { background-position: 200% center; }
}

/* 右侧：天气 */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
    min-width: 300px;
}
#weather-icon { font-size: 20px; }
.weather-city {
    font-size: 14px;
    color: #00d4ff;
    font-weight: 600;
}
.weather-temp {
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
}
.weather-desc {
    font-size: 13px;
    color: #c8d6e5;
}
.weather-humidity, .weather-wind {
    font-size: 12px;
    color: #88a4c3;
}

/* ========== 内容区 ========== */
.yrc-section {
    position: relative;
    z-index: 5;
    padding: 15px 20px;
}
.yrc-container {
    max-width: 1920px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.4fr 1fr;
    gap: 15px;
}
.yrc-container.full {
    grid-template-columns: 1fr;
}

/* ========== 面板通用 ========== */
.panel {
    background: linear-gradient(135deg, rgba(16, 30, 70, 0.9) 0%, rgba(10, 18, 50, 0.95) 100%);
    border: 1px solid rgba(0, 168, 255, 0.15);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}
.panel:hover {
    box-shadow: 0 8px 30px rgba(0, 168, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.panel::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    animation: scanLine 3s linear infinite;
}
@keyframes scanLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.panel-header {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 168, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #00d4ff;
    background: linear-gradient(90deg, rgba(0, 168, 255, 0.08), transparent);
}
.panel-header .icon { font-size: 16px; }
.panel-header.sub-header {
    border-top: 1px solid rgba(0, 168, 255, 0.1);
    margin-top: 5px;
}
.panel-body {
    padding: 15px;
}

/* ========== TOP7列表 ========== */
.top-list { list-style: none; padding: 0; margin: 0; }
.top-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}
.top-item:hover {
    background: rgba(0, 168, 255, 0.05);
    border-radius: 4px;
    padding-left: 8px;
}
.top-item:last-child { border-bottom: none; }
.rank {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    flex-shrink: 0;
}
.rank-1 { background: linear-gradient(135deg, #ffd700, #ff8c00); color: #000; box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }
.rank-2 { background: linear-gradient(135deg, #c0c0c0, #808080); color: #000; }
.rank-3 { background: linear-gradient(135deg, #cd7f32, #8b4513); color: #fff; }
.rank-4, .rank-5, .rank-6, .rank-7 { background: rgba(0, 168, 255, 0.2); color: #00d4ff; border: 1px solid rgba(0, 168, 255, 0.3); }
.city-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.city-name { font-size: 14px; color: #e0e6ed; font-weight: 600; }
.transport-num { font-size: 12px; color: #88a4c3; }
.transport-num strong { color: #00ff88; font-size: 15px; }
.trend { font-size: 11px; }
.trend-up { color: #00ff88; }
.trend-stable { color: #88a4c3; }

/* ========== 实时监控圆环 ========== */
.monitor-body { text-align: center; }
.monitor-ring-wrapper {
    position: relative;
    width: 280px; height: 280px;
    margin: 0 auto 15px;
}
#monitorCanvas {
    width: 100%; height: 100%;
}
.ring-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.ring-label {
    font-size: 14px;
    color: #88a4c3;
    margin-bottom: 5px;
}
.ring-value {
    font-size: 42px;
    font-weight: 700;
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    font-family: "Courier New", monospace;
}

/* 厂方滚动 */
.factory-marquee {
    margin: 15px 0;
    overflow: hidden;
    border-top: 1px solid rgba(0, 168, 255, 0.1);
    border-bottom: 1px solid rgba(0, 168, 255, 0.1);
    padding: 10px 0;
}
.marquee-label {
    font-size: 12px;
    color: #88a4c3;
    margin-bottom: 8px;
    text-align: left;
}
.marquee-track {
    display: flex;
    gap: 10px;
    animation: marqueeScroll 20s linear infinite;
    white-space: nowrap;
}
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.factory-tag {
    background: rgba(0, 168, 255, 0.15);
    border: 1px solid rgba(0, 168, 255, 0.3);
    color: #00d4ff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 实时记录滚动 */
.realtime-records {
    margin-top: 10px;
    text-align: left;
}
.records-title {
    font-size: 12px;
    color: #88a4c3;
    margin-bottom: 8px;
}
.records-scroll {
    max-height: 120px;
    overflow: hidden;
    position: relative;
}
.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    animation: recordSlide 0.5s ease-out;
}
@keyframes recordSlide {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
.record-route { color: #e0e6ed; flex: 1; }
.record-km { color: #00ff88; font-weight: 600; margin: 0 10px; font-size: 12px; }
.record-date { color: #88a4c3; font-size: 11px; }

/* ========== 财务卡片 ========== */
.finance-body { padding: 10px; }
.finance-card {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.08), rgba(0, 100, 200, 0.05));
    border: 1px solid rgba(0, 168, 255, 0.15);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}
.finance-card::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 40px; height: 40px;
    background: linear-gradient(135deg, transparent 50%, rgba(0, 168, 255, 0.1) 50%);
}
.finance-card.highlight {
    border-color: rgba(255, 215, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 140, 0, 0.05));
}
.finance-card.highlight .finance-label { color: #ffd700; }
.finance-card.highlight .finance-value { color: #ffd700; }
.finance-label {
    font-size: 12px;
    color: #88a4c3;
    margin-bottom: 5px;
}
.finance-value {
    font-size: 20px;
    font-weight: 700;
    color: #00d4ff;
    font-family: "Courier New", monospace;
}
.finance-sub {
    font-size: 11px;
    color: #88a4c3;
    margin-top: 4px;
}
.finance-card.small { padding: 8px 12px; }
.finance-card.small .finance-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.finance-card.small .finance-label { margin-bottom: 0; font-size: 11px; }
.finance-card.small .finance-value { font-size: 14px; }

/* ========== 趋势图表区 ========== */
.section-trend { padding-top: 0; }
.chart-body { padding: 15px; }
#trendChart { width: 100% !important; }

/* ========== 第二段：车长标签 ========== */
.vehicle-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.vehicle-tag {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.15), rgba(0, 100, 200, 0.1));
    border: 1px solid rgba(0, 168, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 80px;
    justify-content: center;
    transition: all 0.3s;
}
.vehicle-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 255, 0.2);
    border-color: rgba(0, 168, 255, 0.5);
}
.v-length {
    font-size: 13px;
    font-weight: 700;
    color: #00d4ff;
}
.v-count {
    font-size: 12px;
    color: #88a4c3;
}

/* ========== 诸暨线路 ========== */
.line-list {
    max-height: 280px;
    overflow-y: auto;
}
.line-list::-webkit-scrollbar { width: 4px; }
.line-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
.line-list::-webkit-scrollbar-thumb { background: rgba(0, 168, 255, 0.3); border-radius: 2px; }
.line-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    font-size: 13px;
    transition: all 0.2s;
}
.line-item:hover {
    background: rgba(0, 168, 255, 0.05);
    padding-left: 8px;
    border-radius: 4px;
}
.line-route { color: #e0e6ed; flex: 1; }
.line-km {
    color: #00ff88;
    font-size: 12px;
    margin: 0 10px;
    font-weight: 600;
}
.line-km .km-loading {
    color: #88a4c3;
    font-size: 11px;
}
.line-num {
    color: #ffd700;
    font-size: 12px;
    font-weight: 600;
    min-width: 40px;
    text-align: right;
}

/* ========== 年度对比 ========== */
.compare-body { padding: 20px; }
.year-compare {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.year-bar-item {
    display: flex;
    align-items: center;
    gap: 15px;
}
.year-label {
    width: 60px;
    font-size: 14px;
    font-weight: 700;
    color: #00d4ff;
    text-align: right;
}
.year-bar-wrapper {
    flex: 1;
    height: 36px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 168, 255, 0.1);
}
.year-bar {
    height: 100%;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
    background: linear-gradient(90deg, rgba(0, 168, 255, 0.3), rgba(0, 212, 255, 0.6));
    width: 0%;
    transition: width 2s ease-out;
    position: relative;
    overflow: hidden;
}
.year-bar::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: barShine 2s linear infinite;
}
@keyframes barShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
.bar-num {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.year-unit {
    width: 30px;
    font-size: 12px;
    color: #88a4c3;
}

/* ========== 月度网格 ========== */
.month-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}
.month-item {
    background: rgba(0, 168, 255, 0.06);
    border: 1px solid rgba(0, 168, 255, 0.1);
    border-radius: 6px;
    padding: 8px;
    text-align: center;
    transition: all 0.3s;
}
.month-item:hover {
    background: rgba(0, 168, 255, 0.12);
    transform: scale(1.05);
}
.month-name {
    font-size: 12px;
    color: #88a4c3;
    margin-bottom: 4px;
}
.month-num {
    font-size: 14px;
    font-weight: 700;
    color: #00d4ff;
}

/* ========== 车辆总数圆环 ========== */
.vehicle-total-body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.vehicle-total-ring {
    width: 160px; height: 160px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(0, 168, 255, 0.3) 0%, rgba(0, 212, 255, 0.6) 50%, rgba(0, 168, 255, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ringRotate 4s linear infinite;
    box-shadow: 0 0 30px rgba(0, 168, 255, 0.2);
}
@keyframes ringRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.vt-ring-inner {
    width: 130px; height: 130px;
    border-radius: 50%;
    background: #0a0e27;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: ringRotate 4s linear infinite reverse;
}
.vt-number {
    font-size: 32px;
    font-weight: 700;
    color: #00d4ff;
    font-family: "Courier New", monospace;
}
.vt-label {
    font-size: 14px;
    color: #88a4c3;
}

/* ========== 周统计卡片 ========== */
.week-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.week-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 168, 255, 0.06);
    border: 1px solid rgba(0, 168, 255, 0.1);
    border-radius: 6px;
    padding: 12px;
    transition: all 0.3s;
}
.week-card:hover {
    background: rgba(0, 168, 255, 0.1);
    transform: translateX(5px);
}
.week-card.today {
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.06);
}
.week-card.today .week-value { color: #ffd700; }
.week-icon { font-size: 20px; }
.week-label {
    font-size: 13px;
    color: #88a4c3;
    width: 40px;
}
.week-value {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    color: #00d4ff;
    text-align: right;
    font-family: "Courier New", monospace;
}

/* ========== 数字计数器动画 ========== */
.counter {
    display: inline-block;
}

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .yrc-container { grid-template-columns: 1fr 1fr; }
    .panel-center { grid-column: 1 / -1; }
    .header-center { order: -1; width: 100%; justify-content: center; }
}
@media (max-width: 768px) {
    .yrc-container { grid-template-columns: 1fr; }
    .data-title { font-size: 16px; }
    .live-clock { font-size: 16px; }
    .monitor-ring-wrapper { width: 220px; height: 220px; }
    .ring-value { font-size: 32px; }
    .month-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ========== 粒子背景装饰 ========== */
.particle {
    position: fixed;
    width: 4px; height: 4px;
    background: rgba(0, 168, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    animation: particleFloat 10s linear infinite;
}
@keyframes particleFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

/* ========== 车牌号显示 ========== */
.record-plate {
    color: #ffd700;
    font-weight: 600;
    font-size: 12px;
    margin: 0 8px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}