:root { color-scheme: dark; font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; background: #0b0d10; color: #f5f7fa; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top, #1d2735 0, #0b0d10 45%); }
.shell { width: min(100%, 920px); margin: 0 auto; padding: 24px 18px 48px; }
h1 { font-size: clamp(1.5rem, 5vw, 2.2rem); margin: 0 0 8px; }
h2 { margin-top: 32px; }
.muted { color: #a8b0ba; }
a { color: #9fc4ff; }
.login-form { display: grid; gap: 12px; }
.login-form button { margin-top: 8px; }
.card { background: rgba(22, 27, 34, .94); border: 1px solid #303945; border-radius: 18px; padding: 18px; margin-top: 18px; box-shadow: 0 20px 60px #0008; }
video { display: block; width: 100%; max-height: 60vh; background: #000; border-radius: 14px; object-fit: contain; }
.status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 34px; margin: 12px 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #78818b; }
.dot.live { background: #ff3b4e; box-shadow: 0 0 0 6px #ff3b4e22; animation: pulse 1.5s infinite; }
@keyframes pulse { 50% { opacity: .45; } }
button, input, select { font: inherit; border-radius: 12px; border: 1px solid #3c4652; padding: 12px 14px; background: #202732; color: #fff; }
button { cursor: pointer; font-weight: 750; }
button.primary { width: 100%; min-height: 62px; border: 0; background: #2e7df6; font-size: 1.15rem; }
button.finish { width: 100%; min-height: 62px; border-color: #ff6573; background: #411923; color: #fff; touch-action: none; }
button:disabled { opacity: .45; cursor: not-allowed; }
.warning { color: #ffd27a; background: #4c3715; padding: 10px 12px; border-radius: 10px; }
.error { color: #ffb2b8; background: #4b151c; padding: 10px 12px; border-radius: 10px; }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row > input, .row > select { flex: 1 1 180px; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { padding: 11px 8px; text-align: left; border-bottom: 1px solid #303945; vertical-align: top; }
.table-wrap { overflow-x: auto; }
.pill { display: inline-block; border: 1px solid #465464; border-radius: 99px; padding: 3px 8px; font-size: .78rem; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions button { padding: 7px 9px; font-size: .82rem; }
dialog { background: #161b22; color: #fff; border: 1px solid #46515e; border-radius: 16px; max-width: 420px; }
@media (max-width: 620px) { .shell { padding: 18px 12px 36px; } .card { padding: 14px; border-radius: 14px; } }

/* Manager workspace: two clear sections, with recording review kept in context. */
.manager { background: #101319; }
.manager-shell { width: min(100%, 1180px); padding-top: 30px; }
.manager .card { border-radius: 12px; box-shadow: none; }
.manager h2 { margin: 0; font-size: 1.35rem; }
.manager h3 { margin: 0 0 16px; font-size: 1rem; }
.manager p { line-height: 1.5; }
.manager-header, .section-heading, .review-header, .review-controls, .review-actions { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.manager-header { margin-bottom: 24px; }
.eyebrow { margin: 0 0 6px; color: #a8b0ba; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.manager-header h1 { font-size: 1.8rem; margin: 0; }
.manager-login { max-width: 440px; margin: 48px auto; }
.manager-login > a { display: inline-block; margin-top: 20px; }
.manager-tabs { display: flex; gap: 28px; border-bottom: 1px solid #303945; }
.manager-tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 14px 4px; background: none; color: #a8b0ba; }
.manager-tabs button[aria-selected="true"] { color: #fff; border-bottom-color: #6ca3ff; }
.section-heading { margin: 26px 0 18px; }
.section-heading p { margin: 6px 0 0; }
.section-heading.compact { margin: 0 0 12px; }
.section-heading.compact h3 { margin: 0; }
.manager label { display: grid; gap: 7px; font-size: .85rem; color: #b7c0cb; }
.recording-filters { display: grid; grid-template-columns: 1.4fr 1.1fr 1.1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.recording-filters input, .recording-filters select { width: 100%; min-width: 0; padding: 10px; font-size: .87rem; }
.recording-filters button { padding: 10px 12px; font-size: .87rem; }
.recordings-table { min-width: 650px; }
.recordings-table th { color: #a8b0ba; font-weight: 500; font-size: .78rem; padding-top: 8px; }
.recordings-table td { padding: 16px 10px; vertical-align: middle; }
.recordings-table th:first-child, .recordings-table td:first-child { padding-left: 0; }
.recordings-table th:last-child, .recordings-table td:last-child { padding-right: 0; text-align: right; }
.recordings-table tbody tr:last-child td { border-bottom: 0; }
.manager .accent { background: #275eae; border-color: #3b76cf; color: #fff; }
.manager .accent:hover { background: #326fc8; }
.manager button, .manager input, .manager select { border-radius: 8px; }
.manager :focus-visible { outline: 2px solid #86b3ff; outline-offset: 3px; }
.small { font-size: .8rem; }
.block { display: block; margin-top: 5px; }
.nowrap { white-space: nowrap; }
.kept { color: #a8d7c2; font-size: .8rem; }
.attention { color: #edc16e; }
.status-available { color: #ace0c5; border-color: #375c4a; background: #163025; }
.status-processing, .status-starting { color: #eed296; border-color: #6e552d; }
.status-live { color: #a9cfff; border-color: #44658e; }
.status-failed { color: #ffb2b8; border-color: #85434a; }
.empty-state { margin: 32px 0; padding: 24px; text-align: center; color: #a8b0ba; }
.retention-settings summary, .recording-details summary { cursor: pointer; font-weight: 600; }
.retention-settings .row { margin-top: 20px; }
.manager .retention-settings label { display: block; }
#retentionDays { width: 90px; margin: 0 5px; }
.grow { flex: 1; min-width: 200px; }
#employeeForm { align-items: end; }
.employee-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid #303945; }
.employee-item > div:first-child { display: grid; gap: 5px; }
.manager .check-label { display: flex; align-items: center; gap: 8px; }
.check-label input { width: 16px; height: 16px; }
.review-dialog { width: min(1100px, calc(100% - 32px)); max-width: none; max-height: 94vh; padding: 24px; border-radius: 14px; }
dialog::backdrop { background: #000b; }
.review-header { align-items: flex-start; margin-bottom: 12px; }
.review-header h2 { margin: 0; }
.review-header .muted { margin: 6px 0 0; }
#reviewVideo { height: min(58vh, 640px); max-height: none; border-radius: 8px; }
#playerStatus { font-size: .82rem; }
.review-controls { margin: 14px 0; flex-wrap: wrap; }
.manager .speed-label { display: flex; align-items: center; gap: 8px; }
.speed-label select { padding: 9px; }
.review-actions { padding: 18px 0; border-top: 1px solid #303945; align-items: flex-start; }
.review-actions p { margin: 8px 0 0; }
#keepRecording[aria-pressed="true"] { border-color: #75b69a; color: #b4e4cd; }
.recording-details { border-top: 1px solid #303945; padding-top: 16px; }
.checksum, .row-error { overflow-wrap: anywhere; max-width: 100%; }
.row-error { margin-top: 8px; max-width: 240px; }
.danger { border-color: #874950; color: #ffb2b8; background: #361d23; }
.rename-dialog { width: min(420px, calc(100% - 32px)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 900px) { .recording-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .manager-shell { padding-top: 20px; }
  .manager-header h1 { font-size: 1.5rem; }
  .recording-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manager .section-heading { align-items: flex-start; }
  .section-heading.compact, .employee-item { flex-wrap: wrap; }
  .review-dialog { width: calc(100% - 16px); padding: 14px; }
  #reviewVideo { height: 48vh; }
  .review-controls, .review-actions { gap: 12px; }
  .review-controls button { padding: 9px; }
}
