/* Aday360 brand tokens match the existing site's styles.css. */
:root {
  color-scheme: light;
  --page: #f5f5f7;
  --white: #fff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --orange: #f56300;
  --orange-dark: #b64400;
  --orange-soft: #fff9f4;
  --line: #d2d2d7;
  --soft: #e8e8ed;
  --blue: #06c;
  --font: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}
h1,
h2 {
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.1;
}
h1 {
  font-size: 44px;
  margin: 12px 0;
}
h2 {
  font-size: 23px;
  margin: 0 0 20px;
}
::selection {
  background: #f5630030;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 72px;
  background: #f5f5f7ed;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #d2d2d78c;
}
.nav-shell {
  width: calc(100% - 96px);
  max-width: 1180px;
  height: 100%;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand-lockup {
  display: block;
  flex: none;
  line-height: 0;
}
.brand-lockup img {
  width: 128px;
  height: auto;
  aspect-ratio: 162/80;
}
.nav-context {
  margin-right: auto;
  padding-left: 24px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: -0.015em;
}
main {
  width: calc(100% - 96px);
  max-width: 1180px;
  margin: auto;
  padding: 40px 0;
}
.page-heading {
  margin-bottom: 32px;
}
.eyebrow {
  margin: 0;
  color: var(--orange-dark);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.page-heading .intro {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  letter-spacing: -0.025em;
}
section {
  padding: 30px;
  background: var(--white);
  border-radius: 24px;
  margin-bottom: 24px;
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}
.grid section {
  min-width: 0;
}
.toolbar,
.row,
.sectionhead,
.pagination {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.toolbar {
  justify-content: space-between;
  margin-bottom: 24px;
}
.toolbar label {
  min-width: 280px;
  margin: 0;
}
.sectionhead {
  justify-content: space-between;
}
.row {
  align-items: flex-end;
  margin: 24px 0;
}
.row label {
  flex: 1;
  min-width: 160px;
  margin-bottom: 0;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}
input,
select {
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
}
button,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 0;
  border-radius: 999px;
  min-height: 46px;
  padding: 12px 23px;
  background: var(--orange);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.2s;
}
button:hover,
.button:hover {
  background: #ff791f;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--orange-dark);
  outline-offset: 4px;
}
#logout,
#prev,
#next,
#cancelJob {
  background: var(--soft);
  color: var(--ink);
}
#logout:hover,
#prev:hover,
#next:hover,
#cancelJob:hover {
  background: var(--line);
}
#logout {
  min-height: 36px;
  padding: 9px 18px;
  font-size: 12px;
}
p {
  line-height: 1.6;
  margin: 12px 0;
}
.hint,
footer {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.badge {
  background: var(--page);
  color: var(--muted);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
}
.badge.online {
  background: var(--orange-soft);
  color: var(--orange-dark);
}
dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 24px 0;
  font-size: 14px;
}
dt {
  color: var(--muted);
}
dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  font-size: 14px;
}
.check input {
  width: 19px;
  min-height: 19px;
  margin: 0;
  accent-color: var(--orange);
}
#settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 16px;
  max-height: 370px;
  overflow: auto;
  padding: 4px;
  margin: 0 -4px 8px;
}
.reported {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
#message:empty {
  display: none;
}
#message {
  margin: 0 0 24px;
  padding: 14px 18px;
  border: 1px solid #f5630030;
  border-radius: 14px;
  background: var(--orange-soft);
  color: var(--orange-dark);
}
#message.error {
  background: #fff1ef;
  color: #a52b20;
  border-color: #a52b2025;
}
.tablewrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  white-space: nowrap;
}
td,
th {
  padding: 15px 12px;
  border-bottom: 1px solid var(--soft);
  font-size: 13px;
}
th {
  color: var(--muted);
  background: var(--page);
  font-size: 12px;
  font-weight: 500;
}
td button {
  min-height: 34px;
  padding: 8px 14px;
  font-size: 12px;
}
.pagination {
  justify-content: flex-end;
  margin: 18px 0;
  font-size: 13px;
  color: var(--muted);
}
.pagination button {
  min-height: 36px;
  padding: 9px 18px;
  font-size: 12px;
}
progress {
  width: 100%;
  height: 10px;
  accent-color: var(--orange);
  margin-top: 16px;
}
video {
  display: block;
  width: 100%;
  max-height: 500px;
  background: var(--ink);
  border-radius: 16px;
  margin-top: 26px;
}
.history {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.history button {
  justify-content: flex-start;
  text-align: left;
  background: var(--page);
  color: var(--ink);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 500;
}
.history button:hover {
  background: var(--soft);
}
footer {
  width: calc(100% - 96px);
  max-width: 1180px;
  margin: auto;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .nav-shell,
  main,
  footer {
    width: calc(100% - 40px);
  }
  .nav-shell {
    gap: 14px;
  }
  .brand-lockup img {
    width: 112px;
  }
  .nav-context {
    display: none;
  }
  .grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  main {
    padding: 28px 0;
  }
  h1 {
    font-size: 34px;
  }
  h2 {
    font-size: 22px;
  }
  section {
    padding: 24px;
    border-radius: 22px;
  }
  .row {
    gap: 18px;
  }
  .row label {
    min-width: 100%;
  }
  .row button {
    width: 100%;
  }
  .toolbar label {
    min-width: 0;
    width: 100%;
  }
  .page-heading .intro {
    font-size: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  button,
  .button {
    transition: none;
  }
}

/* Branded, keyboard-accessible selects and switches. Native values remain the API source. */
.select-control {
  display: flex;
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  padding: 11px 14px;
  gap: 14px;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  text-align: left;
  font-size: 14px;
  font-weight: 400;
}
.select-control:hover {
  background: var(--page);
  border-color: #a8a8ad;
}
.select-control[aria-expanded='true'] {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px #f5630014;
  background: var(--white);
}
.select-control::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  flex: none;
  margin: -4px 2px 0 0;
}
.select-control[aria-expanded='true']::after {
  transform: rotate(225deg);
  margin-top: 4px;
  border-color: var(--orange-dark);
}
.select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.select-menu {
  position: fixed;
  z-index: 100;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow:
    0 12px 40px #1d1d1f1a,
    0 2px 8px #1d1d1f08;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.select-option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 34px 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.select-option.is-active {
  background: var(--page);
}
.select-option[aria-selected='true'] {
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-weight: 500;
}
.select-option[aria-selected='true']::after {
  content: '✓';
  position: absolute;
  right: 12px;
  color: var(--orange);
  font-weight: 600;
}
.select-option[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
}
.check {
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}
.switch {
  position: relative;
  display: inline-flex;
  width: 52px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex: none;
  vertical-align: middle;
}
.switch input {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
.switch-track {
  position: relative;
  display: block;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #c5c5ca;
  transition: background 0.18s;
  pointer-events: none;
}
.switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 1px 3px #1d1d1f26;
  transition: transform 0.18s;
}
.switch input:checked + .switch-track {
  background: var(--orange);
}
.switch input:checked + .switch-track::after {
  transform: translateX(20px);
}
.switch input:focus-visible {
  outline: 0;
}
.switch input:focus-visible + .switch-track {
  outline: 3px solid var(--orange-dark);
  outline-offset: 4px;
}
.switch input:disabled {
  cursor: not-allowed;
}
.switch input:disabled + .switch-track {
  opacity: 0.4;
}
.setting-toggle {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 16px;
  border-bottom: 1px solid var(--soft);
  padding: 4px 0 12px;
  margin-bottom: 12px;
  cursor: pointer;
}
.setting-toggle .setting-name {
  font-size: 14px;
}
.setting-toggle .reported {
  margin-top: -2px;
  grid-column: 1;
}
.setting-toggle .switch {
  grid-column: 2;
  grid-row: 1 / 3;
}
.setting-range {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 16px;
}
.range-value {
  color: var(--orange-dark);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.setting-range .reported {
  grid-column: 1 / -1;
  margin-top: 0;
}
input[type='range'] {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--orange);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
input[type='range']::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--orange) var(--range-fill, 0%),
    var(--soft) var(--range-fill, 0%)
  );
}
input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -8.5px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 1px 4px #1d1d1f26;
}
input[type='range']::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: var(--soft);
}
input[type='range']::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: var(--orange);
}
input[type='range']::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--orange);
}
@media (prefers-reduced-motion: reduce) {
  .switch-track,
  .switch-track::after {
    transition: none;
  }
}
@media (forced-colors: active) {
  .switch-track {
    border: 1px solid ButtonText;
  }
  .switch-track::after {
    background: ButtonText;
  }
  .switch input:checked + .switch-track {
    background: Highlight;
  }
}

