:root {
  --bg: #151515;
  --panel: #1f1f1f;
  --panel-strong: #2a2a2a;
  --panel-muted: #242424;
  --text: #f5f5f5;
  --muted: #b3b3b3;
  --line: #3b3b3b;
  --line-strong: #4d4d4d;
  --accent: #ffd113;
  --accent-strong: #e0b400;
  --accent-soft: #fff3b8;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --sidebar-width: 360px;
  --player-height: 108px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(
      circle at top left,
      rgba(255, 209, 19, 0.14),
      transparent 24%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(255, 255, 255, 0.04),
      transparent 22%
    ),
    linear-gradient(180deg, #0f0f0f 0%, #1a1a1a 100%);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  --sidebar-current-width: var(--sidebar-width);
  display: grid;
  grid-template-columns: var(--sidebar-current-width) minmax(0, 1fr);
  height: 100vh;
  width: 100%;
}

.page-shell.sidebar-collapsed {
  --sidebar-current-width: 0px;
}

.side-panel {
  min-width: 0;
  height: 100vh;
  padding: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(14px);
  overflow-y: auto;
  overflow-x: hidden;
  transition:
    padding 160ms ease,
    border 160ms ease,
    opacity 160ms ease;
}

.page-shell.sidebar-collapsed .side-panel {
  padding: 0;
  border-right: 0;
  opacity: 0;
  overflow: hidden;
}

.main-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  overflow: hidden;
  height: 100vh;
  padding: 12px 14px calc(var(--player-height) + 12px);
}

/* .panel-card, */
.table-card,
.workspace-header,
.status-banner,
.tools-bar,
.player-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel-card {
  padding: 6px;
  margin-bottom: 14px;
}

.brand-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 10px;
  /* background: linear-gradient(
    180deg,
    rgba(38, 38, 38, 0.98),
    rgba(24, 24, 24, 0.98)
  ); */
  /* border-color: rgba(255, 209, 19, 0.22); */
}

.brand-logo {
  display: block;
  width: min(80px, 100%);
  height: auto;
}

.brand-logo-light {
  display: none;
}

body[data-theme="light"] .brand-logo-dark {
  display: none;
}

body[data-theme="light"] .brand-logo-light {
  display: block;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 1.9rem;
  line-height: 1.05;
  margin-bottom: 10px;
}

h2 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.intro,
.helper {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.8em;
}

.compact-helper {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.compact-field {
  margin-bottom: 0;
}

.mini-field {
  width: 92px;
}

#seek-step-input {
  width: 76px;
  padding: 4px 8px;
}

