:root {
  --ink: #244172;
  --soft-ink: #1a2d4d;
  --beige: #f3f6fb;
  --warm-beige: #dce5f3;
  --panel: #ffffff;
  --white: #ffffff;
  --gold: #f4dc00;
  --gold-dark: #244172;
  --line: #d5deec;
  --muted: #637086;
  --shadow: 0 18px 45px rgba(36, 65, 114, 0.10);
  --radius: 8px;
  --blue: #2f80ed;
  --wine: #7a1f3d;
  --green: #2f8f57;
  --orange: #d97924;
  --purple: #7b45c7;
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(244, 220, 0, 0.08), rgba(255, 255, 255, 0) 38%),
    var(--beige);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  background: var(--ink);
  color: var(--beige);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

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

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.brand-wordmark {
  width: 118px;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  background: var(--white);
  padding: 7px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 0;
  font-size: 20px;
}

h2 {
  margin-bottom: 0;
  font-size: 28px;
}

h3 {
  margin-bottom: 0;
  font-size: 20px;
}

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

.nav-item,
.ghost-button,
.gold-button,
.icon-button {
  border: 0;
  border-radius: var(--radius);
  min-height: 42px;
}

.nav-item {
  text-align: left;
  padding: 12px 14px;
  color: var(--beige);
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active,
.nav-item:hover {
  background: var(--gold);
  color: var(--ink);
}

.sidebar-card {
  margin-top: auto;
  border: 1px solid rgba(244, 220, 0, 0.45);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-card p {
  margin-bottom: 0;
  color: #dbe5f4;
  font-size: 13px;
  line-height: 1.45;
}

.mini-label {
  display: block;
  color: var(--gold);
  font-weight: 800;
  font-size: 12px;
  margin-bottom: 6px;
}

.workspace {
  padding: 24px;
  overflow: hidden;
}

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

.topbar {
  margin-bottom: 18px;
}

.topbar-subtitle,
.context-line {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.topbar-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.top-brand-logo {
  width: 118px;
  height: 50px;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
}

.field {
  display: grid;
  gap: 6px;
}

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

.field input,
.field select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 0 12px;
  color: var(--ink);
}

.field.compact {
  min-width: 190px;
}

.gold-button {
  padding: 0 16px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
}

.ghost-button {
  padding: 0 16px;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
}

.ghost-button.slim {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.selector-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.selector-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.selector-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.status-strip article {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 24px rgba(36, 65, 114, 0.04);
}

.metric-value {
  display: block;
  font-size: 28px;
  font-weight: 900;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.quick-filters {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.quick-filters summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.quick-filter-grid {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(240px, 420px) minmax(240px, 1fr);
  align-items: end;
  gap: 14px;
  padding: 14px;
}

.quick-filter-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

.section-heading {
  margin-bottom: 14px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
  max-width: 520px;
  color: var(--muted);
  font-size: 12px;
}

.legend span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  display: inline-block;
}

.blue { background: var(--blue); }
.wine { background: var(--wine); }
.green { background: var(--green); }
.orange { background: var(--orange); }
.purple { background: var(--purple); }

.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 14px;
}

.column {
  min-height: 520px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.column.drag-over {
  outline: 2px solid var(--gold);
  background: rgba(244, 220, 0, 0.10);
}

.column-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.column-header h4 {
  margin: 0;
  font-size: 14px;
}

.count-pill,
.month-pill,
.storage-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--ink);
  color: var(--beige);
  font-size: 12px;
  font-weight: 800;
}

.card {
  background: var(--white);
  border: 1px solid rgba(36, 65, 114, 0.08);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 10px 22px rgba(36, 65, 114, 0.07);
  text-align: left;
  width: 100%;
}

.card:hover {
  transform: translateY(-1px);
}

.card[draggable="true"] {
  cursor: grab;
}

.card.dragging {
  opacity: 0.55;
}

.card h4 {
  margin: 8px 0 8px;
  font-size: 15px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  min-height: 24px;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--beige);
  color: var(--soft-ink);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chip.gold {
  background: rgba(244, 220, 0, 0.18);
  color: #6f511c;
}

.chip.client-visible {
  background: rgba(47, 143, 87, 0.13);
  color: #1f6f3f;
}

.chip.client-hidden {
  background: rgba(36, 65, 114, 0.08);
  color: #4e5f78;
}

.chip-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  margin-top: 12px;
}

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

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

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.weekday-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.day {
  min-height: 148px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  position: relative;
  overflow: hidden;
}

.day.outside-month {
  opacity: 0.38;
  background: rgba(255, 255, 255, 0.45);
}

.day.today {
  box-shadow: inset 0 0 0 2px var(--gold);
}

.day.has-events {
  border-width: 2px;
}

.day.has-events::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(244, 220, 0, 0.11), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.day-number {
  font-weight: 900;
  color: var(--muted);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.day-number strong {
  color: var(--ink);
}

.day-number small {
  color: var(--gold-dark);
  font-size: 10px;
  text-transform: uppercase;
}

.calendar-item {
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 6px;
  background: var(--beige);
  border-left: 4px solid var(--gold);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  border-right: 1px solid rgba(36, 65, 114, 0.04);
  border-bottom: 1px solid rgba(36, 65, 114, 0.04);
  color: var(--ink);
  font-size: 11px;
  line-height: 1.3;
  text-align: left;
  width: 100%;
  position: relative;
  z-index: 1;
}

.calendar-item strong,
.calendar-item span {
  display: block;
}

.calendar-item span {
  color: var(--muted);
  margin-top: 3px;
}

.calendar-item-time {
  font-weight: 900;
  color: var(--gold-dark);
}

.files-layout,
.notifications-list,
.production-layout,
.approvals-layout,
.reports-layout,
.scope-grid {
  display: grid;
  gap: 12px;
}

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

.file-box,
.notification,
.scope-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 8px 24px rgba(36, 65, 114, 0.04);
}

.file-box h4,
.notification h4,
.scope-item h4 {
  margin: 0 0 8px;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.file-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  align-items: center;
  border-radius: 6px;
  background: var(--beige);
  padding: 8px 10px;
  font-size: 12px;
}

.notification {
  display: grid;
  grid-template-columns: 110px 1fr 170px;
  align-items: center;
  gap: 12px;
}

.production-layout {
  gap: 16px;
}

.production-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.production-summary article {
  border: 1px solid rgba(244, 220, 0, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(36, 65, 114, 0.05), rgba(244, 220, 0, 0.12)),
    var(--white);
  padding: 16px;
  box-shadow: 0 12px 30px rgba(36, 65, 114, 0.06);
}

.production-summary span,
.production-summary strong {
  display: block;
}

.production-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.production-summary strong {
  margin-top: 8px;
  font-size: 32px;
}

.production-list {
  display: grid;
  gap: 12px;
}

.production-card {
  border: 1px solid rgba(244, 220, 0, 0.26);
  border-left: 5px solid var(--gold);
  border-radius: 14px;
  background: var(--white);
  padding: 16px;
  box-shadow: 0 12px 30px rgba(36, 65, 114, 0.06);
}

.production-card-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.production-card h4 {
  margin: 10px 0 5px;
  font-size: 18px;
}

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

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--beige);
  overflow: hidden;
  margin: 14px 0;
  border: 1px solid var(--line);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
}

