/* CONTROLS */
.ctrl-select {
  height: 34px; padding: 0 30px 0 11px;
  border: 1px solid var(--border-strong);
  background: var(--bg-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(238,241,246,0.4)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--text); border-radius: var(--r-sm); font-size: 12.5px;
  appearance: none; -webkit-appearance: none; outline: none; cursor: pointer;
}
.ctrl-select:focus { border-color: var(--accent); }
.ctrl-pill {
  height: 34px; padding: 0 12px; border: 1px solid var(--border);
  background: var(--bg-2); border-radius: var(--r-sm);
  font-size: 12px; color: var(--text-2);
  display: inline-flex; align-items: center; white-space: nowrap;
}
.ctrl-pill.good { color: var(--green); border-color: rgba(76,175,130,0.25); background: var(--green-dim); }
.ctrl-pill.warn { color: var(--amber); border-color: rgba(212,168,67,0.25); background: var(--amber-dim); }
.ctrl-pill.bad  { color: var(--red);   border-color: rgba(212,96,96,0.25);  background: var(--red-dim); }
.ctrl-btn-ghost {
  height: 34px; padding: 0 12px;
  border: 1px solid var(--border-strong); background: var(--bg-2);
  border-radius: var(--r-sm); font-size: 12.5px; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 150ms, color 150ms;
}
.ctrl-btn-ghost:hover { background: var(--bg-3); color: var(--text); }
.mobile-toggle-btn { display: none; }

/* CARD */
.card {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--r-xl); backdrop-filter: blur(20px);
  padding: clamp(14px, 1.3vw, 20px); min-width: 0;
}
.card-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.card-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; letter-spacing: 0.04em; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 10px; }
.kpi { border-radius: var(--r-lg); padding: 14px; border: 1px solid var(--border); background: var(--bg-2); min-width: 0; }
.kpi-label { font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 7px; }
.kpi-value { font-family: 'DM Mono', monospace; font-size: clamp(14px, 1.4vw, 22px); font-weight: 500; letter-spacing: -0.02em; line-height: 1; margin-bottom: 5px; }
.kpi-note { font-size: 11px; color: var(--text-3); }
.kpi-accent .kpi-value { color: var(--accent); }
.kpi-good   .kpi-value { color: var(--green); }
.kpi-warn   .kpi-value { color: var(--amber); }
.kpi-bad    .kpi-value { color: var(--red); }
.kpi-accent { border-color: var(--accent-border); background: var(--accent-dim); }
.kpi-good   { border-color: rgba(76,175,130,0.2); background: var(--green-dim); }
.kpi-warn   { border-color: rgba(212,168,67,0.2); background: var(--amber-dim); }
.kpi-bad    { border-color: rgba(212,96,96,0.2);  background: var(--red-dim); }

/* LAYOUTS */
.two-col   { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.auto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 12px; }
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px,1fr)); gap: 14px; }

/* TABLE */
.table-wrap { width: 100%; overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { padding: 10px 13px; border-bottom: 1px solid var(--border); font-size: 12.5px; vertical-align: middle; }
th { color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; font-size: 10.5px; text-align: left; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-family: 'DM Mono', monospace; font-size: 12px; }
td.text { word-break: break-word; }

/* FORMS */
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.03); color: var(--text);
  border-radius: var(--r-sm); padding: 8px 10px;
  outline: none; font-size: 12.5px; transition: border-color 150ms;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); }
.textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.field-label { display: block; font-size: 10.5px; font-weight: 500; color: var(--text-3); margin-bottom: 5px; letter-spacing: 0.07em; text-transform: uppercase; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; }

/* BUTTONS */
.btn-primary {
  height: 34px; padding: 0 14px;
  background: var(--accent-dim); border: 1px solid var(--accent-border);
  border-radius: var(--r-sm); color: #C8DAFF;
  font-size: 12.5px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 150ms;
}
.btn-primary:hover { background: rgba(91,143,255,0.22); }
.btn-ghost {
  height: 34px; padding: 0 12px;
  border: 1px solid var(--border-strong); background: var(--bg-2);
  border-radius: var(--r-sm); color: var(--text-2); font-size: 12.5px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 150ms, color 150ms;
}
.btn-ghost:hover { background: var(--bg-3); color: var(--text); }
.inline-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* TAGS */
.tag { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: var(--r-sm); font-size: 11px; font-weight: 500; border: 1px solid var(--border); background: var(--bg-2); color: var(--text-2); white-space: nowrap; }
.tag.good { color: var(--green); border-color: rgba(76,175,130,0.22); background: var(--green-dim); }
.tag.warn { color: var(--amber); border-color: rgba(212,168,67,0.22); background: var(--amber-dim); }
.tag.bad  { color: var(--red);   border-color: rgba(212,96,96,0.22);  background: var(--red-dim); }

/* ALERTS */
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item { display: flex; gap: 11px; align-items: flex-start; padding: 11px 13px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--bg-2); font-size: 12.5px; }
.alert-item.good { border-color: rgba(76,175,130,0.2); background: var(--green-dim); }
.alert-item.warn { border-color: rgba(212,168,67,0.2); background: var(--amber-dim); }
.alert-item.bad  { border-color: rgba(212,96,96,0.2);  background: var(--red-dim); }
.alert-icon { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: rgba(255,255,255,0.06); font-size: 11px; flex-shrink: 0; }

/* MISC */
.progress { width: 100%; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), rgba(91,143,255,0.4)); }
.bar-line { margin-top: 7px; width: 100%; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.bar-line > span { display: block; height: 100%; border-radius: inherit; background: rgba(91,143,255,0.7); }
.metric-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.metric-row:last-of-type { border-bottom: 0; }
.metric-row .muted { font-size: 12.5px; color: var(--text-2); }
.metric-row strong { font-family: 'DM Mono', monospace; font-size: 12.5px; font-weight: 500; }
.mini-card { border-radius: var(--r-lg); padding: 13px; border: 1px solid var(--border); background: var(--bg-2); }
.mini-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.mini-card-label { font-size: 10.5px; color: var(--text-3); letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 3px; }
.mini-card-value { font-family: 'DM Mono', monospace; font-size: 17px; font-weight: 500; letter-spacing: -0.02em; }
.slider-wrap { display: flex; flex-direction: column; gap: 9px; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 4px; }
.session-card { border-radius: var(--r-lg); padding: 13px; border: 1px solid var(--border); background: var(--bg-2); display: flex; flex-direction: column; gap: 8px; }
.vehicle-card { border-radius: var(--r-lg); padding: 14px; border: 1px solid var(--border); background: var(--bg-2); }
.vehicle-card details[open] summary { margin-bottom: 10px; }
details summary { list-style: none; cursor: pointer; }
details summary::-webkit-details-marker { display: none; }
.split { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.muted { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.tiny  { font-size: 11px; color: var(--text-3); }
.footer-note { font-size: 11px; color: var(--text-3); margin-top: 10px; }
.empty-state { border: 1px dashed var(--border-strong); border-radius: var(--r-lg); padding: 18px; text-align: center; color: var(--text-2); font-size: 12.5px; }
