:root {
  --ink: #f7f3ff;
  --muted: #a99fb8;
  --line: #312642;
  --paper: #0d0714;
  --panel: #171020;
  --panel-soft: #21172d;
  --green: #ff3d81;
  --green-dark: #cf1f60;
  --blue: #36c5f0;
  --red: #ff6b6b;
  --amber: #ffd166;
  --violet: #9b5cff;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(255, 61, 129, 0.18), transparent 34rem),
    radial-gradient(circle at top left, rgba(54, 197, 240, 0.12), transparent 30rem),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button {
  cursor: pointer;
}

.login-screen {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(340px, 460px);
  gap: 32px;
  min-height: 100vh;
  padding: 42px;
  align-items: center;
}

.login-screen[hidden],
.app-shell[hidden] {
  display: none;
}

.login-brand-panel {
  display: grid;
  gap: 56px;
  max-width: 760px;
}

.login-brand {
  align-self: start;
}

.brand-lockup {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-lockup-large {
  max-width: min(620px, 88vw);
}

.brand-lockup-sidebar {
  max-width: 210px;
}

.login-copy {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.login-card {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid rgba(255, 61, 129, 0.32);
  border-radius: 8px;
  background: rgba(23, 16, 32, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.login-error {
  min-height: 20px;
  color: var(--red);
  font-size: 0.88rem;
  font-weight: 700;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100vh;
  overflow-y: auto;
  padding: 24px;
  background: #09050f;
  color: #f5f3eb;
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: white;
  box-shadow: 0 0 28px rgba(255, 61, 129, 0.45);
  font-weight: 800;
}

.brand span,
.sidebar-panel small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #f7f3ff;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(255, 61, 129, 0.38);
  background: rgba(255, 61, 129, 0.14);
}

.sidebar-panel {
  display: grid;
  width: 100%;
  gap: 2px;
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #f7f3ff;
  text-align: left;
  cursor: pointer;
}

.sidebar-panel[hidden] {
  display: none;
}

.sidebar-panel:hover,
.sidebar-panel:focus-visible {
  border-color: rgba(54, 197, 240, 0.42);
  background: rgba(54, 197, 240, 0.1);
}

.sidebar-panel[disabled] {
  cursor: default;
  opacity: 0.76;
}

.sidebar-panel[disabled]:hover {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-divider {
  display: block;
  height: 1px;
  margin: 12px 0 10px;
  background: rgba(255, 255, 255, 0.12);
}

.panel-label,
.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .panel-label {
  color: var(--green);
}

.main {
  position: relative;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 28px;
  background: var(--paper);
}

.topbar,
.section-heading,
.task-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar {
  margin: 0 0 18px;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4.25rem);
  line-height: 0.98;
}

.main.compact-title h1 {
  max-width: 620px;
  font-size: 1.6rem;
  line-height: 1.12;
}

h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.topbar-actions,
.task-actions,
.split-fields {
  display: flex;
  gap: 10px;
}

.task-heading {
  align-items: flex-start;
}

.task-heading .task-actions {
  flex: 1 1 640px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.task-heading .task-actions select {
  width: auto;
  min-width: 152px;
  flex: 1 1 152px;
  max-width: 210px;
}

.task-heading .task-actions .primary-button {
  flex: 0 0 auto;
  min-width: 150px;
}

.topbar-actions {
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
}

.task-sticky-tools {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--paper);
}

.profile-menu {
  position: relative;
}

.profile-chip {
  display: grid;
  grid-template-columns: 34px minmax(110px, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  list-style: none;
}

.profile-chip::-webkit-details-marker {
  display: none;
}

.profile-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--violet));
  color: white;
  font-size: 0.86rem;
  font-weight: 900;
}

.profile-chip strong,
.profile-chip span {
  display: block;
}

.profile-chip strong {
  font-size: 0.9rem;
}

.profile-chip span {
  color: var(--muted);
  font-size: 0.76rem;
}

.profile-dropdown {
  position: absolute;
  right: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  width: 190px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #120b1b;
  box-shadow: var(--shadow);
}

.profile-menu-item {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.profile-menu-item:hover,
.profile-menu-item.active {
  border-color: rgba(255, 61, 129, 0.42);
  background: rgba(255, 61, 129, 0.14);
}

.modal-dialog {
  width: min(620px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}

.modal-dialog::backdrop {
  background: rgba(5, 3, 10, 0.72);
}

.modal-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.segmented-control {
  display: inline-flex;
  min-height: 42px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.segment {
  min-width: 72px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segment.active {
  background: var(--green);
  color: white;
}

.topbar-actions .primary-button,
.task-actions .primary-button {
  min-width: 152px;
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
}

.primary-button {
  padding: 0 18px;
  background: var(--green);
  color: white;
  white-space: nowrap;
}

.primary-button:hover {
  background: var(--green-dark);
}

.secondary-button {
  padding: 0 16px;
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--ink);
}

.danger-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255, 107, 107, 0.42);
  border-radius: 8px;
  background: rgba(255, 107, 107, 0.12);
  color: var(--red);
  font-weight: 800;
}

.icon-button {
  width: 42px;
  background: var(--panel-soft);
  border-color: var(--line);
  color: var(--ink);
}

.full {
  width: 100%;
}

.view {
  display: none;
  margin-top: 28px;
}

.view.active {
  display: block;
}

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

.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
}

button.metric {
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

button.metric:hover,
button.metric:focus-visible {
  border-color: rgba(54, 197, 240, 0.42);
  background: rgba(54, 197, 240, 0.1);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 2rem;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  margin-top: 18px;
}

.request-queue-panel {
  margin-top: 18px;
}

.request-queue {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.request-queue-item {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
}

.event-chip-section {
  margin-top: 18px;
}

.event-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.event-status-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.event-status-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.event-status-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.4rem;
}

.event-chip-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.event-chip {
  display: grid;
  align-content: start;
  gap: 7px;
  width: 100%;
  min-height: 132px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.event-chip strong,
.event-chip small {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.event-chip:hover,
.event-chip:focus-visible {
  border-color: rgba(255, 61, 129, 0.5);
  background: rgba(255, 61, 129, 0.12);
}

.event-chip small {
  color: var(--muted);
}

.content-grid {
  grid-template-columns: minmax(320px, 0.75fr) minmax(0, 1.25fr);
}

.content-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.content-tag-row,
.content-results {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.content-card {
  display: grid;
  gap: 6px;
  min-width: 220px;
  flex: 1;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.content-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #0b0710;
}

.content-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.content-card small {
  color: #9be8ff;
  font-size: 0.76rem;
  font-weight: 800;
}

.content-card p {
  margin: 0;
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.4;
}

.drive-folder-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}

.drive-folder-row {
  display: grid;
  gap: 8px;
  padding-left: calc(var(--depth, 0) * 16px);
}

.drive-folder-chip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.drive-folder-chip.active {
  border-color: rgba(54, 197, 240, 0.72);
  background: rgba(54, 197, 240, 0.14);
}

.drive-folder-chip button:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.drive-folder-chip:hover,
.drive-folder-chip:focus-visible {
  border-color: rgba(255, 61, 129, 0.55);
  background: rgba(255, 61, 129, 0.12);
}

.drive-folder-chip span {
  color: var(--muted);
  font-size: 0.78rem;
}

.drive-folder-remove {
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.drive-folder-remove:hover,
.drive-folder-remove:focus-visible {
  border-color: rgba(255, 61, 129, 0.5);
  color: var(--text);
}

.compact-empty {
  margin-top: 12px;
  padding: 18px;
}

.request-select {
  display: grid;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.request-queue-item.active,
.request-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(255, 61, 129, 0.16);
}

.request-queue-item small {
  color: var(--muted);
  line-height: 1.35;
}

.admin-grid,
.import-grid,
.drafting-grid,
.submitter-grid {
  grid-template-columns: minmax(300px, 0.7fr) minmax(0, 1.3fr);
}

.panel {
  padding: 20px;
}

.large-panel {
  min-height: 430px;
}

.compact {
  margin-bottom: 14px;
}

.timeline {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
}

.timeline-date,
.task-date {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.channel-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 61, 129, 0.14);
  color: #ffd7e6;
  font-size: 0.78rem;
  font-weight: 800;
}

.readiness-list,
.template-list {
  display: grid;
  gap: 12px;
}

.readiness-item,
.template-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.readiness-item strong,
.template-item strong {
  display: block;
  margin-bottom: 4px;
}

.readiness-item span,
.template-item span {
  color: var(--muted);
  font-size: 0.86rem;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field span {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #110b19;
  color: var(--ink);
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  padding: 12px;
  resize: vertical;
}

.code-input {
  min-height: 280px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.9rem;
}

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

.csv-mapping-panel {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.csv-mapping-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.csv-preview {
  display: grid;
  gap: 8px;
}

.csv-preview > strong {
  color: var(--muted);
  font-size: 0.82rem;
}

.csv-preview-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.csv-preview table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.csv-preview th,
.csv-preview td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  text-align: left;
}

.csv-preview th {
  color: var(--ink);
  font-weight: 900;
}

.weekday-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.weekday-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.weekday-toggle input {
  width: 18px;
  height: 18px;
}

.template-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

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

.admin-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.admin-stats div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.admin-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.admin-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
}

.user-list,
.submitter-task-list,
.submitter-request-form,
.task-group-admin-list {
  display: grid;
  gap: 10px;
}

.user-list,
.submitter-task-list {
  margin-bottom: 16px;
}

.user-item,
.submitter-task,
.task-group-admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.user-item strong,
.submitter-task strong {
  display: block;
}

.user-item span,
.submitter-task span,
.assignee-line {
  color: var(--muted);
  font-size: 0.82rem;
}

.task-group-admin-item {
  flex-wrap: wrap;
}

.task-group-admin-item input {
  min-width: 180px;
  flex: 1;
}

.task-group-admin-item .combine-channel-toggle {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.task-group-admin-item small {
  width: 100%;
  color: var(--muted);
  font-size: 0.78rem;
}

.small-button {
  min-height: 34px;
  padding: 0 10px;
}

.editable-template {
  display: grid;
  gap: 10px;
}

.template-edit-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 96px 112px;
  gap: 10px;
}

.template-edit-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

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

.asset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.asset-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(54, 197, 240, 0.12);
  color: #9be8ff;
  font-size: 0.76rem;
  font-weight: 800;
  text-decoration: none;
}

.asset-editor {
  display: grid;
  gap: 10px;
}

.asset-editor-list {
  display: grid;
  gap: 8px;
}

.asset-editor-row,
.asset-editor-add {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.asset-editor-row input,
.asset-editor-add input {
  min-width: 0;
}

.task-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  margin-bottom: 10px;
}

.task-health-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
}

.task-health-card:hover {
  border-color: rgba(255, 61, 129, 0.42);
  background: rgba(255, 61, 129, 0.1);
}

.task-health-card.active {
  border-color: rgba(255, 61, 129, 0.68);
  background: rgba(255, 61, 129, 0.18);
  box-shadow: 0 0 0 3px rgba(255, 61, 129, 0.12);
}

.task-health-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.task-health-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.55rem;
}

.task-table tr.active-row {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(255, 61, 129, 0.14);
}

.task-table-wrap {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  overflow: visible;
}

.task-group-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: visible;
}

.task-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  list-style: none;
}

