:root {
  --background: #f8f9ff;
  --surface: #ffffff;
  --surface-low: #eff4ff;
  --surface-high: #dce9ff;
  --surface-top: #d3e4fe;
  --text: #0b1c30;
  --muted: #464555;
  --line: #c7c4d8;
  --primary: #3525cd;
  --primary-bright: #4f46e5;
  --danger: #ba1a1a;
  --warning: #a44100;
  --ok: #0d6f4f;
  --shadow: 0 10px 30px rgba(11, 28, 48, 0.08);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    linear-gradient(120deg, rgba(211, 228, 254, 0.78), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, var(--background) 42%, #edf3ff 100%);
  color: var(--text);
  font-family: Inter, sans-serif;
}

body:has(.auth-page) {
  background:
    linear-gradient(135deg, rgba(13, 111, 79, 0.16), transparent 32%),
    linear-gradient(315deg, rgba(53, 37, 205, 0.10), transparent 38%),
    linear-gradient(180deg, #ffffff 0%, var(--background) 100%);
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100dvh;
}

.auth-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.auth-brand {
  padding: 0;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 12px;
  background: rgba(255, 255, 255, 0.9);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-bright);
  color: white;
}

.brand strong,
.page-title,
.section-title,
.metric-value,
.job-title {
  font-family: Geist, sans-serif;
}

.brand strong {
  display: block;
  font-size: 20px;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 0;
  border-left: 4px solid transparent;
  border-radius: 0 10px 10px 0;
  background: transparent;
  color: #3f465c;
  text-align: left;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-button .material-symbols-outlined {
  width: 24px;
  overflow: hidden;
  flex: 0 0 24px;
}

.nav-button:hover,
.nav-button.active {
  background: var(--surface-low);
  color: var(--primary);
}

.nav-button.active {
  border-left-color: var(--primary);
  font-weight: 700;
}

.sidebar-foot {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 249, 255, 0.84);
  backdrop-filter: blur(12px);
}

.search {
  width: min(560px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-low);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.account-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.topbar > .icon-button {
  flex: 0 0 auto;
}

.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-bright);
  color: white;
  font-weight: 800;
}

.content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px;
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-header > div:first-child {
  flex: 1 1 260px;
}

.page-header > .toolbar {
  flex: 1 1 520px;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
}

.page-header > .toolbar:has(.scheduler-header-actions) {
  flex-basis: 100%;
}

.page-title {
  margin: 0 0 8px;
  font-size: 36px;
  line-height: 1.12;
}

.muted {
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.button:hover {
  border-color: rgba(53, 37, 205, 0.35);
}

.button:active {
  transform: scale(0.98);
}

.button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 12px 24px rgba(53, 37, 205, 0.16);
}

.button.danger {
  border-color: rgba(186, 26, 26, 0.35);
  color: var(--danger);
}

.button.ghost {
  background: transparent;
}

.button.active,
.platform-choice:has(input:checked) {
  border-color: rgba(53, 37, 205, 0.38);
}

.button.active,
.platform-choice:has(input:checked),
.chip-choice.active {
  background: var(--surface-low);
  color: var(--primary);
}

.grid {
  display: grid;
  gap: 24px;
}

.brand-platform-list,
.scheduled-post-list,
.date-range-grid,
.filter-platform-grid,
.metadata-item,
.field,
.caption-choice {
  display: grid;
  gap: 8px;
}

.brand-editor,
.filter-section,
.mini-calendar,
.list,
.platform-grid,
.caption-grid,
.duration-grid,
.output-body,
.output-list {
  display: grid;
  gap: 10px;
}

.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metadata-item,
.item,
.scheduled-post-item,
.output-card,
.notice,
.mini-calendar,
.panel,
.calendar-shell,
.month-shell,
.status-card {
  border: 1px solid var(--line);
}

.metadata-item,
.item {
  border-radius: 12px;
}

.output-card,
.mini-calendar,
.panel,
.calendar-shell,
.month-shell,
.status-card {
  border-radius: 14px;
}

.item,
.output-card,
.notice {
  background: var(--surface);
}

.scheduled-post-item,
.mini-calendar {
  background: #fbfcff;
}

.panel,
.calendar-shell,
.month-shell,
.status-card {
  box-shadow: var(--shadow);
}

.panel {
  background: rgba(255, 255, 255, 0.9);
}

.panel-pad {
  padding: 20px;
}

.section-title {
  margin: 0 0 14px;
  font-size: 20px;
}

.metric {
  padding: 20px;
}

.metric-label,
th,
.brand-inline-editor label,
.date-filter-button small,
.mini-calendar-entry span,
.metadata-item span,
.time-entry-copy small {
  color: var(--muted);
}

