:root {
  --bg: #f4f8fb;
  --panel: #ffffff;
  --panel-soft: #f8fbfe;
  --line: #d8e5ef;
  --line-strong: #c7d8e6;
  --text: #172534;
  --muted: #6d8092;
  --brand: #1aa8df;
  --brand-deep: #0a7ea8;
  --brand-soft: rgba(26, 168, 223, 0.12);
  --warn: #b57918;
  --warn-soft: rgba(181, 121, 24, 0.12);
  --success: #1c8b5e;
  --danger: #d14a3d;
  --shadow: 0 18px 40px rgba(16, 38, 58, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Segoe UI Variable Display", "PingFang SC", "HarmonyOS Sans SC",
    "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(26, 168, 223, 0.09), transparent 28%),
    linear-gradient(180deg, #fafdff 0%, #f1f6fa 100%);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 10%, rgba(26, 168, 223, 0.16), transparent 26%),
    radial-gradient(circle at 90% 20%, rgba(12, 122, 164, 0.1), transparent 28%),
    linear-gradient(180deg, #fafdff 0%, #eef5fa 100%);
}

.login-panel {
  width: min(520px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(201, 226, 239, 0.96);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 60px rgba(16, 38, 58, 0.14);
}

.login-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1aa8df, #4fc4ea);
  box-shadow: 0 16px 30px rgba(26, 168, 223, 0.24);
}

.login-panel h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.login-copy,
.login-hint {
  color: var(--muted);
  line-height: 1.65;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-field {
  display: grid;
  gap: 8px;
}

.login-field span {
  font-size: 0.84rem;
  font-weight: 800;
  color: #355468;
}

.login-field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid #d8e5ef;
  background: #fbfdff;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.login-field input:focus {
  outline: none;
  border-color: #98d7ea;
  box-shadow: 0 0 0 4px rgba(26, 168, 223, 0.12);
}

.login-button {
  justify-content: center;
  width: 100%;
  min-height: 50px;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-shell {
  width: min(1500px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 16px 0 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #1aa8df, #4fc4ea);
  box-shadow: 0 12px 28px rgba(26, 168, 223, 0.2);
}

.brand-copy {
  display: flex;
  align-items: center;
  min-height: 52px;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.status-line,
.chip-row,
.meta-row,
.record-actions,
.record-side-actions,
.asset-rail,
.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.status-line {
  flex: 1 1 auto;
  min-width: 0;
}

.status-chip,
.mini-chip,
.asset-chip,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid var(--line);
  background: #f4f8fb;
  color: #415364;
}

.status-chip {
  background: var(--brand-soft);
  color: var(--brand-deep);
  white-space: nowrap;
  position: relative;
}

.mini-chip.has-tooltip {
  position: relative;
}

.status-chip.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.archive-chip.success {
  background: rgba(28, 139, 94, 0.12);
  color: var(--success);
}

.archive-chip.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.archive-chip.danger {
  background: rgba(209, 74, 61, 0.12);
  color: var(--danger);
}

.archive-chip.muted {
  background: #eef4f8;
  color: var(--muted);
}

.status-chip.has-tooltip::after,
.mini-chip.has-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(118, 177, 206, 0.28);
  background: rgba(16, 36, 51, 0.94);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 16px 34px rgba(12, 28, 40, 0.24);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

.status-chip.has-tooltip::before,
.mini-chip.has-tooltip::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  pointer-events: none;
  border-width: 0 6px 6px 6px;
  border-style: solid;
  border-color: transparent transparent rgba(16, 36, 51, 0.94) transparent;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 20;
}

.status-chip.has-tooltip:hover::after,
.status-chip.has-tooltip:hover::before,
.mini-chip.has-tooltip:hover::after,
.mini-chip.has-tooltip:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.status-badge.submitted,
.status-badge.queued,
.status-badge.pending {
  background: var(--warn-soft);
  color: var(--warn);
}

.status-badge.running {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.status-badge.succeeded {
  background: rgba(28, 139, 94, 0.12);
  color: var(--success);
}

.status-badge.failed,
.status-badge.cancelled,
.status-badge.expired {
  background: rgba(209, 74, 61, 0.12);
  color: var(--danger);
}

.records-card,
.composer-card {
  background: var(--panel);
  border: 1px solid rgba(216, 229, 239, 0.96);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.records-card {
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(26, 168, 223, 0.08), transparent 22%),
    linear-gradient(180deg, #fbfeff 0%, #f2f7fb 100%);
}

.records-card-inner {
  display: grid;
  grid-template-rows: auto auto;
}

.records-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fdfefe 0%, #f7fbfd 100%);
}

.records-head h3,
.slot-title {
  margin: 0;
}

.records-head-tools {
  display: flex;
  justify-content: flex-end;
  min-width: min(100%, 520px);
}

.records-head-tools .chip-row {
  justify-content: flex-end;
}

.records-model-filter {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  width: 210px;
  padding: 6px 8px 6px 10px;
  border: 1px solid #bfe1ef;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fdff 0%, #eaf7fc 100%);
  box-shadow: 0 8px 18px rgba(26, 168, 223, 0.09);
}

.records-model-filter span {
  color: #0b6f95;
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.records-model-filter select {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  color: #16364b;
  background: transparent;
  font-weight: 800;
}

.pagination-model-filter {
  flex: 0 0 auto;
}

.section-copy,
.helper-text,
.empty-state,
.record-prompt,
.record-detail-text,
.record-error,
.asset-meta span,
.asset-meta code {
  color: var(--muted);
  line-height: 1.6;
}

.records-stream {
  display: grid;
  gap: 16px;
  padding: 18px 18px 22px;
  align-content: start;
  background:
    linear-gradient(180deg, rgba(245, 250, 253, 0.84) 0%, rgba(240, 247, 251, 0.92) 100%);
}

.records-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 0;
  background:
    linear-gradient(180deg, rgba(253, 254, 254, 0.96) 0%, rgba(247, 251, 253, 0.88) 100%);
}

.records-pagination-summary,
.records-pagination-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.records-pagination-copy {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.records-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.records-page-input {
  width: 76px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.records-page-input:focus {
  outline: none;
  border-color: #98d7ea;
  box-shadow: 0 0 0 4px rgba(26, 168, 223, 0.12);
}

.records-page-button[disabled] {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.empty-state {
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed var(--line-strong);
  background: var(--panel-soft);
}

.record-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid #d6e5ee;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 254, 0.98) 100%);
  box-shadow:
    0 18px 32px rgba(16, 38, 58, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.86) inset;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    opacity 0.22s ease;
}

.record-card-enter {
  opacity: 0;
  transform: translateY(-10px);
}

.record-card-exit {
  opacity: 0;
  transform: scale(0.985) translateY(8px);
  pointer-events: none;
}

.record-card-flip {
  transition:
    transform 0.24s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    opacity 0.22s ease;
}

.record-live-pulse {
  animation: record-live-pulse 0.52s ease;
}

@keyframes record-live-pulse {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }

  35% {
    transform: scale(1.06);
    filter: brightness(1.08);
  }

  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.record-card:hover {
  transform: translateY(-2px);
  border-color: #bfd8e5;
  box-shadow:
    0 22px 38px rgba(16, 38, 58, 0.11),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.record-card:has(.status-badge.succeeded) {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.94), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 252, 249, 0.98) 100%);
}

.record-card:has(.status-badge.failed),
.record-card:has(.status-badge.cancelled),
.record-card:has(.status-badge.expired) {
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.94), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(254, 249, 248, 0.98) 100%);
}

.record-asset-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.record-asset-strip.inline {
  margin-top: 6px;
}

.record-asset-chip {
  position: relative;
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 10px;
  overflow: visible;
  border: 1px solid var(--line);
  background: #e9f0f5;
  box-shadow: 0 4px 10px rgba(16, 38, 58, 0.05);
}

.record-asset-chip img,
.record-asset-chip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

.record-asset-chip.fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.record-asset-chip.fallback.audio {
  color: #176e99;
  background: #eaf8fc;
  border-color: #bee3f0;
}

.record-headline {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.record-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.record-title-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.record-title-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.record-title-main strong {
  display: block;
  margin-bottom: 0;
  font-size: 1rem;
}

.record-prompt-line {
  color: #31485a;
  line-height: 1.55;
  display: block;
  overflow: visible;
  overflow-wrap: anywhere;
}

.prompt-rich-text {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.prompt-rich-text .mention-token {
  margin-top: 2px;
  margin-bottom: 2px;
}

.record-prompt-line.prompt-rich-text {
  min-height: 1.55em;
  padding-top: 2px;
}

.record-prompt-line.prompt-rich-text br + .mention-token,
.record-prompt-line.prompt-rich-text br + span,
.record-prompt-line.prompt-rich-text br + img {
  margin-top: 6px;
}

.meta-row {
  color: var(--muted);
  font-size: 0.82rem;
}

.record-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.record-meta-line span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4f8fb;
  border: 1px solid #dde8f0;
}

.record-progress-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 150px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid #d9e6ef;
  background:
    linear-gradient(180deg, rgba(247, 251, 254, 0.96) 0%, rgba(241, 247, 251, 0.96) 100%);
}

.record-progress-panel.pending {
  border-color: rgba(181, 121, 24, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.98) 0%, rgba(254, 246, 229, 0.98) 100%);
}

.record-progress-panel.running {
  border-color: rgba(26, 168, 223, 0.24);
  background:
    linear-gradient(180deg, rgba(241, 250, 254, 0.98) 0%, rgba(233, 246, 252, 0.98) 100%);
}

.record-progress-panel.succeeded {
  border-color: rgba(28, 139, 94, 0.18);
  background:
    linear-gradient(180deg, rgba(243, 251, 247, 0.98) 0%, rgba(236, 248, 241, 0.98) 100%);
}

.record-progress-panel.failed {
  border-color: rgba(209, 74, 61, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 246, 245, 0.98) 0%, rgba(253, 239, 237, 0.98) 100%);
}

.record-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.record-progress-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.record-progress-copy strong {
  font-size: 0.84rem;
  line-height: 1.2;
}

.record-progress-copy span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.record-progress-value {
  flex: 0 0 auto;
  min-width: 44px;
  padding: 5px 8px;
  border-radius: 999px;
  text-align: center;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--brand-deep);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(10, 126, 168, 0.12);
}

