/* MORSE Workspace Portal — vanilla CSS, no framework */

@font-face {
  font-family: Vazirmatn;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../../../themes/mors-studio/assets/fonts/vazirmatn.woff2") format("woff2");
}

:root {
  --background: #f7f9fc;
  --foreground: #102e45;
  --card: #fff;
  --primary: #10334d;
  --primary-foreground: #fff;
  --secondary: #edf2f7;
  --muted: #edf2f7;
  --muted-foreground: #697b8b;
  --accent: #eaf0f8;
  --border: #e3e9ef;
  --input: #dbe3eb;
  --ring: #365df4;
  --sidebar: #fff;
  --sidebar-foreground: #304b5e;
  --sidebar-accent: #10334d;
  --sidebar-border: #e4eaf0;
  --radius: .6rem;
}

* { box-sizing: border-box; }
html, body {
  min-height: 100%;
  max-width: 100%;
  overflow-x: clip;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.9;
}
body.sidebar-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { transition: background .18s, border-color .18s, box-shadow .18s; }
button {
  cursor: pointer;
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
}
button:disabled { opacity: .48; cursor: not-allowed; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #365df4;
  outline-offset: 4px;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(26px, 2.3vw, 30px); font-weight: 700; line-height: 1.55; letter-spacing: 0; }
