body {
    font-size: .875rem;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f8f9fa;
    color: #343a40;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 200px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-right: 1px solid #dee2e6;
    padding: 1.5rem 1rem;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    overflow: hidden;
}

.sidebar.collapsed {
    width: 60px;
    padding: 1.5rem 0.5rem;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: 1rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.navbar-brand {
    padding-top: .75rem;
    padding-bottom: .75rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    background-color: rgba(0, 0, 0, .25);
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .25);
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    background-color: rgba(0, 0, 0, .35);
}

.navbar .navbar-toggler {
    top: .25rem;
    right: 1rem;
}

.location-title {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #dee2e6;
    position: relative;
}

.location-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #6610f2);
    border-radius: 3px;
}

/* 操作牌（绿色）- 非电工班组 */
.card-operation {
    background: linear-gradient(145deg, #f8fffc, #ebfff6);
    border-left: 4px solid #28a745 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(40, 167, 69, 0.2);
}

.card-operation .card-body {
    background-color: transparent;
}

.card-operation .card-title {
    color: #198754;
}

.card-operation .card-title::after {
    background-color: #198754;
}

.card-operation::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    color: rgba(25, 135, 84, 0.3);
    font-weight: bold;
}

/* 检修牌（红色）- 非电工班组 */
.card-maintenance {
    background: linear-gradient(145deg, #fff8f8, #fff1f1);
    border-left: 4px solid #dc3545 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(220, 53, 69, 0.2);
}

.card-maintenance .card-body {
    background-color: transparent;
}

.card-maintenance .card-title {
    color: #dc3545;
}

.card-maintenance .card-title::after {
    background-color: #dc3545;
}

.card-maintenance::before {
    content: '⚠';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    color: rgba(220, 53, 69, 0.3);
    font-weight: bold;
}

/* 电工班组 - 操作牌（红色） */
.card-electrician-operation {
    background: linear-gradient(145deg, #fff8f8, #fff1f1);
    border-left: 4px solid #dc3545 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(220, 53, 69, 0.2);
}

.card-electrician-operation .card-body {
    background-color: transparent;
}

.card-electrician-operation .card-title {
    color: #dc3545;
}

.card-electrician-operation .card-title::after {
    background-color: #dc3545;
}

.card-electrician-operation::before {
    content: '⚠';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    color: rgba(220, 53, 69, 0.3);
    font-weight: bold;
}

/* 电工班组 - 送电牌（绿色） */
.card-electrician-power {
    background: linear-gradient(145deg, #f8fffc, #ebfff6);
    border-left: 4px solid #28a745 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(40, 167, 69, 0.2);
}

.card-electrician-power .card-body {
    background-color: transparent;
}

.card-electrician-power .card-title {
    color: #198754;
}

.card-electrician-power .card-title::after {
    background-color: #198754;
}

.card-electrician-power::before {
    content: '⚡';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    color: rgba(25, 135, 84, 0.3);
    font-weight: bold;
}

/* 电工班组 - 待送电牌（黄色） */
.card-electrician-pending-power {
    background: linear-gradient(145deg, #fffcf5, #fff8e1);
    border-left: 4px solid #ffc107 !important;
    box-shadow: 0 0.125rem 0.25rem rgba(255, 193, 7, 0.2);
}

.card-electrician-pending-power .card-body {
    background-color: transparent;
}

.card-electrician-pending-power .card-title {
    color: #e6a800;
}

.card-electrician-pending-power .card-title::after {
    background-color: #ffc107;
}

.card-electrician-pending-power::before {
    content: '⌛';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    color: rgba(255, 193, 7, 0.4);
    font-weight: bold;
}

/* 设备状态标签 */
.status-label {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    padding: 1.5rem !important;
    position: relative !important;
    left: 10px !important; /* 向右偏移以修正居中位置 */
}

/* 操作牌标签（绿色） - 非电工班组 */
.status-operation {
    background-color: #e8f5e9;
    color: #28a745;
}

/* 检修牌标签（红色） - 非电工班组 */
.status-maintenance {
    background-color: #ffebee;
    color: #dc3545;
}

/* 送电牌标签（绿色） - 电工班组 */
.status-power {
    background-color: #e8f5e9;
    color: #28a745;
}

/* 待送电牌标签（黄色） - 电工班组 */
.status-pending-power {
    background-color: #fff3cd;
    color: #ffc107;
}

/* 电工班组 - 操作牌特殊样式 */
.card-electrician-operation .status-maintenance {
    background-color: #ffebee;
    color: #dc3545;
}

/* 响应式调整 */
@media (max-width: 767.98px) {
    .sidebar {
        position: fixed;
        width: 100%;
        height: auto;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        padding: 0.5rem;
        z-index: 1030;
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: center;
        border-top: 1px solid #dee2e6;
        border-right: none;
    }

    .sidebar.collapsed {
        width: 100%;
        padding: 0.5rem;
    }

    .sidebar-toggle {
        display: none;
    }

    .btn-group-vertical {
        flex-direction: row !important;
        width: auto !important;
        margin: 0 !important;
    }

    .sidebar .btn {
        padding: 0.5rem;
        margin: 0 0.25rem;
        width: auto;
        border-radius: 0.5rem;
        font-size: 0.8rem;
    }

    .sidebar .btn i {
        margin: 0;
        font-size: 1.2rem;
    }

    .sidebar .btn span {
        display: none;
    }

    .sidebar-title {
        display: none;
    }

    .main-content {
        margin-left: 0 !important;
        margin-bottom: 80px;
        padding: 0.5rem;
    }

    .main-content.sidebar-collapsed {
        margin-left: 0;
    }

    .device-card {
        margin: 0.5rem 0;
    }

    .device-card .card-body {
        padding: 1rem;
    }

    .device-card .card-title {
        font-size: 1.5rem;
        padding: 1rem;
    }

    .navbar-brand {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }

    .btn-toolbar {
        position: static;
        margin: 1rem 0;
        padding: 0;
        width: 100%;
    }

    .btn-toolbar .btn-group {
        margin-bottom: 0.5rem;
        width: 100%;
    }

    .btn-toolbar .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .maintenance-record-item.compact {
        padding: 0.5rem;
    }

    .record-flex-row {
        flex-direction: column;
        gap: 0.3rem;
    }

    .time-info.compact,
    .applicant-info.compact {
        width: 100%;
        white-space: normal;
    }

    .phone-row {
        width: 100%;
        text-align: left;
    }

    .status-label {
        font-size: 1.25rem;
        padding: 1rem;
        left: 0;
    }

    .d-flex.justify-content-between.flex-wrap.flex-md-nowrap {
        flex-direction: column;
    }

    h1.h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        width: 100%;
        text-align: center;
    }
}

/* 平板设备的响应式布局 */
@media (min-width: 768px) and (max-width: 991.98px) {
    .main-content {
        margin-left: 60px;
    }

    .sidebar {
        width: 60px;
    }

    .sidebar .btn span {
        display: none;
    }

    .sidebar .btn {
        padding: 0.75rem;
        justify-content: center;
    }

    .sidebar .btn i {
        margin: 0;
    }

    .device-card {
        margin: 0.5rem;
    }
}

/* 确保在不同设备上的滚动行为一致 */
@media (hover: none) and (pointer: coarse) {
    .maintenance-records-list {
        -webkit-overflow-scrolling: touch;
    }
}

/* 优化触摸屏交互 */
@media (hover: none) {
    .btn,
    .device-card,
    .maintenance-record-item {
        cursor: default;
    }

    .btn:active,
    .device-card:active,
    .maintenance-record-item:active {
        transform: scale(0.98);
    }
}

/* 中等屏幕尺寸调整 */
@media (min-width: 768px) and (max-width: 991.98px) {
    main .col {
        min-width: 250px; /* 稍小一点的尺寸 */
        max-width: 250px;
        flex: 0 0 250px;
    }
}

/* 导出按钮样式 */
.btn-outline-primary {
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    border-width: 2px;
}

.btn-outline-primary svg {
    margin-right: 8px;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.15);
    background-color: #0d6efd;
    color: white;
}

.btn-outline-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.15);
}

