/* 上一次充电信息显示区域样式 */
.last-charge-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.6s ease-out;
}

.last-charge-info h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: clamp(1.1rem, 5vw, 1.5rem);
    font-weight: 600;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
    white-space: nowrap;
}

.last-charge-info h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #0071e3, #005bbd);
    border-radius: 3px;
}

.last-charge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.detail-btn {
    background-color: #0071e3;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.detail-btn:hover {
    background-color: #005bbd;
}

.info-row {
    display: flex;
    flex: auto;
    width: fit-content;
    min-width: fit-content;
    align-items: center;
    padding: 8px 15px;
    background-color: rgba(0, 113, 227, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
    justify-content: center;
    white-space: nowrap;
}

.info-row:nth-child(1) {
    animation-delay: 0.1s;
}

.info-row:nth-child(2) {
    animation-delay: 0.2s;
}

.info-row:nth-child(3) {
    animation-delay: 0.3s;
}

.info-row:nth-child(4) {
    animation-delay: 0.4s;
}

.info-row:hover {
    background-color: rgba(0, 113, 227, 0.1);
    box-shadow: 0 2px 8px rgba(0, 113, 227, 0.15);
}

#lastChargeInfo>div {
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

/* 为金额信息添加特殊样式 */
#lastChargeAmount {
    color: #0071e3;
    font-weight: 700;
    font-size: 1.1rem;
}

/* 为时长信息添加特殊样式 */
#lastChargeDuration {
    color: #27ae60;
    font-weight: 700;
    font-size: 1.1rem;
}

/* 为日期信息添加特殊样式 */
#lastChargeDate {
    color: #e67e22;
    font-weight: 600;
}

.stats-by-person {
    margin-top: 30px;
}

.person-stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    width: 100%;
    /* 适应容器宽度 */
    box-sizing: border-box;
    /* 包含padding和border在内的宽度计算 */
}

.person-stat-card:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.person-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.person-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #212529;
    background: linear-gradient(90deg, #0071e3 0%, #005bbd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 纵向排列的数据展示样式 */
.person-stats-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.person-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: rgba(248, 249, 250, 0.7);
    transition: all 0.2s ease;
}

.person-stat-item:hover {
    background-color: rgba(233, 236, 239, 0.8);
}

.stat-label {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 500;
}

.stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #0071e3;
}

.no-data-message {
    text-align: center;
    color: #6c757d;
    padding: 50px 0;
    font-size: 1.1rem;
}

/* 按充电人统计卡片内的布局 */
.person-stats-layout {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
}

/* 横向滚动条样式优化 */
.person-stats-layout::-webkit-scrollbar {
    height: 8px;
}

.person-stats-layout::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 4px;
}

.person-stats-layout::-webkit-scrollbar-thumb {
    background-color: #0071e3;
    border-radius: 4px;
}

.person-stats-layout::-webkit-scrollbar-thumb:hover {
    background-color: #005bbd;
}

/* 充电人卡片容器 */
#personStatsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(600px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

@media (max-width: 767px) {
    #personStatsContainer {
        grid-template-columns: 1fr;
    }
}

/* Toast提示样式 */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    padding: 16px 24px;
    background-color: #323232;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    min-width: 250px;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: linear-gradient(135deg, #66bb6a, #43a047);
}

.toast.error {
    background: linear-gradient(135deg, #ef5350, #e53935);
}

.toast-icon {
    margin-right: 12px;
    font-size: 20px;
    font-weight: bold;
}

#lastChargeContent {
    cursor: pointer;
}

.last-charge-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.last-charge-header h3 {
    margin: 0;
}

.next-charge-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 12px;
    flex: 1 0 auto;
}

.next-charge-inline .next-charge-tag {
    padding: 4px 10px;
    background: #f0f7ff;
    color: #0a84ff;
    font-weight: 600;
    border: 1px solid #d2d2d7;
    border-right: none;
    border-radius: 999px 0 0 999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    font-size: clamp(0.85rem, 0.8rem + 0.3vw, 1rem);
}

.next-charge-inline #nextChargeInlineDate {
    padding: 4px 12px;
    background: #fff;
    color: #1d1d1f;
    border: 1px solid #d2d2d7;
    border-radius: 0 999px 999px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    font-size: clamp(0.9rem, 0.85rem + 0.3vw, 1.05rem);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .last-charge-info {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .last-charge-info h3 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    #lastChargeInfo>div {
        gap: 10px;
        justify-content: space-between;
    }

    .info-row {
        padding: 6px 12px;
        flex: auto;
        min-width: fit-content;
        justify-content: center;
    }

    .info-value {
        font-size: 1rem;
    }

    #lastChargeAmount,
    #lastChargeDuration {
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    .last-charge-info {
        padding: 15px 10px;
        margin-bottom: 15px;
    }

    .last-charge-info h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    #lastChargeInfo>div {
        gap: 5px;
        justify-content: space-between;
    }

    .info-row {
        padding: 5px 10px;
        flex: auto;
        min-width: fit-content;
        justify-content: center;
    }

    .info-value {
        font-size: 0.95rem;
    }

    #lastChargeAmount,
    #lastChargeDuration {
        font-size: 1rem;
    }
}