.metric-label,
th,
.brand-inline-editor label,
.filter-section > strong,
.date-filter-button small,
.mini-calendar-entry span,
.metadata-item span,
.time-entry-copy small {
  text-transform: uppercase;
}

.metric-label,
.brand-inline-editor label,
.filter-section > strong,
.date-filter-button small,
.mini-calendar-entry span,
.time-entry-copy small {
  letter-spacing: 0.08em;
}

.metric-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.metric-value {
  margin: 0;
  font-size: 32px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: capitalize;
}

.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status.failed {
  background: #ffdad6;
  color: var(--danger);
}

.status.completed {
  background: #dff7ec;
  color: var(--ok);
}

.status.processing,
.status.queued {
  background: #fff0d6;
  color: var(--warning);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-low);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

tr[data-clickable="true"] {
  cursor: pointer;
}

tr[data-clickable="true"]:hover {
  background: #f1f5f9;
}

.job-title {
  margin: 0;
  font-size: 18px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.settings-tabs,
.job-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
}

.settings-tabs {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.settings-tab,
.job-tab {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.settings-tab {
  min-height: 42px;
  padding: 0 14px 12px;
  font-weight: 900;
}

.settings-tab.active,
.job-tab.active {
  color: var(--primary);
}

.settings-tab.active::after,
.job-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--primary);
}

.settings-tab.active::after {
  right: 10px;
  left: 10px;
}

.settings-panel {
  max-width: 1040px;
}

.settings-divider {
  margin: 22px 0;
  border-top: 1px solid var(--line);
}

.brand-selector {
  position: relative;
  max-width: 560px;
  margin-bottom: 12px;
}

.brand-editor {
  grid-template-columns: minmax(0, 560px);
  align-items: start;
}

.brand-card-actions,
.brand-platform-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-card-actions {
  flex: 0 0 auto;
  align-self: stretch;
  padding: 8px 8px 8px 0;
}

.brand-icon-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 8px;
}

.brand-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.brand-icon-button .material-symbols-outlined {
  font-size: 18px;
}

.brand-selector-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.brand-selector-kicker strong {
  font-family: Geist, sans-serif;
  font-size: 18px;
}

.brand-selector-kicker span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.brand-help {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--primary);
  border-radius: 50%;
  color: var(--primary) !important;
  font-size: 11px !important;
  line-height: 1;
}

.brand-selector-card {
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--text);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  overflow: hidden;
}

.brand-selector-card.active,
.item.active,
.chip-choice.active {
  border-color: var(--primary);
}

.brand-selector-card.active {
  box-shadow: inset 0 0 0 1px rgba(53, 37, 205, 0.12);
}

.brand-selector-main {
  min-width: 0;
  min-height: 62px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.brand-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #0b1c30;
  color: white;
  font-family: Geist, sans-serif;
  font-size: 14px;
  font-weight: 900;
  overflow: hidden;
}

.brand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-avatar-large {
  width: 68px;
  height: 68px;
  flex-basis: 68px;
  font-size: 18px;
}

.brand-inline-editor {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.brand-image-picker {
  position: relative;
  flex: 0 0 auto;
  cursor: pointer;
}

.brand-image-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(11, 28, 48, 0.58);
  color: white;
  opacity: 0;
  transition: opacity 160ms ease;
}

.brand-image-picker:hover .brand-image-overlay,
.brand-image-picker:focus-within .brand-image-overlay {
  opacity: 1;
}

.brand-inline-editor label {
  font-size: 12px;
  font-weight: 900;
}

.brand-inline-editor input[type="text"],
.brand-inline-editor input[name="brandName"] {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  outline: 0;
  font-family: Geist, sans-serif;
  font-weight: 900;
}

.brand-inline-editor input[type="text"]:focus,
.brand-inline-editor input[name="brandName"]:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(53, 37, 205, 0.12);
}

.brand-selector-copy {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 5px;
}