.task-group-heading::-webkit-details-marker {
  display: none;
}

.task-group-heading h3 {
  margin: 0;
}

.task-group-heading span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.combine-task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.combine-task-toolbar span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.task-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: transparent;
}

.task-table th:nth-child(1),
.task-table td:nth-child(1) {
  width: 4%;
}

.task-table th:nth-child(2),
.task-table td:nth-child(2) {
  width: 38%;
}

.task-table th:nth-child(3),
.task-table td:nth-child(3) {
  width: 13%;
}

.task-table th:nth-child(4),
.task-table td:nth-child(4) {
  width: 15%;
}

.task-table th:nth-child(5),
.task-table td:nth-child(5) {
  width: 25%;
}

.task-table th:nth-child(6),
.task-table td:nth-child(6) {
  width: 5%;
}

.task-table th,
.task-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.task-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.task-table td:nth-child(2) strong,
.task-table td:nth-child(2) span,
.task-event-link {
  overflow-wrap: anywhere;
}

.task-event-link {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

.task-event-link:hover,
.task-event-link:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.task-table td select {
  min-width: 0;
}

.task-actions-heading span,
.task-combine-heading span {
  display: block;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}

.task-combine-cell {
  text-align: center;
}

.task-combine-cell input {
  width: 16px;
  height: 16px;
}

.task-table td span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.task-table tr.due-warning {
  background: rgba(255, 209, 102, 0.08);
}

.task-table tr.due-close {
  background: rgba(255, 145, 77, 0.1);
}

.task-table tr.due-danger {
  background: rgba(255, 107, 107, 0.12);
}

.task-table tr.out-of-policy {
  box-shadow: inset 4px 0 0 var(--amber);
}

.task-table tr.due-danger.out-of-policy {
  box-shadow: inset 4px 0 0 var(--red);
}

.task-table tr.task-complete {
  opacity: 0.68;
  background: rgba(255, 255, 255, 0.035);
}

.task-table tr.task-complete strong {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}

.task-table td .policy-warning {
  display: inline-flex;
  width: fit-content;
  max-width: min(520px, 100%);
  margin-top: 7px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 209, 102, 0.34);
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.12);
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 900;
}