.production-checks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.production-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(243, 246, 251, 0.52);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--soft-ink);
}

.production-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold-dark);
}

.production-detail-box {
  border: 1px solid rgba(244, 220, 0, 0.28);
  border-radius: var(--radius);
  background: rgba(243, 246, 251, 0.58);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.history-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(36, 65, 114, 0.12);
}

.history-entry:first-of-type {
  border-top: 0;
}

.history-entry strong,
.history-entry span,
.history-entry p {
  margin: 0;
  font-size: 12px;
}

.history-entry span {
  color: var(--soft-ink);
}

.history-entry p {
  grid-column: 1 / -1;
}

.field-title {
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.approvals-layout {
  gap: 16px;
}

.approval-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.approval-summary article {
  border: 1px solid rgba(244, 220, 0, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(244, 220, 0, 0.10), rgba(255, 255, 255, 0)),
    var(--white);
  padding: 16px;
  box-shadow: 0 12px 30px rgba(36, 65, 114, 0.06);
}

.approval-summary span,
.approval-summary strong {
  display: block;
}

.approval-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.approval-summary strong {
  margin-top: 8px;
  font-size: 32px;
}

.approval-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.approval-column {
  border: 1px solid rgba(244, 220, 0, 0.24);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  padding: 12px;
  min-height: 420px;
}

.approval-column header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.approval-column h4 {
  margin: 0;
  font-size: 15px;
}

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

.approval-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  background: var(--white);
  padding: 12px;
  box-shadow: 0 10px 24px rgba(36, 65, 114, 0.07);
}