.brand-selector-copy > strong {
  overflow: hidden;
  font-family: Geist, sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-selector-platforms {
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.brand-selector-platforms .platform-logo {
  width: 18px;
  height: 18px;
}

.brand-selector-platforms > span:not(.platform-logo) {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.brand-selector .custom-popover {
  right: auto;
  left: 0;
}

.brand-selector-popover {
  width: min(560px, 100%);
  min-width: 280px;
}

.brand-option-list {
  display: grid;
  gap: 6px;
}

.brand-option {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.brand-option.active,
.brand-option:hover {
  background: #eef2ff;
}

.brand-option > span:nth-child(2) {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 2px;
}

.brand-option strong,
.brand-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.brand-platform-slot,
.billing-plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-platform-main span,
.billing-plan span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.brand-platform-slot {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.brand-platform-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-platform-main > div,
.billing-plan > div {
  display: grid;
  gap: 2px;
}

.brand-platform-controls {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.billing-plan {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.range-pill {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 800;
}

.scheduler-header-actions {
  position: relative;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.custom-selector {
  position: relative;
}

.custom-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(11, 28, 48, 0.14);
}

.mode-line-list {
  display: grid;
}

.mode-line {
  min-width: 180px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-weight: 900;
  text-align: left;
  text-transform: capitalize;
  text-decoration: none;
}

.mode-line:last-child {
  border-bottom: 0;
}

.mode-line.active {
  color: var(--primary);
}

.danger-line {
  color: var(--danger);
}

.mode-line .material-symbols-outlined {
  font-size: 18px;
}

.complete-job-actions {
  z-index: 3;
}

.complete-job-popover {
  min-width: 230px;
}

.calendar-shell,
.month-shell {
  overflow: auto;
  max-height: calc(100dvh - 230px);
}

.calendar-shell {
  background: rgba(255, 255, 255, 0.92);
}

.calendar-grid {
  min-width: 1040px;
  display: grid;
  grid-template-columns: 76px repeat(7, minmax(128px, 1fr));
}

.calendar-grid.day-grid {
  min-width: 520px;
  grid-template-columns: 76px minmax(280px, 1fr);
}

.calendar-corner,
.calendar-day,
.calendar-time,
.calendar-cell,
.month-head,
.month-cell {
  border-right: 1px solid #d9e1ef;
  border-bottom: 1px solid #d9e1ef;
}

.calendar-corner,
.calendar-day,
.month-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f9fd;
}

.calendar-corner {
  left: 0;
  z-index: 3;
}

.calendar-day {
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 10px 12px;
  text-align: center;
}

.calendar-day.today {
  background: var(--primary);
  color: white;
}

.calendar-day span {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
}

.calendar-day strong {
  font-family: Geist, sans-serif;
}

.calendar-time {
  position: sticky;
  left: 0;
  z-index: 1;
  min-height: 58px;
  padding: 8px;
  background: #fbfcff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.calendar-cell {
  min-height: 58px;
  padding: 6px;
  background:
    linear-gradient(180deg, rgba(140, 184, 248, 0.22), rgba(255, 255, 255, 0) 72%),
    #f8fbff;
}

.calendar-post {
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(53, 37, 205, 0.24);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(11, 28, 48, 0.1);
}

.calendar-post strong,
.calendar-post span,
.calendar-post small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-post span,
.calendar-post small {
  color: var(--muted);
  font-size: 11px;
}

.calendar-empty {
  padding: 16px;
  background: #f8fbff;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.month-grid {
  min-width: 980px;
  display: grid;
  grid-template-columns: repeat(7, minmax(128px, 1fr));
}

.month-shell {
  background: rgba(255, 255, 255, 0.94);
}

.month-head {
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.month-cell {
  min-height: 132px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(140, 184, 248, 0.18), rgba(255, 255, 255, 0) 72%),
    #f8fbff;
}

.month-cell.outside {
  background: #f1f4f9;
  color: var(--muted);
}

.month-cell.today {
  box-shadow: inset 0 0 0 2px var(--primary);
}

.month-date {
  margin-bottom: 8px;
  font-family: Geist, sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.month-posts {
  display: grid;
  gap: 6px;
}

.month-more {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.scheduler-list-tools {
  align-items: center;
}

.scheduler-list-titleline {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.scheduler-bulk-actions {
  display: inline-flex;
}

.scheduler-bulk-actions .custom-selector-trigger {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #f8fbff;
}

.scheduler-bulk-actions .custom-popover {
  right: auto;
  left: 0;
}

.scheduler-bulk-popover {
  min-width: 210px;
}

.scheduler-filter-bar {
  display: inline-flex;
}

.scheduler-filter-popover {
  width: min(360px, calc(100vw - 40px));
  display: grid;
  gap: 14px;
  text-align: left;
}

.filter-section > strong {
  font-size: 12px;
}

.brand-selector-card,
.date-filter-button,
.time-filter-button,
.scheduler-brand-card,
.filter-platform-choice,
.platform-choice {
  display: flex;
  align-items: center;
}

.date-filter-button,
.time-filter-button,
.scheduler-brand-card,
.filter-platform-choice,
.platform-choice {
  border: 1px solid var(--line);
}

.date-filter-button,
.time-filter-button,
.scheduler-brand-card {
  min-height: 58px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(239, 244, 255, 0.92)),
    var(--surface);
  color: var(--text);
}

.date-filter-button,
.time-filter-button {
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 14px;
}

.date-filter-button,
.scheduler-brand-card {
  text-align: left;
}

.date-filter-button.active,
.time-filter-button:focus-within,
.scheduler-brand-card.active,
.scheduler-brand-card:focus-visible {
  border-color: rgba(53, 37, 205, 0.5);
  box-shadow: inset 0 0 0 1px rgba(53, 37, 205, 0.16);
}

.date-filter-button small {
  display: block;
  font-size: 11px;
  font-weight: 900;
}

.date-filter-button strong {
  display: block;
  margin-top: 2px;
  font-family: Geist, sans-serif;
  font-size: 14px;
}

.mini-calendar {
  padding: 10px;
}

.mini-calendar-entry {
  display: grid;
  gap: 5px;
}

.mini-calendar-entry span {
  font-size: 11px;
  font-weight: 900;
}

.mini-calendar-entry input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  font-weight: 800;
}

.mini-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-calendar-head strong {
  font-family: Geist, sans-serif;
  font-size: 14px;
}

.mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.mini-calendar-weekday {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.mini-calendar-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.mini-calendar-day.outside {
  color: #9aa3b7;
}

.mini-calendar-day.today {
  box-shadow: inset 0 0 0 1px rgba(53, 37, 205, 0.45);
}

.mini-calendar-day.selected {
  background: var(--primary);
  color: white;
}

.filter-platform-choice,
.platform-choice {
  gap: 10px;
}

.filter-platform-choice {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f8fbff;
  font-weight: 800;
}

.custom-selector-trigger.active,
.filter-platform-choice.active {
  border-color: rgba(53, 37, 205, 0.45);
  background: #eef2ff;
}

.filter-platform-choice input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.filter-actions,
.scheduled-actions {
  display: flex;
  justify-content: flex-end;
}

.scheduled-list-head,
.scheduled-post-item {
  display: grid;
  grid-template-columns: 38px 142px minmax(320px, 1fr) minmax(128px, 180px) 132px 104px;
  gap: 16px;
  align-items: center;
}

.scheduled-list-head {
  padding: 0 14px 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.scheduled-post-item {
  padding: 14px;
  border-radius: 8px;
}

.check-cell {
  display: grid;
  place-items: center;
}

.check-cell input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.scheduled-date {
  display: grid;
  gap: 3px;
}

.scheduled-date strong {
  font-family: Geist, sans-serif;
}

.scheduled-date span {
  color: var(--muted);
  font-size: 13px;
}

.scheduled-post-main,
.output-row-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.scheduled-post-main > div,
.output-row-main > div {
  min-width: 0;
}

.scheduled-post-main .job-title,
.output-row-main strong,
.output-row-main .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheduled-post-main .job-title {
  margin: 0;
}

.scheduled-thumb {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(53, 37, 205, 0.22), rgba(13, 111, 79, 0.18)),
    #eef4ff;
  color: var(--primary);
  overflow: hidden;
}

.scheduled-thumb.has-media {
  background: #101820;
}

.scheduled-thumb img,
.scheduled-thumb video[data-scheduler-preview] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scheduled-thumb video[data-scheduler-preview] {
  pointer-events: none;
}

.scheduled-thumb.has-media .material-symbols-outlined {
  display: none;
}

.scheduled-thumb .material-symbols-outlined {
  position: relative;
  z-index: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 4px 14px rgba(11, 28, 48, 0.18);
}

.scheduled-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.scheduled-post-meta {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.platform-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(11, 28, 48, 0.12);
  overflow: hidden;
}

.platform-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.platform-facebook,
.platform-instagram {
  background: transparent;
  box-shadow: none;
}

.platform-youtube {
  background: #ff0033;
  color: white;
}

.platform-tiktok {
  background: #101117;
  color: white;
}

.platform-linkedin {
  background: #0a66c2;
  color: white;
}

.job-hero {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.job-hero-copy {
  max-width: 760px;
}

.job-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.job-kicker .muted {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.job-kicker .material-symbols-outlined {
  font-size: 16px;
}

.job-tabs {
  gap: 28px;
  margin-bottom: 28px;
}

.job-tab {
  padding: 0 0 14px;
  font-weight: 800;
}

.job-tab.active::after {
  right: 0;
  left: 0;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-row .section-title {
  margin: 0;
}

.section-title span {
  margin-left: 8px;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.metadata-item {
  min-height: 82px;
  align-content: center;
  padding: 14px;
  background: var(--surface-low);
}

.metadata-item span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.metadata-item strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.status-card {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
}

.status-card-top,
.status-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.status-card-main h2 {
  margin: 0 0 6px;
  font-family: Geist, sans-serif;
  font-size: 26px;
  line-height: 1.14;
}

.status-card-main p {
  margin: 0;
  color: var(--muted);
}

.status-card-main strong {
  font-family: Geist, sans-serif;
  font-size: 28px;
  color: var(--primary);
}

.item {
  width: 100%;
  padding: 14px;
  text-align: left;
}

.item.active {
  box-shadow: 0 0 0 3px rgba(53, 37, 205, 0.12);
}

.video-frame {
  width: min(360px, 100%);
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(160deg, rgba(79, 70, 229, 0.26), transparent 32%),
    #111827;
  box-shadow: 0 24px 50px rgba(11, 28, 48, 0.24);
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050810;
}

.empty-video {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #dbe7ff;
  text-align: center;
}

.form {
  display: grid;
  gap: 16px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  outline: 0;
}

.field input[readonly] {
  color: var(--muted);
  background: var(--surface-low);
}

.field textarea {
  min-height: 160px;
  resize: vertical;
}

.visually-hidden,
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.visually-hidden {
  margin: -1px;
}

.file-input {
  min-height: 0;
}

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

.platform-choice {
  min-height: 58px;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.platform-choice input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--primary);
}

.platform-icon-grid {
  grid-template-columns: repeat(auto-fit, minmax(58px, 72px));
}

.platform-choice-icon {
  width: 58px;
  height: 58px;
  min-height: 58px;
  justify-content: center;
  padding: 0;
}

.platform-choice-icon input {
  position: absolute;
  width: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.platform-choice-icon .platform-logo {
  width: 34px;
  height: 34px;
}

.composer-date-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 12px;
  align-items: start;
}

.composer-date-picker {
  min-width: 0;
}

.time-entry-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.time-entry-copy small {
  font-size: 11px;
  font-weight: 900;
}

.time-entry-copy input,
.time-entry-copy input:focus {
  width: 100%;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: Geist, sans-serif;
  font-size: 14px;
  font-weight: 900;
}

.time-entry-copy input[data-action="scheduler-time-input"] {
  appearance: none;
  -webkit-appearance: none;
}

.time-entry-copy input[data-action="scheduler-time-input"]::-webkit-calendar-picker-indicator {
  display: none;
}

.time-entry-copy input[data-action="scheduler-time-input"]::-webkit-inner-spin-button,
.time-entry-copy input[data-action="scheduler-time-input"]::-webkit-clear-button {
  display: none;
}

.time-filter-button > .material-symbols-outlined {
  pointer-events: none;
}

.composer-actions {
  justify-content: flex-end;
}

.mass-schedule-modal {
  width: min(820px, 100%);
}

.mass-job-summary {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-low);
}

.mass-job-summary > .material-symbols-outlined {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--surface);
  color: var(--primary);
}

.mass-job-summary > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.mass-job-summary strong,
.mass-job-summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mass-job-summary span,
.field-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mass-rule-grid,
.mass-date-fields,
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.slot-grid {
  align-items: stretch;
}

.mass-mode-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mass-workflow-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mass-mode-grid .chip-choice {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 10px;
  text-align: center;
}

.mass-workflow-grid .chip-choice {
  min-height: 68px;
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 10px;
  text-align: left;
}

.mass-workflow-grid .chip-choice span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.mass-preview {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
}

.mass-preview-toggle {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.mass-preview-toggle > span:first-child {
  display: grid;
  gap: 3px;
}

.mass-preview-toggle strong {
  font-family: Geist, sans-serif;
  font-size: 15px;
}

.mass-preview-toggle small,
.mass-preview-toggle-copy {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mass-preview-toggle .material-symbols-outlined {
  transition: transform 0.18s ease;
}

.mass-preview.expanded .mass-preview-toggle .material-symbols-outlined {
  transform: rotate(180deg);
}

.mass-preview-list {
  display: grid;
  gap: 6px;
  padding: 0 12px 12px;
}

.mass-preview-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--surface);
}

.mass-preview-row.conflict {
  outline: 1px solid #d97706;
  background: #fff7ed;
}

.mass-preview-row > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-high);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.mass-preview-row strong,
.mass-preview-row time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mass-preview-row time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-zone {
  position: relative;
  min-height: 190px;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 24px;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.upload-zone:hover {
  border-color: rgba(53, 37, 205, 0.35);
  background: var(--surface-low);
}

.source-video-field:focus-within .upload-zone {
  border-color: rgba(53, 37, 205, 0.35);
  outline: 2px solid rgba(53, 37, 205, 0.18);
  outline-offset: 2px;
}

.upload-zone.drag-valid {
  border-color: var(--primary);
  background: var(--surface-low);
  box-shadow: 0 0 0 3px rgba(53, 37, 205, 0.12), 0 12px 24px rgba(53, 37, 205, 0.14);
}

.upload-zone.drag-invalid {
  border-color: rgba(186, 26, 26, 0.44);
  background: #fff2f0;
}

.upload-zone.has-file {
  border-style: solid;
  border-color: rgba(53, 37, 205, 0.35);
  background: var(--surface-low);
}

.upload-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.upload-status.ready {
  color: var(--success);
}

.upload-status.error {
  color: var(--danger);
}

.scheduler-upload-zone {
  min-height: 140px;
}

.scheduler-brand-picker {
  position: relative;
}

.scheduler-brand-card {
  width: 100%;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
}

.scheduler-brand-card.active,
.scheduler-brand-card:focus-visible {
  outline: 0;
}

.scheduler-brand-popover {
  right: auto;
  left: 0;
  width: 100%;
}

.upload-icon {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-low);
  color: var(--primary);
  font-size: 34px;
}

.upload-icon.material-symbols-outlined {
  display: grid;
  font-size: 36px;
  line-height: 1;
}

.upload-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
}

.upload-copy strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.upload-copy > strong + span {
  color: var(--muted);
  font-size: 13px;
}

.upload-copy .upload-browse {
  color: inherit;
  font-size: inherit;
  text-decoration: none;
}

.caption-grid,
.duration-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.duration-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chip-choice {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 800;
}

.caption-choice {
  min-height: 0;
  padding: 8px;
  color: var(--text);
  text-align: left;
}

.caption-choice.active {
  color: var(--text);
}

.caption-preview {
  position: relative;
  width: 92%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  display: grid;
  justify-self: center;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
}

.caption-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.caption-preview-empty {
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.caption-choice-label {
  display: block;
  padding: 0 2px 2px;
  font-size: 12px;
  font-weight: 800;
}

.output-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 18px;
}

.manual-editor {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.job-run-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.job-run-list h3 {
  margin: 0 0 2px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.job-run-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.job-run-row strong {
  color: var(--text);
}

.job-run-row small {
  color: var(--primary);
  font-weight: 900;
}

.manual-editor-head,
.manual-editor-actions,
.manual-selection-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manual-editor-head h3,
.manual-editor-head p {
  margin: 0;
}

.manual-editor-head h3 {
  font-family: Geist, sans-serif;
  font-size: 22px;
}

.manual-preview {
  width: 100%;
  max-height: min(68dvh, 720px);
  aspect-ratio: 16 / 9;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101827;
}

.manual-preview video {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: contain;
}

.manual-video-controls {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) minmax(96px, auto);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--text);
}

.manual-video-controls .icon-button {
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-color: var(--primary);
  border-radius: 14px;
  background: var(--primary);
  color: white;
  box-shadow: 0 12px 24px rgba(53, 37, 205, 0.16);
}

.manual-video-controls .icon-button:hover {
  border-color: var(--primary-bright);
  background: var(--primary-bright);
}

.manual-play-toggle {
  position: relative;
}

.manual-play-toggle .material-symbols-outlined {
  width: 0;
  overflow: hidden;
  font-size: 0;
}

.manual-play-toggle::before {
  content: "";
  width: 0;
  height: 0;
  margin: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid currentColor;
  transform: translateX(1px);
}

.manual-play-toggle[aria-label="Pause source video"]::before {
  width: 14px;
  height: 16px;
  border: 0;
  background:
    linear-gradient(90deg, currentColor 0 38%, transparent 38% 62%, currentColor 62% 100%);
  transform: none;
}

.manual-video-scrubber {
  --progress: 0%;
  width: 100%;
  min-width: 0;
  height: 28px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.manual-video-scrubber::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--primary) 0 var(--progress), var(--surface-high) var(--progress) 100%);
}

.manual-video-scrubber::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  appearance: none;
  border: 3px solid white;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(53, 37, 205, 0.2);
}

.manual-video-scrubber::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-high);
}

.manual-video-scrubber::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
}

.manual-video-scrubber::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid white;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 8px 18px rgba(53, 37, 205, 0.2);
}