.task-date,
.priority-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.task-date.warning {
  background: rgba(255, 209, 102, 0.16);
  color: #ffe08a;
}

.task-date.close {
  background: rgba(255, 145, 77, 0.18);
  color: #ffb37a;
}

.task-date.danger {
  background: rgba(255, 107, 107, 0.14);
  color: var(--red);
}

.priority-pill.high,
.priority-pill.urgent {
  background: rgba(255, 61, 129, 0.15);
  color: var(--green);
}

.priority-pill.low {
  background: rgba(54, 197, 240, 0.12);
  color: var(--blue);
}

.task-table td .assignee-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 64px;
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(54, 197, 240, 0.1);
  color: #9be8ff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.task-row-actions {
  position: relative;
  width: 46px;
}

.row-menu {
  position: relative;
  opacity: 0;
  transition: opacity 0.16s ease;
}

.task-table tr:hover .row-menu,
.task-table tr:focus-within .row-menu {
  opacity: 1;
}

.row-menu summary {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  font-weight: 900;
}

.row-menu summary::-webkit-details-marker {
  display: none;
}

.row-menu-dropdown {
  position: absolute;
  right: 0;
  z-index: 15;
  display: grid;
  gap: 6px;
  width: 160px;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #120b1b;
  box-shadow: var(--shadow);
}