.approval-card-top,
.approval-meta,
.approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.approval-card h5 {
  margin: 10px 0 6px;
  font-size: 15px;
}

.approval-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.approval-meta {
  justify-content: space-between;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 800;
}

.approval-actions {
  margin-top: 12px;
}

.approval-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.reports-layout {
  gap: 16px;
}

.report-card {
  border: 1px solid rgba(244, 220, 0, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(244, 220, 0, 0.10), rgba(255, 255, 255, 0)),
    var(--white);
  box-shadow: 0 16px 38px rgba(36, 65, 114, 0.07);
  padding: 18px;
}

.report-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.report-hero h4 {
  margin: 0 0 6px;
  font-size: 22px;
}

.report-hero p {
  margin: 0;
  color: var(--muted);
}

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

.report-metrics div {
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--beige);
  padding: 12px;
}

.report-metrics span,
.report-metrics strong {
  display: block;
}

.report-metrics span {
  color: #dbe5f4;
  font-size: 12px;
  font-weight: 800;
}

.report-metrics strong {
  margin-top: 6px;
  color: var(--gold);
  font-size: 26px;
}

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

.report-columns section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(243, 246, 251, 0.58);
  padding: 12px;
}

.report-columns h5 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.report-row,
.report-link {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: var(--white);
  padding: 8px 10px;
  margin-bottom: 7px;
  text-align: left;
  color: var(--ink);
  font-size: 12px;
}

.report-row span,
.report-link span {
  color: var(--muted);
}

.report-row strong,
.report-link strong {
  color: var(--ink);
}

.report-link:hover {
  box-shadow: 0 8px 20px rgba(36, 65, 114, 0.10);
}

.channel {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--beige);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.detail-panel {
  position: fixed;
  right: 18px;
  top: 18px;
  bottom: 18px;
  z-index: 20;
  width: min(390px, calc(100vw - 36px));
  padding: 0;
  transform: translateX(calc(100% + 24px));
  transition: transform 200ms ease;
}

.detail-panel.open {
  transform: translateX(0);
}

.detail-empty,
.detail-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  height: 100%;
  overflow: auto;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.detail-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--gold);
  font-weight: 900;
  margin-bottom: 14px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.detail-list div {
  display: grid;
  gap: 3px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.detail-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.detail-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.file-preview {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.file-preview span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--beige);
  font-size: 12px;
  color: var(--ink);
}

.dialog {
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  width: min(560px, calc(100vw - 32px));
  box-shadow: var(--shadow);
}

.dialog form {
  padding: 18px;
}

.dialog::backdrop {
  background: rgba(36, 65, 114, 0.55);
}

.dialog-header,
.dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.icon-button {
  width: 40px;
  background: var(--beige);
  font-size: 24px;
}

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

.dialog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.full-field {
  grid-column: 1 / -1;
}

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

  .overview-grid,
  .files-layout,
  .scope-grid {
    grid-template-columns: 1fr;
  }

  .status-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  .status-strip,
  .selector-grid,
  .files-layout,
  .production-summary,
  .production-checks,
  .approval-summary,
  .approval-columns,
  .report-metrics,
  .report-columns,
  .scope-grid,
  .notification {
    grid-template-columns: 1fr;
  }

  .quick-filter-grid,
  .detail-form-grid {
    grid-template-columns: 1fr;
  }

  .calendar-grid {
    grid-template-columns: 1fr 1fr;
  }

  .weekday-row {
    display: none;
  }

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

  .dialog-grid {
    grid-template-columns: 1fr;
  }
}

