Files
RiverWaterQualityMonitoring/water-admin/style.css
T

403 lines
4.2 KiB
CSS

/* ===========================
Global
=========================== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Microsoft YaHei", Arial, sans-serif;
}
html,
body {
width: 100%;
height: 100%;
}
body {
background: #eef3f8;
overflow: hidden;
display: flex;
flex-direction: column;
}
/* ===========================
Banner
=========================== */
.banner {
height: 11vh;
min-height: 90px;
background: linear-gradient(90deg, #1565c0, #2196f3);
color: white;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 2vw;
box-shadow: 0 3px 12px rgba(0, 0, 0, .18);
flex-shrink: 0;
}
.banner-title {
font-size: clamp(30px, 2vw, 52px);
font-weight: bold;
letter-spacing: 2px;
}
.banner-subtitle {
margin-top: .5vh;
opacity: .9;
font-size: clamp(14px, .9vw, 22px);
}
.banner-right {
text-align: right;
}
.clock-title {
font-size: clamp(16px, 1vw, 24px);
}
.clock {
margin-top: .6vh;
font-size: clamp(28px, 2vw, 46px);
font-weight: bold;
}
/* ===========================
Main
=========================== */
.container {
flex: 1;
display: flex;
flex-direction: column;
gap: 1.2vh;
padding: 1.2vh 1.2vw;
min-height: 0;
}
/* ===========================
Summary Cards
=========================== */
.cards {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1vw;
}
.card {
background: white;
border-radius: 16px;
padding: 1.2vw;
box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
}
.card-title {
color: #666;
font-size: clamp(18px, 1vw, 28px);
}
.card-value {
margin-top: 1vh;
font-size: clamp(36px, 2.3vw, 64px);
font-weight: bold;
}
.black {
color: #111;
}
.normal {
color: #2ecc71;
}
.abnormal {
color: #e74c3c;
}
.update-time {
margin-top: 1vh;
font-size: clamp(18px, 1.1vw, 30px);
color: #333;
}
/* ===========================
Items
=========================== */
.items {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1vw;
}
.item {
background: white;
border-radius: 16px;
padding: 1.2vw;
text-align: center;
box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
}
.item-name {
font-size: clamp(22px, 1.3vw, 36px);
font-weight: bold;
}
.value {
margin-top: 1vh;
color: #1976d2;
font-size: clamp(48px, 3vw, 84px);
font-weight: bold;
}
.level {
margin-top: 1vh;
font-size: clamp(22px, 1.2vw, 30px);
}
.score {
margin-top: .5vh;
color: #666;
font-size: clamp(18px, 1vw, 26px);
}
/* ===========================
Charts
=========================== */
.chart-grid {
flex: 1;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1vw;
min-height: 0;
}
.chart {
background: white;
border-radius: 16px;
display: flex;
flex-direction: column;
box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
min-height: 0;
}
.chart-title {
padding: 16px 20px;
border-bottom: 1px solid #e6e6e6;
font-size: clamp(22px, 1.3vw, 34px);
font-weight: bold;
color: #333;
flex-shrink: 0;
}
.chart-body {
flex: 1;
min-height: 0;
padding: 12px;
}
#phChart,
#tdsChart,
#turbidityChart {
width: 100%;
height: 100%;
}
/* ===========================
Footer
=========================== */
.footer {
height: 3.5vh;
min-height: 28px;
display: flex;
justify-content: center;
align-items: center;
color: #666;
font-size: clamp(12px, .8vw, 18px);
background: white;
border-top: 1px solid #ddd;
flex-shrink: 0;
}
/* ===========================
Responsive
=========================== */
@media (max-width: 1400px) {
.cards {
gap: .8vw;
}
.items {
gap: .8vw;
}
.chart-grid {
gap: .8vw;
}
}
@media (max-width: 1100px) {
.cards {
grid-template-columns: repeat(2, 1fr);
}
.items {
grid-template-columns: 1fr;
}
.chart-grid {
grid-template-columns: 1fr;
}
body {
overflow: auto;
}
}