.post-production-view {
  --post-blue: var(--dashboard-primary, #2563eb);
  --post-green: var(--dashboard-success, #12b76a);
  --post-orange: var(--dashboard-warning, #f79009);
  --post-red: var(--dashboard-danger, #f04438);
  color: var(--dashboard-text);
}

body.post-local-preview #authModal,
body.post-local-preview #authLogoSilhouette { display: none !important; }
body.post-local-preview.auth-modal-open .app-sidebar { display: flex !important; }
body.post-local-preview.auth-modal-open .dashboard-page { display: block !important; }

.post-production-view * { box-sizing: border-box; }
.post-production-view button,
.post-production-view input,
.post-production-view select,
.post-production-view textarea { font: inherit; }

.post-shell { display: grid; gap: 18px; }
.post-topbar,
.post-card,
.post-metric,
.post-column,
.post-modal-card {
  background: var(--dashboard-card);
  border: 1px solid var(--dashboard-border);
  border-radius: 10px;
  box-shadow: var(--dashboard-shadow);
}

.post-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
}

.post-heading { min-width: 230px; }
.post-heading p,
.post-heading h1 { margin: 0; }
.post-heading p { color: var(--dashboard-muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.post-heading h1 { margin-top: 4px; font-size: clamp(22px, 2vw, 30px); line-height: 1.1; }

.post-toolbar { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.post-control,
.post-button {
  min-height: 40px;
  padding: 0 12px;
  color: var(--dashboard-text);
  background: var(--dashboard-card);
  border: 1px solid var(--dashboard-border);
  border-radius: 8px;
}
.post-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 750; cursor: pointer; }
.post-button svg { width: 17px; height: 17px; }
.post-button.primary { color: #fff; background: var(--post-blue); border-color: var(--post-blue); }
.post-button.danger { color: #b42318; background: color-mix(in srgb, var(--post-red) 8%, var(--dashboard-card)); border-color: color-mix(in srgb, var(--post-red) 36%, var(--dashboard-border)); }
.post-button:disabled { opacity: .55; cursor: not-allowed; }
.post-button:focus-visible,
.post-control:focus-visible { outline: 3px solid color-mix(in srgb, var(--post-blue) 20%, transparent); outline-offset: 1px; }

.post-local-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -8px 2px 0;
  color: var(--dashboard-muted);
  font-size: 12px;
}
.post-local-note svg { width: 15px; height: 15px; color: var(--post-orange); }
.post-local-note.is-error { color: var(--post-red); }
.post-local-note.is-error svg { color: var(--post-red); }

.post-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.post-metric { min-width: 0; display: block; padding: 16px; text-align: left; cursor: pointer; }
.post-metric:hover { border-color: color-mix(in srgb, var(--post-blue) 45%, var(--dashboard-border)); }
.post-metric.is-active { border-color: var(--post-blue); box-shadow: 0 0 0 2px color-mix(in srgb, var(--post-blue) 12%, transparent); }
.post-metric-top { display: flex; align-items: center; gap: 9px; color: var(--dashboard-muted); font-size: 12px; font-weight: 700; }
.post-metric-icon { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; color: var(--post-blue); background: color-mix(in srgb, var(--post-blue) 10%, transparent); border-radius: 8px; }
.post-metric-icon svg { width: 16px; height: 16px; }
.post-metric strong { display: block; margin-top: 12px; color: var(--dashboard-text); font-size: 28px; line-height: 1; }
.post-metric small { display: block; margin-top: 7px; color: var(--dashboard-muted); font-size: 11px; }
.post-metric[data-metric="late"] .post-metric-icon { color: var(--post-red); background: color-mix(in srgb, var(--post-red) 10%, transparent); }
.post-metric[data-metric="revision"] .post-metric-icon,
.post-metric[data-metric="week"] .post-metric-icon { color: var(--post-orange); background: color-mix(in srgb, var(--post-orange) 10%, transparent); }
.post-metric[data-metric="completed"] .post-metric-icon { color: var(--post-green); background: color-mix(in srgb, var(--post-green) 10%, transparent); }

.post-active-filter { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; color: var(--dashboard-muted); background: color-mix(in srgb, var(--post-blue) 7%, var(--dashboard-card)); border: 1px solid color-mix(in srgb, var(--post-blue) 24%, var(--dashboard-border)); border-radius: 9px; font-size: 11px; }
.post-active-filter span { display: inline-flex; align-items: center; gap: 6px; }
.post-active-filter span svg { width: 15px; height: 15px; color: var(--post-blue); }
.post-active-filter strong { color: var(--dashboard-text); }
.post-active-filter .post-button { min-height: 32px; padding: 0 9px; font-size: 10px; }

.post-insights { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); gap: 12px; }
.post-card { min-width: 0; padding: 16px; }
.post-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--dashboard-border); }
.post-card-head h2 { margin: 0; font-size: 15px; }
.post-card-head small { color: var(--dashboard-muted); }

.post-donut-wrap { min-height: 170px; display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 18px; }
.post-donut { width: 132px; height: 132px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--dashboard-border) 0 100%); }
.post-donut::after { content: ""; width: 82px; height: 82px; grid-area: 1/1; background: var(--dashboard-card); border-radius: 50%; }
.post-donut-center { z-index: 1; width: 82px; height: 82px; grid-area: 1/1; padding: 0; color: var(--dashboard-text); background: transparent; border: 0; border-radius: 50%; text-align: center; cursor: pointer; }
.post-donut-center:hover { background: color-mix(in srgb, var(--post-blue) 5%, transparent); }
.post-donut-center:focus-visible { outline: 3px solid color-mix(in srgb, var(--post-blue) 35%, transparent); outline-offset: 2px; }
.post-donut-center strong { display: block; font-size: 24px; }
.post-donut-center small { color: var(--dashboard-muted); }
.post-legend { display: grid; gap: 8px; }
.post-legend-row { width: 100%; display: grid; grid-template-columns: 8px 1fr auto 13px; align-items: center; gap: 8px; padding: 5px 6px; color: var(--dashboard-muted); background: transparent; border: 0; border-radius: 7px; font-size: 11px; text-align: left; cursor: pointer; }
.post-legend-row:hover { color: var(--dashboard-text); background: color-mix(in srgb, var(--post-blue) 6%, transparent); }
.post-legend-row:focus-visible { outline: 3px solid color-mix(in srgb, var(--post-blue) 24%, transparent); outline-offset: 1px; }
.post-legend-row > i:first-child { width: 8px; height: 8px; border-radius: 50%; }
.post-legend-row > svg { width: 13px; height: 13px; color: var(--post-blue); }
.post-legend-row strong { color: var(--dashboard-text); }


.post-workload { display: grid; gap: 9px; }
.post-workload-row { display: grid; grid-template-columns: minmax(100px, 1.5fr) minmax(60px, .8fr) 72px 16px; align-items: center; gap: 8px; font-size: 11px; }
.post-workload-row.header { color: var(--dashboard-muted); font-weight: 700; }
.post-workload-link { width: 100%; padding: 7px 6px; color: var(--dashboard-text); background: transparent; border: 0; border-radius: 8px; font: inherit; text-align: left; cursor: pointer; }
.post-workload-link:hover { background: color-mix(in srgb, var(--post-blue) 6%, transparent); }
.post-workload-link:focus-visible { outline: 3px solid color-mix(in srgb, var(--post-blue) 24%, transparent); outline-offset: 1px; }
.post-workload-link > svg { width: 16px; height: 16px; color: var(--post-blue); }
.post-workload-person { min-width: 0; }
.post-workload-link .post-workload-person strong { color: var(--post-blue); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--post-blue) 45%, transparent); text-underline-offset: 3px; }
.post-workload-person strong,
.post-workload-person span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-workload-person span { margin-top: 2px; color: var(--dashboard-muted); font-size: 10px; }
.post-workload-count { min-height: 26px; display: grid; place-items: center; background: color-mix(in srgb, var(--post-blue) 8%, transparent); border-radius: 6px; font-weight: 750; }