.manual-video-scrubber:focus-visible {
  outline: 2px solid var(--primary-bright);
  outline-offset: 4px;
}

.manual-video-time {
  font-family: Geist, sans-serif;
  font-size: 12px;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
  color: var(--muted);
}

.manual-pair-panel,
.manual-pair-list {
  display: grid;
  gap: 10px;
}

.manual-pair-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.manual-warning-slot {
  grid-column: 1 / -1;
}

.manual-warning {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(186, 26, 26, 0.28);
  border-radius: 10px;
  background: #fff2f0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.manual-warning .icon-button {
  width: 36px;
  height: 36px;
  color: var(--danger);
}

.manual-pair-list {
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

.manual-editor-actions {
  justify-content: flex-end;
}

.manual-selection-readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.manual-selection-readout span,
.manual-pair-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbff;
}

.manual-selection-readout span {
  min-height: 58px;
  display: grid;
  gap: 4px;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.manual-selection-readout strong {
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.manual-pair-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.manual-pair-row > span:first-child {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-low);
  color: var(--primary);
  font-weight: 900;
}

.manual-pair-row.pending > span:first-child {
  background: #fff4e7;
  color: var(--warning);
}

.manual-pair-row strong,
.manual-pair-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-pair-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.manual-transcript {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 18px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
  cursor: ew-resize;
  line-height: 1.7;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  white-space: nowrap;
  -ms-overflow-style: none;
}

.manual-transcript::-webkit-scrollbar {
  display: none;
}

.manual-transcript-spacer {
  display: inline-block;
  width: 0;
  height: 1px;
  vertical-align: middle;
}

.transcript-word {
  --clip-color: #2b6fbd;
  --clip-fill: #eaf4ff;
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 2px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 750;
  transform-origin: center;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.transcript-word:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.transcript-word.clip-marked {
  background:
    linear-gradient(var(--clip-color), var(--clip-color)) center 6px / calc(100% + 14px) 3px no-repeat,
    var(--clip-fill);
  border-color: rgba(43, 111, 189, 0.34);
  border-color: color-mix(in srgb, var(--clip-color) 34%, white);
  box-shadow: inset 0 0 0 1px rgba(43, 111, 189, 0.1);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--clip-color) 10%, transparent);
}

