/* Placeholder functional layout only — NOT a design pass.
   Visual styling (color, typography, chart treatment, layout polish) is
   deferred to a dedicated Impeccable pass over /ui. This file exists so the
   app is legible and usable in the meantime. */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #f4f4f4;
  color: #1a1a1a;
}

#app {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

.app-header h1 {
  margin: 0 0 4px;
}

.app-subtitle {
  margin: 0 0 16px;
  color: #555;
}

.app-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid #ddd;
}

.tab-button {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  margin-right: 0;
  padding: 8px 4px;
  color: #555;
}

.tab-button[aria-selected='true'] {
  color: #1a1a1a;
  border-bottom-color: #1a1a1a;
  font-weight: 600;
}

.app-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* .app-main's own `display: flex` would otherwise override the browser's
   default `display: none` for [hidden] (author styles beat the UA
   stylesheet even at equal specificity) — without this, a hidden tab panel
   stays visible. */
.app-main[hidden] {
  display: none;
}

.review-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-filename {
  color: #333;
  font-weight: 600;
}

.review-status {
  margin-top: 8px;
  color: #666;
}

.review-legend {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.85rem;
}
.review-legend[hidden] {
  display: none;
}

.legend-item {
  position: relative;
  padding-left: 16px;
}

.legend-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 2px;
}

.legend-accel::before {
  background: #3d6fe0;
}

.legend-gyro::before {
  background: #e05252;
}

.review-chart-holder {
  width: 100%;
  height: 320px;
  margin-top: 12px;
  border: 1px solid #eee;
  border-radius: 4px;
}

.review-chart-holder canvas {
  display: block;
}

section {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 12px;
}

button {
  font: inherit;
  padding: 6px 12px;
  margin-right: 8px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.connection-status,
.recording-status {
  font-weight: 600;
  margin-bottom: 8px;
}

.connection-error,
.recording-error {
  color: #b00020;
  margin-top: 8px;
}

.status-readout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.readout-field {
  display: flex;
  flex-direction: column;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 6px 8px;
}

.readout-label {
  font-size: 0.75rem;
  color: #666;
}

.readout-value {
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.chart-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chart-group h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.chart-canvas-holder {
  width: 100%;
  height: 160px;
  border: 1px solid #eee;
  border-radius: 4px;
}

.chart-canvas-holder canvas {
  display: block;
}

.recording-file {
  margin-top: 8px;
  color: #333;
}