.post-pipeline-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.post-pipeline-heading h2 { margin: 0; font-size: 17px; }
.post-pipeline-heading p { margin: 3px 0 0; color: var(--dashboard-muted); font-size: 11px; }
.post-result-count { color: var(--dashboard-muted); font-size: 11px; }
.post-pipeline { display: grid; grid-template-columns: repeat(5, minmax(230px, 1fr)); gap: 12px; overflow-x: auto; padding: 2px 1px 12px; scroll-snap-type: x proximity; }
.post-column { min-width: 230px; padding: 11px; scroll-snap-align: start; }
.post-column-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; padding: 2px 2px 10px; border-bottom: 1px solid var(--dashboard-border); }
.post-column-head span { font-size: 12px; font-weight: 750; }
.post-column-head strong { min-width: 23px; height: 23px; display: grid; place-items: center; color: var(--dashboard-muted); background: var(--dashboard-bg); border-radius: 7px; font-size: 10px; }
.post-column-list { display: grid; align-content: start; gap: 9px; min-height: 110px; }

.post-project { padding: 12px; background: var(--dashboard-card); border: 1px solid var(--dashboard-border); border-top: 3px solid var(--post-blue); border-left: 4px solid var(--post-project-color, var(--post-blue)); border-radius: 9px; cursor: pointer; }
.post-project.is-due { border-top-color: var(--post-orange); }
.post-project.is-late { border-top-color: var(--post-red); }
.post-project.is-complete { border-top-color: var(--post-green); }
.post-project:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(16, 24, 40, .08); }
.post-project-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.post-project h3 { margin: 0; font-size: 12px; line-height: 1.35; }
.post-project-client { margin: 3px 0 0; color: var(--dashboard-muted); font-size: 10px; }
.post-job-code-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  padding: 0;
  color: var(--post-blue);
  background: transparent;
  border: 0;
  font-size: 9px;
  font-weight: 750;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.post-job-code-link svg { width: 11px; height: 11px; }
