Repository navigation
Expand file tree
/
Copy pathdashboard.css
More file actions
190 lines (167 loc) · 3.58 KB
/
Copy pathdashboard.css
File metadata and controls
190 lines (167 loc) · 3.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
/* dashboard.css (v3)
- Variables de color (claro/oscuro)
- Layout responsivo
- Controles con datetime-local
- Tarjetas para ultimo resultado y grafico
*/
/* =========================
Paleta (CSS variables)
========================= */
:root {
--bg: #f8f8f8;
--fg: #333333;
--muted: #6b7280;
--card: #ffffff;
--border: #e5e7eb;
--accent: #0d6efd;
--accent-hover: #0b5ed7;
--shadow: 0 1px 3px rgba(0,0,0,0.08);
}
body.dark-mode {
--bg: #121212;
--fg: #e6e6e6;
--muted: #b3b3b3;
--card: #1c1c1c;
--border: #2a2a2a;
--accent: #3a86ff;
--accent-hover: #2b6bd1;
--shadow: none;
}
/* =========================
Base
========================= */
* { box-sizing: border-box; }
html, body {
height: 100%;
}
body {
font-family: Arial, Helvetica, sans-serif;
background: var(--bg);
color: var(--fg);
margin: 0;
padding: 16px;
transition: background-color .25s linear, color .25s linear;
}
/* =========================
Encabezado y controles
========================= */
header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
flex-wrap: wrap;
}
h1 {
margin: 0;
font-size: 1.8rem;
line-height: 1.2;
}
.controls {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.controls label {
font-weight: 600;
}
.controls input[type="datetime-local"] {
appearance: none;
padding: 8px 10px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--card);
color: var(--fg);
font-size: 0.95rem;
}
.controls button {
padding: 8px 12px;
border: 1px solid var(--accent);
background: var(--accent);
color: #fff;
border-radius: 8px;
font-size: 0.95rem;
cursor: pointer;
transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.controls button:hover {
background: var(--accent-hover);
border-color: var(--accent-hover);
}
.controls button:focus,
.controls input[type="datetime-local"]:focus {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
/* Boton "modo oscuro" hereda el estilo anterior;
si deseas que luzca neutro, descomenta este bloque:
.controls button:last-of-type {
background: transparent;
color: var(--fg);
border-color: var(--border);
}
.controls button:last-of-type:hover {
background: var(--card);
}
*/
/* =========================
Contenido principal
========================= */
main {
max-width: 1200px;
margin: 16px auto 0 auto;
}
#ultimoResultado {
background: var(--card);
border: 1px solid var(--border);
border-radius: 12px;
padding: 16px;
box-shadow: var(--shadow);
text-align: center;
}
#ultimoResultado h2 {
margin: 0 0 8px 0;
font-size: 1.3rem;
}
#ultimoDetalle {
margin: 0;
color: var(--muted);
line-height: 1.6;
}
/* =========================
Grafico
========================= */
.chart-container {
position: relative;
margin-top: 16px;
background: var(--card);
border: 1px solid var(--border);
border-radius: 12px;
padding: 12px;
box-shadow: var(--shadow);
}
/* Altura fija para canvas responsive controlado por Chart.js */
.chart-container canvas {
width: 100%;
height: 520px;
}
/* =========================
Pie de pagina
========================= */
footer {
text-align: center;
margin: 16px 0 0 0;
font-size: 0.9rem;
color: var(--muted);
}
/* =========================
Responsive
========================= */
@media (max-width: 640px) {
h1 { font-size: 1.4rem; }
.controls { gap: 6px; }
.controls input[type="datetime-local"],
.controls button { font-size: 0.9rem; }
.chart-container canvas { height: 420px; }
}