/* Playback takes priority; device settings live in their own tab. */
.camera-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.camera-picker {
  width: min(100%, 390px);
  min-width: 0;
}
.camera-picker label {
  margin: 0;
}
.camera-bar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}
.workspace-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.workspace-tabs button {
  min-height: 48px;
  padding: 0 0 14px;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  font-size: 14px;
}
.workspace-tabs button:hover {
  color: var(--ink);
}
.workspace-tabs button[aria-selected='true'] {
  color: var(--ink);
  border-color: var(--orange);
}
.playback-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}
.viewer-card {
  padding: 24px;
  min-width: 0;
}
.viewer-card .eyebrow {
  font-size: 12px;
  margin-bottom: 8px;
}
.viewer-card h2 {
  margin: 0;
  font-size: 22px;
}
.viewer-card .sectionhead {
  margin-bottom: 20px;
}
.viewer-placeholder {
  min-height: 340px;
  aspect-ratio: 16/10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: #f5f5f7;
  border: 1px solid var(--soft);
  border-radius: 16px;
  text-align: center;
}
.viewer-placeholder svg {
  color: #9d9da4;
  margin-bottom: 24px;
}
.viewer-placeholder strong {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.025em;
}
.viewer-placeholder p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0;
}
.viewer-card video {
  margin: 0;
}
.viewer-controls,
#playbackActions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.viewer-controls {
  padding: 0 0 12px;
}
.viewer-controls button {
  min-height: 40px;
  padding: 10px 16px;
  font-size: 13px;
}
#playbackActions button {
  background: var(--page);
  border: 1px solid var(--line);
  color: var(--ink);
}
#playbackActions button:hover:not(:disabled) {
  background: var(--orange-soft);
  border-color: var(--orange);
}
.viewer-controls #startLive {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
}
.playback-status {
  margin: 0 0 16px;
  min-height: 22px;
}
.selection-card {
  padding: 24px;
}
.selection-card h2 {
  font-size: 21px;
  margin-bottom: 8px;
}
.selection-card > .hint {
  margin-bottom: 24px;
}
.selection-card form button[type='submit'] {
  width: 100%;
}
.selection-fields {
  display: grid;
  gap: 2px;
}
.selection-divider {
  height: 1px;
  background: var(--soft);
  margin: 24px 0;
}
.selection-note {
  font-size: 11px;
  margin-bottom: 0;
}
.recordings-card .sectionhead h2 {
  margin-bottom: 8px;
}
.recordings-card .sectionhead .hint {
  margin: 0 0 24px;
}
.empty-table {
  padding: 30px 12px;
  color: var(--muted);
  text-align: center;
}
.history-details {
  padding: 20px 24px;
  background: var(--white);
  border-radius: 20px;
  margin-bottom: 24px;
}
.history-details summary,
.device-details summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.history-details .history {
  margin-top: 20px;
  max-height: min(420px, 55vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 4px;
}
.settings-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.power-card .check {
  margin-top: 0;
}
.device-details {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--soft);
}
#settings {
  max-height: none;
  overflow: visible;
}
#job {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--soft);
}
#job .sectionhead {
  margin: 0;
}
#cancelJob {
  min-height: 34px;
  padding: 8px 14px;
  font-size: 12px;
}
.date-control {
  width: 100%;
  margin-top: 8px;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
}
.date-control::after {
  content: '';
  width: 15px;
  height: 15px;
  flex: none;
  border: 1.5px solid var(--muted);
  border-radius: 4px;
  background: linear-gradient(
    to bottom,
    transparent 4px,
    var(--muted) 4px,
    var(--muted) 5.5px,
    transparent 5.5px
  );
}
.date-control:hover {
  background: var(--page);
  border-color: #a8a8ad;
}
.date-control[aria-expanded='true'] {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px #f5630014;
  background: var(--white);
}
.date-value {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.date-menu {
  position: fixed;
  z-index: 100;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  box-shadow:
    0 12px 40px #1d1d1f1a,
    0 2px 8px #1d1d1f08;
  overflow: auto;
  overscroll-behavior: contain;
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.calendar-month {
  font-size: 15px;
  font-weight: 600;
  text-transform: capitalize;
}
.calendar-header .calendar-nav {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 9px;
  background: var(--page);
  color: var(--ink);
  font-size: 24px;
  font-weight: 400;
}
.calendar-header .calendar-nav:hover {
  background: var(--soft);
}
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}
.calendar-week [role='columnheader'] {
  padding: 7px 0;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.calendar-week .calendar-day {
  width: 100%;
  min-height: 36px;
  height: 36px;
  padding: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
}
.calendar-week .calendar-day:hover {
  background: var(--page);
}
.calendar-day.is-outside {
  color: #9d9da4;
}
.calendar-day.is-today {
  box-shadow: inset 0 0 0 1px var(--orange);
}
.calendar-week .calendar-day[aria-selected='true'] {
  background: var(--orange);
  color: var(--ink);
  font-weight: 600;
}
.calendar-day:focus-visible {
  outline-offset: -2px;
}
.calendar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--soft);
}
.calendar-footer button {
  min-height: 34px;
  padding: 8px 14px;
  font-size: 12px;
}
.calendar-footer .calendar-today {
  background: var(--orange-soft);
  color: var(--orange-dark);
}
.calendar-time {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--soft);
}
.calendar-time-label {
  color: var(--muted);
  font-size: 12px;
}
.time-fields {
  display: flex;
  align-items: center;
  gap: 4px;
}
.time-fields input {
  width: 38px;
  min-height: 36px;
  height: 36px;
  margin: 0;
  padding: 6px 2px;
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.time-colon {
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 1000px) {
  .playback-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 20px;
  }
  .viewer-placeholder {
    min-height: 290px;
  }
}
@media (max-width: 760px) {
  .camera-bar {
    padding: 18px;
    flex-wrap: wrap;
    gap: 14px;
  }
  .camera-picker {
    width: 100%;
  }
  .camera-bar-actions {
    width: 100%;
    justify-content: space-between;
  }
  .workspace-tabs {
    gap: 20px;
  }
  .workspace-tabs button {
    font-size: 13px;
  }
  .playback-layout,
  .settings-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .selection-card {
    order: -1;
  }
  .selection-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
  }
  .viewer-placeholder {
    min-height: 230px;
  }
  .viewer-card,
  .selection-card {
    padding: 20px;
  }
  .selection-card #exportForm {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 12px;
  }
  .selection-card #exportForm button {
    grid-column: 1 / -1;
  }
  .date-control {
    font-size: 12px;
    padding: 11px 10px;
  }
  .date-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

