* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* 头部样式 */
.header {
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 32px;
    font-weight: 600;
    color: #00d4ff;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* 印章徽章样式 */
.stamp-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #c41e3a;
    background: transparent;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: #c41e3a;
    background-clip: unset;
    border: 2px solid #c41e3a;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: '楷体', 'KaiTi', 'STKaiti', serif;
    letter-spacing: 1px;
    transform: rotate(-5deg);
    box-shadow:
        inset 0 0 0 1px rgba(196, 30, 58, 0.3),
        0 0 3px rgba(196, 30, 58, 0.2);
    position: relative;
    vertical-align: middle;
    margin-left: 8px;
}

.stamp-badge::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px dashed rgba(196, 30, 58, 0.4);
    border-radius: 3px;
}

.header p {
    color: #a0a0a0;
    margin-top: 8px;
    font-size: 14px;
}

/* 公告条 */
.announcement-bar {
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(255, 193, 7, 0.15), rgba(255, 152, 0, 0.15));
    border: 1px solid rgba(255, 193, 7, 0.5);
    border-radius: 10px;
    padding: 12px 20px;
    margin-bottom: 20px;
    animation: announcementGlow 2s ease-in-out infinite;
}

@keyframes announcementGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
    }
}

.announcement-icon {
    font-size: 24px;
    margin-right: 15px;
    animation: shake 2s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20%, 40% { transform: rotate(10deg); }
    50% { transform: rotate(0deg); }
}

.announcement-content {
    color: #ffc107;
    font-size: 15px;
    font-weight: 500;
    flex: 1;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

/* 公告编辑器 */
.announcement-editor {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.announcement-editor textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

.announcement-editor textarea:focus {
    outline: none;
    border-color: #ffc107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.2);
}

.announcement-editor textarea::placeholder {
    color: #6a6a8a;
}

.char-counter {
    text-align: right;
    color: #6a6a8a;
    font-size: 12px;
    margin-top: 5px;
}

.announcement-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* 图表容器 */
.chart-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-title {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}

.chart-title span {
    color: #00d4ff;
}

/* 按钮样式 */
.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid #3a3a5a;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-secondary.active {
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    border-color: transparent;
}

/* 视图切换 */
.view-toggle {
    display: flex;
    gap: 10px;
}

/* 电压等级选择器 */
.voltage-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #a0a0a0;
    font-size: 14px;
}

.voltage-selector label {
    white-space: nowrap;
}

.voltage-selector select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #3a3a5a;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.voltage-selector select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #00d4ff;
}

.voltage-selector select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.voltage-selector select option {
    background: #1a1a2e;
    color: #fff;
}

/* 图表类型切换 */
.chart-type-toggle {
    display: flex;
    gap: 8px;
}

.back-btn {
    display: none;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 图表区域 */
#chart {
    width: 100%;
    height: 500px;
}

/* 提示文字 */
.tip {
    text-align: center;
    color: #6a6a8a;
    font-size: 13px;
    margin-top: 15px;
}

/* 价格免责声明 */
.price-disclaimer {
    text-align: center;
    color: #fa8c16;
    font-size: 12px;
    margin-top: 8px;
    font-style: italic;
}

/* 统计数据 */
.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    color: #00d4ff;
}

.stat-label {
    color: #6a6a8a;
    font-size: 12px;
    margin-top: 5px;
}

/* 极端价格提示 */
.extreme-alert {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 10px;
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    animation: alertPulse 2s ease-in-out infinite;
}

.extreme-alert .alert-icon {
    font-size: 18px;
    margin-right: 10px;
}

.extreme-high {
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.2), rgba(214, 40, 40, 0.2));
    border: 1px solid rgba(255, 107, 53, 0.5);
    color: #ff6b35;
}