.transcript-word.clip-overlap {
  --clip-color: #b96f10;
  --clip-fill: #fff1dc;
}

.transcript-word[data-start-markers]:not([data-start-markers=""])::before,
.transcript-word[data-end-markers]:not([data-end-markers=""])::after {
  position: absolute;
  top: -21px;
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--clip-color);
  color: white;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0;
  box-shadow: 0 13px 0 -5px var(--clip-color);
  pointer-events: none;
  z-index: 2;
}

.transcript-word[data-start-markers]:not([data-start-markers=""])::before {
  left: -4px;
  content: attr(data-start-markers);
}

.transcript-word[data-end-markers]:not([data-end-markers=""])::after {
  right: -4px;
  content: attr(data-end-markers);
}

.transcript-word.active {
  z-index: 1;
  background: #fff;
  border-color: var(--line);
  color: var(--text);
  transition: transform 160ms ease;
  transform: scale(1.18);
}

.transcript-word.active.clip-marked,
.transcript-word.gap-active.clip-marked {
  background:
    linear-gradient(var(--clip-color), var(--clip-color)) center 6px / calc(100% + 14px) 3px no-repeat,
    #fff;
  border-color: color-mix(in srgb, var(--clip-color) 28%, var(--line));
  color: var(--text);
}

.transcript-word.gap-active {
  z-index: 1;
  background: #fff;
  border-color: var(--line);
  color: var(--text);
  transition: transform 160ms ease;
  transform: scale(1.04);
}

