/* dashboard.css — เฉพาะหน้า Dashboard: แบนเนอร์เตือน การ์ดสรุป กราฟ สถานะรถ ปฏิทิน */

.banner { background: #1a6fc4; color: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.banner-s { font-size: 12px; opacity: .9; }
.banner-t { font-size: 16px; font-weight: 700; margin: 2px 0 10px; }
.banner-b { font: inherit; font-size: 13px; font-weight: 700; background: #fff; color: #0b3f7a; border: 0; border-radius: 8px; padding: 6px 14px; cursor: pointer; }

.sc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.sc-grid .sc:last-child { grid-column: 1 / -1; }
.sc { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 12px; padding: 10px 12px; }
.sc-l { font-size: 12px; color: var(--muted); line-height: 1.2; }
.sc-v { font-size: 22px; font-weight: 700; line-height: 1.2; }
.sc-u { font-size: 13px; font-weight: 400; color: var(--muted); }

/* กราฟเส้น */
.lc-wrap { position: relative; }
.lc .gl { stroke: var(--grid); stroke-width: 1; }
.lc .ax { fill: var(--muted); font-size: 10px; }
.lc .area { fill: var(--series-1); fill-opacity: .16; }
.lc .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.lc .xl { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.lc .dot { fill: var(--card); stroke: var(--series-1); stroke-width: 2.5; }
.lc .hit { touch-action: pan-y; cursor: crosshair; }
.tip { position: absolute; top: -4px; transform: translateX(-50%); background: var(--text); color: var(--card); font-size: 12px; padding: 3px 9px; border-radius: 6px; pointer-events: none; white-space: nowrap; }

/* แท่งนอน */
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 64px 1fr 48px; align-items: center; gap: 8px; font-size: 13px; }
.bar-t { height: 12px; background: var(--grid); border-radius: 0 6px 6px 0; overflow: hidden; }
.bar-f { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; }
.bar-v { text-align: right; font-weight: 700; }

.dt { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.dt caption { text-align: left; font-weight: 700; padding: 4px 0; }
.dt td { padding: 4px 2px; border-bottom: 1px solid var(--line); }
.dt .r { text-align: right; }

/* สถานะรถ */
.vs-row { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.vs-row:last-child { border-bottom: 0; }
.vs-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.vs-dot.in { background: #16a34a; }
.vs-dot.out { background: #f59e0b; }
.vs-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.vs-sub { font-size: 12px; color: var(--muted); }

/* ปฏิทิน */
.cal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; row-gap: 2px; font-size: 13px; }
.cal-h { color: var(--muted); font-size: 11px; padding: 2px 0; }
.cal-d { position: relative; background: none; border: 0; border-radius: 8px; padding: 7px 0; font: inherit; color: var(--muted); }
.cal-d.has { color: var(--text); cursor: pointer; font-weight: 700; }
.cal-d.has:hover { background: var(--soft); }
.cal-d.today { outline: 1.5px solid var(--primary); }
.cal-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--series-1); }
.cal-d .cal-dot { position: absolute; left: 50%; bottom: 2px; margin-left: -2.5px; }
.cal-dot.warn { background: var(--red); }
.legend { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