/* Karsan interface refinement layer */
.app-hidden {
  display: none;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(36, 65, 114, 0.94), rgba(36, 65, 114, 0.82)),
    var(--beige);
  color: var(--beige);
}

.login-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px clamp(32px, 7vw, 96px);
  position: relative;
  overflow: hidden;
}

.login-hero::after {
  content: "";
  position: absolute;
  inset: 34px;
  border: 1px solid rgba(244, 220, 0, 0.38);
  border-radius: 22px;
  pointer-events: none;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 40px;
}

.login-logo {
  width: 190px;
  max-width: 42vw;
  background: var(--beige);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.login-brand span,
.login-highlights span {
  color: var(--gold);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.login-hero h1 {
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.95;
  margin: 0 0 18px;
  color: var(--white);
  text-shadow: 0 8px 26px rgba(0, 0, 0, 0.45);
}

.login-hero p {
  max-width: 680px;
  color: #eef3fa;
  font-size: 18px;
  line-height: 1.55;
}

.login-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.login-highlights span {
  border: 1px solid rgba(244, 220, 0, 0.45);
  border-radius: 999px;
  padding: 9px 12px;
}

.login-panel {
  align-self: center;
  margin: 32px 32px 32px 0;
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink);
  border: 1px solid rgba(244, 220, 0, 0.45);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.login-panel h2 {
  font-size: 34px;
  margin-bottom: 8px;
}

.login-panel p {
  color: var(--muted);
  line-height: 1.5;
}

.login-options {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.credential-login {
  display: grid;
  gap: 10px;
  margin: 18px 0 14px;
  border: 1px solid rgba(244, 220, 0, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(244, 220, 0, 0.10), rgba(255, 255, 255, 0)),
    var(--white);
  padding: 14px;
}

.credential-login .gold-button {
  width: 100%;
}

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

.auth-links button {
  border: 0;
  background: transparent;
  color: var(--gold-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-links.single-link {
  justify-content: center;
}

.simulated-email {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(244, 220, 0, 0.34);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 14px;
}

.simulated-email strong {
  color: var(--ink);
}

.simulated-email p {
  margin: 0;
}

.simulated-email a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 900;
}

.login-message {
  min-height: 18px;
  margin: 0;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 800;
}

.login-message.error {
  color: #9b1c1c;
}

.install-button {
  width: 100%;
  justify-content: center;
  background: rgba(36, 65, 114, 0.04);
}

.install-hint {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

body.client-app-entry .login-panel {
  border-color: rgba(244, 220, 0, 0.5);
  box-shadow: 0 30px 80px rgba(36, 65, 114, 0.22);
}

body.client-app-entry .demo-credentials span:not(:last-child),
body.client-app-entry [data-login-role="admin"],
body.client-app-entry [data-login-role="worker"],
body.client-app-entry #workerPicker {
  display: none;
}

body.client-app-entry .login-highlights span:first-child {
  display: none;
}

.demo-credentials {
  display: grid;
  gap: 4px;
  border-radius: var(--radius);
  background: rgba(36, 65, 114, 0.05);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
}

.demo-credentials strong {
  color: var(--ink);
}

.login-option {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 16px;
  text-align: left;
  min-height: 88px;
  box-shadow: 0 8px 22px rgba(36, 65, 114, 0.06);
}

.login-option:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.login-option strong,
.login-option span {
  display: block;
}

.login-option strong {
  font-size: 17px;
  margin-bottom: 6px;
}

.login-option span {
  color: var(--muted);
  line-height: 1.4;
}

body {
  background:
    linear-gradient(110deg, rgba(36, 65, 114, 0.05), rgba(244, 220, 0, 0.16) 42%, rgba(255, 255, 255, 0.36)),
    var(--beige);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(244, 220, 0, 0.12), transparent 34%),
    var(--ink);
}

.brand-block {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(244, 220, 0, 0.24);
}

.session-card {
  border: 1px solid rgba(244, 220, 0, 0.35);
  border-radius: var(--radius);
  padding: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.session-card strong,
.session-card small {
  display: block;
}

.session-card strong {
  margin-bottom: 3px;
}

.session-card small {
  color: #dbe5f4;
  margin-bottom: 12px;
}

.ghost-dark-button {
  width: 100%;
  border: 1px solid rgba(244, 220, 0, 0.38);
  border-radius: var(--radius);
  min-height: 36px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--beige);
  font-weight: 800;
}

.workspace {
  padding: 28px;
}

.topbar {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(244, 220, 0, 0.26);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 14px 38px rgba(36, 65, 114, 0.06);
  position: relative;
  overflow: hidden;
}

.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: linear-gradient(180deg, var(--gold), var(--ink));
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar h2 {
  font-size: 34px;
  line-height: 1.05;
}

.top-brand-logo {
  width: 148px;
  height: 62px;
}

.selector-panel,
.status-strip article,
.quick-filters,
.file-box,
.notification,
.scope-item,
.client-box {
  border-radius: 14px;
  border-color: rgba(244, 220, 0, 0.26);
  box-shadow: 0 12px 30px rgba(36, 65, 114, 0.06);
}

.selector-panel {
  padding: 24px;
}

.status-strip article {
  background:
    linear-gradient(180deg, rgba(244, 220, 0, 0.11), rgba(255, 255, 255, 0) 62%),
    rgba(255, 255, 255, 0.9);
  padding: 20px;
}

.metric-value {
  font-size: 34px;
}

.priority-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.operations-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 14px;
  margin-top: 16px;
}

.permissions-panel {
  margin-top: 16px;
  border: 1px solid rgba(244, 220, 0, 0.26);
  border-radius: 14px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(244, 220, 0, 0.12), rgba(255, 255, 255, 0)),
    var(--white);
  box-shadow: 0 12px 30px rgba(36, 65, 114, 0.06);
}

.permissions-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.permissions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.permission-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(243, 246, 251, 0.62);
  padding: 14px;
}

