* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

:root {
    --bg-body: #edf3fa;
    --bg-header: linear-gradient(to right, #2055a0, #3b82c4);
    --border-header: transparent;
    --bg-sidebar: #f0f5fc;
    --border-sidebar: #d6e4f5;
    --menu-active-bg: #bfdaf5;
    --menu-active-color: #1a5fb4;
    --submenu-bg: #f4f8fc;
    --nav-active-bg: #ddebf8;
    --nav-active-color: #1a5fb4;
    --card-shadow: 0 1px 4px rgba(26,95,180,0.08);
    --table-head-bg: #eaf1f9;
    --btn-primary: #2a6dc9;
    --btn-primary-hover: #1f5aac;
    --filter-focus-shadow: rgba(42,109,201,0.1);
    --td-border: #e2eaf4;
    --period-tag-bg: #eef4fb;
    --period-tag-border: #b8cfe8;
    --period-tag-color: #1a5fb4;
}

body {
    background-color: #f2f5f9;
    background-image: radial-gradient(circle, #dce2ea 1px, transparent 1px);
    background-size: 20px 20px;
    color: #333;
    font-size: 13px;
}

/* 登录遮罩 */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    border-radius: 8px;
    padding: 40px 36px;
    width: 380px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    text-align: center;
}

.login-card h2 {
    font-size: 22px;
    color: #1a5fb4;
    margin-bottom: 8px;
}

.login-card .login-subtitle {
    font-size: 13px;
    color: #999;
    margin-bottom: 28px;
}

.login-card .form-group {
    margin-bottom: 18px;
    text-align: left;
}

.login-card .form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-weight: 500;
    font-size: 13px;
}

.login-card .form-group input {
    width: 100%;
    height: 40px;
    border: 1px solid #dce4f0;
    border-radius: 4px;
    padding: 0 12px;
    outline: none;
    font-size: 14px;
}

.login-card .form-group input:focus {
    border-color: #4096ff;
}

