:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202d31;
  background: #f4f6f4;
  font-synthesis: none;
  --ink: #202d31;
  --muted: #607176;
  --border: #dce4df;
  --accent: #176844;
  --accent-hover: #105637;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid #669879; outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(28px, 3.5vw, 42px); font-weight: 650; line-height: 1.13; letter-spacing: -1.2px; }
h2 { margin-bottom: 12px; font-size: 20px; font-weight: 650; letter-spacing: -.35px; }
h3 { margin-bottom: 12px; font-size: 16px; font-weight: 650; }
p { line-height: 1.55; }
.site-header { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px max(28px, calc((100vw - 1440px) / 2)); border-bottom: 1px solid var(--border); background: #fff; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 650; letter-spacing: -.4px; white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; border: 8px solid var(--accent); border-radius: 50%; box-shadow: 0 0 0 4px #eaf1eb; }
.account-actions { display: flex; align-items: center; gap: 16px; min-width: 0; }
.tenant-label { max-width: 280px; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main-shell { max-width: 1440px; margin: auto; padding: 38px 28px 28px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; margin-bottom: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 8px; font-size: 13px; line-height: 1.35; font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s; }
.button-primary { color: #fff; background: var(--accent); }
.button-primary:hover:not(:disabled) { background: var(--accent-hover); }
.button-secondary { color: var(--ink); background: #fff; border-color: var(--border); }
.button-secondary:hover:not(:disabled) { background: #edf3ef; border-color: #b9cfc0; }
.button-quiet { background: transparent; color: var(--muted); }
.button-quiet:hover:not(:disabled) { background: #edf3ef; color: var(--ink); }
.button-danger { background: #fff4f1; border-color: #ecd2c9; color: #923e2f; }
.button-danger:hover:not(:disabled) { background: #fce6e0; }
.button-full { width: 100%; }
.notice { padding: 14px 18px; margin: 0 0 24px; border: 1px solid #b7d5c0; border-radius: 10px; background: #e9f4ed; color: #235636; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.notice.is-error { background: #fff0eb; color: #823827; border-color: #ebc8bb; }
.loading-view { padding: 100px 0; display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--muted); }
.loading-dot { height: 9px; width: 9px; border-radius: 50%; background: var(--accent); animation: pulse 1.5s ease-in-out infinite; }
.login-view { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: center; max-width: 1080px; margin: 65px auto; }
.login-intro h1 { font-size: clamp(34px, 4.2vw, 54px); line-height: 1.08; letter-spacing: -1.8px; margin-bottom: 22px; }
.intro-copy { max-width: 450px; color: var(--muted); font-size: 16px; }
.flow-list { list-style: none; margin: 35px 0 0; padding: 0; }
.flow-list li { display: flex; align-items: center; gap: 16px; padding: 12px 0; font-size: 14px; }
.flow-list span { color: #79927f; font-size: 12px; font-variant-numeric: tabular-nums; }
.panel { border: 1px solid var(--border); border-radius: 14px; background: #fff; padding: 24px; box-shadow: 0 3px 6px #183b2203; min-width: 0; }
.login-panel { padding: 34px; }
.login-panel .muted { margin-bottom: 28px; font-size: 14px; }
.login-panel .button { margin-top: 8px; min-height: 46px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; min-width: 0; }
.field > span, legend { font-size: 12px; line-height: 1.4; font-weight: 600; }
.optional { color: var(--muted); font-size: 11px; font-weight: 400; margin-left: 4px; }
input:not([type="radio"]):not([type="checkbox"]), .field select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #ccd8d0; border-radius: 8px; color: var(--ink); background: #fff; font-size: 13px; line-height: 1.5; }
input::placeholder { color: #89968e; }
input:focus { border-color: #649575; }
input:disabled { background: #f4f6f4; }
input[type="datetime-local"] { min-height: 46px; }
.field-hint { margin-top: -11px; margin-bottom: 20px; color: var(--muted); font-size: 11px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row .field > span { font-size: 11px; }
.start-options { border: 0; margin: 3px 0 20px; padding: 0; }
.start-options legend { padding: 0; margin-bottom: 9px; }
.segmented-control { display: flex; gap: 4px; padding: 4px; background: #f0f4f1; border-radius: 8px; }
.segmented-control label { position: relative; flex: 1; cursor: pointer; text-align: center; }
.segmented-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.segmented-control span { display: block; padding: 10px 6px; border-radius: 5px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.segmented-control input:checked + span { background: #fff; color: var(--accent); font-weight: 600; box-shadow: 0 1px 4px #203c2512; }
.segmented-control input:focus-visible + span { outline: 3px solid #669879; outline-offset: 2px; }
.form-note { margin-bottom: 20px; padding-left: 12px; border-left: 2px solid #c8d9c9; font-size: 11px; color: var(--muted); }
.page-heading { display: flex; justify-content: space-between; gap: 30px; align-items: end; margin-bottom: 28px; }
.page-heading h1 { font-size: 34px; }
.page-heading .muted { margin-bottom: 0; font-size: 14px; }
.refresh-controls { display: flex; flex-direction: column; align-items: end; gap: 9px; flex-shrink: 0; }
.refresh-status { font-size: 11px; color: var(--muted); }
.refresh-status.is-stale { color: #923e2f; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.metric { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 17px 21px; background: #eef3ee; }
.metric-label { color: #566a5d; font-size: 12px; }
.metric strong { font-size: 25px; font-weight: 600; font-variant-numeric: tabular-nums; }
.workspace-grid { display: grid; grid-template-columns: minmax(290px, .95fr) minmax(270px, 1fr) minmax(320px, 1.2fr); gap: 20px; align-items: start; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.section-heading h2, .section-heading h3 { margin-bottom: 0; }
.section-heading h2 { font-size: 17px; }
.subtle-tag { color: var(--muted); font-size: 10px; white-space: nowrap; }
.count-label { min-width: 24px; padding: 4px 7px; border-radius: 6px; color: var(--muted); background: #f0f4f1; font-size: 11px; text-align: center; }
.section-caption { margin-top: -6px; margin-bottom: 20px; font-size: 12px; color: var(--muted); }
.recordings-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; max-height: 775px; overflow-y: auto; scrollbar-width: thin; }
.load-more-button { margin-top: 14px; }
.recording-card { display: block; width: 100%; text-align: left; color: var(--ink); border: 1px solid #e0e7e1; border-radius: 9px; padding: 14px; background: #fff; }
.recording-card:hover { border-color: #a9c5b2; background: #f8faf8; }
.recording-card[aria-pressed="true"] { border-color: #8aaf95; background: #f0f6f0; box-shadow: inset 3px 0 var(--accent); }
.recording-card-heading { display: flex; justify-content: space-between; align-items: start; gap: 6px; margin-bottom: 12px; }
.platform-label { font-size: 12px; font-weight: 650; }
.recording-date { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.recording-name { display: block; font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.recording-id { display: block; margin-top: 8px; color: #7b8a80; font: 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.status-badge { display: inline-block; padding: 4px 7px; border-radius: 5px; background: #eef1f0; color: #5d6e68; font-size: 10px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.status-recording { background: #fff0e4; color: #99551c; }
.status-completed { background: #e7f1e6; color: #28603a; }
.status-partial { background: #fff1d7; color: #855e15; }
.status-failed { background: #fbe8e4; color: #983e34; }
.status-waiting, .status-connecting, .status-finalizing { background: #e9f0fb; color: #43618b; }
.empty-state { padding: 46px 4px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }
.empty-state h3 { font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.empty-state p { margin-bottom: 0; font-size: 12px; }
.empty-symbol { display: inline-flex; justify-content: center; align-items: center; margin-bottom: 16px; width: 44px; height: 44px; border-radius: 14px; background: #edf3ed; color: #5e876a; font-size: 34px; line-height: 1; }
.compact-empty { padding: 42px 4px; }
.detail-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding-top: 4px; }
.detail-heading .eyebrow { margin-bottom: 7px; font-size: 10px; }
.detail-heading h3 { font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.detail-facts { display: grid; gap: 12px; margin: 8px 0 20px; font-size: 11px; }
.detail-facts > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; }
.detail-facts dt { color: var(--muted); }
.detail-facts dd { margin: 0; line-height: 1.4; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.detail-reason { border-radius: 7px; padding: 11px 12px; margin-bottom: 16px; color: #756044; background: #f8f3e9; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-section { border-top: 1px solid #e5eae5; padding-top: 22px; margin-top: 24px; }
.detail-section h3 { font-size: 13px; }
.files-list { padding: 0; margin: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.file-item { padding: 12px; border: 1px solid var(--border); border-radius: 8px; }
.file-name { margin-bottom: 4px; overflow-wrap: anywhere; font-size: 12px; font-weight: 600; }
.file-size { color: var(--muted); font-size: 11px; }
.file-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file-actions .button { padding: 7px 10px; min-height: 34px; font-size: 11px; }
.preview-container { margin-top: 14px; padding: 12px; border-radius: 8px; background: #f0f4f1; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; overflow-wrap: anywhere; }
.preview-heading .button { min-height: 34px; padding: 5px 8px; font-size: 11px; }
video { display: block; width: 100%; max-height: 380px; margin-top: 8px; background: #17231c; border-radius: 6px; }
audio { display: block; width: 100%; margin-top: 8px; }
.media-error { font-size: 11px; color: #923e2f; margin: 12px 0 0; }
.checkbox-field { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 18px; font-size: 12px; line-height: 1.5; cursor: pointer; }
.checkbox-field input { width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--accent); margin: 1px 0 0; }
.transcription-section .section-heading { align-items: flex-start; }
.transcription-section .status-badge { white-space: normal; text-align: right; }
.transcription-section form { margin-top: 18px; }
.diarization-note { margin: 16px 0 12px; line-height: 1.55; color: var(--muted); }
.transcription-warnings { padding-left: 18px; font-size: 11px; line-height: 1.55; color: #855e15; }
.transcript-result { margin-top: 16px; }
.transcript-segments { list-style: none; padding: 0; margin: 0 0 12px; max-height: 560px; overflow-y: auto; scrollbar-width: thin; }
.transcript-segment { padding: 11px 0; border-bottom: 1px solid #e5eae5; }
.transcript-segment:first-child { padding-top: 0; }
.transcript-segment:last-child { border-bottom: 0; }
.transcript-segment-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 5px; }
.transcript-time { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.transcript-speaker { color: var(--accent); font-size: 11px; font-weight: 600; }
.transcript-segment-text, .transcript-full { font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; margin: 0; }
.transcript-full-details { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 18px; }
.transcript-full-details summary { cursor: pointer; font-size: 12px; font-weight: 600; color: var(--accent); }
.transcript-full-details[open] summary { margin-bottom: 12px; }
.transcript-full { max-height: 560px; overflow-y: auto; }
.events-list { list-style: none; padding: 0; margin: 0; max-height: 420px; overflow-y: auto; scrollbar-width: thin; }
.event-item { position: relative; margin-left: 4px; padding: 0 0 19px 17px; border-left: 1px solid var(--border); }
.event-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.event-item::before { position: absolute; content: ""; left: -4px; top: 3px; width: 7px; height: 7px; border-radius: 50%; background: #9bb7a0; }
.event-heading { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.event-title { font-size: 11px; font-weight: 600; }
.event-time { color: var(--muted); font-size: 10px; }
.event-detail { color: var(--muted); margin: 6px 0 0; font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.workspace-footer { margin: 22px 0 0; text-align: center; font-size: 11px; color: var(--muted); }
.skip-link { position: absolute; left: 20px; top: -100px; z-index: 10; padding: 12px; background: #fff; }
.skip-link:focus { top: 12px; }
.noscript-message { padding: 24px; text-align: center; }
@keyframes pulse { 50% { opacity: .35; } }
@media (min-width: 1500px) { .main-shell { padding-left: 0; padding-right: 0; } }
@media (max-width: 1150px) {
  .workspace-grid { grid-template-columns: minmax(290px, .85fr) minmax(340px, 1.15fr); }
  .new-recording-panel { grid-row: span 2; }
  .recordings-list { max-height: 340px; }
  .detail-panel { grid-column: 2; }
  .login-view { gap: 40px; }
}
@media (max-width: 740px) {
  .site-header { min-height: 68px; padding: 14px 20px; gap: 12px; }
  .brand { font-size: 17px; gap: 10px; }
  .brand-mark { width: 23px; height: 23px; border-width: 7px; }
  .tenant-label { display: none; }
  .main-shell { padding: 26px 18px; }
  .login-view { display: flex; flex-direction: column; align-items: stretch; gap: 28px; margin: 18px auto; max-width: 460px; }
  .login-intro h1 { font-size: 38px; }
  .intro-copy { font-size: 14px; }
  .flow-list { display: none; }
  .login-panel { padding: 26px; }
  .page-heading { align-items: start; gap: 12px; }
  .page-heading h1 { font-size: 28px; }
  .page-heading .muted { font-size: 12px; }
  .refresh-status { display: none; }
  .refresh-controls { padding-top: 23px; }
  .refresh-controls .button { padding: 8px 10px; min-height: 36px; font-size: 11px; }
  .metrics { gap: 8px; margin-bottom: 18px; }
  .metric { flex-direction: column-reverse; align-items: start; gap: 5px; padding: 12px; }
  .metric-label { font-size: 10px; }
  .metric strong { font-size: 23px; }
  .workspace-grid { display: flex; flex-direction: column; gap: 18px; }
  .panel { width: 100%; padding: 22px; }
  .recordings-list { max-height: 450px; }
  .detail-panel { scroll-margin-top: 18px; }
  .workspace-footer { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