input[type="text"],
input[type="search"],
input[type="file"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

.inline-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.folder-picker-row {
  justify-content: flex-start;
}

.hidden-input {
  display: none !important;
}

.primary-button,
.secondary-button,
.ghost-button,
.play-button {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition:
    transform 120ms ease,
    opacity 120ms ease,
    background 120ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.play-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled,
.play-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.primary-button {
  width: 100%;
  padding: 6px 12px;
  color: #111111;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.secondary-button {
  padding: 6px 12px;
  background: #343434;
  color: var(--text);
}

.ghost-button {
  padding: 6px 12px;
  background: #242424;
  border: 1px solid var(--line);
  color: var(--text);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  overflow-y: auto;
}

.auth-card {
  width: min(100%, 460px);
  display: grid;
  gap: 22px;
  padding: 28px 30px 32px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(20, 20, 20, 0.9);
  box-shadow: var(--shadow);
}

.auth-brand-card {
  width: min(100%, 340px);
  min-height: 0;
  margin: 0 auto;
  padding: 28px 20px 12px;
}

.auth-brand-card .brand-logo {
  width: min(96px, 100%);
}

.auth-copy {
  width: min(100%, 340px);
  margin: 0 auto;
  text-align: center;
}

.auth-copy .eyebrow {
  margin-bottom: 10px;
}

.auth-copy h1 {
  margin-bottom: 12px;
}

.auth-helper {
  margin-bottom: 0;
}

.auth-form {
  width: min(100%, 340px);
  margin: 0 auto;
}

.auth-form .field {
  margin-bottom: 14px;
}

.auth-form .field span {
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
  min-height: 48px;
}

.auth-error {
  margin: 4px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 117, 117, 0.2);
  border-radius: 14px;
  background: rgba(120, 24, 24, 0.28);
  color: #ffd8d8;
  font-size: 0.9rem;
  line-height: 1.4;
}

.auth-warning {
  border-color: rgba(255, 209, 19, 0.28);
  background: rgba(112, 86, 0, 0.22);
  color: #fff0a7;
}

.auth-submit {
  margin-top: 4px;
}

.admin-users-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.logout-form {
  display: inline-flex;
  margin: 0;
}

.workspace-account {
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-message-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.access-message-card {
  width: min(520px, 100%);
  padding: 28px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.access-message-card h1 {
  margin-top: 0;
}

.access-message-card .helper {
  line-height: 1.55;
}

.access-message-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0 56px;
}

html.admin-page,
body.admin-page {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
}

.admin-header,
.admin-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  margin-bottom: 14px;
}

.admin-header h1,
.admin-card h2 {
  margin: 0;
}

.admin-header .helper {
  max-width: 680px;
  margin: 8px 0 0;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-user-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-notices {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.admin-notice {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
}

.admin-notice-success {
  color: #d9ffcc;
  background: rgba(89, 170, 79, 0.16);
  border-color: rgba(125, 215, 112, 0.28);
}

.admin-notice-error {
  color: #ffd0c6;
  background: rgba(192, 83, 55, 0.16);
  border-color: rgba(237, 123, 89, 0.3);
}

.admin-card {
  padding: 20px;
  margin-bottom: 14px;
}

.admin-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-card-heading .helper {
  margin: 4px 0 0;
  text-align: right;
}

.admin-create-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(220px, 1.4fr) 130px minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.admin-users-list {
  display: grid;
  gap: 10px;
}

.admin-user-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto;
  gap: 12px 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.admin-user-row.is-inactive {
  opacity: 0.62;
}

.admin-user-summary {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-user-summary strong,
.admin-user-summary span,
.admin-user-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-summary span,
.admin-user-summary small {
  color: var(--muted);
}

.admin-access-form,
.admin-reset-form {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-access-form .field,
.admin-reset-form .field {
  margin-bottom: 0;
}

.admin-access-form select {
  min-width: 110px;
}

.admin-reset-password {
  grid-column: 1 / -1;
}

.admin-reset-password summary {
  width: max-content;
  color: var(--accent);
  cursor: pointer;
}

.admin-reset-form {
  padding-top: 12px;
}

@media (max-width: 980px) {
  .admin-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-create-form .primary-button {
    width: max-content;
  }

  .admin-user-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .admin-header,
  .admin-card {
    padding: 16px;
  }

  .admin-header,
  .admin-card-heading {
    flex-direction: column;
  }

  .admin-header-actions,
  .admin-card-heading .helper {
    justify-content: flex-start;
    text-align: left;
  }

  .admin-create-form {
    grid-template-columns: 1fr;
  }
}

.initial-session-button {
  width: 100%;
  margin-top: 10px;
}

.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 6px 7px;
  margin-bottom: 6px;
  min-width: 0;
}

.workspace-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.workspace-copy {
  min-width: 0;
}

.workspace-copy h2 {
  margin-bottom: 0;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-actions {
  display: flex;
  gap: 6px;
  min-width: 0;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace-actions.is-scrollable {
  flex: 1 1 auto;
  max-width: 100%;
  flex-shrink: 1;
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 209, 19, 0.35) transparent;
  -webkit-overflow-scrolling: touch;
}

.workspace-status-slot {
  flex: 1 1 240px;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.workspace-status-slot.is-empty {
  flex: 0 0 auto;
}

.workspace-actions .primary-button,
.workspace-actions .secondary-button,
.workspace-actions .ghost-button {
  width: auto;
}

.workspace-actions.is-scrollable .primary-button,
.workspace-actions.is-scrollable .secondary-button,
.workspace-actions.is-scrollable .ghost-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.workspace-actions.is-scrollable::-webkit-scrollbar {
  height: 6px;
}

.workspace-actions.is-scrollable::-webkit-scrollbar-track {
  background: transparent;
}

.workspace-actions.is-scrollable::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 209, 19, 0.28);
}

.workspace-actions.is-scrollable::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 209, 19, 0.42);
}

.sidebar-toggle {
  width: auto;
  white-space: nowrap;
}

.status-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  max-width: min(760px, 100%);
  padding: 6px 12px;
  color: grey;
  font-size: 0.76rem;
  line-height: 1.2;
  text-align: center;
}

.status-banner[data-tone="success"] {
  background: rgba(255, 209, 19, 0.16);
  color: rgb(255, 208, 19);
}

.status-banner[data-tone="error"] {
  background: rgba(255, 255, 255, 0.07);
  color: rgb(255, 255, 255);
}

.status-banner[data-tone="warning"] {
  background: rgba(255, 209, 19, 0.16);
  color: rgb(255, 208, 19);
}

.status-banner[data-tone="loading"] {
  background: rgba(255, 255, 255, 0.05);
  color: rgb(255, 255, 255);
}

.tools-bar {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 10px;
  min-width: 0;
}

.tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.search-field {
  flex: 1 1 300px;
}

.pagination {
  display: flex;
  gap: 4px;
  align-items: center;
  color: var(--muted);
  margin-left: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.workspace-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 12px;
  min-height: 0;
}

.workspace-body.details-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.table-card {
  display: flex;
  flex-direction: column;
  overflow: visible;
  width: 100%;
  min-width: 0;
  min-height: 0;
  position: relative;
}

.table-wrap {
  flex: 1 1 auto;
  overflow: auto;
  height: 100%;
  max-height: none;
  min-height: 0;
  width: 100%;
  border-radius: var(--radius);
}

.selected-row-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  min-height: 0;
  overflow: auto;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.selected-row-panel-header h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.selected-row-empty {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.selected-row-content {
  display: grid;
  gap: 10px;
}

.selected-row-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
}

.selected-row-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.selected-row-inline {
  display: grid;
  gap: 10px;
}

.selected-row-nav {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.selected-row-source-text,
#selected-row-status,
#selected-row-audio,
#selected-row-prev,
#selected-row-next,
#selected-row-errors,
#selected-row-notes {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.selected-row-meta {
  display: grid;
  gap: 8px;
}

.selected-row-meta-item {
  display: grid;
  gap: 3px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.selected-row-meta-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.selected-row-meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.selected-row-meta-value {
  font-size: 0.84rem;
  line-height: 1.4;
  word-break: break-word;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  text-align: left;
  padding: 8px 10px;
  font-size: var(--cell-font-size, 0.84rem);
  background: #2a2a2a;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

thead th.is-filtered {
  color: #ffd113;
}

tbody td {
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(36, 36, 36, 0.96);
  font-size: var(--cell-font-size, 0.84rem);
}

tbody tr:nth-child(even) td {
  background: rgba(31, 31, 31, 0.98);
}

tbody tr.current-row td {
  background: rgba(255, 209, 19, 0.24);
}

tbody tr.row-transcript-changed td {
  background: rgba(104, 91, 20, 0.5);
}

tbody tr.row-transcript-changed.current-row td {
  background: rgba(160, 132, 16, 0.66);
}

tbody tr.row-audio-only td {
  background: rgba(110, 43, 43, 0.56);
}

tbody tr.row-missing-audio td {
  background: rgba(111, 92, 133, 0.34);
}

tbody tr.row-audio-only.current-row td,
tbody tr.row-audio-only.row-transcript-changed td {
  background: rgba(148, 56, 56, 0.72);
}

tbody tr.row-missing-audio.current-row td,
tbody tr.row-missing-audio.row-transcript-changed td {
  background: rgba(129, 107, 156, 0.52);
}

.sticky-column {
  position: sticky;
  z-index: 3;
}

thead .sticky-column {
  z-index: 6;
}

.sticky-column-edge {
  box-shadow: 10px 0 16px rgba(0, 0, 0, 0.22);
}

.plain-cell {
  min-width: 120px;
  line-height: 1.4;
  white-space: pre-wrap;
  font-size: var(--cell-font-size, 0.82rem);
}

.table-textarea {
  min-width: 100%;
  min-height: 72px;
  border-radius: 12px;
  font-size: var(--cell-font-size, inherit);
  line-height: 1.4;
  overflow: hidden;
  overflow-y: hidden;
}

.transcript-editor {
  min-height: 88px;
}

.transcript-cell {
  min-width: 100%;
  display: grid;
  gap: 6px;
}

.transcript-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.transcript-mini-button {
  width: auto;
  min-height: 22px;
  padding: 3px 6px;
  font-size: 0.4rem;
  line-height: 1.1;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.notes-editor {
  min-height: 72px;
}

.audio-cell {
  min-width: 110px;
  display: grid;
  gap: 6px;
}

.play-button {
  padding: 6px 12px;
  color: #111111;
  background: linear-gradient(135deg, #ffd113, #e0b400);
}

.play-button.is-missing {
  color: var(--muted);
  background: #3a3a3a;
  cursor: default;
}

.audio-filename {
  font-size: var(--cell-font-size, 0.78rem);
  color: var(--muted);
  word-break: break-word;
}

.audio-warning {
  color: #ffd5d5;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 12px;
  font-size: var(--cell-font-size, 0.76rem);
  white-space: nowrap;
}

.badge.muted {
  background: #343434;
  color: var(--muted);
}

.badge.status-checked {
  background: rgba(255, 209, 19, 0.92);
  color: #111111;
}

.badge.status-review {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.badge.status-to-check {
  background: rgba(255, 157, 0, 0.2);
  color: #ffb347;
}

.badge.status-error {
  background: rgba(168, 62, 62, 0.3);
  color: #ffd5d5;
}

.status-cell {
  display: grid;
  gap: 6px;
  min-width: 124px;
}

.status-select {
  min-width: 118px;
  font-size: var(--cell-font-size, 0.8rem);
  padding: 8px 10px;
}

#error-panel .inline-row {
  margin-bottom: 10px;
}

.error-selector {
  min-width: 120px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 8px;
}

.error-selector summary {
  cursor: pointer;
  color: var(--text);
  font-size: var(--cell-font-size, 0.8rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.error-options {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 220px;
  overflow: auto;
}

.checkbox-list,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(52, 52, 52, 0.9);
  font-size: var(--cell-font-size, 0.8rem);
}

.tag-chip {
  padding: 6px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: #111111;
  border: 0;
  cursor: pointer;
}

.column-manager-list {
  display: grid;
  gap: 6px;
  font-size: 0.8em;
}

.column-manager-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(52, 52, 52, 0.72);
}

.column-manager-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.column-manager-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-icon-button {
  min-width: 34px;
  min-height: 34px;
  padding: 6px 12px;
}

.column-width-input {
  width: 76px !important;
  padding: 8px 10px !important;
}

.column-font-input {
  width: 62px !important;
  padding: 8px 10px !important;
}

.column-width-label {
  font-size: 0.84rem;
  color: var(--muted);
}

.range-field-output {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
}

.shortcut-grid {
  display: grid;
  gap: 10px;
}

.shortcut-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.shortcut-item span {
  font-size: 0.92rem;
}

.shortcut-capture {
  min-width: 64px;
  font-size: 0.8em;
}

.shortcut-capture.capturing {
  border-color: var(--accent);
  color: var(--accent);
}

.empty-table {
  text-align: center;
  color: var(--muted);
  padding: 28px 20px;
}

.player-panel {
  display: grid;
  gap: 8px;
  padding: 8px 12px 6px;
  position: fixed;
  left: var(--sidebar-current-width);
  right: 0;
  bottom: 0;
  z-index: 20;
  min-height: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -10px 26px rgba(0, 0, 0, 0.18);
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.99), rgba(8, 8, 8, 0.99)),
    linear-gradient(90deg, rgba(255, 209, 19, 0.14), transparent 35%);
  color: #ffffff;
  backdrop-filter: blur(18px);
  transition: left 160ms ease;
}

.player-panel .eyebrow,
.player-panel .helper,
.player-panel h3 {
  color: inherit;
}

.player-panel .eyebrow {
  color: rgba(255, 209, 19, 0.88);
}

.player-panel .helper {
  color: rgba(255, 255, 255, 0.68);
  margin-bottom: 0;
}

.player-copy h3 {
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.player-topbar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.player-controls {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.transport-button {
  min-width: 44px;
}

.player-main-button {
  width: auto;
  min-width: 118px;
  font-size: 0.8em;
}

.player-check-button {
  min-width: 112px;
  font-size: 0.8em;
}

.player-controls .ghost-button,
.player-controls .primary-button,
.player-controls .secondary-button {
  min-height: 18px;
  font-weight: 600;
  font-size: 0.8em;
}

.player-controls .ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.player-controls .primary-button {
  background: linear-gradient(135deg, #ffd113, #d6a900);
  color: #111111;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.player-controls .secondary-button {
  background: rgba(255, 209, 19, 0.18);
  color: var(--accent);
}

.waveform-panel {
  display: grid;
  gap: 6px;
}

.waveform-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.waveform-zoom-label {
  min-width: 54px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.waveform-canvas {
  width: 100%;
  height: 52px;
  display: block;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    180deg,
    rgba(36, 36, 36, 0.96),
    rgba(18, 18, 18, 0.98)
  );
  cursor: pointer;
}

.waveform-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.76);
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
}

.player-panel[data-size="large"] {
  padding: 10px 14px 8px;
}

.player-panel[data-size="large"] .waveform-canvas {
  height: 88px;
}

.player-panel[data-size="large"] .player-controls .ghost-button,
.player-panel[data-size="large"] .player-controls .primary-button,
.player-panel[data-size="large"] .player-controls .secondary-button {
  min-height: 22px;
  font-size: 0.86em;
}

.player-panel[data-size="large"] .player-copy h3 {
  font-size: 1rem;
}

.player-panel[data-size="xlarge"] {
  padding: 12px 16px 10px;
}

.player-panel[data-size="xlarge"] .waveform-canvas {
  height: 118px;
}

.player-panel[data-size="xlarge"] .player-controls .ghost-button,
.player-panel[data-size="xlarge"] .player-controls .primary-button,
.player-panel[data-size="xlarge"] .player-controls .secondary-button {
  min-height: 26px;
  font-size: 0.92em;
}

.player-panel[data-size="xlarge"] .player-copy h3 {
  font-size: 1.06rem;
}

.player-panel audio {
  display: none;
}

.hidden {
  display: none !important;
}

.workspace-header.compact {
  padding-top: 8px;
  padding-bottom: 8px;
}

.workspace-header.compact .workspace-copy {
  display: none;
}

.workspace-header.compact .workspace-left {
  gap: 8px;
}

.status-banner {
  transition:
    opacity 140ms ease,
    transform 140ms ease;
}

.tools-bar {
  gap: 6px;
  padding: 8px 10px;
}

.tools-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tools-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.tools-title {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tools-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.tools-stat {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.1;
  white-space: nowrap;
}

.tools-toggle-button {
  width: auto;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.tools-body {
  display: grid;
  gap: 6px;
}

.tools-bar.collapsed .tools-body {
  display: none;
}

.tools-row {
  gap: 8px;
}

.search-field {
  flex: 1 1 240px;
}

.pagination .ghost-button {
  width: 22px;
  min-width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border-radius: 8px;
  font-size: 0.78rem;
}

#page-indicator {
  font-size: 0.76rem;
}

.session-actions {
  display: grid;
  gap: 8px;
}

.session-actions .secondary-button,
.session-actions .ghost-button {
  width: 100%;
}

.table-wrap {
  scroll-behavior: smooth;
}

.column-filter-popover {
  position: absolute;
  top: 70px;
  right: 14px;
  z-index: 50;
  width: min(320px, calc(100vw - 48px));
  display: grid;
  gap: 10px;
  padding: 12px;
  background: rgba(26, 26, 26, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.36);
}

.column-filter-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.column-filter-popover-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.column-filter-popover-actions .ghost-button {
  width: auto;
}

.column-filter-options {
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
  padding-right: 4px;
}

.column-filter-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
}

.column-filter-option-label {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge.status-checked {
  background: rgba(149, 233, 133, 0.92);
  color: #102313;
}

.column-manager-item {
  gap: 8px;
  padding: 5px 8px;
}

.column-manager-title {
  font-size: 0.84rem;
}

.column-manager-controls {
  gap: 6px;
}

.compact-icon-button {
  min-width: 28px;
  min-height: 28px;
  padding: 6px 12px;
  font-size: 0.82rem;
  border-radius: 12px;
}

.column-width-input {
  width: 62px !important;
  padding: 6px 8px !important;
  font-size: 0.82rem;
}

.column-width-label {
  font-size: 0.76rem;
}

.player-panel {
  gap: 6px;
  padding: 6px 10px 5px;
}

.player-topbar {
  align-items: flex-start;
  gap: 10px;
}

.player-copy {
  min-width: 0;
}

.player-title-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.player-title-line .eyebrow {
  margin: 0;
  white-space: nowrap;
}

.player-title-line h3 {
  min-width: 0;
  margin: 0;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-meta-line {
  margin-top: 2px;
  font-size: 0.8rem;
}

.player-controls {
  gap: 6px;
}

.transport-button {
  min-width: 40px;
}

.player-main-button {
  min-width: 108px;
}

.player-check-button {
  min-width: 102px;
}

.player-check-button.is-ready {
  background: rgba(149, 233, 133, 0.18);
  color: #95e985;
}

.waveform-panel {
  gap: 4px;
}

.waveform-canvas {
  height: 42px;
}

.waveform-footer {
  font-size: 0.8rem;
}

@media (max-width: 1080px) {
  .page-shell {
    grid-template-columns: minmax(0, 1fr);
    --sidebar-current-width: 0px;
  }

  .side-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: var(--player-height);
    width: min(340px, 84vw);
    z-index: 30;
    box-shadow: 18px 0 40px rgba(0, 0, 0, 0.24);
  }

  .page-shell.sidebar-collapsed .side-panel {
    transform: translateX(-100%);
    opacity: 1;
  }

  .main-panel {
    padding: 10px 10px calc(var(--player-height) + 12px);
  }

  .workspace-header,
  .tools-bar {
    padding: 10px 12px;
  }

  .tools-header {
    flex-wrap: wrap;
  }

  .workspace-status-slot {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
  }

  .tools-row {
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .selected-row-nav {
    grid-template-columns: 1fr;
  }

  .column-manager-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .column-manager-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .pagination {
    margin-left: 0;
  }

  .player-panel {
    left: 0;
  }

  .player-topbar,
  .player-controls {
    flex-wrap: wrap;
  }

  .player-title-line {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    padding: 24px 14px;
  }

  .auth-card {
    width: 100%;
    gap: 18px;
    padding: 22px 16px 24px;
    border-radius: 12px;
  }

  .auth-brand-card,
  .auth-copy,
  .auth-form {
    width: 100%;
  }

  .auth-brand-card {
    padding-top: 22px;
  }
}