.transcript-word.selected {
  background: #dff7ec;
  border-color: rgba(13, 111, 79, 0.32);
}

.transcript-word.selected.clip-marked {
  background:
    linear-gradient(var(--clip-color), var(--clip-color)) center 6px / calc(100% + 14px) 3px no-repeat,
    #dff7ec;
}

.transcript-word.start,
.transcript-word.end {
  background: var(--primary);
  color: white;
}

.transcript-word.start.clip-marked,
.transcript-word.end.clip-marked {
  background:
    linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82)) center 6px / calc(100% + 14px) 3px no-repeat,
    var(--primary);
}

.view-toggle {
  display: inline-flex;
  gap: 6px;
}

.icon-button,
.view-toggle .button {
  width: 44px;
  padding: 0;
}

.output-card {
  overflow: hidden;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.output-card:hover,
.output-card.active {
  border-color: rgba(53, 37, 205, 0.38);
  box-shadow: 0 14px 32px rgba(11, 28, 48, 0.12);
}

.output-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #101827;
  color: white;
  text-align: left;
}

.output-thumb video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.output-schedule-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0b1c30;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(11, 28, 48, 0.18);
}

.output-schedule-icon .material-symbols-outlined {
  font-size: 19px;
}

.output-number-badge {
  position: absolute;
  right: 10px;
  bottom: 58px;
  z-index: 2;
  min-width: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
}