.login-card .btn-login {
    width: 100%;
    height: 42px;
    background-color: var(--btn-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    margin-top: 8px;
    transition: all 0.2s;
}

.login-card .btn-login:hover {
    background-color: var(--btn-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.login-error {
    color: #ff4d4f;
    font-size: 13px;
    min-height: 20px;
    margin-top: 8px;
}

/* 用户信息栏 */
.user-info-bar {
    position: absolute;
    right: 20px;
    top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 13px;
    z-index: 100;
}

.user-info-bar .btn-logout {
    padding: 4px 12px;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 4px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.user-info-bar .btn-logout:hover {
    background: rgba(255,255,255,0.2);
}

.user-info-bar .role-tag {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.user-info-bar .role-tag.admin {
    background: #ff4d4f;
    color: #fff;
}

.user-info-bar .role-tag.user {
    background: #52c41a;
    color: #fff;
}

/* 页面标题 */
.header-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    padding: 16px 20px 12px;
    letter-spacing: 2px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-header);
    position: relative;
}

/* 顶部导航栏 */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 99;
    background-color: #eceff5;
    display: flex;
    align-items: center;
    padding: 0 0 0 4px;
    border-bottom: 1px solid #d0dceb;
    margin: 8px 0 16px;
    height: 42px;
}

.top-nav-links {
    display: flex;
    gap: 0;
    align-items: center;
}

.nav-link {
    padding: 0 16px;
    line-height: 42px;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    border-top: 2px solid transparent;
}

.nav-link.active {
    background: var(--nav-active-bg);
    color: var(--nav-active-color);
    border-top: 2px solid var(--nav-active-color);
}

.nav-link .tab-close {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 16px;
    text-align: center;
    font-size: 14px;
    color: #999;
    border-radius: 50%;
    cursor: pointer;
}

.nav-link .tab-close:hover {
    background-color: #ff4d4f;
    color: #fff;
}

/* 主体布局 */
.layout {
    display: flex;
    height: calc(100vh - 52px);
}

/* 左侧菜单 */
.sidebar {
    width: 200px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-sidebar);
    padding: 10px 0;
}

.sidebar-search {
    padding: 0 15px 15px;
}

.sidebar-search input {
    width: 100%;
    height: 36px;
    border: 1px solid #dce4f0;
    border-radius: 4px;
    padding: 0 10px;
    outline: none;
}

.menu-group {
    margin-bottom: 5px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #555;
    cursor: pointer;
    gap: 8px;
}

.menu-item.active {
    background-color: var(--menu-active-bg);
    color: var(--menu-active-color);
}

.menu-item .arrow {
    margin-left: auto;
    font-size: 12px;
}

.menu-disabled {
    color: #bbb !important;
    cursor: not-allowed;
    pointer-events: none;
}

.submenu {
    background-color: var(--submenu-bg);
}
.submenu.collapsed {
    display: none;
}

.submenu .menu-item {
    padding-left: 35px;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 0 20px 20px;
    overflow-y: auto;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #1a1a1a;
}

/* 筛选区 */
.filter-section {
    background-color: #fff;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    box-shadow: var(--card-shadow);
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-item label {
    white-space: nowrap;
    color: #555;
    font-weight: 500;
    font-size: 12px;
}

.filter-item select,
.filter-item input {
    height: 34px;
    border: 1px solid #dce4f0;
    border-radius: 4px;
    padding: 0 8px;
    min-width: 90px;
    outline: none;
    font-size: 13px;
}

.filter-item select:focus,
.filter-item input:focus {
    border-color: var(--btn-primary);
    box-shadow: 0 0 0 2px var(--filter-focus-shadow);
}

.filter-btn-group {
    width: 100%;
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn {
    height: 34px;
    padding: 0 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.btn-primary {
    background-color: var(--btn-primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--btn-primary-hover);
}

/* 表格区域 */
.table-wrapper {
    background-color: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.table-wrapper .table-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead {
    background: var(--table-head-bg);
}

th {
    text-align: center;
}

td {
    text-align: center;
}

th, td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--td-border);
    white-space: nowrap;
}

/* 项目明细表格列宽 */
#listContent th:nth-child(1) { width: 44px; }
#listContent th:nth-child(5) { width: 80px; }
#listContent th:nth-child(7) { width: 90px; }
#listContent th:nth-child(8) { width: 120px; }

#listContent td:nth-child(4),
#listContent td:nth-child(6) {
    white-space: normal;
    word-wrap: break-word;
    vertical-align: top;
}

#listContent td:nth-child(4) { max-width: 180px; }
#listContent td:nth-child(6) { max-width: 200px; }

.progress-content {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: 3em;
}

.empty-table {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

/* 详情页样式 */
.detail-view {
    display: none;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.detail-header .btn-back {
    height: 36px;
    padding: 0 16px;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.detail-header .btn-back:hover {
    border-color: #4096ff;
    color: #4096ff;
}

.detail-info-card {
    background-color: #fff;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
}

.detail-info-card h4 {
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--menu-active-color);
    color: var(--menu-active-color);
}

.detail-info-row {
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.detail-info-row span {
    color: #666;
    font-size: 13px;
}

.detail-info-row strong {
    color: #1a1a1a;
    margin-left: 4px;
    font-weight: 600;
}

.detail-info-meta {
    margin-top: 4px;
    padding-top: 4px;
}

.detail-info-meta span {
    color: #888;
    font-size: 13px;
}

.period-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.period-tag {
    background-color: var(--period-tag-bg);
    border: 1px solid var(--period-tag-border);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 13px;
}

.period-tag .tag-name {
    font-weight: 600;
    color: var(--period-tag-color);
}

.period-tag .tag-info {
    color: #555;
    margin-left: 8px;
}

.progress-log-section {
    background-color: #fff;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: var(--card-shadow);
}

.progress-log-section h4 {
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--menu-active-color);
    color: var(--menu-active-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-log-table {
    margin-top: 8px;
    overflow-x: auto;
}

.progress-log-table table {
    table-layout: fixed;
    width: 100%;
    min-width: 600px;
    font-size: 12px;
}

.progress-log-table th,
.progress-log-table td {
    padding: 6px 8px;
    text-align: center;
    border-bottom: 1px solid #f0f2f5;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-log-table th {
    background-color: var(--table-head-bg);
    color: #555;
    font-weight: 600;
}

.progress-log-table th:nth-child(1) { width: 40px; }
.progress-log-table th:nth-child(2) { width: 70px; }
.progress-log-table th:nth-child(3) { width: auto; }
.progress-log-table th:nth-child(4) { width: 100px; }
.progress-log-table th:nth-child(5) { width: 100px; }
.progress-log-table th:nth-child(6) { width: 60px; }

.progress-log-table td:nth-child(3) {
    text-align: left;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
}

.prog-log-content {
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
}

.add-log-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    align-items: flex-end;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
}

.add-log-form .form-group {
    margin-bottom: 0;
    flex: 3;
    min-width: 280px;
}

.add-log-form .alert-options {
    display: flex;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.add-log-form .alert-options .form-group {
    flex: 1;
    min-width: 90px;
}

.add-log-form .form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: #666;
}

.add-log-form .form-group input,
.add-log-form .form-group select {
    width: 100%;
    height: 32px;
    border: 1px solid #dce4f0;
    border-radius: 4px;
    padding: 0 8px;
    outline: none;
    font-size: 12px;
}

.add-log-form .form-group input:focus,
.add-log-form .form-group select:focus {
    border-color: #4096ff;
}

.add-log-form .btn {
    height: 32px;
    flex-shrink: 0;
    font-size: 12px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 15px 20px;
    gap: 10px;
}

.page-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #dce4f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
}

.page-btn.active {
    background-color: #4096ff;
    color: #fff;
    border-color: #4096ff;
}

.page-input {
    width: 60px;
    height: 32px;
    border: 1px solid #dce4f0;
    border-radius: 4px;
    padding: 0 8px;
    text-align: center;
}

/* 右侧悬浮按钮 */
.float-btn-group {
    position: fixed;
    right: 20px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.float-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.float-btn.ai {
    background-color: #e6f4ff;
    color: #4096ff;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.close {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-weight: 500;
}

.form-group select,
.form-group input {
    width: 100%;
    height: 40px;
    border: 1px solid #dce4f0;
    border-radius: 4px;
    padding: 0 12px;
    outline: none;
    font-size: 14px;
}

.form-group select:focus,
.form-group input:focus {
    border-color: #4096ff;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #eee;
}

.btn-cancel {
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #d9d9d9;
}

.btn-cancel:hover {
    background-color: #e8e8e8;
}

/* 操作按钮样式 */
.btn-small {
    padding: 3px 7px;
    font-size: 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-right: 4px;
}

.btn-edit {
    background-color: #1890ff;
    color: white;
}

.btn-edit:hover {
    background-color: #40a9ff;
}

.btn-delete {
    background-color: #ff4d4f;
    color: white;
}

.btn-delete:hover {
    background-color: #ff7875;
}

.btn-pin {
    background-color: #f0f0f0;
    color: #999;
    font-size: 11px;
    padding: 3px 6px;
}

.btn-pin:hover {
    background-color: #e6f7ff;
    color: #1890ff;
}

.btn-pin.pinned {
    background-color: #e6f7ff;
    color: #1890ff;
}

.btn-pin.pinned:hover {
    background-color: #bae7ff;
}

/* 复选框样式 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 400px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    margin-right: 0;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 6px;
    width: 16px;
    height: 16px;
    accent-color: #4096ff;
    cursor: pointer;
}

.checkbox-label:hover {
    color: #4096ff;
}

/* 模态框中的复选框样式 */
.modal .checkbox-group {
    max-width: 100%;
    gap: 10px;
}

.modal .checkbox-label {
    font-size: 14px;
}

/* 模态框期次布局样式 */
.period-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 4px 0;
}

.period-item {
    padding: 5px 16px;
    transition: all 0.2s;
    border-bottom: 1px solid #f5f5f5;
}

.period-item:last-child { border-bottom: none; }

.period-item.has-detail {
    background-color: #fafbff;
}

.period-item .checkbox-label {
    display: block;
    font-weight: 500;
    font-size: 14px;
}

.period-detail {
    display: none;
    margin-top: 4px;
    padding-left: 20px;
}

.period-detail.show {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.period-detail label {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
    font-weight: normal;
}

.period-detail input[type="number"] {
    width: 60px;
    height: 28px;
    border: 1px solid #dce4f0;
    border-radius: 4px;
    padding: 0 6px;
    outline: none;
    font-size: 13px;
    text-align: center;
}

.period-detail input[type="number"]:focus {
    border-color: #4096ff;
}

.period-detail textarea.period-numbers {
    width: 100%;
    min-width: 260px;
    height: 28px;
    border: 1px solid #dce4f0;
    border-radius: 4px;
    padding: 3px 8px;
    outline: none;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    overflow-y: hidden;
    line-height: 22px;
}

.period-detail textarea.period-numbers:focus {
    border-color: #4096ff;
    height: auto;
    min-height: 50px;
    overflow-y: auto;
}

.pending-input {
    display: none;
    margin-top: 8px;
}

.pending-input.show {
    display: inline-flex;
    align-items: center;
}

.modal-checkbox-group {
    display: block;
}

.checkbox-row {
    display: contents;
}

/* 下拉复选框样式 */
.dropdown-checkbox {
    position: relative;
    min-width: 110px;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 34px;
    border: 1px solid #dce4f0;
    border-radius: 4px;
    padding: 0 8px;
    background-color: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    min-width: 110px;
}

.dropdown-toggle:hover {
    border-color: #4096ff;
}

.dropdown-arrow {
    font-size: 12px;
    color: #999;
    transition: transform 0.2s;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #dce4f0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 4px;
    width: 200px;
}

.dropdown-content {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-content .checkbox-label {
    margin: 0;
    padding: 6px 10px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
}

.dropdown-content .checkbox-label:hover {
    background-color: #f5f5f5;
}

.dropdown-content input[type="checkbox"] {
    margin: 0;
    width: 14px;
    height: 14px;
    min-width: 14px;
    accent-color: #4096ff;
}

/* 预警角标 */
.alert-badge {
    display: inline-block;
    background-color: #ff4d4f;
    color: #fff;
    font-size: 11px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    padding: 0 5px;
    margin-left: 6px;
    font-weight: 600;
}

.alert-badge:empty {
    display: none;
}

.menu-item .alert-badge {
    margin-left: auto;
    margin-right: 0;
}

/* 预警页面 */
.alert-section {
    margin-bottom: 24px;
}

.alert-section-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-section-title .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.alert-section-title .dot.overdue { background-color: #ff4d4f; }
.alert-section-title .dot.today { background-color: #faad14; }

.alert-empty {
    text-align: center;
    padding: 60px 0;
    color: #999;
    font-size: 14px;
}

tr.row-overdue {
    background-color: #fff1f0;
}

tr.row-overdue:hover {
    background-color: #ffe0df !important;
}

tr.row-today {
    background-color: #fffbe6;
}

tr.row-today:hover {
    background-color: #fff7cc !important;
}

.alert-options {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.alert-options .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 160px;
}

.alert-options .form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: #666;
}

.alert-options .form-group input[type="date"] {
    width: 100%;
    height: 38px;
    border: 1px solid #dce4f0;
    border-radius: 6px;
    padding: 0 10px;
    outline: none;
    font-size: 13px;
}

.alert-options .form-group input[type="date"]:focus {
    border-color: #4096ff;
}

.alert-options .form-group select {
    width: 100%;
    height: 38px;
    border: 1px solid #dce4f0;
    border-radius: 6px;
    padding: 0 10px;
    outline: none;
    font-size: 13px;
    background-color: #fff;
}

.turbine-section {
    background-color: #fff;
    border-radius: 6px;
    padding: 20px 24px;
    margin-top: 0;
    box-shadow: var(--card-shadow);
}

.turbine-section h4 {
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--menu-active-color);
    color: var(--menu-active-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.turbine-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.turbine-summary span {
    border-radius: 4px;
    padding: 3px 12px;
    font-size: 12px;
}

.turbine-summary .done { background-color: #e6ffed; color: #389e0d; }
.turbine-summary .pending { background-color: #fffbe6; color: #d48806; }
.turbine-summary .none { background-color: #f5f5f5; color: #999; }

.turbine-table {
    font-size: 12px;
    width: 100%;
    border-collapse: collapse;
}

.turbine-table th {
    background-color: var(--table-head-bg);
    color: #555;
    font-weight: 600;
    font-size: 12px;
}

.turbine-table th,
.turbine-table td {
    padding: 5px 6px;
    text-align: center;
    border-bottom: 1px solid #f0f2f5;
    white-space: nowrap;
}

.turbine-table th:nth-child(1) { width: 75px; }
.turbine-table th:nth-child(2) { width: 75px; }
.turbine-table th:nth-child(3) { width: 120px; }
.turbine-table th:nth-child(4) { }
.turbine-table th:nth-child(5) { min-width: 170px; }
.turbine-table th:nth-child(6) { width: 133px; }

.turbine-status-done { color: #389e0d; font-weight: 600; }
.turbine-status-active { color: #d48806; font-weight: 600; }
.turbine-status-none { color: #999; }

.turbine-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.turbine-tab {
    padding: 3px 14px;
    border: 1px solid #d6e4f5;
    border-radius: 14px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
    background-color: #f8fafd;
    transition: all 0.15s;
}

.turbine-tab:hover {
    border-color: var(--menu-active-color);
    color: var(--menu-active-color);
}

.turbine-tab.active {
    background-color: var(--menu-active-color);
    color: #fff;
    border-color: var(--menu-active-color);
}

#turbineDailyNote:focus { border-color: #4096ff; }

/* Toast提示 */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 10px 24px;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: toastIn 0.3s ease;
    white-space: nowrap;
}

.toast-success { background-color: #52c41a; }
.toast-warning { background-color: #faad14; }
.toast-error { background-color: #ff4d4f; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.component-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    margin-bottom: 12px;
}

.component-detail-grid .form-group {
    margin-bottom: 0;
}

.comp-upload-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.comp-upload-row input[type="text"] {
    flex: 1;
}

.comp-upload-btn {
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
    border: 1px solid #dce4f0;
    border-radius: 4px;
    background-color: #fafafa;
    cursor: pointer;
    white-space: nowrap;
}

.comp-upload-btn:hover {
    border-color: #4096ff;
    color: #4096ff;
}

.comp-thumb {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    border: 1px solid #eee;
    object-fit: cover;
    display: none;
    cursor: pointer;
}

.comp-thumb.show {
    display: block;
}

/* 大部件台账查看详情弹窗 */
.comp-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 32px;
    margin-bottom: 20px;
}

.comp-view-field {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.comp-view-field:last-child {
    border-bottom: none;
}

.comp-view-label {
    color: #888;
    font-size: 13px;
    font-weight: 500;
    min-width: 90px;
    white-space: nowrap;
}

.comp-view-value {
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    margin-left: 12px;
}

.comp-view-section {
    background-color: #f8fafd;
    border: 1px solid #e8ecf2;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 16px;
}

.comp-view-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a5fb4;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e6ed;
}

.comp-view-photo-row {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.comp-view-photo-box {
    flex: 1;
    min-width: 200px;
}

.comp-view-sublabel {
    display: block;
    color: #888;
    font-size: 12px;
    margin-bottom: 4px;
}

.comp-view-photo-box .comp-view-value {
    margin-left: 0;
    margin-bottom: 8px;
}

.comp-view-photo-box .comp-thumb {
    width: 120px;
    height: 120px;
    border-radius: 6px;
    border: 1px solid #ddd;
    object-fit: cover;
    display: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.comp-view-photo-box .comp-thumb:hover {
    transform: scale(1.05);
}

.comp-view-photo-box .comp-thumb.show {
    display: block;
}

/* 权限控制 - 非管理员隐藏操作元素 */
.hidden-for-user {
    display: none !important;
}

/* 项目明细表格 — 项目名称、当前进度居中 */
#listContent td:nth-child(4),
#listContent td:nth-child(6) {
    vertical-align: middle;
}

#listContent th:nth-child(5) {
    min-width: 100px;
}

/* 大部件更换台账表格居中 */
#componentView td {
    vertical-align: middle;
    text-align: center;
}

/* ===== 设备异动 — 编辑模态框 ===== */
.form-section-label {
    font-size: 14px;
    font-weight: 600;
    color: #1f1f1f;
    margin: 16px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f0f0f0;
}
.anom-update-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.anom-update-fields {
    display: flex;
    gap: 8px;
    flex: 1;
}
.anom-update-fields input,
.anom-update-fields select {
    height: 34px;
    border: 1px solid #dce4f0;
    border-radius: 4px;
    padding: 0 8px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}
.anom-update-fields input:focus,
.anom-update-fields select:focus {
    border-color: #4096ff;
}
.anom-new-date { width: 130px; flex: none; }
.anom-new-operator { width: 100px; flex: none; }
.anom-new-content { flex: 1; }
.anom-new-status { width: 110px; flex: none; }
.anom-update-fields .form-group input,
.anom-update-fields .form-group select { width: auto; }
.anom-update-fields .anom-new-date { width: 130px; }
.anom-update-fields .anom-new-status { width: 110px; }
.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
    height: 34px;
    white-space: nowrap;
}

/* ===== 设备异动 — 表格紧凑样式（9列防溢出） ===== */
#anomalyView table {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
}
#anomalyView th,
#anomalyView td {
    padding: 6px 4px;
    font-size: 12px;
    vertical-align: middle;
    text-align: center;
}
#anomalyView th {
    white-space: normal;
}
#anomalyView td {
    white-space: nowrap;
}
/* 序号、期次、风机号、异动类型、异动状态 — 统一宽度 */
#anomalyView th:nth-child(1),
#anomalyView td:nth-child(1),
#anomalyView th:nth-child(2),
#anomalyView td:nth-child(2),
#anomalyView th:nth-child(3),
#anomalyView td:nth-child(3),
#anomalyView th:nth-child(4),
#anomalyView td:nth-child(4),
#anomalyView th:nth-child(8),
#anomalyView td:nth-child(8) { width: 60px; }
/* 异动时间 */
#anomalyView th:nth-child(7),
#anomalyView td:nth-child(7) { width: 96px; font-size: 11px; }
/* 操作 */
#anomalyView th:nth-child(9),
#anomalyView td:nth-child(9) { width: 84px; }
/* 异动内容、最近更新 — 自动伸缩，溢出截断 */
#anomalyView td:nth-child(5),
#anomalyView td:nth-child(6) {
    overflow: hidden;
    text-overflow: ellipsis;
}
#anomalyView .btn-small {
    padding: 2px 6px;
    font-size: 11px;
}

/* ===== 设备异动 — 变更记录表格（编辑弹窗内嵌） ===== */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 0;
    table-layout: auto;
}
.history-table th {
    background: #fafafa;
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e8e8e8;
    font-size: 12px;
}
.history-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    vertical-align: middle;
}
.history-table td:last-child {
    text-align: left;
}
.history-table tbody tr:hover {
    background: #fafafa;
}
.history-row-latest {
    background: #f6ffed;
}
.history-row-latest:hover {
    background: #eeffd8;
}
.history-badge {
    font-size: 10px;
    background: #52c41a;
    color: #fff;
    padding: 1px 5px;
    border-radius: 8px;
    font-weight: 600;
    vertical-align: middle;
    display: inline-block;
    line-height: 1.4;
}
.history-del {
    cursor: pointer;
    color: #ccc;
    font-size: 18px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    transition: all 0.15s;
}
.history-del:hover {
    color: #fff;
    background: #ff4d4f;
}

/* 大部件台账 — 输入框紧凑保持一行，其余与异动管理一致 */
#compFilterSection .filter-item input,
#compFilterSection .filter-item select {
    min-width: 80px;
    width: 100px;
}
#compFilterSection .filter-item input[type="date"] {
    width: 90px;
    min-width: 90px;
}
#compFilterSection .dropdown-single {
    min-width: 80px;
}
#compFilterSection .dropdown-single .dropdown-toggle {
    min-width: 80px;
}
/* 按钮行：与异动管理 filter-btn-group 一致 */
.comp-filter-btns {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* 统一 placeholder 颜色 */
.filter-item input::placeholder,
.form-group input::placeholder,
.dropdown-input::placeholder {
    color: #bbb;
}

/* select 下拉选择 placeholder 淡色 */
select.placeholder-light {
    color: #bbb;
}
select.placeholder-light option {
    color: #333;
}
select.placeholder-light option[value=""] {
    color: #bbb;
}

/* ===== 单选自定下拉 ===== */
.dropdown-single {
    position: relative;
}
.dropdown-single .dropdown-menu {
    min-width: 100%;
}
.dropdown-input {
    width: 100%;
    height: 34px;
    border: none !important;
    outline: none;
    padding: 0;
    font-size: 13px;
    font-family: inherit;
    background: transparent;
    color: #555;
    box-shadow: none !important;
    min-width: 0;
}
.dropdown-input:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none;
}
.filter-item .dropdown-input,
.filter-item .dropdown-input:focus {
    border: none !important;
    box-shadow: none !important;
}
.dropdown-option {
    padding: 6px 10px;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
}
.dropdown-option:hover {
    background-color: #f0f5fc;
}
.dropdown-option.selected {
    background-color: #e6f4ff;
    color: #1a5fb4;
    font-weight: 600;
}