.record-progress-panel.pending .record-progress-value {
  color: var(--warn);
  border-color: rgba(181, 121, 24, 0.12);
}

.record-progress-panel.succeeded .record-progress-value {
  color: var(--success);
  border-color: rgba(28, 139, 94, 0.12);
}

.record-progress-panel.failed .record-progress-value {
  color: var(--danger);
  border-color: rgba(209, 74, 61, 0.12);
}

.record-progress-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(144, 170, 192, 0.16);
}

.record-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2fb6e6 0%, #1187c0 100%);
  box-shadow: 0 4px 14px rgba(17, 135, 192, 0.2);
  transition: width 0.35s ease;
}

.record-progress-panel.pending .record-progress-track span {
  background: linear-gradient(90deg, #d8aa3f 0%, #b57918 100%);
  box-shadow: 0 4px 14px rgba(181, 121, 24, 0.18);
}

.record-progress-panel.succeeded .record-progress-track span {
  background: linear-gradient(90deg, #2aa56f 0%, #1c8b5e 100%);
  box-shadow: 0 4px 14px rgba(28, 139, 94, 0.18);
}

.record-progress-panel.failed .record-progress-track span {
  background: linear-gradient(90deg, #e46d63 0%, #d14a3d 100%);
  box-shadow: 0 4px 14px rgba(209, 74, 61, 0.18);
}

.record-progress-panel.running .record-progress-track span::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 72px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.72) 50%, transparent 100%);
  animation: record-progress-glide 1.8s linear infinite;
}