#liveControls { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
#liveAudioControl { display: inline-flex; align-items: center; gap: 8px; margin: 0; }

.demo-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 0 auto;
  cursor: pointer;
  white-space: nowrap;
}


body:has(#login:not([hidden])) > .site-header { display: none; }

main:has(> #login:not([hidden])) {
  width: min(440px, calc(100% - 32px));
  display: grid;
  align-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding-block: 64px;
}
#login {
  margin: 0;
  padding: clamp(24px, 5vw, 36px) clamp(20px, 5vw, 38px) 26px;
  border: 1px solid var(--soft);
}
.login-logo { display: block; width: 116px; height: auto; margin: 0 auto; }
body:has(#login:not([hidden])) > footer {
  width: min(440px, calc(100% - 32px));
  margin: -56px auto 0;
  height: 56px;
  padding: 22px 0;
  border: 0;
}
.login-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  margin: 29px 0 26px;
  list-style: none;
}
.login-steps::before {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}
#phoneStep { order: -1; }
.login-steps li { white-space: nowrap; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.login-steps span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--soft); }
.login-steps [aria-current] { color: var(--ink); font-weight: 600; }
.login-steps [aria-current] span { background: var(--orange); }
#login form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
#login form > * { min-width: 0; margin: 0; }
#login form button[type="submit"] { margin-top: 8px; }
.phone-field { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; }
.phone-field:focus-within { outline: 2px solid var(--orange); }
.phone-field input { min-width: 0; border: 0; outline: 0; padding-left: 0; margin: 0; }
#login #verificationHint { color: var(--muted); margin-bottom: 8px; }
#changePhone { background: transparent; color: var(--ink); }
#loginCode { letter-spacing: .12em; }
#codeError, #loginHint { color: #a32f0a; }
#codeError:empty, #loginHint:empty { display: none; }