.post-button.post-job-code-link { min-height: 38px; margin-top: 0; padding: 0 12px; border: 1px solid var(--dashboard-border); text-decoration: none; }
.post-job-code-static { display: inline-block; margin-top: 5px; color: var(--dashboard-muted); font-size: 9px; font-weight: 750; }
.post-priority { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; background: var(--dashboard-bg); border-radius: 999px; color: var(--dashboard-muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.post-color-dot { width: 9px; height: 9px; display: inline-block; flex: 0 0 auto; border: 1px solid color-mix(in srgb, currentColor 20%, transparent); border-radius: 50%; }
.post-stage-select { width: 100%; margin: 10px 0; padding: 7px 8px; color: var(--dashboard-text); background: var(--dashboard-bg); border: 1px solid var(--dashboard-border); border-radius: 7px; font-size: 10px; }
.post-avatars { display: flex; align-items: center; min-height: 26px; margin-bottom: 9px; }
.post-avatar { width: 25px; height: 25px; display: grid; place-items: center; margin-right: -5px; color: #fff; background: #526a94; border: 2px solid var(--dashboard-card); border-radius: 50%; font-size: 8px; font-style: normal; font-weight: 800; }
.post-avatar-label { margin-left: 10px; color: var(--dashboard-muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-project-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 9px; }
.post-project-dates span { color: var(--dashboard-muted); font-size: 8px; }
.post-project-dates strong { display: block; margin-top: 2px; color: var(--dashboard-text); font-size: 9px; }
.post-progress { height: 5px; overflow: hidden; background: var(--dashboard-bg); border-radius: 999px; }
.post-progress i { display: block; height: 100%; background: var(--post-blue); border-radius: inherit; }
.post-project-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--dashboard-muted); font-size: 8px; }
.post-project-foot .late { color: var(--post-red); font-weight: 800; }
.post-project-foot .due { color: var(--post-orange); font-weight: 800; }

.post-empty { min-height: 110px; display: grid; place-items: center; padding: 16px; color: var(--dashboard-muted); text-align: center; font-size: 11px; }
.post-empty-wide { grid-column: 1 / -1; min-height: 180px; background: var(--dashboard-card); border: 1px dashed var(--dashboard-border); border-radius: 10px; }

.post-modal { position: fixed; inset: 0; z-index: 1600; display: grid; place-items: center; padding: 20px; background: rgba(15, 23, 42, .58); }
.post-modal[hidden] { display: none !important; }
.post-modal-card { width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 20px; }
.post-modal-card.detail { width: min(880px, 100%); }
.post-modal-card.post-metric-list-card { width: min(820px, 100%); }
.post-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--dashboard-border); }
.post-modal-head h2 { margin: 0; font-size: 20px; }
.post-modal-head p { margin: 4px 0 0; color: var(--dashboard-muted); font-size: 11px; }
.post-icon-close { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; color: var(--dashboard-text); background: transparent; border: 1px solid var(--dashboard-border); border-radius: 8px; cursor: pointer; }
.post-icon-close svg { width: 17px; height: 17px; }
.post-form { display: grid; gap: 14px; margin-top: 16px; }
.post-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.post-field { display: grid; gap: 6px; }
.post-field.full { grid-column: 1 / -1; }
.post-field label { color: var(--dashboard-muted); font-size: 10px; font-weight: 750; }
.post-field input,
.post-field select,
.post-field textarea { width: 100%; min-height: 40px; padding: 9px 10px; color: var(--dashboard-text); background: var(--dashboard-card); border: 1px solid var(--dashboard-border); border-radius: 8px; }
.post-field.is-invalid input,
.post-field.is-invalid select,
.post-field.is-invalid textarea { border-color: var(--post-red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--post-red) 12%, transparent); }
.post-field textarea { min-height: 78px; resize: vertical; }
.post-color-options { display: flex; flex-wrap: wrap; gap: 12px; padding: 3px 2px; }
.post-color-option { width: 42px; height: 42px; padding: 0; background: var(--post-project-color); border: 3px solid var(--dashboard-card); border-radius: 11px; box-shadow: 0 0 0 1px var(--dashboard-border); cursor: pointer; }
.post-color-option:hover { transform: translateY(-1px); }
.post-color-option.is-selected { box-shadow: 0 0 0 2px var(--dashboard-text), 0 0 0 5px var(--dashboard-card); }
.post-color-option:focus-visible { outline: 3px solid color-mix(in srgb, var(--post-blue) 30%, transparent); outline-offset: 4px; }
.post-checkboxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; max-height: 160px; overflow: auto; padding: 9px; background: var(--dashboard-bg); border-radius: 8px; }
.post-checkbox { display: flex; align-items: center; gap: 7px; font-size: 10px; }
.post-checkbox input { width: auto; min-height: 0; }
.post-form-error { margin: 0; color: var(--post-red); font-size: 11px; }
.post-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 14px; border-top: 1px solid var(--dashboard-border); }