.record-progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.record-progress-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(10, 126, 168, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: #355468;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}

.record-progress-pill.warn {
  color: var(--danger);
  border-color: rgba(209, 74, 61, 0.16);
  background: rgba(255, 255, 255, 0.92);
}

.record-progress-note {
  color: #566c7e;
  font-size: 0.76rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.record-preview-row {
  display: grid;
  grid-template-columns: 266px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.record-media-frame,
.record-media-empty {
  width: 266px;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #d8e5ee;
  background: linear-gradient(180deg, #dfe7ee 0%, #edf4f9 100%);
  box-shadow: 0 10px 22px rgba(16, 38, 58, 0.08);
}

.record-media-frame img,
.record-media-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #dfe7ee;
}

.record-media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.record-bottom {
  display: grid;
  gap: 12px;
  margin-top: 0;
}

.record-subtitle-panel {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid #d9e6ef;
  background:
    linear-gradient(180deg, rgba(247, 251, 254, 0.96) 0%, rgba(241, 247, 251, 0.96) 100%);
}

.record-subtitle-panel.running {
  border-color: rgba(26, 168, 223, 0.24);
  background:
    linear-gradient(180deg, rgba(241, 250, 254, 0.98) 0%, rgba(233, 246, 252, 0.98) 100%);
}

.record-subtitle-panel.success {
  border-color: rgba(28, 139, 94, 0.18);
  background:
    linear-gradient(180deg, rgba(243, 251, 247, 0.98) 0%, rgba(236, 248, 241, 0.98) 100%);
}

.record-subtitle-panel.failed {
  border-color: rgba(209, 74, 61, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 246, 245, 0.98) 0%, rgba(253, 239, 237, 0.98) 100%);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 22px rgba(16, 38, 58, 0.08);
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(16, 38, 58, 0.12);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.button-secondary {
  padding: 10px 16px;
  color: #16364b;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fb 100%);
  border: 1px solid #cfe1ec;
}

.button-secondary:hover {
  border-color: #9ecfe2;
  background: linear-gradient(180deg, #ffffff 0%, #ebf6fb 100%);
}

.button-secondary.danger-lite {
  color: #b24a3f;
  border-color: rgba(209, 74, 61, 0.18);
  background: rgba(255, 246, 245, 0.92);
}

.button-secondary.danger-lite:hover {
  color: #fff;
  background: linear-gradient(135deg, #d55a4f, #c9483c);
  border-color: #c9483c;
}

.button-ghost {
  padding: 10px 16px;
  color: #075f83;
  background: linear-gradient(180deg, #f5fbfe 0%, #e8f6fc 100%);
  border: 1px solid #9fd2e4;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(26, 168, 223, 0.12);
}

.button-ghost:hover {
  color: #034f6f;
  border-color: #68bddc;
  background: linear-gradient(180deg, #f8fdff 0%, #def2fb 100%);
  box-shadow: 0 18px 30px rgba(26, 168, 223, 0.18);
}

@media (max-width: 1200px) {
  .topbar {
    flex-wrap: wrap;
    align-items: center;
  }

  .status-line {
    order: 3;
    width: 100%;
  }

  .topbar-actions {
    order: 2;
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .topbar {
    align-items: stretch;
    gap: 12px;
  }

  .brand-block {
    width: 100%;
    min-width: 0;
  }

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

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .topbar-actions .button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    padding-inline: 10px;
  }

  .topbar-actions #topbar-logout {
    flex-basis: 100%;
  }
}

.button-danger {
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, #d55a4f, #c9483c);
  border: 1px solid #c9483c;
  box-shadow: 0 14px 26px rgba(201, 72, 60, 0.22);
}

@keyframes record-progress-glide {
  0% {
    transform: translateX(-84px);
  }

  100% {
    transform: translateX(220px);
  }
}

.composer-dock {
  position: relative;
  width: auto;
  margin-bottom: 16px;
  z-index: 8;
}

.composer-card {
  overflow: visible;
  backdrop-filter: blur(10px);
}

.composer-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #eaf8fe 0%, #eefafd 100%);
}

.composer-top-row,
.composer-mode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.composer-top-row {
  justify-content: space-between;
}

.composer-mode-row {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.composer-header-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
  justify-content: flex-end;
  margin-left: auto;
}

.composer-body {
  padding: 14px;
}

.composer-matrix,
.composer-form,
.mode-strip,
.asset-stack {
  display: grid;
  gap: 12px;
}

.model-switcher {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: clamp(240px, 20vw, 300px);
  min-height: 40px;
  padding: 5px 9px 5px 13px;
  border-radius: 999px;
  border: 1px solid rgba(15, 78, 111, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(232, 247, 252, 0.94));
  box-shadow:
    0 14px 30px rgba(12, 83, 112, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.model-switcher::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #10a7d7;
  box-shadow: 0 0 0 5px rgba(16, 167, 215, 0.12);
}

.model-switcher.hh::before {
  background: #d58a1d;
  box-shadow: 0 0 0 5px rgba(213, 138, 29, 0.14);
}

.model-switcher-kicker {
  color: #2d556a;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.model-select {
  min-width: 0;
  border: none;
  -webkit-appearance: none;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #0a6889 50%) calc(100% - 10px) 50% / 5px 5px no-repeat,
    linear-gradient(135deg, #0a6889 50%, transparent 50%) calc(100% - 6px) 50% / 5px 5px no-repeat;
  color: #0d3246;
  font-weight: 900;
  outline: none;
  overflow: hidden;
  padding-right: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-provider-pill {
  padding: 5px 8px;
  border-radius: 999px;
  background: #102838;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.toolbar-model-switcher {
  flex: 0 0 188px;
  width: 188px;
  min-height: 37px;
  gap: 5px;
  padding: 3px 7px 3px 9px;
  border-color: rgba(130, 193, 218, 0.78);
  background: #fff;
  box-shadow: none;
}

.toolbar-model-switcher::before {
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.toolbar-model-switcher.hh::before {
  box-shadow: none;
}

.toolbar-model-switcher:hover,
.toolbar-model-switcher:focus-within {
  border-color: rgba(30, 157, 204, 0.82);
  background: #f9fdff;
}

.toolbar-model-switcher .model-switcher-kicker {
  font-size: 0.7rem;
}

.toolbar-model-switcher .model-select {
  min-width: 0;
  font-size: 0.82rem;
}

.mode-strip.compact {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.mode-strip.compact.integrated {
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.mode-inline-hint {
  flex: 1 1 240px;
  min-width: 180px;
  color: #6f8294;
  font-size: 0.92rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mode-card {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfdff;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.mode-card {
  padding: 8px 12px;
  text-align: center;
  min-width: 112px;
}

.mode-card:hover {
  transform: translateY(-1px);
  border-color: #acdced;
}

.mode-card.active {
  color: #08384c;
  background: linear-gradient(180deg, #dff5ff 0%, #f4fbff 100%);
  border-color: #57bfe5;
  box-shadow:
    inset 0 0 0 1px rgba(87, 191, 229, 0.28),
    0 12px 24px rgba(26, 168, 223, 0.18);
  transform: translateY(-1px);
}

.mode-card strong {
  display: block;
}

.composer-canvas {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.asset-rail.compact.embedded {
  min-height: 0;
  padding: 0 2px 2px;
}

.toolbar-tip {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.asset-stat-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid #cae1ec;
  color: #2b6279;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.asset-stat-chip.total {
  color: #17384c;
  background: rgba(255, 255, 255, 0.92);
  border-color: #bdd8e6;
}

.prompt-editor-shell {
  position: relative;
  z-index: 2;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.prompt-editor-shell.solo {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.prompt-editor {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 260px;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 58px 18px 18px;
  border-radius: 24px;
  border: 1px solid rgba(202, 223, 236, 0.9);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-break: anywhere;
  contain: inline-size;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.prompt-editor * {
  max-width: 100%;
  white-space: inherit !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.prompt-editor[contenteditable="true"] {
  resize: none;
  cursor: text;
}

.prompt-editor:focus {
  outline: none;
  border-color: #98d7ea;
  box-shadow: 0 0 0 4px rgba(26, 168, 223, 0.12);
}

.prompt-editor:empty::before {
  content: attr(data-placeholder);
  color: #8b9aa7;
}

.mention-trigger {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #c8ddea;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-deep);
  box-shadow: 0 12px 24px rgba(16, 38, 58, 0.1);
}

.mention-token {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 4px 10px 4px 4px;
  margin: 0 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #eef8fd 0%, #e6f4fb 100%);
  border: 1px solid #bddff0;
  color: #1f4f66;
  box-shadow: 0 6px 14px rgba(26, 168, 223, 0.1);
  max-width: 210px;
  min-width: 0;
  user-select: none;
  white-space: nowrap !important;
  overflow: visible;
  vertical-align: middle;
}

.mention-token:hover {
  border-color: #96d0e8;
  box-shadow: 0 10px 18px rgba(26, 168, 223, 0.16);
}

.mention-token-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #63c8ec);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.mention-token-thumb {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  object-fit: cover;
  flex: 0 0 24px;
  box-shadow: 0 4px 10px rgba(16, 38, 58, 0.12);
}

.mention-token-label {
  max-width: 150px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.2;
}

.mention-popup {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  z-index: 60;
  width: min(560px, calc(100vw - 56px));
  max-height: 320px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  box-shadow: 0 18px 28px rgba(16, 38, 58, 0.14);
  overflow-y: auto;
}

.mention-popup.open {
  display: grid;
  gap: 8px;
}

.mention-popup-head,
.mention-empty {
  color: var(--muted);
  font-size: 0.86rem;
}

.mention-item {
  display: grid;
  grid-template-columns: 36px auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: #f8fbfd;
  text-align: left;
}

.mention-item.active {
  background: #eef8fd;
  border-color: #c9e7f4;
}

.mention-thumb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: #e8eef3;
}

.mention-thumb-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
}

.mention-item-label {
  font-weight: 700;
}

.mention-item-name {
  color: var(--muted);
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-rail.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 48px;
  padding: 2px 0 4px;
  overflow: visible;
}

.asset-rail.compact.empty {
  align-items: center;
}

.asset-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  min-height: 40px;
  max-width: min(100%, 230px);
  padding: 6px 6px 6px 6px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7fbfe 0%, #eef7fc 100%);
  border: 1px solid #d2e4ef;
  box-shadow: 0 8px 18px rgba(16, 38, 58, 0.05);
}

.asset-chip.upload-uploading {
  opacity: 0.72;
  filter: saturate(0.65);
}

.asset-chip.upload-failed {
  border-color: rgba(209, 74, 61, 0.44);
  background: linear-gradient(180deg, #fff6f4 0%, #fff0ed 100%);
}

.asset-chip-thumb {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(26, 168, 223, 0.16), rgba(10, 126, 168, 0.08));
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 800;
  position: relative;
}

.asset-chip-thumb img,
.asset-chip-thumb video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.asset-chip-thumb.audio {
  background: linear-gradient(135deg, rgba(181, 121, 24, 0.14), rgba(181, 121, 24, 0.06));
  color: var(--warn);
}

.asset-chip-spinner,
.asset-chip-status-mark {
  position: absolute;
  inset: 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
}

.asset-chip-spinner {
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-top-color: var(--brand);
  animation: asset-chip-spin 0.82s linear infinite;
}

.asset-chip-status-mark {
  color: #fff;
  background: var(--danger);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
}

@keyframes asset-chip-spin {
  to {
    transform: rotate(360deg);
  }
}

.asset-chip-thumb[data-media-preview],
.asset-chip-text[data-media-preview] {
  cursor: pointer;
}

.asset-chip-text {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.asset-chip-type {
  flex: 0 0 auto;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.asset-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-chip-remove {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 999px;
  color: #8a5360;
  background: rgba(209, 74, 61, 0.1);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.asset-chip-remove:hover {
  color: #fff;
  background: var(--danger);
  transform: scale(1.05);
}

.slot-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.slot-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 88px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdff 0%, #f4f9fc 100%);
  box-shadow: 0 10px 20px rgba(16, 38, 58, 0.05);
}

.slot-chip-label {
  display: block;
  width: 100%;
  font-weight: 700;
  font-size: 0.92rem;
}

.slot-chip-count {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--brand-soft);
}

.slot-chip .button {
  display: none;
}

.slot-chip {
  justify-content: flex-start;
}

.toolbar-grid.compact {
  display: grid;
  gap: 6px;
}

.toolbar-row.one-line {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  align-items: center;
  min-width: 0;
  min-height: 46px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 4px 8px 5px 0;
  scrollbar-width: thin;
}

.toolbar-row.one-line.select-menu-open {
  overflow: visible;
}

.toolbar-row.one-line > *,
.toolbar-row.one-line > .submit-button.compact {
  flex: 0 0 auto;
}

.toolbar-row.one-line > .toolbar-actions {
  flex: 1 0 auto;
}

.toolbar-actions {
  display: inline-flex;
  flex: 1 0 auto;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  min-width: max-content;
}

.upload-button.compact,
.portrait-add-button.compact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 37px;
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--brand-deep);
  background: #fff;
  border: 1px solid rgba(132, 200, 226, 0.9);
  box-shadow: none;
}

.button-label {
  line-height: 1.2;
  white-space: nowrap;
}

.upload-button-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(22, 157, 207, 0.1);
  font-size: 0.86rem;
  font-weight: 700;
}

.upload-button.compact:hover,
.portrait-add-button.compact:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 159, 211, 0.92);
  background: #f8fdff;
  box-shadow: none;
}

.toolbar-row.tight {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.custom-select {
  position: relative;
  min-width: 0;
}

.custom-select-trigger {
  width: 100%;
  min-width: 0;
  min-height: 37px;
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) 10px;
  align-items: center;
  gap: 7px;
  padding: 7px 10px 7px 11px;
  border: 1px solid rgba(146, 200, 221, 0.72);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfd 100%);
  color: #12384b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 1px 0 rgba(18, 56, 75, 0.03);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  outline: none;
  text-align: left;
  transition:
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.custom-select-trigger:hover,
.custom-select.open .custom-select-trigger {
  border-color: rgba(34, 165, 210, 0.86);
  background: linear-gradient(180deg, #fbfeff 0%, #edf8fc 100%);
  color: #063a51;
  box-shadow: 0 0 0 3px rgba(26, 168, 223, 0.1);
}

.custom-select-trigger:focus-visible {
  border-color: rgba(34, 165, 210, 0.9);
  box-shadow: 0 0 0 4px rgba(26, 168, 223, 0.14);
}

.custom-select-value,
.custom-select-option-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-arrow {
  width: 8px;
  height: 8px;
  justify-self: end;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: 0.72;
  transform: rotate(45deg) translateY(-1px);
  transform-origin: center;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.custom-select.open .custom-select-arrow {
  opacity: 0.95;
  transform: rotate(-135deg) translateY(-1px);
}

.custom-select-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 90;
  display: none;
  min-width: max(100%, 126px);
  max-width: min(320px, calc(100vw - 32px));
  max-height: min(320px, calc(100vh - 160px));
  overflow-y: auto;
  padding: 5px;
  border: 1px solid rgba(164, 204, 222, 0.78);
  border-radius: 13px;
  background: linear-gradient(180deg, #fbfeff 0%, #f4f9fc 100%);
  box-shadow:
    0 18px 36px rgba(16, 38, 58, 0.16),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.custom-select.open .custom-select-menu {
  display: grid;
  gap: 3px;
  animation: select-menu-pop 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}

.custom-select-option {
  width: 100%;
  min-height: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #24475b;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  outline: none;
  text-align: left;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
  border-color: rgba(170, 218, 235, 0.9);
  background: #eef8fd;
  color: #0b5570;
}

.custom-select-option.selected {
  border-color: rgba(87, 191, 229, 0.42);
  background: linear-gradient(180deg, #e2f6fc 0%, #f2fbfe 100%);
  color: #073f56;
}

.custom-select-option.selected::after {
  content: "";
  width: 6px;
  height: 10px;
  border-right: 2px solid var(--brand-deep);
  border-bottom: 2px solid var(--brand-deep);
  transform: rotate(45deg);
}

.toolbar-custom-select {
  width: 64px;
  min-width: 64px;
  flex: 0 0 auto;
}

.toolbar-custom-select.duration-select {
  width: 64px;
  min-width: 64px;
}

.toolbar-custom-select.ratio-select {
  width: 86px;
  min-width: 86px;
}

.toolbar-custom-select.resolution-select {
  width: 88px;
  min-width: 88px;
}

.toolbar-model-switcher.custom-select .custom-select-trigger {
  min-height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: #0d3246;
  font-weight: 900;
}

.toolbar-model-switcher.custom-select .custom-select-trigger:hover,
.toolbar-model-switcher.custom-select.open .custom-select-trigger,
.toolbar-model-switcher.custom-select .custom-select-trigger:focus-visible {
  background: transparent;
  box-shadow: none;
  color: #063a51;
}

.toolbar-model-switcher.custom-select .custom-select-menu {
  min-width: 100%;
  width: max-content;
}

@keyframes select-menu-pop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.toolbar-select {
  -webkit-appearance: none;
  appearance: none;
  width: 64px;
  min-width: 64px;
  flex: 0 0 auto;
  min-height: 37px;
  padding: 6px 20px 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(146, 200, 221, 0.72);
  background:
    linear-gradient(45deg, transparent 50%, #0a6889 50%) calc(100% - 12px) 50% / 5px 5px no-repeat,
    linear-gradient(135deg, #0a6889 50%, transparent 50%) calc(100% - 8px) 50% / 5px 5px no-repeat,
    #fff;
  box-shadow: none;
  color: #12384b;
  font-size: 0.82rem;
  font-weight: 700;
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.toolbar-select:hover,
.toolbar-select:focus {
  border-color: rgba(34, 165, 210, 0.82);
  background:
    linear-gradient(45deg, transparent 50%, #0784ad 50%) calc(100% - 12px) 50% / 5px 5px no-repeat,
    linear-gradient(135deg, #0784ad 50%, transparent 50%) calc(100% - 8px) 50% / 5px 5px no-repeat,
    #f8fdff;
  box-shadow: none;
}

.toolbar-select.duration-select {
  width: 54px;
  min-width: 54px;
}

.toolbar-select.ratio-select {
  width: 64px;
  min-width: 64px;
}

.toolbar-select.resolution-select {
  width: 66px;
  min-width: 66px;
}

.toolbar-number-input {
  width: 70px;
  flex: 0 0 auto;
  min-height: 37px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(180, 207, 222, 0.86);
  background: #fff;
  font-size: 0.82rem;
}

.toggle-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 37px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(190, 211, 224, 0.86);
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}

.toggle-pill input {
  accent-color: var(--brand);
}

.toolbar-static-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 37px;
  padding: 6px 8px;
  border-radius: 999px;
  color: #67410b;
  background: #fff9ed;
  border: 1px solid rgba(221, 185, 112, 0.72);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.submit-button.compact {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 37px;
  padding: 7px 12px;
  color: #fff;
  border: 1px solid rgba(5, 119, 159, 0.78);
  background: linear-gradient(135deg, #16a8d8 0%, #0786b6 100%);
  box-shadow: none;
  transform: translateY(0);
}

.submit-button.compact.is-busy {
  background: linear-gradient(135deg, #1599c5 0%, #08769e 100%);
}

.submit-button.compact:hover {
  transform: translateY(-1px);
  border-color: rgba(4, 102, 137, 0.92);
  background: linear-gradient(135deg, #18addf 0%, #0780ad 100%);
  box-shadow: 0 0 0 3px rgba(10, 139, 186, 0.14);
}

.submit-button.compact[aria-busy="true"] .send-circle {
  animation: pulse-send 1.2s ease-in-out infinite;
}

.send-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.22);
}

@keyframes pulse-send {
  0%,
  100% {
    transform: scale(1);
    background: rgba(255, 255, 255, 0.24);
  }
  50% {
    transform: scale(1.08);
    background: rgba(255, 255, 255, 0.38);
  }
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 30;
}

.confirm-modal-root {
  position: fixed;
  inset: 0;
  z-index: 140;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0s linear 0.2s;
}

body.modal-open {
  overflow: hidden;
}

.confirm-modal-root[aria-hidden="false"] {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.2s ease,
    visibility 0s linear 0s;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 23, 33, 0.22);
  backdrop-filter: blur(10px);
}

.confirm-modal {
  width: min(460px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(201, 226, 239, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(247, 251, 254, 0.99) 100%);
  box-shadow: 0 30px 60px rgba(16, 38, 58, 0.2);
  transform: translateY(14px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.2s ease,
    box-shadow 0.2s ease;
}

.confirm-modal.danger {
  border-color: rgba(209, 74, 61, 0.16);
}

.confirm-modal-root[aria-hidden="false"] .confirm-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.confirm-modal-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: rgba(26, 168, 223, 0.12);
}

.confirm-modal.danger .confirm-modal-kicker {
  color: #b24a3f;
  background: rgba(209, 74, 61, 0.1);
}

.confirm-modal h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.confirm-modal p {
  margin: 0;
  color: #587082;
  line-height: 1.6;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.confirm-modal .button {
  min-width: 96px;
}

.change-password-form {
  display: grid;
  gap: 14px;
}

.change-password-form .login-field {
  display: grid;
  gap: 6px;
}

.change-password-form .login-field span {
  font-size: 0.82rem;
  font-weight: 700;
  color: #44607a;
  letter-spacing: 0.04em;
}

.change-password-form .login-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(73, 116, 158, 0.18);
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fbfdff;
  color: #1c2c3c;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.change-password-form .login-field input:focus {
  outline: none;
  border-color: #98d7ea;
  box-shadow: 0 0 0 3px rgba(152, 215, 234, 0.25);
}

.confirm-modal-copy {
  margin: 0;
  color: #587082;
  line-height: 1.55;
  font-size: 0.95rem;
}

.change-password-error {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(209, 74, 61, 0.08);
  color: #b24a3f;
  font-size: 0.88rem;
  line-height: 1.4;
}

.media-hover-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.98);
  transition:
    opacity 0.18s ease,
    transform 0.22s ease,
    visibility 0s linear 0.22s;
  will-change: transform, opacity;
}

.media-hover-preview.interactive {
  pointer-events: auto;
}

.media-hover-preview.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.18s ease,
    transform 0.22s ease,
    visibility 0s linear 0s;
}

.media-hover-card {
  padding: 8px;
  border-radius: 18px;
  border: 1px solid #c9e7f4;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 40px rgba(16, 38, 58, 0.2);
  backdrop-filter: blur(10px);
  transform-origin: top left;
}

.media-hover-card img,
.media-hover-card video {
  display: block;
  width: auto;
  height: auto;
  max-width: 320px;
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
  background: #e9f1f6;
}

.media-hover-card.audio {
  width: min(340px, calc(100vw - 24px));
  padding: 12px;
}

.media-hover-card.audio audio {
  width: 100%;
  min-width: 260px;
  display: block;
}

.media-hover-audio-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.media-hover-audio-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: #0f6f99;
  font-size: 0.82rem;
  font-weight: 800;
  background: #e2f6fb;
  border: 1px solid #bce5f2;
}

.media-hover-audio-title {
  min-width: 0;
  overflow: hidden;
  color: #23465d;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-hover-caption {
  margin-top: 8px;
  max-width: 320px;
  color: #355468;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
}

.toast {
  min-width: 250px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 14px 28px rgba(16, 38, 58, 0.18);
}

.toast.success {
  background: linear-gradient(135deg, #209263, #147b50);
}

.toast.error {
  background: linear-gradient(135deg, #d34d3f, #ba3d31);
}

.toast.info {
  background: linear-gradient(135deg, #0ea5d8, #06739a);
}

.batch-shell {
  max-width: 1540px;
}

.batch-nav {
  align-items: center;
}

.batch-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.65fr);
  gap: 16px;
  margin-bottom: 16px;
}

.asset-shell {
  max-width: 1540px;
}

.portrait-shell {
  max-width: 1640px;
}

.asset-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-bottom: 16px;
}

.asset-hero-copy {
  display: grid;
  gap: 8px;
}

.asset-toolbar {
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.asset-stat {
  min-width: 120px;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid #d9e6ef;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8fb 100%);
}

.asset-stat span {
  color: var(--muted);
  font-size: 0.8rem;
}

.asset-stat strong {
  font-size: 1.3rem;
  line-height: 1;
}

.asset-search {
  min-width: 240px;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid #d9e6ef;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8fb 100%);
}

.asset-search span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.asset-search input {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
  padding: 0;
}

.asset-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.asset-tile {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid rgba(216, 229, 239, 0.96);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.asset-tile:hover {
  transform: translateY(-2px);
  border-color: #b9ddeb;
  box-shadow: 0 24px 44px rgba(16, 38, 58, 0.12);
}

.asset-tile-media {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #dfe7ee;
  aspect-ratio: 4 / 5;
}

.asset-play-card {
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  display: block;
}

.asset-play-card img,
.asset-play-card video,
.asset-tile-media img,
.asset-tile-media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #dfe7ee;
}

.asset-play-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 24, 34, 0.02) 0%, rgba(8, 24, 34, 0.28) 100%);
}

.asset-play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  background: rgba(9, 23, 33, 0.56);
  box-shadow: 0 14px 30px rgba(9, 23, 33, 0.24);
  backdrop-filter: blur(10px);
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.asset-play-card:hover .asset-play-button {
  transform: translate(-50%, -50%) scale(1.06);
  background: rgba(8, 24, 34, 0.72);
}

.asset-tile-overlay {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.asset-mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(11, 31, 44, 0.64);
  backdrop-filter: blur(8px);
}

.asset-tile-copy {
  display: grid;
  gap: 4px;
}

.asset-tile-copy strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 1.4em;
  font-size: 1rem;
  font-weight: 800;
}

.asset-tile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--muted);
  font-size: 0.74rem;
}

.asset-tile-meta span {
  padding: 3px 6px;
  border-radius: 999px;
  background: #f4f8fb;
  border: 1px solid #dde8f0;
}

.asset-tile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portrait-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.portrait-group-panel {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  border: 1px solid rgba(216, 229, 239, 0.96);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  min-height: 320px;
}

.portrait-group-card {
  width: 100%;
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid #d9e6ef;
  background: linear-gradient(180deg, #fbfdff 0%, #f3f8fb 100%);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.portrait-group-card:hover,
.portrait-group-card.active {
  transform: translateY(-1px);
  border-color: #9ad2e6;
  box-shadow: 0 20px 36px rgba(16, 38, 58, 0.1);
}

.portrait-group-card strong {
  font-size: 0.96rem;
}

.portrait-group-card span,
.portrait-group-card small {
  color: var(--muted);
}

.portrait-asset-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.portrait-asset-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 16px 18px;
  border: 1px solid rgba(216, 229, 239, 0.96);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.portrait-asset-toolbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
}

.compact-search {
  min-width: 220px;
}

.portrait-asset-wall {
  min-height: 320px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.portrait-asset-tile .asset-tile-media {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 8px;
  background: linear-gradient(180deg, #edf4f8 0%, #dfe7ee 100%);
}

.portrait-asset-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #36566a;
  font-weight: 800;
  background: linear-gradient(135deg, #dcebf3 0%, #edf5f9 100%);
}

.portrait-picker-backdrop {
  align-items: stretch;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.portrait-picker-modal {
  width: min(1320px, 100%);
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  max-height: calc(100vh - 48px);
  border-radius: 28px;
  border: 1px solid rgba(216, 229, 239, 0.96);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 253, 0.98) 100%);
  box-shadow: 0 40px 90px rgba(15, 34, 48, 0.2);
}

.portrait-picker-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  flex: 0 0 auto;
}

.portrait-picker-head h3 {
  margin: 4px 0 0;
}

.portrait-picker-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: end;
  flex: 0 0 auto;
}

.portrait-picker-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.portrait-picker-group-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.portrait-picker-assets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.portrait-picker-tile .asset-tile-media {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 8px;
  background: linear-gradient(180deg, #edf4f8 0%, #dfe7ee 100%);
}

.portrait-asset-tile .asset-tile-media img,
.portrait-asset-tile .asset-tile-media video,
.portrait-picker-tile .asset-tile-media img,
.portrait-picker-tile .asset-tile-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 14px;
  background: #eef4f8;
}

.portrait-add-button {
  white-space: nowrap;
  border-color: #74c7ea;
  color: #0b6f97;
  background:
    linear-gradient(180deg, rgba(244, 252, 255, 0.98) 0%, rgba(222, 244, 252, 0.98) 100%);
  box-shadow: 0 12px 24px rgba(16, 138, 189, 0.14);
}

.portrait-add-button:hover {
  border-color: #59b7e0;
  color: #075f83;
  background:
    linear-gradient(180deg, rgba(247, 253, 255, 1) 0%, rgba(214, 240, 251, 1) 100%);
}

.portrait-add-button .upload-button-icon {
  background: rgba(12, 145, 200, 0.12);
  color: #0b86b8;
}

.portrait-asset-id {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: -1px;
}

.portrait-picker-tile .asset-tile-actions .button {
  width: 100%;
}

.portrait-picker-tile .asset-tile-actions .button-secondary {
  border-color: #0c86b8;
  color: #fff;
  background: linear-gradient(135deg, #0b91c8 0%, #0f6ea0 100%);
  box-shadow: 0 10px 22px rgba(15, 110, 160, 0.22);
}

.portrait-picker-tile .asset-tile-actions .button-secondary:hover {
  border-color: #0a7eb0;
  background: linear-gradient(135deg, #0c9bd6 0%, #125f8a 100%);
  color: #fff;
}

@media (max-width: 1200px) {
  .asset-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portrait-asset-wall,
  .portrait-picker-assets {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .composer-top-row,
  .composer-mode-row {
    flex-direction: column;
    align-items: stretch;
  }

  .model-switcher {
    grid-template-columns: auto auto minmax(0, 1fr);
    width: min(100%, 280px);
  }

  .mode-strip.compact.integrated {
    gap: 8px;
  }

  .composer-header-stats {
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .mode-inline-hint {
    flex-basis: auto;
    min-width: 0;
    white-space: normal;
  }

  .toolbar-model-switcher {
    flex: 0 0 188px;
    width: 188px;
  }

  .portrait-workspace,
  .portrait-picker-layout {
    grid-template-columns: 1fr;
  }

  .portrait-picker-layout {
    overflow: visible;
  }

  .portrait-picker-group-list,
  .portrait-picker-assets {
    overflow: visible;
    min-height: 0;
  }

  .portrait-asset-toolbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .portrait-asset-wall,
  .portrait-picker-assets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.batch-uploader,
.batch-note,
.batch-summary-card,
.batch-table-card {
  border: 1px solid rgba(216, 229, 239, 0.96);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.batch-uploader {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.batch-uploader label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.batch-uploader input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fbfdff;
  color: var(--text);
}

.batch-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.batch-note {
  padding: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.batch-note strong {
  color: var(--text);
}

.batch-summary-card {
  min-height: 120px;
  margin-bottom: 16px;
  padding: 18px;
}

.batch-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.batch-summary-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 18px;
  background: #f6fbfe;
  border: 1px solid #d6e7f1;
}

.batch-summary-item span {
  color: var(--muted);
  font-size: 0.84rem;
}

.batch-summary-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-progress,
.row-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5f1f7;
}

.batch-progress {
  margin-top: 14px;
}

.batch-progress span,
.row-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-deep));
}

.batch-warning {
  margin-top: 12px;
  color: var(--warn);
  font-weight: 700;
}

.batch-summary-empty {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.batch-table-card {
  overflow: hidden;
}

.batch-table-wrap {
  overflow-x: auto;
}

.batch-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

.batch-table th,
.batch-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.batch-table th {
  color: #355468;
  background: #f4f9fc;
  font-size: 0.86rem;
}

.batch-table code {
  color: var(--brand-deep);
  font-size: 0.78rem;
}

.batch-error {
  color: var(--danger);
  max-width: 360px;
}

.batch-empty {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .records-head {
    flex-direction: column;
  }

  .records-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .records-pagination-actions {
    justify-content: flex-start;
  }

  .records-head-tools .chip-row {
    justify-content: flex-start;
  }

  .records-model-filter {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .record-preview-row {
    grid-template-columns: 1fr;
  }

  .record-media-frame,
  .record-media-empty {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .record-progress-panel {
    min-height: 0;
  }

  .record-progress-head {
    align-items: flex-start;
  }

  .record-progress-meta {
    min-width: 0;
  }

  .record-progress-pill {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    border-radius: 14px;
  }

  .batch-hero {
    grid-template-columns: 1fr;
  }

  .batch-uploader {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .batch-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .batch-actions .button {
    flex: 1 1 140px;
    min-width: 0;
  }
}