/* Paired with the fleet demo layout; this console uses the connected camera API. */
main:has(#dashboard:not([hidden])) { width:100%; max-width:none; margin:0; padding:0; }
body:has(#dashboard:not([hidden])) .nav-shell { width:100%; max-width:none; padding-inline:clamp(12px,1.5vw,24px); }
.camera-console { display:grid; grid-template-columns:190px minmax(0,1fr); align-items:start; gap:16px; }
.console-rail,.console-work { min-width:0; padding:16px; background:white; border:1px solid var(--soft); border-radius:16px; }
.console-rail h2 { font-size:17px; margin:0 0 14px; }
#cameraList { display:grid; gap:6px; }
#cameraList button { text-align:left; justify-content:flex-start; overflow-wrap:anywhere; border:1px solid transparent; padding:12px; border-radius:10px; background:transparent; }
#cameraList button[aria-pressed=true] { background:var(--orange-soft); border-color:#f6b992; }

.console-heading,.console-tools,.console-segments { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.console-tools { width:100%; justify-content:space-between; margin-bottom:14px; }
.console-heading .console-segments { flex-wrap:nowrap; }
.console-work:has(#recordingsPanel[hidden]) .console-heading { display:none; }
.console-segments { background:var(--page); border-radius:10px; padding:3px; width:fit-content; }
.console-segments button,.console-heading button { min-height:38px; padding:6px 12px; border-radius:8px; background:var(--page); }
.console-segments button[aria-pressed=true] { background:var(--ink); color:white; }
.console-work .playback-layout { grid-template-columns:minmax(0,1fr); gap:16px; }
.console-work .playback-layout:has(#archiveDrawer:not([hidden])) { grid-template-columns:minmax(0,1fr) minmax(270px,320px); }
.console-work .viewer-card { padding:0; margin:0; }
.console-work .viewer-placeholder { background:#19191c; color:white; min-height:0; aspect-ratio:16/9; }
.console-work .viewer-placeholder p { color:#c1c1c5; }
#archiveDrawer { min-width:0; border-left:1px solid var(--soft); padding-left:16px; }
#archiveDrawer section,#archiveDrawer details { padding:12px 0; margin:0; min-width:0; }
#archiveDrawer .selection-fields { display:block; }
#archiveDrawer .tablewrap { max-width:100%; overflow-x:auto; }
@media(max-width:850px) {
  .camera-console,.console-work .playback-layout:has(#archiveDrawer:not([hidden])) { grid-template-columns:minmax(0,1fr); }
  #cameraList { grid-template-columns:repeat(auto-fit,minmax(min(140px,100%),1fr)); }
  #archiveDrawer { border-left:0; border-top:1px solid var(--soft); padding:12px 0 0; }
}

/* One workspace surface: vehicle rail, viewer, then the date/record drawer. */
.camera-console, .fleet-demo .fleet-layout {
  gap:0; background:var(--white); border:1px solid var(--line); border-radius:16px;
}
.camera-console .console-rail, .fleet-demo .fleet-rail {
  align-self:stretch; border:0; border-right:1px solid var(--soft); border-radius:16px 0 0 16px;
}
.camera-console .console-work, .fleet-demo .fleet-work { border:0; border-radius:0 16px 16px 0; }
.recent-days { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; margin:12px 0 14px; }
.recent-days button { display:grid; gap:2px; min-height:48px; padding:5px 2px; border:1px solid var(--line); border-radius:8px; color:var(--ink); background:white; }
.recent-days button strong { font-size:13px; }
.recent-days button small { font-size:12px; font-weight:400; color:inherit; }
.recent-days button[aria-pressed=true] { background:var(--ink); color:white; border-color:var(--ink); }
@media(max-width:850px) {
  .camera-console .console-rail,.fleet-demo .fleet-rail { border-right:0; border-bottom:1px solid var(--soft); border-radius:16px 16px 0 0; }
  .camera-console .console-work,.fleet-demo .fleet-work { border-radius:0 0 16px 16px; }
}

.recording-lesson { display:block; margin-top:3px; color:var(--muted); }

#dashboard .camera-console { min-height:calc(100dvh - 72px); border:0; border-radius:0; }
#dashboard .console-rail,#dashboard .console-work { border-radius:0; }
#dashboard .viewer-card video,#dashboard .viewer-placeholder {
  width:100%; aspect-ratio:16/9; max-height: max(240px, calc(100dvh - 340px)); object-fit:contain;
}
#dashboard .viewer-card video { display:block; background:#19191c; }
#dashboard .viewer-card video:fullscreen { height:100%; max-height:none; }
#dashboard .viewer-controls { justify-content:space-between; padding:10px 0 0; }
#dashboard .viewer-card .sectionhead { margin-bottom:8px; }
#dashboard .viewer-card .playback-status { margin:8px 0 0; }
@media (max-width:850px) {
  #dashboard .camera-console { align-content:start; }
  #dashboard .console-work,#dashboard .console-rail { padding:12px; }
}

/* The transport bar belongs to the player, in both camera modes. */
.media-deck { background:#19191c; color:white; border-radius:12px; overflow:hidden; }
#dashboard .media-deck :is(.viewer-placeholder,video) { border:0; border-radius:0; margin:0; }
#dashboard .media-deck .viewer-controls {
  padding:4px 8px; display:flex; justify-content:flex-start; flex-wrap:wrap;
  align-items:center; gap:4px; background:#242427;
}
.media-deck #liveControls,.media-deck #playbackActions { gap:2px; align-items:center; }
.media-deck #playbackActions { flex:1; }
.media-deck #fullscreenPlayback { margin-inline-start:auto; }
#dashboard .media-deck button {
  display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; min-height:40px;
  padding:0; border:0; border-radius:6px; font-size:0; background:transparent; color:white;
}
#dashboard .media-deck button:disabled { opacity:.32; }
#dashboard .media-deck button:hover:not(:disabled),#dashboard .media-deck button:focus-visible { background:#454549; }
.media-deck button::before { content:''; width:20px; height:20px; background:currentColor; clip-path:var(--glyph); }
.media-deck #startLive,.media-deck #pausePlayback[title="Devam et"] { --glyph:polygon(23% 5%,93% 50%,23% 95%); }
.media-deck #pausePlayback { --glyph:polygon(15% 10%,38% 10%,38% 90%,15% 90%,15% 10%,62% 10%,85% 10%,85% 90%,62% 90%,62% 10%); }
.media-deck #stopPlayback { --glyph:inset(14% round 2px); }
.media-deck #fullscreenPlayback::before { background:none; border:2px solid currentColor; mask:conic-gradient(at 5px 5px,transparent 25%,black 0) 0 0 / calc(100% - 5px) calc(100% - 5px); }
.media-deck #toggleLiveAudio { --glyph:path("M1 7 H5 L11 2 V18 L5 13 H1 Z M13 6 Q18 10 13 14 L14 16 Q21 10 14 4 Z"); }
.media-deck #toggleLiveAudio[aria-pressed="false"] { --glyph:path("M1 7 H5 L11 2 V18 L5 13 H1 Z M13 7 L14 6 L16 9 L19 6 L20 7 L17 10 L20 13 L19 14 L16 11 L14 14 L13 13 L15 10 Z"); }
.media-deck #liveAudioControl { color:white; padding-inline:8px; }
.media-deck:has(#player:not([hidden])) #startLive,
.media-deck:has(#player:not([hidden]) video[controls]) :is(#pausePlayback,#fullscreenPlayback),
#playbackHint:empty { display:none!important; }

.player-heading-accessible { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }

/* Keep the channel identity, picture and transport in a single monitor. */
#dashboard .media-deck { position:relative; isolation:isolate; border:1px solid #252a31; background:#101317; }
.media-caption { display:flex; align-items:center; gap:10px; padding:8px 14px; color:#c7cdd4; background:#181c21; font-size:12px; }
#mediaMode { font-weight:650; color:white; }
#dashboard .media-deck .viewer-placeholder { background:radial-gradient(ellipse at center,#212731,#101317 70%); color:#abb3bf; gap:10px; }
#dashboard .viewer-placeholder svg { width:32px; height:32px; margin:0; color:#7b8594; }
#dashboard .viewer-placeholder strong { font-size:14px; font-weight:500; }
#dashboard .media-deck .viewer-controls { background:#181c21; padding:4px 10px; border-top:1px solid #30353c; }
#dashboard .media-deck #startLive { color:#ff944f; }
.media-deck:fullscreen { width:100%; height:100%; display:flex; flex-direction:column; }
.media-deck:fullscreen #player { flex:1; min-height:0; }
#dashboard .media-deck:fullscreen video { width:100%; height:100%; max-height:none; }
.media-deck:fullscreen .viewer-controls { flex:none; }
.console-work:has(#archiveDrawer:not([hidden])) #liveControls { display:none; }
#archiveDrawer .drawer-details { border-top:1px solid var(--soft); }
#archiveDrawer summary { padding:8px 0; cursor:pointer; font-size:14px; font-weight:600; }
#archiveDrawer .recordings-card h2,#archiveDrawer .selection-card h2 { font-size:17px; margin-bottom:12px; }
#archiveDrawer .tablewrap { overflow:visible; border:0; }
#archiveDrawer table,#archiveDrawer tbody { display:block; width:100%; min-width:0; }
#archiveDrawer thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
#archiveDrawer tbody { display:grid; gap:8px; }
#archiveDrawer tbody tr {
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center;
  gap:10px; padding:12px; border:1px solid var(--soft); border-radius:10px;
}
#archiveDrawer tbody td { padding:0; border:0; white-space:normal; min-width:0; }
#archiveDrawer tbody td:only-child { grid-column:1/-1; }
.clip-time,.clip-meta,.clip-lesson { display:block; }
.clip-time { font-size:14px; font-variant-numeric:tabular-nums; line-height:1.4; }
.clip-meta { color:var(--muted); font-size:12px; margin-top:4px; }
.clip-lesson { font-size:13px; margin-top:5px; }
#archiveDrawer tbody td:nth-child(2) { display:grid; gap:4px; justify-items:stretch; }
#archiveDrawer td button { min-height:34px; padding:5px 10px; border-radius:7px; }
#archiveDrawer td button:first-child { background:var(--ink); color:white; }
#archiveDrawer td button + button { background:transparent; color:var(--muted); font-size:12px; }
#archiveDrawer .pagination { justify-content:center; }
#settingsPanel .settings-layout { grid-template-columns:minmax(210px,1fr) minmax(0,2fr); gap:16px; }
#settingsPanel .settings-layout > section { border:1px solid var(--soft); border-radius:12px; margin:0; padding:18px; }
#settingsPanel #settings { display:grid; grid-template-columns:1fr; gap:18px; margin:18px 0; padding:0; }
#settings fieldset { margin:0; padding:12px 0 0; border:0; border-top:1px solid var(--line); min-width:0; }
#settings legend { font-weight:650; font-size:14px; padding:0 8px 0 0; }
#settings fieldset > label { padding:8px 0; margin:0; }
#settings fieldset > label:not(:last-child) { border-bottom:1px solid var(--soft); }
#settings .reported { font-size:12px; }
@media(max-width:850px) { #settingsPanel .settings-layout { grid-template-columns:1fr; } }
#mediaTime { margin-inline-start:auto; font-variant-numeric:tabular-nums; }
body.player-expanded { overflow:hidden; }
#dashboard .media-deck.expanded { position:fixed; inset:0; z-index:999; width:100%; height:100dvh; border:0; border-radius:0; display:flex; flex-direction:column; }
.media-deck.expanded #player { flex:1; min-height:0; }
#dashboard .media-deck.expanded video { width:100%; height:100%; max-height:none; }

#consoleLive { gap:6px; }
#consoleLive[aria-pressed="true"] { background:#b42332; color:white; }

#dashboard .media-deck.dual-camera { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-rows:auto minmax(0,1fr) auto; }
.dual-camera .media-caption { grid-column:1; grid-row:1; }
.dual-camera #player { grid-column:1; grid-row:2; align-self:center; }
.dual-camera #cabinView { grid-column:2; grid-row:1/3; display:grid; grid-template-rows:auto 1fr; margin:0; min-width:0; border-left:1px solid #30353c; }
#cabinView figcaption { padding:8px 14px; background:#181c21; color:#c7cdd4; font-size:12px; }
#dashboard #cabinVideo { align-self:center; }
.dual-camera .viewer-controls { grid-column:1/-1; grid-row:3; }

.missing-cabin { align-self:center; text-align:center; color:#b3b9c0; font-size:14px; padding:12px; }

#dashboard .paired-preview:not(:fullscreen):not(.expanded) video { aspect-ratio: auto; height: auto; width: 100%; }

.console-tools:has(.candidate-search:not([hidden])) { justify-content:flex-start; }
.candidate-search { position:relative; width:min(19rem,100%); }
.candidate-search input { width:100%; }
#candidateMatches { position:absolute; z-index:8; top:100%; inset-inline:0; max-height:18rem; overflow:auto; background:white; border:1px solid var(--line); border-radius:8px; }
#candidateMatches button { width:100%; display:flex; align-items:center; justify-content:start; text-align:start; gap:12px; border-radius:0; padding:8px 12px; background:white; }
#candidateMatches button:is(:hover,:focus-visible) { background:var(--page); }
#candidateMatches .candidate-avatar { flex:none; display:grid; place-items:center; width:40px; height:40px; border-radius:50%; background:#ede8f6; color:#60438d; }
#candidateMatches small { display:block; color:var(--muted); font-weight:400; }
#candidateMatches p { padding:0 12px; }

.candidate-avatar img { width:100%; height:100%; object-fit:cover; border-radius:inherit; }