h2 { font-size: 19px; font-weight: 750; }
h3 { font-size: 16px; font-weight: 700; }
small { font-size: 12px; color: #586e7e; }
.muted { color: #607588; }
.eyebrow {
  font: 600 11px/1.7 Arial, sans-serif;
  letter-spacing: 2.3px;
  color: #738393;
  text-align: right;
  margin-bottom: 8px;
}

/* —— Layout shell —— */
.portal-root {
  display: flex;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: clip;
  direction: rtl;
}
.sidebar-backdrop {
  display: none;
  cursor: pointer;
  border: 0;
}
.mors-sidebar {
  width: 248px;
  flex: none;
  background: #fff;
  border-left: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  padding: 12px;
  min-height: 100vh;
  overflow: visible;
  z-index: 20;
}
.sidebar-header { padding: 20px 10px 24px; }
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  margin-bottom: 32px;
  color: #0b2d47;
  min-width: 0;
}
.brand img {
  display: block;
  width: auto;
  height: auto;
  max-height: 88px;
  max-width: 210px;
  object-fit: contain;
  object-position: center;
  flex: none;
  margin-inline: auto;
  opacity: 1;
  visibility: visible;
}
.brand > span { font: 800 13px Arial, sans-serif; letter-spacing: 1px; min-width: 0; overflow-wrap: anywhere; }
.brand span span {
  display: block;
  font: 11px Arial, sans-serif;
  letter-spacing: 1.25px;
  margin-top: 7px;
  color: #82919b;
}
.workspace-label {
  font-size: 12px;
  font-weight: 600;
  color: #8c99a5;
  margin: 0 12px 12px;
}
.workspace-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 4px 4px 14px;
}
.workspace-chip__badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font: 700 10px/1 Archivo, Arial, sans-serif;
  letter-spacing: .14em;
  background: #edf2f7;
  color: #4d6273;
}
.workspace-chip__label {
  font-size: 14px;
  font-weight: 750;
  color: #163650;
}
.portal-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font: 700 10px/1 Archivo, Arial, sans-serif;
  letter-spacing: .12em;
  background: #edf2f7;
  color: #4d6273;
  border: 1px solid #dbe3eb;
}
.crumb-root {
  font-weight: 700;
  color: #4a6070;
}
.picker, select.picker {
  width: 100%;
  height: 43px;
  border-radius: 8px;
  background: white;
  font-size: 14px;
  border: 1px solid var(--input);
  padding: 0 12px;
  color: var(--foreground);
}
.sidebar-content { flex: 1; padding: 0 4px; display: flex; flex-direction: column; gap: 4px; }
.nav-btn {
  height: 48px;
  border-radius: 8px;
  padding: 0 15px;
  font-size: 16px;
  margin: 3px 0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: right;
  color: var(--sidebar-foreground);
}
.nav-btn:hover { background: #f0f4f8; }
.nav-btn.active {
  background: #10334d;
  color: #fff;
  box-shadow: 0 5px 12px #10334d12;
}
.nav-btn b {
  margin-right: auto;
  font: 500 12px Vazirmatn, sans-serif;
  background: #ffffff24;
  padding: 0 7px;
  border-radius: 4px;
}
.nav-btn svg { width: 19px; height: 19px; flex: none; }
.nav-divider { height: 1px; background: #edf0f5; margin: 22px 12px 17px; }
.project-nav {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: right;
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 7px;
  line-height: 1.6;
  width: 100%;
  color: var(--sidebar-foreground);
}
.project-nav:hover { background: #f0f4f8; }
.project-nav.muted { color: #8c99a5; }
.project-nav.active { background: #eaf0f8; color: #10334d; font-weight: 600; }
.sidebar-footer { padding: 8px 4px 12px; margin-top: auto; }
.sidebar-note {
  background: #f2f5fa;
  padding: 18px;
  border-radius: 9px;
  margin: 20px 0;
  color: #164366;
  display: none;
}
.sidebar-note > span {
  font: 800 17px/1.4 Arial, sans-serif;
  letter-spacing: -.5px;
  display: block;
  text-align: left;
}
.mini-code {
  font-size: 16px;
  color: #507cf0;
  letter-spacing: 5px;
  text-align: left;
  margin-top: 7px;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #e9edf2;
  padding: 20px 0 5px;
  margin-top: 16px;
}
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #dbe5f6;
  color: #17416b;
  border-radius: 50%;
  font: 700 14px Arial, sans-serif;
  flex: none;
}
.user-card strong { display: block; font-size: 13px; }
.user-card small {
  display: block;
  font-size: 12px;
  max-width: 160px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 78px;
  border-bottom: 1px solid #e4eaf1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 38px;
  background: #ffffffb8;
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
  min-width: 0;
}
.crumb, .top-actions { display: flex; align-items: center; gap: 16px; font-size: 13px; min-width: 0; }
.crumb strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(42vw, 280px);
}
.crumb > span:first-of-type { font: 500 13px Arial, sans-serif; color: #8293a1; }
.crumb strong { font-weight: 500; }
.slash { color: #bbc5cf; }
.tz { display: flex; align-items: center; gap: 7px; color: #778999; font-size: 12px; }
.icon-button {
  padding: 9px;
  border: 1px solid #e0e7ee;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
}
.icon-button:hover { background: #ecf1f8; }
.sidebar-toggle { display: none; }

.page-content { max-width: 1600px; margin: auto; padding: 30px 38px 0; width: 100%; min-width: 0; }
.demo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 27px;
  background: #eaf0fd;
  border: 1px solid #dce5fa;
  border-radius: 7px;
  padding: 10px 14px;
  color: #4c6384;
  font-size: 14px;
  gap: 12px;
}
.demo-bar a { display: flex; align-items: center; gap: 7px; font-weight: 600; text-decoration: underline; }
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px 20px;
  margin-bottom: 24px;
}
.page-heading > div {
  min-width: 0;
  flex: 1 1 220px;
}
.page-heading h1 { overflow-wrap: anywhere; }
.page-heading .primary,
.page-heading .cta-note {
  flex: 0 1 auto;
  max-width: 100%;
}
.page-heading .eyebrow { display: none; }
.page-heading .muted { font-size: 14px; margin-top: 6px; }
.primary, .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 7px;
  padding: 11px 18px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.primary {
  background: #10334d;
  color: #fff;
  border: 1px solid #10334d;
  box-shadow: 0 3px 4px #0a27490a;
}
.primary:hover { background: #1c4a68; }
.secondary {
  background: #fff;
  border: 1px solid #dbe3eb;
  color: #25495f;
}
.secondary:hover { background: #f0f4f8; }
.full { width: 100%; }

/* —— Overview —— */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 17px;
  margin-bottom: 34px;
}
.stat {
  background: #fff;
  border: 1px solid #e1e7ef;
  border-radius: 11px;
  padding: 20px 23px;
  box-shadow: 0 3px 3px #172f4902;
}
.stat > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #647b8e;
}
.stat > div svg { color: #8095a5; stroke-width: 1.5; }
.stat > strong {
  display: block;
  font-size: 36px;
  font-weight: 650;
  line-height: 1.65;
  margin: 3px 0;
  color: #123a55;
}
.stat > button {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 14px;
  color: #75899b;
}
.navy-stat { background: #10334d; border-color: #10334d; }
.navy-stat > strong { color: #d9fb80; }
.navy-stat > div, .navy-stat > button { color: #c4d4e1; }
.navy-stat > div svg { color: #d9fb80; }
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 265px;
  gap: 27px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 17px;
}
.section-heading > button {
  font-size: 14px;
  color: #698093;
  display: flex;
  align-items: center;
  gap: 7px;
}

/* —— Content cards —— */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.overview-cards { gap: 15px; }
.content-card {
  text-align: right;
  background: white;
  border: 1px solid #e1e8ef;
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
  box-shadow: 0 2px 3px #0f304404;
  transition: transform .2s, box-shadow .2s;
  width: 100%;
  display: block;
}
.content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px #0d254712;
}
.card-art {
  height: 150px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  text-align: left;
  direction: ltr;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #224df1;
  color: #eff6ff;
}
.card-art > strong {
  font: 800 clamp(25px, 2.5vw, 38px)/.98 Arial, sans-serif;
  letter-spacing: -1.8px;
  white-space: pre-line;
  position: relative;
  z-index: 1;
}
.art-1 { background: #d9fa87; color: #12334c; }
.art-2 { background: #122d42; color: #edf7e5; }
.art-3 { background: #d7e5fa; color: #183d65; }
.art-index {
  font: 10px Arial, sans-serif;
  letter-spacing: 1.4px;
  position: absolute;
  top: 15px;
  left: 18px;
}
.mors-code {
  position: absolute;
  bottom: 12px;
  left: 20px;
  font: 12px Arial, sans-serif;
  letter-spacing: 3px;
  opacity: .7;
}
.version {
  position: absolute;
  bottom: 13px;
  right: 15px;
  border: 1px solid currentColor;
  padding: 1px 5px;
  font: 9px/1.5 Arial, sans-serif;
  opacity: .7;
  border-radius: 3px;
}
.card-art > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body { padding: 17px 16px 12px; }
.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  align-items: flex-start;
  flex-wrap: wrap;
  font-size: 14px;
  color: #708295;
  margin-bottom: 12px;
}
.card-meta > span:first-child { display: flex; gap: 5px; align-items: center; }
.status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  white-space: normal;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 14px;
  line-height: 1.8;
  background: #eaf0fb;
  color: #3f6193;
  font-weight: 500;
}
.status.review, .status.proposed { background: #fff2d9; color: #957024; }
.status.revision, .status.missed, .status.cancelled { background: #fce9e8; color: #a45249; }
.status.ready, .status.confirmed { background: #e8f0ff; color: #3e65a4; }
.status.published, .status.done { background: #eaf3e2; color: #567044; }
.status.title, .status.body { background: #eaf0fb; color: #3f6193; }
.card-body > h3 { font-size: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.card-body > p { font-size: 14px; color: #8a98a4; margin: 5px 0 18px; }
.next-owner { color: #174260 !important; font-weight: 600; margin: 14px 0 7px !important; }
.mini-progress { display: flex; gap: 4px; margin: 8px 0 14px; }
.mini-progress span {
  height: 4px;
  flex: 1;
  background: #e5ecf2;
  border-radius: 8px;
}
.mini-progress .filled { background: #335ff3; }
.card-bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  border-top: 1px solid #edf1f4;
  padding-top: 10px;
  color: #91a0ad;
  font-size: 13px;
}
.card-bottom > span { display: block; }
.media-symbol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  position: relative;
  z-index: 1;
}
.media-symbol span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next-shoot {
  background: #fff;
  border: 1px solid #e1e8ef;
  border-radius: 11px;
  padding: 20px;
  height: fit-content;
}
.next-shoot h2 { font-size: 16px; }
.date-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid #edf0f4;
  margin-bottom: 6px;
}
.date-tile > strong {
  font-size: 44px;
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: -2px;
}
.date-tile > span {
  font-size: 12px;
  line-height: 1.8;
  max-width: 80px;
  color: #7c8e9f;
}
.date-tile > svg { margin-right: auto; color: #a7b7c8; stroke-width: 1.2; }
.next-shoot h3 { margin: 11px 0; font-size: 16px; }
.next-shoot p {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: #7d91a1;
  margin-bottom: 7px;
}
.next-shoot button { margin-top: 17px; font-size: 12px; }
.recent {
  margin-top: 32px;
  background: #fff;
  border: 1px solid #e1e8ef;
  padding: 22px 25px;
  border-radius: 11px;
}

/* —— Timeline —— */
.timeline { padding: 5px 0; }
.event {
  display: flex;
  gap: 15px;
  position: relative;
  padding-bottom: 23px;
}
.event:not(:last-child):before {
  content: '';
  position: absolute;
  right: 4px;
  top: 11px;
  bottom: 0;
  width: 1px;
  background: #dfe7ed;
}
.event-dot {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: #aac0d2;
  margin-top: 8px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #dae4ec;
}
.event strong { font-size: 14px; font-weight: 600; }
.event p {
  font-size: 14px;
  color: #71879a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 850px;
}
.event small { font-size: 12px; color: #99a6b2; }

.page-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 40px;
  padding: 23px 0;
  border-top: 1px solid #e1e8ef;
  font-size: 11px;
  color: #99a7b5;
}
.page-footer > span:first-child { font: 700 10px Arial, sans-serif; letter-spacing: 2px; }
.page-footer > span:last-child { letter-spacing: 5px; }

/* —— Content view —— */
.channel-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  border-bottom: 1px solid #dfe7ee;
  margin-bottom: 22px;
  padding-bottom: 12px;
  align-items: flex-start;
}
.channel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.channel-tab {
  padding: 9px 13px;
  font-size: 14px;
  color: #7d8ea0;
  gap: 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
}
.channel-tab:hover { background: #f0f4f8; }
.channel-tab.active { background: #10334d; color: white; }
.channel-tab b { font-size: 11px; font-weight: 400; opacity: .7; }
.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-row > .picker { width: 190px; }
.filter-row > .muted { margin-right: auto; font-size: 12px; }
.search {
  display: flex;
  align-items: center;
  gap: 9px;
  background: white;
  border: 1px solid #dce4ed;
  border-radius: 7px;
  padding: 0 12px;
  color: #8da0b1;
  width: 300px;
}
.search input {
  padding: 10px 0;
  border: 0;
  width: 100%;
  background: none;
  outline: none;
  font-size: 13px;
}
.workflow-strip {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid #e0e7ee;
  background: #fff;
  border-radius: 8px;
  margin-bottom: 25px;
}
.workflow-strip button {
  display: flex;
  gap: 6px;
  align-items: center;
  flex: 1 1 160px;
  flex-wrap: wrap;
  padding: 13px 12px;
  font-size: 14px;
  border-left: 1px solid #e9edf2;
}
.workflow-strip button:hover { background: #ecf2fc; }
.workflow-strip button.active {
  background: #10334d;
  border-color: #10334d;
  color: #fff;
}
.workflow-strip button.active span {
  background: #fff;
  color: #10334d;
}
.workflow-strip button.active b { color: #c9d7e8; }
.content-role-stats { margin-bottom: 22px; }
.workflow-strip span {
  background: #f0f4f9;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #6a8194;
  font-size: 14px;
}
.workflow-strip b {
  margin-right: auto;
  color: #8b9eac;
  font-size: 12px;
  font-weight: 500;
}
.content-layout-tabs { margin: 20px 0; }
.layout-tabs {
  display: inline-flex;
  gap: 6px;
  background: #edf2f7;
  padding: 4px;
  border-radius: 8px;
}
.layout-tab {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 6px;
  color: #607588;
}
.layout-tab.active { background: #fff; color: #10334d; box-shadow: 0 1px 3px #00000010; }
.content-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 16px;
  padding: 4px 0 20px;
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.content-board:focus-visible { outline: 2px solid #346be4; outline-offset: 4px; }
.board-column {
  min-width: 0;
  background: #eef3f8;
  border: 1px solid #dce5ef;
  border-top: 3px solid #607d96;
  border-radius: 12px;
  padding: 14px;
}
.board-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.board-column > header h3 { font-size: 16px; }
.board-column > header > span {
  background: white;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 14px;
}
.board-owner { font-size: 14px; color: #506a80; margin: 7px 0 16px; }
.board-column .content-card { width: 100%; margin: 0 0 14px; }
.board-column .card-art { height: 125px; }
.board-column .card-art > strong { font-size: 23px; }
.board-empty {
  padding: 24px 10px;
  border: 1px dashed #b9cbdc;
  border-radius: 8px;
  font-size: 14px;
  color: #607588;
  text-align: center;
}
.board-revision { border-top-color: #d28b39; }
.board-published { border-top-color: #329c77; }
.board-ready { border-top-color: #346be4; }
.board-studio_wait { border-top-color: #8a6d3b; }

/* —— Shoots —— */
.shoot-list { display: flex; flex-direction: column; gap: 13px; margin-bottom: 30px; }
.shoot-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1.4fr) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px 16px;
  width: 100%;
  min-width: 0;
  padding: 23px;
  background: white;
  border: 1px solid #e0e8f0;
  border-radius: 10px;
  text-align: right;
}
.shoot-row:hover { border-color: #99b4d0; }
.shoot-symbol {
  background: #eaf0fa;
  border: 1px solid #dce5f0;
  border-radius: 9px;
  padding: 17px;
  color: #6484a5;
  flex: none;
}
.shoot-row > div:nth-child(2),
.shoot-row > div:nth-child(3) { min-width: 0; }
.shoot-row h3 { font-size: 15px; overflow-wrap: anywhere; }
.shoot-row p { font-size: 14px; color: #8b9ba9; margin-top: 5px; overflow-wrap: anywhere; }
.shoot-row strong { font-size: 14px; font-weight: 500; }
.shoot-row > svg { color: #8b9da9; flex: none; }

/* —— History / archive —— */
.archive-list { margin: 20px 0 35px; }
.archive-row {
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: right;
  width: 100%;
  background: #fff;
  border: 1px solid #e1e8ef;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 12px;
}
.archive-row > div { flex: 1; min-width: 0; }
.archive-row p { font-size: 14px; color: #667c8f; }
.archive-row > span:last-child {
  display: flex;
  align-items: center;
  font-size: 14px;
  gap: 8px;
  flex: none;
}
.archive-row:hover { border-color: #6489dc; }
.history-panel {
  background: #fff;
  border: 1px solid #e0e8f0;
  border-radius: 10px;
  padding: 30px;
}

.empty {
  padding: 60px 20px;
  text-align: center;
  color: #8a9aa7;
  border: 1px dashed #cad7e3;
  border-radius: 12px;
  background: #ffffff80;
  margin: 15px 0;
}
.empty svg { margin: 0 auto 15px; display: block; }
.empty h3 { color: #3b5970; margin-bottom: 5px; }
.empty p { font-size: 14px; }
.load-state { padding: 100px 30px; text-align: center; }
.load-state svg { margin: 0 auto; display: block; }
.load-state p { margin: 15px 0; color: #7c8e9f; }
.load-state h2 { margin-bottom: 10px; }
.spin { animation: spin 2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* —— Flow panels —— */
.flow-panel {
  margin: 20px 0;
  padding: 22px;
  border: 1px solid #dce4f0;
  border-radius: 14px;
  background: #f8faff;
}
.flow-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
}
.flow-heading > span { font-size: 13px; color: #65788c; }
.flow-steps { list-style: none; margin: 18px 0 0; padding: 0; }
.flow-steps li {
  display: flex;
  gap: 15px;
  position: relative;
  padding: 0 0 24px;
  color: #748497;
  min-height: 76px;
}
.flow-steps li:not(:last-child):before {
  content: '';
  width: 2px;
  background: #dce5ef;
  position: absolute;
  right: 17px;
  top: 35px;
  bottom: 0;
}
.flow-steps li.complete:before { background: #4364cb; }
.flow-marker {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  border: 2px solid #dce5ef;
  display: grid;
  place-items: center;
  background: #fff;
  font-size: 14px;
  position: relative;
  z-index: 1;
}
.complete .flow-marker {
  background: #e1e9ff;
  border-color: #4266d4;
  color: #244cac;
}
.active .flow-marker {
  background: #204cf0;
  border-color: #204cf0;
  color: #fff;
  box-shadow: 0 0 0 5px #204cf011;
}
.flow-steps .active strong { color: #2045ad; }
.flow-steps .complete strong { color: #173b56; }
.flow-steps strong { font-size: 16px; }
.flow-steps p { font-size: 14px; }
.flow-steps small { display: block; line-height: 1.9; overflow-wrap: anywhere; }
.flow-steps li:last-child { padding-bottom: 0; }
.flow-revision {
  display: flex;
  gap: 12px;
  padding: 15px;
  background: #fff0e8;
  border-radius: 8px;
  color: #884821;
}
.flow-revision svg { flex: none; margin-top: 5px; }
.flow-revision p { font-size: 14px; white-space: pre-wrap; }
.readiness-note {
  padding: 16px;
  background: #fff5dd;
  border: 1px solid #eed79f;
  border-radius: 9px;
  margin: 12px 0;
}

/* —— Sheet / Dialog / Toast —— */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 46, 69, .35);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.overlay.open { opacity: 1; pointer-events: auto; }
.sheet-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(720px, calc(100vw - 32px));
  max-width: 100%;
  max-height: min(86vh, 900px);
  background: #fff;
  z-index: 101;
  overflow-y: auto;
  transform: translate(-50%, -46%) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: transform .2s ease, opacity .2s ease;
  border-radius: 14px;
  border: 1px solid #e4eaf0;
  direction: rtl;
}
.sheet-panel.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.sheet-header {
  padding: 34px 28px 22px;
  border-bottom: 1px solid #e4eaf0;
  position: relative;
}
.sheet-header h2 { font-size: 23px; line-height: 1.8; }
.sheet-header p { font-size: 13px; color: #71818e; }
.sheet-close {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e0e7ee;
  display: grid;
  place-items: center;
  background: #fff;
}
.detail-page {
  max-width: 860px;
}
.sheet-back {
  position: fixed;
  left: max(16px, env(safe-area-inset-left, 0px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #122f48;
  background: #122f48;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(16, 46, 69, 0.22);
  cursor: pointer;
}
.sheet-back:hover { background: #1c4a68; }
.detail-head { margin-bottom: 8px; }
.detail-head h1 { font-size: 28px; margin: 6px 0 8px; line-height: 1.45; }
.detail-body { padding: 8px 0 40px; }
.detail-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: 14px;
  color: #8090a0;
  gap: 12px;
}
.asset-preview {
  background: #edf2f8;
  border: 1px solid #e0e7ef;
  border-radius: 10px;
  display: grid;
  place-items: center;
  min-height: 180px;
  overflow: hidden;
  padding: 16px;
}
.asset-preview img { width: 100%; max-height: 340px; object-fit: contain; }
.asset-preview video { width: 100%; }
.asset-preview audio { max-width: 100%; }
.asset-preview > a { display: grid; justify-items: center; gap: 13px; }
.download-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #5d7992;
  padding: 12px 0;
  overflow-wrap: anywhere;
}
.action-box {
  background: #eff4fc;
  border: 1px solid #dce6f6;
  border-radius: 10px;
  padding: 22px;
  margin: 20px 0;
}
.action-box h3 { font-size: 17px; }
.action-box p { color: #7c8fa3; font-size: 14px; margin: 7px 0 16px; }
.action-box .primary { margin-top: 10px; }
.revision-box { margin: 25px 0; }
.revision-box label { font-weight: 600; font-size: 14px; }
.copy-block { border-bottom: 1px solid #e2e9f0; padding: 20px 0; }
.copy-block h3 { margin-top: 7px; }
.copy-block p { white-space: pre-wrap; font-size: 14px; line-height: 2; margin-top: 7px; }
.published-box {
  padding: 25px;
  background: #edf6e7;
  border-radius: 9px;
  text-align: center;
  margin: 20px 0;
  color: #4c7042;
}
.published-box > svg { margin: auto; display: block; }
.published-box a {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
}
.version-link {
  display: flex;
  gap: 10px;
  padding: 13px;
  background: #f3f6fa;
  border-radius: 8px;
  margin: 10px 0;
  font-size: 14px;
  align-items: center;
}
.history-title { margin: 26px 0 10px; }
.detail-body > .muted { font-size: 12px; margin-bottom: 20px; }
.shoot-detail {
  border-bottom: 1px solid #e0e7ed;
  padding: 20px 0;
  margin-bottom: 25px;
}
.shoot-detail p {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
  font-size: 14px;
}
.buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.dialog-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(.96);
  width: min(520px, calc(100vw - 32px));
  max-width: 100%;
  max-height: 92vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  z-index: 110;
  padding: 28px;
  box-shadow: 0 24px 80px #0d254730;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  direction: rtl;
}
.dialog-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}
.dialog-header { text-align: right; margin: 0 0 18px; }
.dialog-header h2 { font-size: 22px; }
.dialog-header p { font-size: 13px; line-height: 1.9; margin-top: 10px; color: #71818e; }

label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 17px; }
label input, label textarea, .action-box input, .action-box textarea, .revision-box textarea, .dialog-panel textarea {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d6e1eb;
  border-radius: 7px;
  background: #fff;
  font-size: 14px;
  outline: none;
  margin-top: 7px;
  color: var(--foreground);
}
label input:focus, label textarea:focus, .action-box input:focus, textarea:focus {
  border-color: #517df1;
  box-shadow: 0 0 0 3px #517df117;
}
textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.9;
  margin-bottom: 12px;
}
.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 25px 15px;
  border: 1px dashed #b8c9db;
  background: #f5f8fc;
  border-radius: 10px;
  color: #587994;
  margin-bottom: 17px;
  cursor: pointer;
}
.upload-area input { max-width: 100%; font-size: 12px; background: #fff; }
.upload-area small { text-align: center; }
.form-hint {
  font-size: 12px;
  line-height: 1.9;
  color: #7890a4;
  margin: 0 0 17px;
}
.persian-date { margin: 8px 0; }
.date-fields {
  display: grid;
  grid-template-columns: .7fr 1.4fr 1fr 1.2fr;
  gap: 7px;
  margin: 8px 0;
}
.date-fields select, .date-fields input {
  width: 100%;
  min-width: 0;
  border: 1px solid #d6e1eb;
  background: white;
  border-radius: 7px;
  padding: 10px 7px;
  margin: 0;
  font-size: 14px;
}
.persian-date small { display: block; line-height: 2; }

.toast-host {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(420px, calc(100vw - 24px));
}
.toast {
  pointer-events: auto;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 10px 30px #0d254725;
  background: #fff;
  border: 1px solid #dce5ef;
  color: #123a55;
  animation: toast-in .25s ease;
}
.toast.ok { background: #edf6e7; border-color: #c5dbb0; color: #3d5f35; }
.toast.err { background: #fff0ee; border-color: #f0c4bf; color: #9d3434; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.error-message {
  padding: 14px;
  color: #9d3434;
  background: #fff0ee;
  border-radius: 9px;
  margin: 14px 0;
}

/* —— Login (light + studio navy) —— */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 35px;
  background: #edf3fa;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: Vazirmatn, Tahoma, sans-serif;
  color: #102e45;
  direction: rtl;
  max-width: 100%;
  overflow-x: clip;
}
.back-home {
  display: inline-block;
  align-self: flex-start;
  font-size: 14px;
  margin-bottom: 35px;
  color: #546878;
}
.login-card {
  background: white;
  border: 1px solid #dce5ee;
  padding: 45px;
  width: min(520px, 100%);
  margin: auto;
  border-radius: 15px;
}
.login-card > img,
.logo-img {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}
.login-card > img {
  height: auto;
  max-height: 112px;
  max-width: 240px;
  margin: 0 auto 28px;
}
.logo-img--navy {
  mix-blend-mode: multiply;
}
.logo-img--white,
.logo-img--outline {
  mix-blend-mode: screen;
}
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.login-card .optional {
  color: #8a9aab;
  font-size: 12px;
  font-weight: 500;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}
.auth-tabs a {
  text-align: center;
  padding: 10px 12px;
  border: 1px solid #dce5ee;
  border-radius: 8px;
  color: #546878;
  font-weight: 600;
}
.auth-tabs a.is-active {
  background: #122f48;
  border-color: #122f48;
  color: #fff;
}
.auth-tabs:has(a:only-child) { grid-template-columns: 1fr; }
.info-message {
  background: #e8f6ee;
  color: #1d6b3d;
  padding: 12px 14px;
  border-radius: 8px;
  margin: 0 0 16px;
}
.auth-extra { text-align: center; margin-top: 16px; }
.auth-extra a { color: #365df4; font-weight: 600; }
.mrs-hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.cta-note { max-width: 220px; color: #697b8b; font-size: 13px; text-align: left; }
button.danger, .danger.full {
  background: #fff2f1;
  color: #b42318;
  border: 1px solid #f4c7c3;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 600;
  margin-top: 18px;
}
button.danger:hover { background: #ffe4e1; }
.danger-link {
  color: #b42318;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.members-box, .signup-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-top: 22px;
}
.org-switcher {
  position: relative;
  margin-top: 10px;
}
.org-switcher__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 43px;
  border-radius: 8px;
  border: 1px solid var(--input);
  background: #fff;
  padding: 0 12px;
  font-size: 14px;
  color: var(--foreground);
  text-align: right;
}
.org-switcher__btn svg { transform: rotate(-90deg); opacity: .55; flex: none; }
.org-switcher.is-open .org-switcher__btn svg { transform: rotate(90deg); }
.org-switcher__btn:disabled { opacity: .55; cursor: not-allowed; }
.org-switcher__panel {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 6px);
  z-index: 40;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(16, 51, 77, .12);
  padding: 8px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.org-switcher__search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--input);
  border-radius: 8px;
  padding: 0 10px;
  height: 38px;
  background: #f7fafc;
}
.org-switcher__search input {
  border: 0;
  background: transparent;
  width: 100%;
  outline: none;
  font-size: 13px;
}
.org-switcher__list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  max-height: 210px;
}
.org-switcher__item {
  width: 100%;
  text-align: right;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--foreground);
}
.org-switcher__item:hover { background: #f0f4f8; }
.org-switcher__item.active {
  background: #10334d;
  color: #fff;
}
.org-switcher__empty { padding: 12px; font-size: 13px; }
.org-switcher--single {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #edf2f7;
  font-size: 14px;
  font-weight: 600;
}
.org-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: min(240px, 42vw);
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef3f8;
  color: #10334d;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.org-chip strong {
  overflow: hidden;
  text-overflow: ellipsis;
}
.clients-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.clients-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(320px, 100%);
  height: 42px;
  border: 1px solid var(--input);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}
.clients-search input {
  border: 0;
  outline: none;
  width: 100%;
  background: transparent;
}
.clients-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.clients-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-wrap: wrap;
}
.clients-row.is-active {
  border-color: #10334d;
  box-shadow: 0 0 0 1px #10334d22;
}
.clients-row strong { display: block; font-size: 16px; }
.clients-row small { color: #6a7d8d; }
.clients-row .buttons { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inbox-list .buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.invite-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 4px 8px;
}
.invite-box .buttons { display: flex; gap: 10px; flex-wrap: wrap; }
body.portal-studio .org-switcher__btn {
  background: #0f2433;
  border-color: #24384a;
  color: #e8eef4;
}
body.portal-studio .org-switcher__panel {
  background: #122b3c;
  border-color: #24384a;
}
body.portal-studio .org-switcher__search {
  background: #0d1f2b;
  border-color: #24384a;
}
body.portal-studio .org-switcher__search input {
  color: #e8eef4;
}
body.portal-studio .org-switcher__item {
  color: #d7e4ef;
}
body.portal-studio .org-switcher__item:hover {
  background: #1a3446;
  color: #fff;
}
body.portal-studio .org-switcher__item.active {
  background: rgba(201, 216, 230, .2);
  color: #fff;
}
body.portal-studio .org-switcher__empty {
  color: #8fa8be;
}
body.portal-studio .org-chip {
  background: #1a3446;
  color: #d7e6f2;
}
body.portal-studio .org-switcher--single {
  background: #1a3446;
  color: #e8eef4;
}
body.portal-studio .clients-row.is-active {
  border-color: #0a2438;
}
.member-list { list-style: none; margin: 0; padding: 0; }
.member-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f6;
}
.member-list li:last-child { border-bottom: 0; }
.member-list small { display: block; color: #697b8b; }
.login-card h1 { font-size: 29px; margin: 10px 0 15px; }
.login-card > p:not(.eyebrow) { color: #627c8f; }
.login-benefit {
  display: flex;
  gap: 12px;
  background: #edf3fb;
  padding: 18px;
  margin: 25px 0;
  font-size: 14px;
  border-radius: 8px;
  align-items: flex-start;
}
.login-benefit svg { flex: none; color: #2753e9; }
.login-card > small {
  display: block;
  margin-top: 20px;
  text-align: center;
  color: #71818e;
}
.login-card label { margin-bottom: 14px; }
.remember-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  margin-bottom: 18px !important;
}
.remember-row input { width: auto !important; margin: 0 !important; }
.studio-login { background: #122f48; }
.studio-login > .back-home { color: white; }

/* —— Studio portal shell (distinct from client) —— */
body.portal-studio {
  --background: #eef3f8;
  --primary: #0a2438;
  --sidebar-accent: #c9d8e6;
}
body.portal-studio .mors-sidebar {
  background: #0c2237;
  border-left-color: #16324a;
  color: #d7e4ef;
}
body.portal-studio .brand img,
body.portal-studio .logo-img--navy {
  mix-blend-mode: normal;
  filter: brightness(0) invert(1);
}
body.portal-studio .workspace-chip__badge {
  background: rgba(201, 216, 230, .18);
  color: #c9d8e6;
}
body.portal-studio .workspace-chip__label {
  color: #f3f7fb;
}
body.portal-studio .workspace-label {
  color: #8fa8be;
}
body.portal-studio .picker,
body.portal-studio select.picker {
  background: #102a40;
  border-color: #1c3e5c;
  color: #e4edf5;
}
body.portal-studio .nav-btn {
  color: #b7c9d8;
}
body.portal-studio .nav-btn:hover {
  background: rgba(201, 216, 230, .08);
  color: #fff;
}
body.portal-studio .nav-btn.active {
  background: rgba(201, 216, 230, .16);
  color: #fff;
  box-shadow: none;
}
body.portal-studio .nav-btn b {
  background: rgba(201, 216, 230, .2);
  color: #eaf2f8;
}
body.portal-studio .project-nav {
  color: #b7c9d8;
}
body.portal-studio .project-nav:hover {
  background: rgba(201, 216, 230, .1);
  color: #fff;
}
body.portal-studio .project-nav.active {
  background: rgba(201, 216, 230, .14);
  color: #fff;
}
body.portal-studio .project-nav.muted {
  color: #8fa8be;
}
body.portal-studio .nav-divider {
  background: #1c3e5c;
}
body.portal-studio .sidebar-note {
  background: #102a40;
  color: #b7c9d8;
  border: 1px solid #1c3e5c;
}
body.portal-studio .sidebar-note .mini-code {
  color: #c9d8e6;
}
body.portal-studio .user-card {
  border-top-color: #1c3e5c;
  color: #e4edf5;
}
body.portal-studio .user-card small { color: #8fa8be; }
body.portal-studio .user-card .avatar {
  background: #c9d8e6;
  color: #0c2237;
}
body.portal-studio .topbar {
  background: rgba(247, 249, 252, .92);
  border-bottom-color: #d5dee8;
}
body.portal-studio .portal-pill {
  background: #0c2237;
  color: #c9d8e6;
  border-color: #0c2237;
}
body.portal-studio .crumb-root {
  color: #0c2237;
}
body.portal-studio .page-heading .eyebrow {
  color: #5d7588;
}

@media (min-width: 1500px) {
  .card-art { height: 205px; }
  .overview-cards .card-art { height: 185px; }
}
@media (max-width: 1280px) {
  .page-content { padding: 24px 28px 0; }
  .topbar { padding: 0 28px; }
}
@media (max-width: 1200px) {
  .page-content { padding: 23px; }
  .topbar { padding: 0 23px; }
  .overview-grid { grid-template-columns: 1fr; }
  .next-shoot { display: none; }
  .stats { gap: 11px; }
  .stat { padding: 15px; }
  .workflow-strip button { flex-basis: 180px; }
  .shoot-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .shoot-row > div:nth-child(3) { grid-column: 2; }
  .shoot-row > .status { grid-column: 2; justify-self: start; }
  .shoot-row > svg { grid-column: 3; grid-row: 1; }
}
@media (max-width: 1024px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-row > .picker { width: min(190px, 100%); }
}
@media (max-width: 900px) {
  .mors-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(248px, 86vw);
    height: 100%;
    max-height: 100dvh;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    transform: translateX(110%);
    transition: transform .25s;
    box-shadow: -8px 0 40px #0d254730;
    z-index: 21;
  }
  .mors-sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: grid; }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(16, 46, 69, .38);
    z-index: 19;
  }
  .page-heading { align-items: flex-start; }
  .page-heading .primary { align-self: flex-start; white-space: normal; }
  .search { width: 100%; }
  .filter-row > .picker { width: 100%; max-width: 220px; }
}
@media (max-width: 767px) {
  .topbar { height: 64px; padding: 0 18px; }
  .page-content { padding: 18px; }
  .tz { display: none; }
  .demo-bar { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; }
  h1, .page-heading h1 { font-size: 25px; }
  .stats { gap: 10px; margin-bottom: 25px; }
  .cards-grid { grid-template-columns: 1fr; gap: 13px; }
  .workflow-strip button { flex-basis: 46%; }
  .shoot-row { padding: 16px; gap: 10px 12px; }
  .detail-body { padding: 8px 0 32px; }
  .detail-head h1 { font-size: 22px; }
  .sheet-back { font-size: 13px; min-height: 40px; padding: 8px 14px; left: 12px; }
  .sheet-header { padding: 35px 20px 20px; }
  .history-panel { padding: 20px; }
  .archive-row { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .date-fields { grid-template-columns: .7fr 1.3fr 1fr; }
  .date-fields input[type=time] { grid-column: 1 / -1; }
  .login-page { padding: 20px; }
  .login-card { padding: 27px; }
  .auth-row { grid-template-columns: 1fr; }
  .content-board { grid-template-columns: 1fr; }
  .next-shoot { display: block; }
  .page-footer > span:last-child { display: none; }
  input, textarea, select { font-size: 16px; }
}
@media (max-width: 480px) {
  .page-content { padding: 14px; }
  .topbar { padding: 0 12px; }
  .stats { grid-template-columns: 1fr; }
  .stat > strong { font-size: 30px; }
  .workflow-strip button { flex-basis: 100%; }
  .date-fields { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 22px 16px; }
  .login-card h1 { font-size: 24px; }
  .dialog-panel { width: min(520px, calc(100vw - 16px)); padding: 20px 16px; }
  .sheet-panel { width: min(720px, calc(100vw - 16px)); max-height: min(92dvh, 900px); }
  .primary, .secondary { white-space: normal; }
  .cta-note { max-width: 100%; text-align: right; }
  .crumb { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