.post-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.post-detail-item { padding: 10px; background: var(--dashboard-bg); border-radius: 8px; }
.post-detail-item span { display: block; color: var(--dashboard-muted); font-size: 9px; }
.post-detail-item strong { display: block; margin-top: 4px; font-size: 11px; }
.post-detail-color { display: flex !important; align-items: center; gap: 6px; }
.post-schedule-task.is-post-focus { outline: 3px solid color-mix(in srgb, var(--post-blue) 55%, transparent); outline-offset: 2px; animation: post-focus-pulse 1s ease-in-out 2; }
@keyframes post-focus-pulse { 50% { filter: brightness(1.12); transform: translateY(-1px); } }
.post-detail-section { margin-top: 16px; }
.post-detail-section h3 { margin: 0 0 9px; font-size: 13px; }
.post-history { display: grid; gap: 8px; }
.post-history-item { position: relative; padding: 9px 10px 9px 28px; background: var(--dashboard-bg); border-radius: 8px; font-size: 10px; }
.post-history-item::before { content: ""; position: absolute; left: 12px; top: 13px; width: 7px; height: 7px; background: var(--post-blue); border-radius: 50%; }
.post-history-item span { display: block; margin-top: 3px; color: var(--dashboard-muted); font-size: 9px; }
.post-version-list { display: flex; flex-wrap: wrap; gap: 7px; }
.post-version { padding: 6px 9px; background: var(--dashboard-bg); border-radius: 7px; font-size: 10px; }
.post-demo-badge { display: inline-flex; margin-left: 8px; padding: 3px 7px; color: #92400e; background: #fef3c7; border-radius: 999px; font-size: 9px; vertical-align: middle; }

.post-metric-project-list { display: grid; gap: 8px; margin-top: 14px; }
.post-metric-project-link { width: 100%; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 18px; align-items: center; gap: 10px; padding: 12px; color: var(--dashboard-text); background: var(--dashboard-card); border: 1px solid var(--dashboard-border); border-radius: 9px; text-align: left; cursor: pointer; }
.post-metric-project-link:hover { border-color: color-mix(in srgb, var(--post-blue) 45%, var(--dashboard-border)); background: color-mix(in srgb, var(--post-blue) 4%, var(--dashboard-card)); }
.post-metric-project-link:focus-visible { outline: 3px solid color-mix(in srgb, var(--post-blue) 22%, transparent); outline-offset: 1px; }
.post-metric-project-dot { width: 10px; height: 10px; border-radius: 50%; }
.post-metric-project-copy { min-width: 0; }
.post-metric-project-copy strong,
.post-metric-project-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-metric-project-copy strong { font-size: 12px; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--post-blue) 55%, transparent); text-underline-offset: 3px; }
.post-metric-project-copy span { margin-top: 4px; color: var(--dashboard-muted); font-size: 10px; }
.post-metric-project-stage { padding: 5px 8px; color: var(--dashboard-muted); background: var(--dashboard-bg); border-radius: 999px; font-size: 9px; font-weight: 750; white-space: nowrap; }
.post-metric-project-link > svg { width: 16px; height: 16px; color: var(--post-blue); }
.post-metric-list-empty { min-height: 150px; }