/* ===== 遗留问题页面 ===== */
.leftover-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 0;
}
.leftover-table th {
    background: var(--table-head-bg);
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid var(--td-border);
    font-size: 13px;
}
.leftover-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid var(--td-border);
    vertical-align: middle;
}
.leftover-table th:nth-child(1) { width: 46px; }
.leftover-table td:nth-child(2),
.leftover-table td:nth-child(4),
.leftover-table td:nth-child(5) {
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}
.leftover-table td:nth-child(4) { min-width: 200px; }
.leftover-progress-cell {
    text-align: center !important;
    vertical-align: middle !important;
}
.leftover-section-title:hover {
    background-color: #f8fafd;
    border-radius: 4px;
}
.leftover-arrow {
    font-size: 12px;
    color: #999;
    transition: transform 0.2s;
}

/* ===== 主页仪表盘 ===== */

#homeView {
    display: block;
    padding: 4px 0;
}

.home-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.home-header-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.5px;
}

/* -- 进度条 -- */
.prog-track {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: #e8ecf1;
}

.prog-fill {
    height: 100%;
    border-radius: 3px;
    background: #3b82f6;
    transition: width 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* -- 风场总览 -- */
.home-total-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px 28px 18px;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.02),
        0 4px 12px rgba(0,0,0,0.03),
        0 8px 28px rgba(26,80,160,0.05);
    margin-bottom: 14px;
    border: 1px solid rgba(0,0,0,0.04);
}