/* 主内容区域优化 */
main {
    padding-top: 1rem;
    padding-bottom: 2rem;
    transition: all 0.3s ease;
}

/* 加载指示器 */
.spinner-border {
    color: #0d6efd;
}

/* 登录页面美化 */
.card.login-card {
    border-radius: 1.5rem;
    box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.2);
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
    transform: scale(1.1); /* 整体放大 */
}

.card-header.bg-primary {
    background: linear-gradient(45deg, #007bff, #6610f2) !important;
    padding: 2rem;
    text-align: center;
}

.card-header.bg-primary h4 {
    font-size: 1.6rem;
    font-weight: 600;
}

.card-header.bg-primary p {
    font-size: 1rem;
    margin-top: 0.75rem !important;
}

.card.login-card .card-body {
    padding: 2.5rem !important;
    height: auto !important; /* 确保不受设备卡片样式影响 */
    overflow: visible !important; /* 确保内容不会被截断 */
}

.card.login-card .form-label {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.card.login-card .form-control {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
    height: auto;
}

.card.login-card .input-group-text {
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
}

.card.login-card .btn-primary {
    background: linear-gradient(45deg, #007bff, #6610f2);
    border: none;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.card.login-card .btn-primary:hover {
    background: linear-gradient(45deg, #0069d9, #5e0ae6);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(13, 110, 253, 0.25);
}

/* 登录页面响应式布局 */
@media (max-width: 767.98px) {
    .card.login-card {
        transform: scale(1);
        margin: 0 1rem;
    }
    
    .col-md-6 {
        width: 90%;
        margin: 0 auto;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.row {
    animation: fadeIn 0.5s ease-out;
}

/* 设备卡片交互提示 */
.card {
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 设备卡片基础样式 */
.device-card {
    height: 100%;
    min-height: 300px;
    transition: transform 0.3s ease;
    border-radius: 0.5rem;
    overflow: hidden;
}

.device-card .card-body {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    height: 100%;
}

/* 设备名称样式 */
.device-card .card-title {
    font-size: 2rem;
    font-weight: 600;
    margin: -1.25rem -1.25rem 1rem -1.25rem;
    padding: 1.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* 设备信息区域 */
.device-card .card-text {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* 检修信息列表区域 */
.device-card .maintenance-records-list {
    flex: 1;
    overflow-y: auto;
    margin: 0.5rem -0.5rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
}

/* 状态标签样式 */
.device-card .status-label {
    margin: 0 -1.25rem -1.25rem -1.25rem;
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
    font-size: 1.75rem;
    font-weight: 600;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    position: relative;
    left: 10px; /* 向右偏移以修正居中位置 */
}

.device-card .status-label i {
    margin-right: 0.75rem;
    font-size: 1.75rem;
    display: inline-flex;
    align-items: center;
}

/* 确保图标垂直对齐 */
.status-label i {
    vertical-align: middle;
}

/* 设备卡片悬停效果 */
.device-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 检修信息区域样式优化 - 固定高度和位置 */
.maintenance-records-list {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: transparent !important;
    position: relative;  /* 相对定位，方便内部元素绝对定位 */
    display: flex;
    flex-direction: column;
}

/* 设备卡片结构优化 */
.device-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

/* 固定内容区域布局 */
.device-card .card-body {
    display: flex;
    flex-direction: column;
}

.device-card .card-title {
    flex: 0 0 auto; /* 固定高度，不伸缩 */
}

.device-card .card-text {
    flex: 0 0 auto; /* 固定高度，不伸缩 */
}

.device-card .maintenance-records-list {
    flex: 1 0 auto; /* 伸缩填充，但保持最小高度 */
}

.device-card .status-label {
    flex: 0 0 auto; /* 固定高度，不伸缩 */
    align-self: flex-start;
    margin-top: auto; /* 推到底部 */
}

/* 维护记录项目过渡动画，防止闪烁 */
.maintenance-record-item {
    padding: 0.5rem 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    transition: all 0.3s ease; /* 添加过渡效果 */
}

/* 紧凑型记录样式 */
.maintenance-record-item.compact {
    padding: 0.3rem;
    margin-top: 0.3rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    border: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* 无记录提示居中显示 */
.no-records-message {
    padding: 0.75rem 0;
    color: #6c757d;
    text-align: center;
    font-style: italic;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
}

/* 记录状态和申请人信息样式优化 */
.record-status {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.record-info {
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

/* 紧凑型记录信息 */
.record-info.compact {
    margin-top: 0.2rem;
}

.record-flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.applicant-info {
    margin-top: 0.3rem;
    font-size: 0.85rem;
}

/* 紧凑型申请人信息 */
.applicant-info.compact {
    margin-top: 0;
    white-space: nowrap;
    color: #495057;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 0.15rem 0.4rem;
    border-radius: 1rem;
    font-size: 0.8rem;
}

.applicant-info.compact i {
    margin-right: 0.2rem;
    color: #6c757d;
}

/* 紧凑型部门信息 */
.applicant-info .department-info {
    color: #6c757d;
    font-size: 0.75rem;
    margin-left: 0.2rem;
}

/* 紧凑型电话信息 */
.applicant-info .phone-info {
    margin-left: 0.5rem;
    white-space: nowrap;
    color: #0d6efd;
}

.applicant-info .department {
    color: #6c757d;
}

/* 时间信息样式 */
.time-info {
    margin: 0.3rem 0;
    font-size: 0.85rem;
}

/* 紧凑型时间信息 */
.time-info.compact {
    margin: 0;
    white-space: nowrap;
    color: #495057;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 0.15rem 0.4rem;
    border-radius: 1rem;
    font-size: 0.8rem;
}

.time-info.compact i {
    margin-right: 0.2rem;
    color: #6c757d;
}

/* 描述文本紧凑样式 */
.description.compact {
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: #495057;
    padding: 0.2rem 0;
}

.time-info .time-period {
    color: #495057;
    display: block;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 0.25rem 0.5rem;
    border-radius: 0.2rem;
    border-left: 3px solid #6c757d;
}

.time-info .bi {
    margin-right: 0.3rem;
    color: #6c757d;
}

.applicant-info .phone {
    display: block;
    color: #0d6efd;
    margin-top: 0.2rem;
    font-size: 0.85rem;
}

.card-operation::after,
.card-electrician-power::after {
    background-color: rgba(25, 135, 84, 0.9);
    color: white;
}

.card-maintenance::after,
.card-electrician-operation::after {
    background-color: rgba(220, 53, 69, 0.9);
    color: white;
}

/* 添加一些交互动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.btn-outline-primary:active {
    animation: pulse 0.3s;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 选择器样式优化 */
.form-select {
    border-radius: 0.375rem;
    transition: all 0.2s ease-in-out;
    box-shadow: none;
    border: 1px solid #ced4da;
}

.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* 侧边栏样式优化 */
.sidebar-heading {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
    font-weight: 600;
    color: #6c757d;
    margin-top: 1rem;
}

.nav-heading {
    border-bottom: 1px solid rgba(0,0,0,.05);
}

.location-info .card {
    border-radius: 0.5rem;
    background-color: rgba(13, 110, 253, 0.05) !important;
    border-left: 3px solid #0d6efd;
    height: auto !important; /* 覆盖设备卡片高度限制 */
}

.location-info .card-title {
    color: #0d6efd;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.location-info .card-text {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.5;
}

/* 状态图标样式 */
.status-label i {
    margin-right: 0.25rem;
}

/* 错误通知样式 */
.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    padding: 15px;
    z-index: 1050;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid #dc3545;
}

.error-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.error-icon {
    color: #dc3545;
    font-size: 1.5rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.error-message {
    flex: 1;
    font-size: 0.9rem;
    color: #343a40;
    font-weight: 500;
}

.error-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.error-close:hover {
    color: #343a40;
}

/* 离线模式标识 */
.offline-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: rgba(255, 193, 7, 0.95);
    color: #343a40;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.3s ease;
}

.offline-indicator.visible {
    opacity: 1;
    transform: translateY(0);
}

.offline-indicator i {
    margin-right: 8px;
    font-size: 1rem;
}

/* 空状态样式 */
.empty-state {
    padding: 40px 0;
}

.empty-state .empty-state-icon {
    font-size: 3rem;
    color: #adb5bd;
    margin-bottom: 1rem;
}

.empty-state h4 {
    color: #495057;
    font-weight: 500;
}

.empty-state p {
    color: #6c757d;
    max-width: 400px;
    margin: 0 auto;
}

/* 状态变更通知样式 */
.status-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    padding: 15px;
    z-index: 1050;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid #0d6efd; /* 蓝色边框，表示状态变更 */
}

.status-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.status-icon {
    color: #0d6efd;
    font-size: 1.5rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.status-message {
    flex: 1;
    font-size: 0.9rem;
    color: #343a40;
    font-weight: 500;
}

.status-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.status-close:hover {
    color: #343a40;
}

/* 当状态通知和错误通知同时出现时的定位调整 */
.status-notification:nth-of-type(1) {
    top: 20px;
}

.status-notification:nth-of-type(2) {
    top: 100px;
}

/* 状态自动刷新标识 */
.refresh-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(13, 110, 253, 0.2);
    color: #0d6efd;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    z-index: 900;
}

.refresh-indicator i {
    margin-right: 6px;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 流程控制面板样式 */
.flow-control .card {
    background: #f8f9fa;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    height: auto !important; /* 覆盖设备卡片高度限制 */
}

.flow-control .card:hover {
    background: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.flow-control .card-title {
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.flow-control .form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

.flow-control .form-check-label {
    font-size: 0.9rem;
    color: #495057;
}

.flow-state-info {
    background-color: #f1f1f1;
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.flow-state-info p {
    font-weight: 600;
    color: #495057;
}

.flow-state-info ul {
    margin-bottom: 0;
}

.flow-state-info li {
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}

/* 流程模拟提示样式 */
.flow-control .alert-info {
    background-color: #e8f4f8;
    border-color: #d1e7f0;
    color: #0c5460;
}

.flow-control .text-muted {
    color: #6c757d !important;
    font-size: 0.75rem;
}

/* 设备卡片列样式 */
main .col {
    min-width: 300px; /* 最小宽度 */
    max-width: 300px; /* 最大宽度 */
    flex: 0 0 300px; /* 固定宽度 */
    margin-bottom: 1rem;
}

/* 添加全局按钮样式 */
.btn-primary {
    background: linear-gradient(45deg, #007bff, #6610f2);
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0069d9, #5e0ae6);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
}

/* 维护信息样式 */
.maintenance-description {
    display: block;
    margin-top: 5px;
    background-color: #f8f9fa;
    padding: 5px;
    border-radius: 4px;
    font-size: 0.85rem;
    border-left: 3px solid #6c757d;
}

.card-maintenance .maintenance-description {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

.card-operation .maintenance-description {
    border-left-color: #28a745;
    background-color: #d4edda;
}

.card-electrician-power .maintenance-description {
    border-left-color: #28a745;
    background-color: #d4edda;
}

.card-electrician-operation .maintenance-description {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

/* 检修记录列表样式 */
.maintenance-records-list {
    margin-top: 10px;
    margin-bottom: 15px;
}

.maintenance-record-item {
    border-left: 3px solid #6c757d;
    background-color: #f8f9fa;
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.card-maintenance .maintenance-record-item {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

.card-operation .maintenance-record-item {
    border-left-color: #28a745;
    background-color: #d4edda;
}

.card-electrician-power .maintenance-record-item {
    border-left-color: #28a745;
    background-color: #d4edda;
}

.card-electrician-operation .maintenance-record-item {
    border-left-color: #dc3545;
    background-color: #f8d7da;
}

.record-status {
    font-weight: bold;
    margin-bottom: 3px;
}

.record-info {
    padding-left: 5px;
    font-size: 0.85rem;
}

.applicant-info {
    margin-top: 3px;
}

.applicant-info .department {
    color: #666;
    font-style: italic;
}

.power-status {
    margin-top: 3px;
    font-weight: bold;
}

.status-inprogress {
    color: #fd7e14;
}

.status-approved {
    color: #0d6efd;
}

.status-requested {
    color: #6c757d;
}

.status-completed {
    color: #198754;
}

/* Vue过渡动画效果 */
.fade-enter-active, 
.fade-leave-active {
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 200px;
    opacity: 1;
    margin-bottom: 8px;
    overflow: hidden;
}

.fade-enter-from {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
    margin-bottom: 0;
}

.fade-leave-to {
    opacity: 0;
    transform: translateY(20px);
    max-height: 0;
    margin-bottom: 0;
}

/* 维护记录整体容器的过渡 */
.maintenance-records-list {
    transition: min-height 0.5s ease-out;
}

/* 维护记录项目过渡优化 */
.maintenance-record-item {
    transition: all 0.5s ease;
    transform-origin: top center;
    will-change: transform, opacity, height;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* 无记录提示过渡 */
.no-records-message {
    transition: opacity 0.3s ease;
}

/* 强制设备卡片保持固定高度 */
.device-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 修复嵌套的flex布局问题 */
.device-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 确保检修信息区域在没有记录时仍然保持最小高度 */
.device-card .maintenance-records-list {
    flex: 1;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

/* 状态标签固定在底部 */
.device-card .status-label {
    margin-top: auto;
}

/* 过滤按钮样式 */
.btn-outline-secondary.active {
    background-color: #6c757d;
    color: white;
}

.btn-group .btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 确保列表项目最后一个没有下边框 */
.maintenance-record-item:last-child {
    border-bottom: none;
}

/* 电工班组 - 操作牌标签（红色） */
.card-electrician-operation .status-label {
    color: #dc3545;
}

/* 电工班组 - 送电牌标签（绿色） */
.card-electrician-power .status-label {
    color: #28a745;
}

/* 电工班组 - 待送电牌标签（黄色） */
.card-electrician-pending-power .status-label {
    color: #ffc107;
}

/* 其他班组 - 操作牌标签（绿色） */
.card-operation .status-label {
    color: #28a745;
}

/* 其他班组 - 检修牌标签（红色） */
.card-maintenance .status-label {
    color: #dc3545;
}

/* 侧边栏收起按钮 */
.sidebar-toggle {
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 1px solid #dee2e6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin: 0; /* 确保没有边距影响位置 */
}

.sidebar.collapsed .sidebar-toggle {
    right: 0px; /* 将按钮位置回调，以便在收起状态下也能完全可见 */
}

.sidebar.collapsed .btn-group-vertical {
    margin-top: 5rem; /* 增加顶部间距，解决煤场按钮太靠上的问题 */
}

.sidebar-toggle:hover {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    transform: translateY(-50%) translateX(2px);
}

.sidebar-toggle i {
    transition: transform 0.3s ease;
    color: #0d6efd;
}

/* 侧边栏按钮样式 */
.sidebar .btn {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease, padding 0.3s ease;
    border: none;
    text-align: left;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.sidebar .btn i {
    font-size: 1.2rem;
    margin-right: 0.75rem;
    transition: margin 0.3s ease;
    flex-shrink: 0;
}

.sidebar .btn span {
    white-space: nowrap;
    opacity: 1;
    transform: translateX(0);
    display: inline-block;
    overflow: hidden;
    width: auto;
    max-width: 150px;
    transition: opacity 0.5s ease, transform 0.5s ease, max-width 0.5s ease, margin 0.5s ease;
}

.sidebar.collapsed .btn span {
    opacity: 0;
    transform: translateX(-20px);
    max-width: 0;
    margin-left: 0;
}

.sidebar.collapsed .btn {
    padding: 0.75rem;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 0.5rem;
}

.sidebar.collapsed .btn i {
    margin: 0;
    font-size: 1.25rem;
}

/* 主内容区域样式 */
.main-content {
    margin-left: 200px;
    padding: 1rem;
    transition: margin-left 0.3s ease;
}

/* 主内容区域在侧边栏收起时的样式 */
.main-content.sidebar-collapsed {
    margin-left: 60px;
}

/* 侧边栏标题过渡效果 */
.sidebar-title {
    display: flex;
    align-items: center;
    padding: 0 0.5rem 1rem 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar-title i {
    font-size: 1.1rem;
    margin-right: 0.5rem;
    color: #0d6efd;
    transition: all 0.3s ease;
}

.sidebar-title span {
    white-space: nowrap;
    opacity: 1;
    transform: translateX(0);
    display: inline-block;
    overflow: hidden;
    max-width: 150px;
    transition: opacity 0.5s ease, transform 0.5s ease, max-width 0.5s ease;
}

.sidebar.collapsed .sidebar-title span {
    opacity: 0;
    transform: translateX(-20px);
    max-width: 0;
}

/* 顶部按钮工具栏优化 */
.btn-toolbar {
    display: flex;
    flex-wrap: wrap;
    margin-left: auto;
    padding-left: 1rem;
    position: absolute;
    right: 200px; /* 向左移动固定距离 */
    transition: none; /* 禁用过渡效果，确保位置不受侧边栏影响 */
}

/* 为顶部标题区域添加更好的响应式支持 */
.d-flex.justify-content-between.flex-wrap {
    margin-right: 1rem;
    position: relative; /* 为绝对定位的子元素提供参考 */
}

@media (max-width: 991.98px) {
    .btn-toolbar {
        position: static; /* 在小屏幕上恢复正常流布局 */
        margin-top: 1rem;
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        right: auto;
    }
    
    .btn-toolbar .btn-group,
    .btn-toolbar .btn {
        margin-bottom: 0.5rem;
    }
    
    /* 页面标题在小屏幕上调整大小 */
    h1.h2 {
        font-size: 1.5rem;
    }
}

/* 按钮组样式调整 */
.btn-toolbar .btn-group {
    margin-right: 0.5rem;
}

.btn-toolbar .btn {
    white-space: nowrap;
    padding: 0.375rem 0.75rem;
}

/* 电话号码样式 */
.phone-row {
    color: #0d6efd;
    font-size: 0.8rem;
    margin-top: 0.2rem;
    padding: 0.1rem 0.3rem;
    background-color: rgba(13, 110, 253, 0.05);
    border-radius: 0.25rem;
    display: inline-block;
}

.phone-row i {
    margin-right: 0.2rem;
    color: #0d6efd;
}

/* 成功通知样式 */
.success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 320px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    padding: 15px;
    z-index: 1050;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    border-left: 4px solid #28a745;
}

.success-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.success-icon {
    color: #28a745;
    font-size: 1.5rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.success-message {
    flex: 1;
    font-size: 0.9rem;
    color: #343a40;
    font-weight: 500;
}

.success-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.success-close:hover {
    color: #343a40;
}