.permission-card.active-permission {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(244, 220, 0, 0.38);
}

.permission-card span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--ink);
  color: var(--beige);
  font-size: 11px;
  font-weight: 900;
}

.permission-card h4 {
  margin: 10px 0 6px;
}

.permission-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 13px;
}

.operations-panel {
  border: 1px solid rgba(244, 220, 0, 0.26);
  border-radius: 14px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(36, 65, 114, 0.04), rgba(244, 220, 0, 0.12)),
    var(--white);
  box-shadow: 0 12px 30px rgba(36, 65, 114, 0.06);
}

.operations-panel h3 {
  margin-bottom: 8px;
}

.operations-panel p {
  color: var(--muted);
  line-height: 1.45;
}

.operations-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.activity-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.activity-item {
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  background: rgba(243, 246, 251, 0.72);
  padding: 10px 12px;
}

.activity-item span,
.activity-item strong,
.activity-item p {
  display: block;
}

.activity-item span {
  color: var(--gold-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.activity-item strong {
  margin-top: 3px;
  color: var(--ink);
}

.activity-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.priority-panel {
  border: 1px solid rgba(244, 220, 0, 0.26);
  border-radius: 14px;
  padding: 18px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(36, 65, 114, 0.06);
}

.priority-panel span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}

.priority-panel strong {
  display: block;
  margin: 12px 0 6px;
  font-size: 30px;
}

.priority-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.priority-panel.high span { background: #9b1c1c; }
.priority-panel.medium span { background: var(--gold-dark); }
.priority-panel.low span { background: #516070; }

.column {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.9)),
    rgba(255, 255, 255, 0.9);
  border-color: rgba(244, 220, 0, 0.24);
  border-radius: 14px;
}

.card {
  position: relative;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.card:hover,
.calendar-item:hover {
  box-shadow: 0 16px 34px rgba(36, 65, 114, 0.13);
}

.card[data-note]:not([data-note=""]):hover::before,
.calendar-item[data-note]:not([data-note=""]):hover::before {
  content: attr(data-note);
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(100% + 10px);
  z-index: 30;
  background: var(--white);
  color: var(--ink);
  border: 1px solid rgba(244, 220, 0, 0.48);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 18px 36px rgba(36, 65, 114, 0.18);
}

.card.priority-alta {
  box-shadow: 0 12px 28px rgba(155, 28, 28, 0.12);
}

.card.priority-alta::after {
  content: "ALTA";
  position: absolute;
  right: 10px;
  top: 10px;
  background: #9b1c1c;
  color: var(--white);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 900;
}

.card.priority-media::after {
  content: "MEDIA";
  position: absolute;
  right: 10px;
  top: 10px;
  background: var(--gold-dark);
  color: var(--white);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 900;
}

.card-comment {
  margin-top: 8px;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 800;
}

.client-portal-hero {
  display: flex;
  gap: 18px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(244, 220, 0, 0.12), rgba(255, 255, 255, 0)),
    var(--white);
  border: 1px solid rgba(244, 220, 0, 0.28);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.client-portal-logo {
  width: 150px;
  height: 70px;
  object-fit: contain;
  background: var(--beige);
  border-radius: var(--radius);
  padding: 10px;
}

.client-portal-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 16px;
}

.client-box {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 18px;
}

.client-card-list {
  display: grid;
  gap: 10px;
}

.client-review-card {
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  background: var(--beige);
  padding: 12px;
}

.client-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.approve-button,
.reject-button {
  border: 0;
  border-radius: var(--radius);
  min-height: 34px;
  padding: 0 12px;
  color: var(--white);
  font-weight: 900;
}

.approve-button { background: var(--green); }
.reject-button { background: #9b1c1c; }

.admin-directory {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.admin-directory-header,
.directory-section {
  background:
    linear-gradient(135deg, rgba(244, 220, 0, 0.10), rgba(255, 255, 255, 0)),
    var(--white);
  border: 1px solid rgba(244, 220, 0, 0.26);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(36, 65, 114, 0.06);
}

.admin-directory-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.admin-header-actions,
.board-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.board-tools {
  margin: -4px 0 14px;
  justify-content: flex-end;
}

.admin-directory-header p {
  color: var(--muted);
  margin-bottom: 0;
  max-width: 560px;
}

.directory-section h4 {
  margin: 0 0 12px;
  font-size: 18px;
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.directory-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 14px;
  text-align: left;
  color: var(--ink);
}

button.directory-card:hover,
.client-assignment:hover {
  border-color: var(--gold);
}

.directory-card > button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0 0 10px;
  text-align: left;
  color: inherit;
}

.directory-card strong,
.directory-card span,
.directory-card small {
  display: block;
}

.directory-card strong {
  font-size: 16px;
  margin-bottom: 6px;
}

.directory-card span {
  color: var(--gold-dark);
  font-weight: 900;
  margin-bottom: 5px;
}

.directory-card small {
  color: var(--muted);
  line-height: 1.35;
}

.client-assignment button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0 0 12px;
  text-align: left;
  color: inherit;
}

.client-public-content {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--beige);
  padding: 14px;
  margin: 14px 0;
}