body.theme-dark .post-project:hover { box-shadow: 0 5px 18px rgba(0, 0, 0, .22); }

@media (max-width: 1180px) {
  .post-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .post-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .post-topbar { align-items: flex-start; flex-direction: column; }
  .post-toolbar { justify-content: flex-start; }
  .post-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-insights { grid-template-columns: 1fr; }
}

@media (hover: none) and (pointer: coarse), (max-width: 720px) {
  body[data-app-view="post-production"] .dashboard-page,
  body[data-app-view="post-production"] .dashboard-mobile-menu { display: block !important; }
  body[data-app-view="post-production"].dashboard-mobile-nav-open .app-sidebar { display: flex !important; }
  body[data-app-view="post-production"].dashboard-mobile-nav-open .dashboard-sidebar-backdrop { display: block !important; }
  body[data-app-view="post-production"] .dashboard-mobile-menu { display: grid !important; }
  body[data-app-view="post-production"] .dashboard-page { padding: 66px 12px 24px; }
  .post-shell { gap: 12px; }
  .post-topbar { padding: 14px; }
  .post-heading h1 { font-size: 22px; }
  .post-toolbar { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-toolbar .post-button.primary { grid-column: 1 / -1; }
  .post-control { min-width: 0; width: 100%; }
  .post-metrics { grid-template-columns: 1fr; }
  .post-active-filter { align-items: flex-start; flex-direction: column; }
  .post-metric { padding: 13px; }
  .post-metric strong { font-size: 24px; }
  .post-donut-wrap { grid-template-columns: 120px 1fr; gap: 10px; }
  .post-donut { width: 112px; height: 112px; }
  .post-donut::after { width: 70px; height: 70px; }
  .post-donut-center { width: 70px; height: 70px; }
  .post-pipeline-heading { align-items: flex-start; flex-direction: column; }
  .post-pipeline { grid-template-columns: repeat(5, minmax(82vw, 1fr)); }
  .post-column { min-width: 82vw; }
  .post-form-grid,
  .post-detail-grid { grid-template-columns: 1fr; }
  .post-metric-project-link { grid-template-columns: 9px minmax(0, 1fr) 16px; }
  .post-metric-project-stage { display: none; }
  .post-field.full { grid-column: auto; }
  .post-checkboxes { grid-template-columns: 1fr; }
  .post-modal { padding: 0; place-items: stretch; }
  .post-modal-card,
  .post-modal-card.detail { width: 100%; max-height: 100vh; min-height: 100vh; border-radius: 0; }
}

@media (max-width: 360px) {
  .post-toolbar { grid-template-columns: 1fr; }
  .post-toolbar .post-button.primary { grid-column: auto; }
  .post-donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .post-legend { width: 100%; }
}