.row-menu-dropdown button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.row-menu-dropdown button:hover {
  border-color: rgba(255, 61, 129, 0.42);
  background: rgba(255, 61, 129, 0.14);
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
}

.notification-toggle {
  justify-content: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.notification-preferences {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.notification-type-list {
  display: grid;
  gap: 8px;
}

.notification-type-option {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.notification-type-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.notification-type-option strong,
.notification-type-option small {
  display: block;
}

.notification-type-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.notification-activity {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.notification-activity > strong {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.notification-activity-item {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.notification-activity-item.sent {
  border-color: rgba(55, 210, 162, 0.38);
}

.notification-activity-item.failed {
  border-color: rgba(255, 94, 108, 0.5);
}

.notification-activity-item.pending {
  border-color: rgba(255, 211, 105, 0.45);
}

.notification-activity-item span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.notification-activity-item p {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 0.84rem;
}

.social-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  align-items: start;
}

.social-grid .large-panel {
  position: sticky;
  top: 18px;
}

.calendar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.social-calendar {
  display: grid;
  gap: 10px;
}

.social-weekdays,
.social-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.social-weekdays span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.social-day {
  min-height: 118px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.social-day.drag-over,
.unscheduled-tray.drag-over {
  border-color: var(--green);
  background: rgba(255, 61, 129, 0.1);
}

.muted-day {
  background: transparent;
  border-style: dashed;
}

.social-day strong {
  display: block;
  margin-bottom: 8px;
}

.social-post-pill {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 5px 7px;
  border: 1px solid rgba(54, 197, 240, 0.28);
  border-radius: 8px;
  background: rgba(54, 197, 240, 0.12);
  color: #9be8ff;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: left;
  line-height: 1.25;
}

.social-post-pill span {
  display: inline-block;
  margin-right: 5px;
  color: var(--ink);
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin: 0 4px 4px 0;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
}

.social-post-pill .platform-badge,
.social-queue-card .platform-badge {
  color: var(--ink);
}

.platform-facebook {
  border-color: rgba(24, 119, 242, 0.5);
  background: rgba(24, 119, 242, 0.22);
}

.platform-instagram {
  border-color: rgba(255, 61, 129, 0.5);
  background: rgba(255, 61, 129, 0.22);
}

.platform-youtube {
  border-color: rgba(255, 0, 0, 0.46);
  background: rgba(255, 0, 0, 0.2);
}

.platform-threads {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14);
}

.social-post-pill[draggable="true"] {
  cursor: grab;
}

.social-post-list {
  display: grid;
  gap: 8px;
  max-height: calc(100vh - 210px);
  overflow-y: auto;
  padding-right: 4px;
}

.social-queue-section {
  display: grid;
  gap: 8px;
}

.social-queue-section h3,
.unscheduled-tray strong {
  margin: 0;
  font-size: 0.9rem;
}

.social-queue-card,
.social-post-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  text-align: left;
}

.social-queue-card:hover,
.social-queue-card:focus-visible {
  border-color: rgba(255, 61, 129, 0.48);
  background: rgba(255, 61, 129, 0.12);
}

.social-post-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.platform-checkboxes {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.platform-checkboxes legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.platform-checkboxes > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.social-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.social-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.unscheduled-tray {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #110b19;
}

.unscheduled-tray > strong {
  display: block;
}

.unscheduled-tray > span {
  color: var(--muted);
  font-size: 0.84rem;
}

.request-card,
.progress-band {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

button.request-card {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  color: var(--ink);
  text-align: left;
}

.request-card h3 {
  margin-top: 12px;
}

.request-card p {
  margin-bottom: 8px;
  color: var(--muted);
}

.decision-note {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 107, 107, 0.12);
  color: var(--red);
  font-weight: 700;
}

.info-history {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(54, 197, 240, 0.1);
}

.info-history strong,
.info-history span {
  display: block;
}

.info-history span {
  color: var(--muted);
  font-size: 0.82rem;
}

.late-warning {
  color: var(--amber);
}

.event-chip.out-of-policy {
  border-color: rgba(255, 209, 102, 0.48);
  background: rgba(255, 209, 102, 0.08);
}

.urgent-item {
  border-color: rgba(255, 107, 107, 0.42);
  background: rgba(255, 107, 107, 0.09);
}

.needs-info-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid rgba(255, 197, 92, 0.35);
  border-radius: 8px;
  background: rgba(255, 197, 92, 0.12);
}

.needs-info-action strong,
.needs-info-action span {
  display: block;
}

.needs-info-action span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
}

.progress-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.progress-band span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.progress-band strong {
  display: block;
  margin-top: 4px;
  font-size: 1.4rem;
}

.status-pill.approved {
  background: rgba(58, 217, 145, 0.12);
  color: #8ff0bd;
}

.status-pill.rejected {
  background: rgba(255, 107, 107, 0.12);
  color: var(--red);
}

.status-pill.needs-info {
  background: rgba(255, 209, 102, 0.12);
  color: var(--amber);
}

.draft-actions {
  display: flex;
  gap: 10px;
}

.draft-output {
  min-height: 420px;
  margin-top: 18px;
  line-height: 1.5;
}

.draft-history {
  margin-top: 18px;
}

.draft-history h3 {
  margin-bottom: 10px;
}

.saved-draft-list {
  display: grid;
  gap: 10px;
}

.saved-draft {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.saved-draft button:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.saved-draft span {
  color: var(--muted);
  font-size: 0.82rem;
}

.draft-delete {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 107, 107, 0.42);
  border-radius: 8px;
  background: rgba(255, 107, 107, 0.12);
  color: var(--red);
  font-weight: 800;
}

.empty-state {
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

[data-channel="Church Email"] {
  border-left-color: var(--blue);
}

[data-channel="Social Media"] {
  border-left-color: var(--violet);
}

[data-channel="Church App"] {
  border-left-color: var(--green);
}

[data-channel="Text Message"] {
  border-left-color: var(--amber);
}

[data-channel="Stage Announcement"] {
  border-left-color: var(--red);
}

@media (max-width: 1050px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
  }

  .main {
    height: auto;
    overflow: visible;
  }

  .nav-list,
  .event-status-grid,
  .metrics-grid,
  .task-health-grid,
  .workspace-grid {
    grid-template-columns: 1fr 1fr;
  }

  .large-panel,
  .panel {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .login-screen {
    padding: 20px;
  }

  .main,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .section-heading,
  .task-heading,
  .topbar-actions,
  .task-actions,
  .draft-actions,
  .split-fields {
    align-items: stretch;
    flex-direction: column;
  }

  .task-sticky-tools {
    position: static;
    margin: 0;
    padding: 0 0 14px;
  }

  .nav-list,
  .event-status-grid,
  .metrics-grid,
  .task-health-grid,
  .csv-mapping-grid,
  .asset-editor-row,
  .asset-editor-add,
  .workspace-grid,
  .admin-grid,
  .import-grid {
    grid-template-columns: 1fr;
  }

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

  .timeline-item {
    grid-template-columns: 1fr;
  }

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

  .user-item,
  .submitter-task,
  .progress-band {
    align-items: stretch;
    grid-template-columns: 1fr;
  }
}