.output-missing {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.output-missing .material-symbols-outlined {
  font-size: 30px;
}

.output-processing,
.output-queued {
  background:
    linear-gradient(135deg, rgba(255, 240, 214, 0.22), rgba(255, 255, 255, 0.06)),
    #101827;
}

.output-processing .material-symbols-outlined,
.output-queued .material-symbols-outlined {
  animation: spin 1.1s linear infinite;
  color: #f2b84b;
}

.score-badge {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 10px;
  min-width: 44px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 10px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.score-high {
  background: #138a45;
}

.score-mid {
  background: #b98900;
}

.score-low {
  background: #c62828;
}

.output-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.output-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.output-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.output-row-main strong,
.output-row-main .muted {
  display: block;
}

.output-inline-number {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-low);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.output-row > .toolbar {
  flex-wrap: nowrap;
}

.output-row > .toolbar .button {
  white-space: nowrap;
}

.output-row-icon {
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-low);
  color: var(--primary);
}

.post-modal,
.confirm-dialog {
  display: grid;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(11, 28, 48, 0.24);
}

.modal-backdrop,
.confirm-backdrop {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 28, 48, 0.32);
  backdrop-filter: blur(6px);
}

.modal-backdrop {
  align-items: start;
  overflow-y: auto;
}

.post-modal {
  width: min(720px, 100%);
  gap: 16px;
  margin: min(6vh, 48px) auto;
}