.client-public-content p {
  line-height: 1.5;
  margin-bottom: 8px;
}

.client-public-content strong {
  color: var(--gold-dark);
}

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

#workerPickerList {
  display: grid;
  gap: 10px;
}

.worker-choice {
  border: 1px solid rgba(244, 220, 0, 0.36);
  border-radius: var(--radius);
  background: var(--beige);
  padding: 12px;
  text-align: left;
  color: var(--ink);
}

.worker-choice strong,
.worker-choice span {
  display: block;
}

.worker-choice span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}

.color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.color-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid rgba(244, 220, 0, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0 10px;
  color: var(--soft-ink);
  font-size: 12px;
  font-weight: 800;
}

.color-legend i {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
}

.column-edit,
.danger-link {
  border: 0;
  background: transparent;
  color: var(--gold-dark);
  font-size: 11px;
  font-weight: 900;
  padding: 0;
}

.danger-link {
  color: #9b1c1c;
  margin-top: 10px;
}

.danger-link:disabled {
  color: var(--muted);
  cursor: default;
}

.danger-button {
  border: 0;
  border-radius: var(--radius);
  min-height: 42px;
  padding: 0 14px;
  background: #9b1c1c;
  color: var(--white);
  font-weight: 900;
}

.split-actions {
  align-items: center;
}