.home-total-title {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.home-total-cols {
    display: flex;
    gap: 36px;
}

.home-total-col {
    flex: 1;
}

.home-total-col-label {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 4px;
    font-weight: 500;
}

.home-total-col-pct {
    font-size: 38px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -1.5px;
}

.home-total-col-bar {
    margin-bottom: 6px;
}

.home-total-col-bar .prog-track {
    height: 8px;
    border-radius: 4px;
}

.home-total-col-detail {
    font-size: 11px;
    color: #94a3b8;
}

/* -- 期次卡片 -- */
.home-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.home-card {
    background: #fff;
    border-radius: 10px;
    padding: 10px 14px 10px;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.02),
        0 2px 8px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-card:hover {
    transform: translateY(-1px);
    box-shadow:
        0 1px 3px rgba(0,0,0,0.03),
        0 4px 16px rgba(26,80,160,0.08);
}

.home-card-name {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.home-card-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-card-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.home-row-label {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    width: 14px;
    flex-shrink: 0;
    text-transform: uppercase;
}

.home-row-bar {
    flex: 1;
    min-width: 0;
}

.home-row-bar .prog-track {
    height: 5px;
    border-radius: 2.5px;
}

.home-row-pct {
    font-size: 12px;
    font-weight: 600;
    width: 34px;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.home-row-val {
    font-size: 10px;
    color: #94a3b8;
    width: 42px;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* ===== 发电量录入弹窗 ===== */
.gen-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 0;
}

.gen-table th {
    background: var(--table-head-bg);
    padding: 8px 10px;
    text-align: center;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid var(--td-border);
    font-size: 12px;
}

.gen-table td {
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: middle;
}

.gen-edit-table td {
    padding: 6px 8px;
}

.gen-edit-table input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    text-align: center;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.gen-edit-table input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59,130,246,0.1);
}

.gen-edit-table input::placeholder {
    color: #c0c8d2;
}