.confirm-dialog {
  width: min(420px, 100%);
  gap: 14px;
}

.confirm-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #ffdad6;
  color: var(--danger);
}

.confirm-dialog h2,
.confirm-dialog p {
  margin: 0;
}

.confirm-dialog h2 {
  font-family: Geist, sans-serif;
  font-size: 24px;
}

.confirm-dialog p {
  color: var(--muted);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-high);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #50b4ff);
  transition: width 280ms ease;
}

.notice {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--muted);
}

.notice.error {
  border-color: rgba(186, 26, 26, 0.32);
  background: #fff2f0;
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.loading-icon {
  animation: spin 900ms linear infinite;
}

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

@media (max-width: 1120px) {
  .app-shell {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .sidebar {
    padding: 16px 8px;
  }

  .brand div:last-child,
  .nav-button span:last-child,
  .sidebar-foot {
    display: none;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .nav-button {
    justify-content: center;
    padding: 13px 10px;
  }

  .metrics,
  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

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

  .nav-button {
    min-height: 56px;
    border-left: 0;
    border-bottom: 3px solid transparent;
    border-radius: 10px;
  }

  .nav-button.active {
    border-bottom-color: var(--primary);
  }

  .topbar,
  .page-header,
  .job-hero,
  .status-card-main,
  .status-card-top {
    align-items: stretch;
    flex-direction: column;
  }

  .content {
    padding: 20px;
  }

  .page-title {
    font-size: 28px;
  }

  .caption-grid,
  .duration-grid,
  .job-run-row,
  .manual-pair-panel,
  .manual-selection-readout {
    grid-template-columns: 1fr;
  }

  .manual-video-controls {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 8px 10px;
  }

  .manual-video-controls .icon-button {
    justify-self: start;
  }

  .manual-video-time {
    grid-column: 2;
    text-align: left;
  }

  .mass-mode-grid,
  .mass-workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .upload-zone {
    min-height: 180px;
    padding: 22px 18px;
  }

  .upload-copy strong {
    white-space: normal;
  }

  .status-card-top {
    align-items: flex-start;
  }

  .calendar-grid {
    min-width: 880px;
    grid-template-columns: 64px repeat(7, minmax(112px, 1fr));
  }

  .calendar-grid.day-grid {
    min-width: 520px;
    grid-template-columns: 64px minmax(420px, 1fr);
  }

  .calendar-time,
  .calendar-cell {
    min-height: 54px;
  }

  .month-grid {
    min-width: 760px;
    grid-template-columns: repeat(7, minmax(104px, 1fr));
  }

  .month-cell {
    min-height: 112px;
    padding: 8px;
  }

  .custom-popover {
    right: auto;
    left: 0;
  }

  .brand-editor {
    grid-template-columns: 1fr;
  }

  .brand-editor,
  .brand-inline-editor {
    align-items: stretch;
  }

  .brand-inline-editor {
    flex-direction: column;
  }

  .scheduler-filter-popover {
    width: calc(100vw - 40px);
  }

  .date-range-grid,
  .filter-platform-grid,
  .composer-date-grid {
    grid-template-columns: 1fr;
  }

  .scheduled-post-item {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .scheduled-list-head {
    display: none;
  }

  .scheduled-post-main {
    align-items: flex-start;
  }

  .scheduled-post-meta {
    min-width: 0;
    justify-content: flex-start;
  }

  .scheduled-actions {
    justify-content: flex-start;
  }

  .post-modal {
    margin: 0;
    border-radius: 0;
  }

  .section-row,
  .manual-editor-head,
  .manual-editor-actions,
  .manual-selection-actions,
  .confirm-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .mass-preview-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .mass-preview-row time {
    grid-column: 2;
  }
}