.split-actions > div {
  display: flex;
  gap: 10px;
}

.gold-button.slim {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.assign-workers-button {
  width: 100%;
  margin-top: 10px;
}

.check-list,
.archive-list,
.color-manager {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.check-row,
.archive-row,
.color-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(243, 246, 251, 0.65);
  padding: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--gold-dark);
}

.check-row strong,
.check-row small,
.archive-row strong,
.archive-row span {
  display: block;
}

.check-row small,
.archive-row span {
  color: var(--muted);
  margin-top: 3px;
}

.archive-row,
.color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.color-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.color-row i {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid rgba(36, 65, 114, 0.12);
}

.client-change-panel {
  margin-top: 12px;
  border: 1px solid rgba(244, 220, 0, 0.34);
  border-radius: var(--radius);
  background: var(--beige);
  padding: 12px;
}

.detail-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  width: auto;
  padding: 28px;
  display: none;
  place-items: center;
  transform: none;
  background: rgba(36, 65, 114, 0.58);
  backdrop-filter: blur(8px);
}

.detail-panel.open {
  display: grid;
  transform: none;
}

.detail-panel .detail-empty {
  display: none;
}

.detail-card.editor-card {
  width: min(1080px, calc(100vw - 38px));
  max-height: calc(100vh - 56px);
  height: auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: var(--white);
}

.preview-pane {
  background:
    linear-gradient(180deg, rgba(36, 65, 114, 0.92), rgba(36, 65, 114, 0.84)),
    var(--ink);
  color: var(--beige);
  padding: 22px;
  overflow: auto;
}

.preview-pane .eyebrow,
.preview-pane .detail-list span {
  color: var(--gold);
}

.preview-pane .detail-list strong {
  color: var(--beige);
}

.editor-pane {
  padding: 22px;
  overflow: auto;
}

.editor-help {
  color: var(--muted);
  line-height: 1.45;
  margin: 6px 0 14px;
}

.post-preview {
  min-height: 340px;
  border: 2px solid var(--gold);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(234, 220, 200, 0.96)),
    var(--beige);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55), 0 18px 44px rgba(0, 0, 0, 0.22);
}

.preview-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.preview-type {
  color: var(--gold-dark);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.post-preview strong {
  font-size: 28px;
  line-height: 1.05;
}

.post-preview p {
  margin: 0;
  color: var(--soft-ink);
  line-height: 1.45;
}

.post-preview small {
  color: var(--gold-dark);
  font-weight: 900;
}

.compact-list {
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
}

.quick-note-box {
  border: 1px solid rgba(244, 220, 0, 0.28);
  border-radius: var(--radius);
  background: rgba(243, 246, 251, 0.58);
  padding: 12px;
}

.quick-note-box p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.client-public-pane {
  background:
    linear-gradient(180deg, rgba(244, 220, 0, 0.10), rgba(255, 255, 255, 0)),
    var(--white);
}

.credentials-box {
  display: grid;
  gap: 10px;
  padding: 0 18px 18px;
}

.credential-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--beige);
  padding: 10px 12px;
}

.credential-row span {
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 980px) {
  .directory-grid {
    grid-template-columns: 1fr;
  }

  .admin-directory-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .login-screen,
  .client-portal-grid,
  .operations-grid,
  .permissions-grid,
  .priority-dashboard {
    grid-template-columns: 1fr;
  }

  .login-panel {
    margin: 0 24px 32px;
  }

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

  .detail-panel {
    padding: 14px;
  }

  .post-preview {
    min-height: 260px;
  }
}
.media-preview { width: 100%; margin-bottom: 12px; }
.media-preview img, .media-preview video { width: 100%; max-height: 400px; object-fit: contain; }
.media-preview iframe { width: 100%; height: 400px; border: 0; background: white; }
.media-dialog { width: min(1100px, 96vw); max-height: 95dvh; border: 0; padding: 16px; }
.media-dialog::backdrop { background: #000a; }
.media-dialog img, .media-dialog video, .media-dialog iframe { display: block; width: 100%; height: 80dvh; object-fit: contain; border: 0; }