.extreme-low {
    background: linear-gradient(90deg, rgba(168, 218, 220, 0.2), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(168, 218, 220, 0.5);
    color: #a8dadc;
}

.realtime-price {
    background: linear-gradient(90deg, rgba(154, 205, 50, 0.2), rgba(50, 205, 50, 0.15));
    border: 1px solid rgba(154, 205, 50, 0.5);
    color: #9acd32;
}

@keyframes alertPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 登录遮罩层 */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.login-box {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 40px;
    width: 400px;
    max-width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.login-box h2 {
    color: #00d4ff;
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.login-box > p {
    color: #a0a0a0;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

.btn-full {
    width: 100%;
}

/* 管理员区域 */
.admin-area {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.admin-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
}

#userInfo {
    color: #68d391;
    font-size: 13px;
    font-weight: 500;
}

.admin-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #3a3a5a;
    border-radius: 6px;
    color: #a0a0a0;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: #00d4ff;
}

.admin-logged {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #68d391;
    font-size: 13px;
}

.logout-btn {
    color: #fc8181 !important;
    border-color: rgba(252, 129, 129, 0.3) !important;
}

.logout-btn:hover {
    background: rgba(252, 129, 129, 0.2) !important;
    border-color: #fc8181 !important;
}

.header {
    position: relative;
}

/* 弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    width: 400px;
    max-width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-large {
    width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}

.modal-close {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: #a0a0a0;
    font-size: 13px;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.form-group input::placeholder {
    color: #6a6a8a;
}

.form-message {
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    margin-top: 10px;
}

.form-message.error {
    background: rgba(252, 129, 129, 0.1);
    color: #fc8181;
    border: 1px solid rgba(252, 129, 129, 0.3);
}

.form-message.success {
    background: rgba(104, 211, 145, 0.1);
    color: #68d391;
    border: 1px solid rgba(104, 211, 145, 0.3);
}

.btn-primary {
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 上传区域 */
.upload-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.upload-section h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

/* 模板下载行 */
.template-download-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 8px;
    border: 1px dashed rgba(0, 212, 255, 0.3);
}

.template-download-row .template-label {
    color: #a0a0a0;
    font-size: 13px;
}

.template-download-row .btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.upload-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.upload-row input[type="file"] {
    flex: 1;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #3a3a5a;
    border-radius: 6px;
    color: #a0a0a0;
    font-size: 13px;
}

.upload-row input[type="file"]::-webkit-file-upload-button {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #3a3a5a;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    margin-right: 10px;
}

.upload-hint {
    color: #6a6a8a;
    font-size: 11px;
    margin-top: 8px;
    font-family: monospace;
}

/* 数据更新时间显示 */
.data-update-info {
    color: #6a6a8a;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.update-time {
    color: #68d391;
}

/* 配置错误提示 */
.config-error-alert {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.config-error-alert .alert-icon {
    font-size: 16px;
}

/* 加宽弹窗 */
.modal-xlarge {
    width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Tab 样式 */
.upload-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    color: #a0a0a0;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.tab-btn.active {
    background: rgba(0, 212, 255, 0.1);
    border-color: #00d4ff;
    color: #00d4ff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-description {
    color: #6a6a8a;
    font-size: 13px;
    margin-bottom: 15px;
}

/* 月份网格 */
.monthly-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.month-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.month-card:hover {
    border-color: #00d4ff;
    background: rgba(255, 255, 255, 0.05);
}

.month-card.configured {
    border-color: #68d391;
}

.month-name {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
}

.month-status {
    font-size: 12px;
    color: #6a6a8a;
    margin-bottom: 10px;
}

.month-status.configured {
    color: #68d391;
}

.month-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.btn-danger {
    background: rgba(252, 129, 129, 0.2);
    color: #fc8181;
    border: 1px solid rgba(252, 129, 129, 0.3);
}

.btn-danger:hover {
    background: rgba(252, 129, 129, 0.3);
}

/* 当前数据区域 */
.current-data-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.current-data-section h4 {
    color: #00d4ff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

.current-data-info {
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.info-label {
    color: #a0a0a0;
    font-size: 13px;
    width: 80px;
}

.info-value {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.current-data-preview {
    margin-bottom: 15px;
}

.preview-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.preview-stat {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 12px;
    border-radius: 6px;
}

.preview-stat .stat-label {
    display: block;
    color: #6a6a8a;
    font-size: 11px;
    margin-bottom: 4px;
}

.preview-stat .stat-value {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.current-data-actions {
    display: flex;
    gap: 10px;
}

.current-data-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 8px 12px;
}

/* 输配电价预览表格 */
.transmission-tables {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.transmission-table {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 12px;
}

.transmission-table h5 {
    color: #fff;
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 500;
}

.transmission-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.transmission-table th,
.transmission-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.transmission-table th {
    color: #6a6a8a;
    font-weight: normal;
}

.transmission-table td {
    color: #fff;
}

/* 版本历史 */
.version-history {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.version-history h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
}

.version-list {
    max-height: 200px;
    overflow-y: auto;
}

.version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    margin-bottom: 8px;
}

.version-item.latest {
    border-left: 3px solid #00d4ff;
}

.version-info {
    flex: 1;
}

.version-date {
    color: #fff;
    font-weight: 500;
}

.version-meta {
    font-size: 11px;
    color: #6a6a8a;
    margin-top: 3px;
}

.version-badge {
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 10px;
}

/* 必填标记 */
.required {
    color: #fc8181;
}

.hint {
    display: block;
    color: #6a6a8a;
    font-size: 11px;
    margin-top: 5px;
}

/* 辅助样式 */
.loading, .no-data, .error {
    text-align: center;
    padding: 20px;
    color: #6a6a8a;
    font-size: 13px;
}

.error {
    color: #fc8181;
}

/* 最优用电时段面板 */
.optimal-period-panel {
    background: linear-gradient(135deg, rgba(30, 30, 60, 0.9), rgba(20, 20, 40, 0.95));
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.panel-header h3 {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* 开关样式 */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    width: 44px;
    height: 24px;
    background: #3a3a5a;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
}

.toggle-switch input:checked + .toggle-slider::after {
    left: 23px;
}

.toggle-label {
    color: #a0a0a0;
    font-size: 13px;
}

/* 设置区域 */
.optimal-settings {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 时间轴区域 - 在图表下方 */
.time-axis-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.time-axis-container {
    position: relative;
    padding: 0 10px;
}

.time-axis-track {
    position: relative;
    height: 32px;
    background: linear-gradient(to right, #1a1a3a, #2a2a4a);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

/* 最优时段虚影 */
.optimal-shadow {
    position: absolute;
    top: 2px;
    bottom: 2px;
    background: rgba(104, 211, 145, 0.15);
    border: 1px dashed rgba(104, 211, 145, 0.5);
    border-radius: 4px;
    pointer-events: none;
    transition: left 0.3s, width 0.3s;
}

/* 当前选中时段 */
.current-range {
    position: absolute;
    top: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.3), rgba(123, 44, 191, 0.3));
    border-radius: 4px;
    pointer-events: none;
    transition: left 0.1s;
}

/* 可拖拽的范围滑块 */
.range-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.8), rgba(123, 44, 191, 0.8));
    border-radius: 4px;
    cursor: ew-resize;
    border: 2px solid #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    transition: box-shadow 0.2s;
}

.range-handle:hover {
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.8);
}

.range-handle:active {
    box-shadow: 0 0 20px rgba(0, 212, 255, 1);
}

/* 时间轴刻度标签 */
.time-axis-labels {
    display: flex;
    justify-content: space-between;
    padding: 8px 0 0;
    color: #6a6a8a;
    font-size: 10px;
}

.time-axis-labels span {
    width: calc(100% / 24);
    text-align: center;
}

/* 时间轴信息显示 */
.time-axis-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.current-period-label,
.current-price-label {
    color: #a0a0a0;
    font-size: 15px;
}

.current-period-value {
    color: #00d4ff;
    font-weight: 700;
    font-size: 26px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.current-price-value {
    color: #00d4ff;
    font-weight: 700;
    font-size: 30px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    transition: color 0.3s, text-shadow 0.3s;
}

/* 设置和结果行 */
.settings-result-row {
    display: flex;
    gap: 30px;
}

.settings-left {
    flex: 0 0 280px;
}

.settings-right {
    flex: 1;
    min-width: 0;
}

/* 紧凑结果显示 */
.optimal-result-compact {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(123, 44, 191, 0.1));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
}

.optimal-result-compact .result-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.optimal-result-compact .result-row:last-child {
    margin-bottom: 0;
}

.optimal-result-compact .result-icon {
    color: #ffd93d;
    font-size: 16px;
}

.optimal-result-compact .result-label {
    color: #a0a0a0;
    font-size: 15px;
}

.optimal-result-compact .result-value {
    color: #00d4ff;
    font-weight: 700;
    font-size: 26px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.optimal-result-compact .result-price {
    color: #68d391;
    font-weight: 700;
    font-size: 30px;
    text-shadow: 0 0 10px rgba(104, 211, 145, 0.5);
}

/* 权重编辑器头部 */
.weight-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.weight-editor-header label {
    color: #a0a0a0;
    font-size: 13px;
}

.btn-reset-weights {
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #3a3a5a;
    border-radius: 4px;
    color: #a0a0a0;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset-weights:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: #00d4ff;
    color: #fff;
}

.settings-row {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.setting-group {
    flex: 1;
}

.setting-group label {
    display: block;
    color: #a0a0a0;
    font-size: 13px;
    margin-bottom: 8px;
}

.duration-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-adjust {
    width: 32px;
    height: 32px;
    border: 1px solid #3a3a5a;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.btn-adjust:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: #00d4ff;
}

.duration-input input {
    width: 60px;
    height: 32px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #3a3a5a;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

.duration-input input:focus {
    outline: none;
    border-color: #00d4ff;
}

.duration-input .unit {
    color: #6a6a8a;
    font-size: 13px;
}

.setting-group select {
    width: 100%;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #3a3a5a;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    padding: 0 10px;
    cursor: pointer;
}

.setting-group select:focus {
    outline: none;
    border-color: #00d4ff;
}

/* 权重编辑器 */
.weight-editor {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.weight-hint {
    color: #6a6a8a;
    font-size: 12px;
    margin-bottom: 15px;
}

.weight-bars {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 100px;
}

.weight-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

.weight-bar {
    width: 100%;
    background: linear-gradient(to top, #00d4ff, #7b2cbf);
    border-radius: 4px 4px 0 0;
    cursor: ns-resize;
    transition: height 0.2s;
    min-height: 10px;
}

.weight-bar:hover {
    filter: brightness(1.2);
}

.weight-label {
    color: #6a6a8a;
    font-size: 9px;
}

.weight-value {
    color: #fff;
    font-size: 10px;
    font-weight: 500;
}

/* 权重输入框 */
.weight-input {
    width: 100%;
    max-width: 36px;
    height: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #3a3a5a;
    border-radius: 3px;
    color: #fff;
    font-size: 10px;
    padding: 0 2px;
}

.weight-input:focus {
    outline: none;
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

.weight-input::-webkit-inner-spin-button,
.weight-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 结果显示 */
.optimal-result {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(123, 44, 191, 0.1));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.result-icon {
    font-size: 20px;
    color: #ffd93d;
}

.result-title {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.result-content {
    display: flex;
    gap: 30px;
}

.result-period, .result-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.period-label, .price-label {
    color: #a0a0a0;
    font-size: 13px;
}

.period-value {
    color: #00d4ff;
    font-size: 16px;
    font-weight: 600;
}

.price-value {
    color: #68d391;
    font-size: 20px;
    font-weight: 600;
}

.price-unit {
    color: #6a6a8a;
    font-size: 12px;
}

/* 手动调整 */
.manual-adjust {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
}

.adjust-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #a0a0a0;
    font-size: 13px;
}

.current-period {
    color: #00d4ff;
    font-weight: 500;
}

.slider-container {
    margin-bottom: 15px;
}

.slider-container input[type="range"] {
    width: 100%;
    height: 6px;
    background: #3a3a5a;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #00d4ff, #7b2cbf);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.5);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #00d4ff, #7b2cbf);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: #6a6a8a;
    font-size: 11px;
}

.manual-result {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.manual-price-label {
    color: #a0a0a0;
    font-size: 13px;
}

.manual-price-value {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.price-diff {
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 4px;
}

.price-diff.higher {
    color: #fc8181;
    background: rgba(252, 129, 129, 0.1);
}

.price-diff.lower {
    color: #68d391;
    background: rgba(104, 211, 145, 0.1);
}

.price-diff.same {
    color: #ffd93d;
    background: rgba(255, 217, 61, 0.1);
}

/* 响应式布局 */
@media (max-width: 768px) {
    #chart {
        height: 400px;
    }

    .chart-header {
        flex-direction: column;
        gap: 15px;
    }

    .stats {
        gap: 20px;
    }

    .stat-value {
        font-size: 22px;
    }

    .extreme-alert {
        font-size: 12px;
        padding: 10px 15px;
    }

    .admin-area {
        position: static;
        margin-top: 15px;
    }

    .modal {
        width: 95%;
    }

    .monthly-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-xlarge {
        width: 95%;
    }
}

/* 登录日志样式 */
.login-logs-container {
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.login-logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.login-logs-table thead {
    background: rgba(0, 212, 255, 0.15);
    position: sticky;
    top: 0;
}

.login-logs-table th,
.login-logs-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.login-logs-table th {
    color: #00d4ff;
    font-weight: 600;
}

.login-logs-table td {
    color: #e0e0e0;
}

.login-logs-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.status-badge.failed {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.logs-actions {
    margin-top: 15px;
    text-align: right;
}

.login-logs-table .loading,
.login-logs-table .no-data,
.login-logs-table .error {
    text-align: center;
    color: #888;
    padding: 30px;
}

/* 账户管理样式 */
.users-list-container {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.role-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.role-badge.admin-role {
    background: rgba(0, 212, 255, 0.2);
    color: #00d4ff;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.role-badge.user-role {
    background: rgba(160, 160, 160, 0.2);
    color: #a0a0a0;
    border: 1px solid rgba(160, 160, 160, 0.3);
}

.current-user-badge {
    color: #68d391;
    font-size: 11px;
    margin-left: 5px;
}

#accountsTab .form-group select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

#accountsTab .form-group select:focus {
    outline: none;
    border-color: #00d4ff;
}

#accountsTab .form-group select option {
    background: #1a1a2e;
    color: #fff;
}

/* 有效期显示样式 */
.validity-info {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: #a0a0a0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.validity-permanent {
    color: #68d391;
}

.validity-normal {
    color: #a0a0a0;
}

.validity-notice {
    color: #ffd93d;
}

.validity-warning {
    color: #ff9500;
    animation: blink 1s ease-in-out infinite;
}

.validity-expired {
    color: #fc8181;
}

.validity-info.warning {
    background: rgba(255, 149, 0, 0.1);
    border-color: rgba(255, 149, 0, 0.3);
}

.validity-info.expired {
    background: rgba(252, 129, 129, 0.1);
    border-color: rgba(252, 129, 129, 0.3);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 有效期状态样式 */
.expires-permanent {
    color: #68d391;
}

.expires-normal {
    color: #a0a0a0;
}

.expires-notice {
    color: #ffd93d;
}

.expires-warning {
    color: #ff9500;
}

.expires-expired {
    color: #fc8181;
    font-weight: 500;
}

/* 表单布局 */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.form-group-half {
    flex: 1;
}

.expires-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.expires-input select {
    flex: 1;
}

.expires-input input[type="date"] {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #3a3a5a;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
}

.expires-input input[type="date"]:focus {
    outline: none;
    border-color: #00d4ff;
}

/* 用户表格样式 */
.users-table th,
.users-table td {
    padding: 10px 12px;
    font-size: 13px;
}

.users-table .user-description {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.users-table .user-actions {
    white-space: nowrap;
}

.users-table .user-actions .btn {
    margin-right: 5px;
}

.users-table .user-actions .btn:last-child {
    margin-right: 0;
}

/* 编辑用户弹窗 */
.edit-user-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.edit-user-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.edit-user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-user-header h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

.edit-user-header h4 span {
    color: #00d4ff;
}

.edit-user-body {
    padding: 20px;
}

.edit-user-body .form-group {
    margin-bottom: 15px;
}

.edit-user-body .form-group:last-child {
    margin-bottom: 0;
}

.edit-user-body .form-group select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #3a3a5a;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
}

.edit-user-body .form-group select option {
    background: #1a1a2e;
    color: #fff;
}

.edit-user-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 版本历史操作按钮 */
.version-item .version-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.version-item .version-actions .btn {
    padding: 5px 12px;
    font-size: 12px;
}

/* 历史版本数据查看弹窗 */
.version-data-modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.version-data-section {
    margin-bottom: 25px;
}

.version-data-section:last-child {
    margin-bottom: 0;
}

.version-data-section h4 {
    color: #00d4ff;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-data-section h4::before {
    content: '';
    width: 4px;
    height: 16px;
    background: linear-gradient(180deg, #00d4ff, #7b2cbf);
    border-radius: 2px;
}

.version-data-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.version-data-summary span {
    color: #a0a0a0;
    font-size: 13px;
}

.version-data-table-wrapper {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.version-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.version-data-table th,
.version-data-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.version-data-table th {
    background: rgba(0, 0, 0, 0.3);
    color: #00d4ff;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 1;
}

.version-data-table td {
    color: #e0e0e0;
}

.version-data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.version-data-table tbody tr.extreme-high td {
    color: #fc8181;
}

.version-data-table tbody tr.extreme-low td {
    color: #63b3ed;
}

.version-data-table tbody tr.realtime td:first-child::after {
    content: ' (实时)';
    color: #68d391;
    font-size: 11px;
}

/* 分时电价日期Tab切换 */
.version-hourly-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hourly-tab-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #a0a0a0;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.hourly-tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.hourly-tab-btn.active {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.2), rgba(123, 44, 191, 0.2));
    border-color: rgba(0, 212, 255, 0.5);
    color: #00d4ff;
}

.version-hourly-content {
    max-height: 250px;
    overflow-y: auto;
}

.version-data-table.hourly-table {
    max-width: 400px;
}

.version-data-table.hourly-table th,
.version-data-table.hourly-table td {
    padding: 8px 15px;
}
