- 实时电费卡片 + 月度汇总卡 - 月份选择器导航 + Chart.js 图表 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
271 lines
4.4 KiB
CSS
271 lines
4.4 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
|
|
"Microsoft YaHei", sans-serif;
|
|
background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
|
|
min-height: 100vh;
|
|
color: #e8edf2;
|
|
}
|
|
|
|
.container {
|
|
max-width: 720px;
|
|
margin: 0 auto;
|
|
padding: 24px 16px 48px;
|
|
}
|
|
|
|
header {
|
|
text-align: center;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
header h1 {
|
|
font-size: 26px;
|
|
font-weight: 700;
|
|
letter-spacing: 1px;
|
|
background: linear-gradient(90deg, #ffd700, #ffaa00);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
|
|
.room-info {
|
|
margin-top: 8px;
|
|
font-size: 14px;
|
|
color: #9fb3c8;
|
|
}
|
|
|
|
.card {
|
|
background: rgba(255, 255, 255, 0.06);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
border-radius: 16px;
|
|
padding: 20px;
|
|
margin-bottom: 20px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.card-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.label {
|
|
font-size: 14px;
|
|
color: #9fb3c8;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.status-badge {
|
|
padding: 3px 12px;
|
|
border-radius: 20px;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.status-badge.ok {
|
|
background: rgba(46, 204, 113, 0.2);
|
|
color: #2ecc71;
|
|
}
|
|
|
|
.status-badge.err {
|
|
background: rgba(231, 76, 60, 0.2);
|
|
color: #e74c3c;
|
|
}
|
|
|
|
.status-badge.loading {
|
|
background: rgba(241, 196, 15, 0.2);
|
|
color: #f1c40f;
|
|
}
|
|
|
|
.surplus-display {
|
|
display: flex;
|
|
align-items: baseline;
|
|
justify-content: center;
|
|
padding: 16px 0 8px;
|
|
}
|
|
|
|
.surplus-value {
|
|
font-size: 64px;
|
|
font-weight: 800;
|
|
background: linear-gradient(90deg, #4fc3f7, #00e5ff);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
}
|
|
|
|
.surplus-unit {
|
|
font-size: 20px;
|
|
color: #9fb3c8;
|
|
margin-left: 8px;
|
|
}
|
|
|
|
.sub-info {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 24px;
|
|
font-size: 13px;
|
|
color: #9fb3c8;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.refresh-btn {
|
|
display: block;
|
|
width: 100%;
|
|
padding: 12px;
|
|
border: none;
|
|
border-radius: 10px;
|
|
background: linear-gradient(90deg, #00b4d8, #0096c7);
|
|
color: #fff;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: transform 0.15s, opacity 0.15s;
|
|
}
|
|
|
|
.refresh-btn:hover {
|
|
transform: translateY(-1px);
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.refresh-btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.chart-wrap {
|
|
position: relative;
|
|
}
|
|
|
|
.chart-empty {
|
|
display: none;
|
|
text-align: center;
|
|
padding: 40px 0;
|
|
color: #9fb3c8;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.history-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.history-table th,
|
|
.history-table td {
|
|
padding: 10px 8px;
|
|
text-align: center;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
.history-table th {
|
|
color: #9fb3c8;
|
|
font-weight: 500;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.history-table td:first-child {
|
|
text-align: left;
|
|
}
|
|
|
|
.empty-td {
|
|
color: #9fb3c8;
|
|
text-align: center !important;
|
|
padding: 24px 0 !important;
|
|
}
|
|
|
|
.tag {
|
|
padding: 2px 8px;
|
|
border-radius: 12px;
|
|
font-size: 11px;
|
|
}
|
|
|
|
.tag.auto {
|
|
background: rgba(0, 180, 216, 0.2);
|
|
color: #4fc3f7;
|
|
}
|
|
|
|
.tag.manual {
|
|
background: rgba(241, 196, 15, 0.2);
|
|
color: #f1c40f;
|
|
}
|
|
|
|
.tag.cache {
|
|
background: rgba(46, 204, 113, 0.2);
|
|
color: #2ecc71;
|
|
}
|
|
|
|
/* 月份选择器 */
|
|
.month-selector {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.month-selector input[type="month"] {
|
|
background: rgba(255, 255, 255, 0.08);
|
|
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
color: #e8edf2;
|
|
border-radius: 8px;
|
|
padding: 5px 8px;
|
|
font-size: 13px;
|
|
color-scheme: dark;
|
|
}
|
|
|
|
.month-selector input[type="month"]::-webkit-calendar-picker-indicator {
|
|
filter: invert(0.8);
|
|
}
|
|
|
|
.mini-btn {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
color: #e8edf2;
|
|
border-radius: 8px;
|
|
width: 30px;
|
|
height: 30px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
transition: background 0.15s;
|
|
}
|
|
|
|
.mini-btn:hover {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
/* 月度汇总 */
|
|
.summary-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 10px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
@media (max-width: 480px) {
|
|
.summary-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
}
|
|
|
|
.summary-item {
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border-radius: 10px;
|
|
padding: 10px 8px;
|
|
text-align: center;
|
|
}
|
|
|
|
.summary-value {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
color: #ffd700;
|
|
}
|
|
|
|
.summary-label {
|
|
font-size: 11px;
|
|
color: #9fb3c8;
|
|
margin-top: 2px;
|
|
}
|