:root {
  --ink: #15202b;
  --muted: #62717d;
  --line: #dbe3e8;
  --surface: #ffffff;
  --soft: #f4f7f9;
  --brand: #0f766e;
  --brand-dark: #0b4f4b;
  --accent: #c76a15;
  --danger: #b42318;
  --ok: #15803d;
  --warn: #b7791f;
  --sidebar: #101820;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #eef3f5;
  color: var(--ink);
}

[hidden] { display: none !important; }

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: 28px 20px 26px;
  background-color: #F5F5F7;
  background-image: url("assets/brand/login-bg-marks.png");
  background-repeat: repeat;
  background-size: 340px 300px;
  color: #111;
  font-family: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.011em;
}

.login-shell {
  width: min(476px, 100%);
  display: flex;
  flex-direction: column;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.login-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 14px;
}

.login-logo {
  display: block;
  width: 230px;
  max-width: 100%;
  height: auto;
}

.login-project-word {
  margin-top: 8px;
  font-family: "Poppins", Inter, sans-serif;
  font-weight: 500;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: #C8161E;
}

.login-hero {
  text-align: center;
  padding: 22px 8px 20px;
}

.login-welcome {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
  font-weight: 450;
  color: #5C5C62;
}

.login-company {
  display: block;
  font-size: 1.65rem;
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -0.035em;
  color: #111;
}

.login-card {
  display: block;
  padding: 22px 22px 24px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04), 0 8px 28px rgba(17, 17, 17, 0.07);
}

.login-card label {
  display: block;
  margin: 16px 0 7px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #5C5C62;
}

.login-card label:first-of-type { margin-top: 0; }

.login-field { position: relative; }

.login-field input {
  width: 100%;
  min-height: 50px;
  padding: 12px 12px 12px 42px;
  border: 1px solid #E6E6EA;
  border-radius: 12px;
  background: #fff;
  font-size: 16px;
}

.login-field input:focus {
  outline: none;
  border-color: #C8102E;
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.16);
}

.login-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #8A8A90;
  pointer-events: none;
}

.login-field-icon svg { display: block; width: 18px; height: 18px; }

.login-card .login-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 20px;
  border: 0;
  border-radius: 14px;
  background: #C8102E;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.login-card .login-submit:hover { background: #A40D25; }

.login-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #F8E6EA;
  color: #C8102E;
  font-size: 14px;
  font-weight: 500;
}

.login-thanks {
  margin: auto 8px 0;
  padding-top: 28px;
  text-align: center;
  color: #8A8A90;
  font-size: 0.8rem;
  line-height: 1.45;
}

.demo-accounts {
  margin-top: 16px;
  border-top: 1px solid #EEE;
  padding-top: 12px;
  text-align: center;
}

.demo-accounts summary { color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 800; }
.demo-accounts p { margin: 10px 0; font-size: 12px; }
.demo-accounts button {
  margin: 0 4px 5px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
}

.supabase-status-card {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 14px;
}

.supabase-setup-panel {
  grid-column: 1 / -1;
}

.supabase-schema-panel {
  grid-column: 1 / -1;
}

.supabase-setup-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 1fr);
  margin: 16px 0 12px;
}

.supabase-readiness-card {
  margin-top: 14px;
}

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

.readiness-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.readiness-item span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.readiness-item.ready {
  border-color: rgba(21, 128, 61, 0.28);
  background: #f0fdf4;
}

.readiness-item.ready span {
  color: var(--ok);
}

.readiness-item strong,
.readiness-item small {
  display: block;
}

.readiness-item small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.supabase-schema-status-result {
  margin-top: 14px;
}

.schema-ready-summary {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 14px;
}

.schema-ready-summary.ready {
  background: #f0fdf4;
  border-color: rgba(21, 128, 61, 0.28);
}

.schema-ready-summary.not-ready {
  background: #fff7ed;
  border-color: rgba(180, 83, 9, 0.3);
}

.schema-ready-summary span,
.schema-ready-summary small {
  color: var(--muted);
}

.schema-ready-summary span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.schema-ready-summary strong {
  font-size: 26px;
}

.schema-status-table td,
.schema-status-table th {
  white-space: nowrap;
}

.supabase-user-management {
  display: grid;
  gap: 14px;
}

.cloud-user-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cloud-user-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cloud-user-form .user-row-actions {
  align-items: end;
}

.cloud-user-table td,
.cloud-user-table th {
  white-space: nowrap;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; }

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 16px;
  background: var(--sidebar);
  color: #f8fafc;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f4b942;
  color: var(--sidebar);
  font-weight: 900;
}

.brand strong, .brand span { display: block; }
.brand span, .sidebar-note { color: #b6c4cf; font-size: 13px; }

nav { display: grid; gap: 6px; }

.nav-item {
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d8e2ea;
  text-align: left;
}

.nav-item.active, .nav-item:hover {
  background: #24313b;
  color: #fff;
}

.sidebar-note {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #30404c;
  line-height: 1.45;
}

main {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 30px; }
h2 { margin-bottom: 14px; font-size: 18px; }
h3 { margin-bottom: 10px; font-size: 15px; }

.top-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.signed-in-user {
  min-height: 38px;
  display: grid;
  align-content: center;
  padding: 4px 10px;
  border-left: 1px solid var(--line);
}

.signed-in-user span,
.signed-in-user strong { display: block; }
.signed-in-user span { font-size: 12px; }
.signed-in-user strong { color: var(--muted); font-size: 11px; }

.notification-center {
  position: relative;
}

.notification-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  white-space: nowrap;
}

.notification-button.has-alerts {
  border-color: rgba(196, 127, 0, 0.35);
  box-shadow: 0 0 0 3px rgba(255, 192, 0, 0.12);
}

.notification-count {
  align-items: center;
  background: #c47f00;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 6px;
}

.notification-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(420px, 88vw);
  z-index: 30;
}

.notification-panel-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
}

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

.notification-list {
  display: grid;
  gap: 8px;
  padding-top: 10px;
}

.notification-item {
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 10px;
}

.notification-item div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notification-item span,
.notification-item small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.notification-item small {
  color: var(--teal);
  font-weight: 800;
}

.notification-title-line {
  align-items: center;
  display: flex !important;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.notification-title-line small {
  background: #eef5f4;
  border-radius: 999px;
  color: var(--teal);
  display: inline-flex;
  font-size: 10px;
  line-height: 1;
  padding: 5px 7px;
  text-transform: uppercase;
}

.notification-outlet {
  font-weight: 800;
}

.notification-action {
  color: var(--ink) !important;
  line-height: 1.35;
}

.notification-detail {
  line-height: 1.35;
}

.notification-time {
  color: #c47f00 !important;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

select, input, textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}

select:disabled, input:disabled, textarea:disabled, button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

textarea {
  min-height: 76px;
  padding-top: 10px;
  resize: vertical;
}

.primary, .secondary {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 800;
}

.primary { background: var(--brand); color: #fff; }
.primary:hover { background: var(--brand-dark); }
.secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.danger-button {
  min-height: 38px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--danger);
  font-weight: 800;
}

.view { display: none; }
.view.active { display: block; }

.panel, .kpi {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(16, 24, 32, 0.05);
}

.panel { padding: 18px; }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-head h2 { margin-bottom: 0; }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e7f5f2;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.muted { background: #edf2f5; color: #536370; }
.badge.danger { background: #fee4e2; color: var(--danger); }
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.warn { background: #fef3c7; color: var(--warn); }

.badge.photo-status.ok { background: #dcfce7; color: #15803d; }
.badge.photo-status.warn { background: #fef3c7; color: #b7791f; }
.badge.photo-status.danger { background: #fee4e2; color: #b42318; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.kpi { padding: 16px; }
.kpi span, .kpi small { display: block; color: var(--muted); }
.kpi strong { display: block; margin: 7px 0; font-size: 27px; }

.dashboard-section {
  margin-bottom: 24px;
}

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

.section-heading h2 {
  margin-bottom: 0;
}

.campaign-overview-grid {
  grid-template-columns: repeat(6, minmax(125px, 1fr));
  gap: 10px;
}

.inactive-summary {
  display: flex;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-group > strong {
  color: var(--ink);
}

.workflow-funnel-panel {
  margin-bottom: 24px;
  padding: 22px;
}

.workflow-funnel {
  display: grid;
  grid-template-columns: repeat(7, minmax(110px, 1fr));
  gap: 18px;
  padding-bottom: 4px;
}

.funnel-step {
  position: relative;
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px 12px;
  border: 1px solid #d2dedf;
  border-radius: 8px;
  background: #f7faf9;
  text-align: center;
}

.funnel-step:not(:last-child)::after {
  content: ">";
  position: absolute;
  top: 50%;
  right: -19px;
  width: 19px;
  color: var(--brand);
  font-size: 19px;
  font-weight: 900;
  transform: translateY(-50%);
}

.funnel-step small {
  color: var(--brand);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.funnel-step span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
}

.funnel-step strong {
  font-size: 29px;
}

.action-queue-panel {
  margin-bottom: 24px;
  padding: 22px;
}

.dashboard-grid, .admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 16px;
  margin-bottom: 16px;
}

.dashboard-grid .panel:last-child {
  grid-column: 1 / -1;
}

.management-panel {
  margin-bottom: 16px;
}

.management-filters {
  display: flex;
  gap: 8px;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.management-filters label {
  width: 150px;
}

.management-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.management-summary article {
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.management-summary span,
.region-stats span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.management-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.region-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.region-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

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

.workflow-bars, .action-list, .campaign-list, .stage-board, .role-matrix {
  display: grid;
  gap: 10px;
}

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

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

.action-queue-groups {
  display: grid;
  gap: 16px;
}

.action-queue-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}

.action-queue-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.action-queue-card {
  display: grid;
  gap: 5px;
  min-height: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.action-queue-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(18, 125, 114, 0.12);
}

.action-queue-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-queue-card strong {
  font-size: 28px;
  line-height: 1;
}

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

.action-queue-results {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.panel-head.compact {
  padding: 0;
  margin-bottom: 0;
}

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

.action-item-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 12px;
}

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

.action-item-head > strong {
  color: var(--ink);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.action-item-section {
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.action-item-section h4 {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-outlet-name {
  display: block;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.action-location-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 5px;
  color: var(--brand-deep);
  font-size: 12px;
  font-weight: 800;
}

.action-address {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.action-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 14px;
  margin: 0;
}

.action-spec-grid div {
  min-width: 0;
}

.action-spec-grid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.action-spec-grid dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.action-spec-grid .action-spec-wide {
  grid-column: 1 / -1;
}

.action-artwork-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border-radius: 6px;
  background: var(--soft);
}

.action-artwork-line > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.action-artwork-line a {
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: right;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.action-item-actions {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.health-check-panel {
  display: grid;
  gap: 16px;
}

.health-summary-grid,
.health-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.health-summary-card,
.health-category-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.health-summary-card span,
.health-category-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.health-summary-card strong,
.health-category-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.health-summary-card.critical {
  border-color: rgba(181, 66, 66, 0.32);
  background: #fff7f6;
}

.health-summary-card.warning {
  border-color: rgba(187, 124, 0, 0.32);
  background: #fffaf0;
}

.health-summary-card.info {
  background: var(--soft);
}

.health-summary-card.ready {
  border-color: rgba(18, 125, 114, 0.28);
  background: #f1fbf8;
}

.health-summary-card.not-ready {
  border-color: rgba(181, 66, 66, 0.32);
  background: #fff7f6;
}

.health-filter-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.health-filter-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.health-filter-panel select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

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

.health-issue-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.health-issue-card header,
.health-issue-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.health-issue-card header > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.health-issue-card header strong {
  overflow-wrap: anywhere;
}

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

.health-issue-grid div {
  min-width: 0;
  padding: 9px;
  border-radius: 7px;
  background: var(--soft);
}

.health-issue-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.health-issue-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.health-issue-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.restore-validation-panel {
  display: grid;
  gap: 14px;
}

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

.restore-upload-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.restore-upload-card input {
  width: 100%;
  min-height: 40px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

.restore-validation-result {
  display: grid;
  gap: 12px;
}

.restore-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.restore-status-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.restore-status-card.danger {
  border-color: rgba(181, 66, 66, 0.32);
  background: #fff7f6;
}

.restore-file-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.restore-file-readout span {
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.small-button {
  min-height: 32px;
  padding: 7px 9px;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .action-item-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .action-spec-grid {
    grid-template-columns: 1fr;
  }

  .action-spec-grid .action-spec-wide {
    grid-column: auto;
  }

  .action-artwork-line {
    align-items: flex-start;
    flex-direction: column;
  }

  .action-artwork-line a {
    text-align: left;
  }
}

.workflow-row {
  display: grid;
  grid-template-columns: 150px minmax(160px, 1fr) 56px;
  gap: 10px;
  align-items: center;
}

.operation-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.operation-summary-grid article {
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.operation-summary-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.operation-summary-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}

.track {
  height: 12px;
  border-radius: 999px;
  background: #e6edf1;
  overflow: hidden;
}

.fill {
  height: 100%;
  background: var(--brand);
}

.action-card, .campaign-card, .item-card, .outlet-card, .role-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.action-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.action-card strong, .action-card span { display: block; }
.action-card span, .muted-text, small { color: var(--muted); }

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

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

.outlet-card button {
  justify-self: start;
}

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

.mini-progress .track { height: 8px; }

.inline-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.search { max-width: 340px; }

.outlet-filter-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}

.outlet-filter-panel label {
  min-width: 0;
}

.outlet-filter-panel select {
  min-height: 38px;
}

.outlet-filter-panel button {
  white-space: nowrap;
}

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

.revision-history-list h4 {
  margin: 0;
}

.revision-history-list article {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfb;
  font-size: 12px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 16px;
}

.split-layout.poster-editing {
  grid-template-columns: minmax(260px, 0.7fr) minmax(620px, 1.3fr);
}

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

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th, td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: var(--soft);
  color: #536370;
  font-size: 12px;
  text-transform: uppercase;
}

td.number { text-align: right; font-variant-numeric: tabular-nums; }
tr[data-outlet-id] { cursor: pointer; }
tr[data-outlet-id]:hover { background: #f8fbfb; }

.detail-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 14px;
}

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

.master-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.master-edit-form label:nth-child(3),
.master-edit-form .overview-upload {
  grid-column: 1 / -1;
}

.overview-upload small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.form-actions,
.item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.form-actions {
  grid-column: 1 / -1;
}

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

.item-card.expanded {
  gap: 14px;
  border-color: var(--primary);
  box-shadow: 0 14px 32px rgba(18, 125, 114, 0.16);
}

.item-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.item-head-actions {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.poster-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.poster-summary-grid div {
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
}

.poster-summary-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.poster-summary-grid strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.master-item-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(74px, 0.7fr));
  gap: 8px;
}

.master-item-grid.visual-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.detail-panel .master-item-grid,
.detail-panel .master-item-grid.visual-grid,
.detail-panel .upload-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-panel .item-card.expanded .master-item-grid {
  grid-template-columns: 1.4fr repeat(3, minmax(110px, 0.8fr));
}

.detail-panel .item-card.expanded .master-item-grid.visual-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-panel .item-card.expanded .upload-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-page {
  display: grid;
  gap: 14px;
}

.detail-toolbar,
.detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-toolbar {
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 24, 32, 0.05);
}

.detail-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tab-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.tab-button.active {
  border-color: #b7d8d4;
  background: #e7f5f2;
  color: var(--brand-dark);
}

.detail-tab-content {
  display: grid;
  gap: 14px;
}

.detail-hero,
.info-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 24, 32, 0.05);
}

.detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 22px;
}

.poster-detail-hero {
  padding: 14px 16px;
}

.poster-header-meta {
  color: var(--muted);
  display: grid;
  gap: 4px;
  line-height: 1.35;
}

.poster-header-meta span:first-child {
  color: var(--ink);
  font-weight: 900;
}

.detail-hero h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.detail-hero p {
  margin-bottom: 0;
  max-width: 920px;
  color: var(--muted);
  line-height: 1.45;
}

.detail-progress {
  min-width: 220px;
}

.outlet-detail-grid,
.poster-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 55fr) minmax(360px, 45fr);
  gap: 14px;
  align-items: start;
}

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

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

.compact-poster-detail-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-poster-detail-layout .poster-photo-panel,
.compact-poster-detail-layout .poster-workflow-panel {
  grid-column: 1 / -1;
}

.compact-poster-detail-layout textarea {
  min-height: 76px;
}

.compact-poster-detail-layout .poe-checklist {
  margin: 12px 0;
}

.poster-workflow-panel {
  grid-column: 1 / -1;
}

.poster-detail-tabs {
  margin: 12px 0 16px;
}

.poster-tab-panel {
  display: none;
  grid-column: 1 / -1;
}

.poster-tab-panel.active {
  display: block;
}

.single-photo-row {
  margin-top: 14px;
  grid-template-columns: minmax(220px, 360px);
}

.workflow-tracker {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.workflow-step {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 4px;
}

.workflow-step span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-step strong {
  font-size: 14px;
}

.workflow-step.completed {
  border-color: rgba(18, 125, 114, 0.25);
  background: rgba(18, 125, 114, 0.08);
}

.workflow-step.in-progress {
  border-color: rgba(196, 127, 0, 0.28);
  background: rgba(255, 192, 0, 0.12);
}

.workflow-step.pending {
  background: var(--soft);
}

.workflow-stage-card {
  position: relative;
}

.workflow-stage-card::after {
  content: attr(data-role-stage);
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.workflow-stage-card .card-title-row {
  padding-right: 140px;
}

.poe-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.single-photo-row {
  margin-top: 12px;
  grid-template-columns: minmax(240px, 360px);
}

.visual-compare-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.visual-compare-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.visual-refresh-arrow {
  display: grid;
  place-items: center;
  color: var(--brand);
  font-size: 24px;
  font-weight: 900;
}

.visual-meta-grid {
  margin-top: 10px;
}

.info-card {
  padding: 16px;
}

.info-card h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

.card-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.card-title-row h2 {
  margin-bottom: 4px;
  font-size: 20px;
}

.form-grid {
  display: grid;
  gap: 10px 12px;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

.overview-card {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.overview-card .photo-upload-card {
  width: 100%;
}

.progress-field {
  min-height: 38px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.location-review-note {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #f1c36d;
  border-radius: 8px;
  background: #fff7e6;
  color: #7a4f00;
  font-weight: 900;
}

.poster-section-panel {
  padding: 16px;
}

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

.poster-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(16, 24, 32, 0.04);
}

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

.poster-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.poster-card-head strong {
  font-size: 18px;
}

.poster-card-head span {
  margin-top: 4px;
  font-weight: 800;
}

.poster-card-head small {
  margin-top: 4px;
}

.poster-detail-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.poster-detail-list div {
  min-width: 0;
  padding: 8px;
  border-radius: 8px;
  background: var(--soft);
}

.poster-detail-list dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.poster-detail-list dd {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.readonly-field {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.readonly-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.readonly-field strong {
  overflow-wrap: anywhere;
}

.readonly-reference-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.readonly-reference-grid .readonly-field:nth-child(7) {
  grid-column: 1 / -1;
}

.poster-info-card-grid,
.poster-production-layout,
.poster-installation-layout,
.poster-rework-layout,
.poster-client-artwork-layout {
  display: grid;
  gap: 12px;
}

.poster-info-card-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 14px;
}

.poster-info-card-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.poster-edit-fields {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.poster-client-artwork-layout,
.poster-production-layout,
.poster-installation-layout,
.poster-rework-layout {
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
}

.poster-section-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.poster-section-card h4 {
  font-size: 14px;
  margin: 0;
}

.workflow-action-panel {
  align-content: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workflow-action-panel h4,
.workflow-action-panel .artwork-revision-alert {
  grid-column: 1 / -1;
}

.workflow-action-panel label {
  min-width: 0;
}

.workflow-action-panel textarea {
  min-height: 76px;
}

.visual-reference-panel {
  align-content: start;
}

.visual-refresh-arrow {
  display: none;
}

.visual-reference-photo-card {
  display: grid;
  gap: 8px;
}

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

.visual-reference-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.visual-reference-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.visual-reference-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.visual-reference-thumb {
  aspect-ratio: 16 / 10;
  background: #f7fafb;
  border: 1px dashed #c9d5dd;
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  min-height: 220px;
  overflow: hidden;
  padding: 0;
  place-items: center;
  width: 100%;
}

.visual-reference-thumb img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.visual-reference-photo-card small {
  color: var(--muted);
  font-weight: 800;
}

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

.rework-history-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.rework-history-list span,
.rework-history-list p {
  color: var(--muted);
  margin: 0;
}

.poster-card-photos,
.poster-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.poster-card-grid.compact .poster-card {
  box-shadow: none;
}

.poster-photo-panel {
  grid-column: 1 / -1;
}

.poster-detail-actions {
  margin-top: 14px;
}

.photo-upload-card {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.photo-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.photo-thumb {
  width: 100%;
  max-width: 160px;
  height: 110px;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #c9d5dd;
  border-radius: 8px;
  background: #f7fafb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.overview-card .photo-thumb {
  width: min(100%, 420px);
  max-width: 420px;
  height: 260px;
}

.photo-thumb.has-image {
  border-style: solid;
  background: #fff;
  cursor: zoom-in;
}

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

.photo-upload-card input[type="file"] {
  min-height: 40px;
  padding: 8px;
}

.photo-upload-card small {
  min-height: 16px;
  overflow-wrap: anywhere;
}

.photo-remove-button {
  justify-self: start;
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.photo-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-small-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.artwork-thumb span {
  padding: 0 8px;
  overflow-wrap: anywhere;
}

.outlet-info-form input,
.outlet-info-form select {
  min-height: 36px;
}

.outlet-info-form textarea {
  min-height: 66px;
}

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

.history-row {
  display: grid;
  grid-template-columns: 130px minmax(180px, 0.6fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.history-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.history-row small {
  overflow-wrap: anywhere;
}

.detail-panel .master-item-grid label:first-child,
.detail-panel .master-item-grid.visual-grid label:nth-child(3) {
  grid-column: 1 / -1;
}

.detail-panel .item-card.expanded .master-item-grid label:first-child,
.detail-panel .item-card.expanded .master-item-grid.visual-grid label:nth-child(3) {
  grid-column: auto;
}

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

.upload-grid input {
  padding: 8px;
}

.legacy-size-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.legacy-size-row span {
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--soft);
}

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

.item-spec div {
  padding: 9px;
  border-radius: 8px;
  background: var(--soft);
}

.item-spec span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

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

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

.stage-column {
  min-height: 260px;
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.stage-column h3 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.stage-card {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.thumb-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.thumb {
  width: 64px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(135deg, #dbeafe, #fef3c7);
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}

.poe-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.export-format {
  min-width: 170px;
}

.poe-report {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.poe-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 2px solid var(--sidebar);
}

.poe-head strong, .poe-head span { display: block; }
.poe-head strong { font-size: 28px; }
.poe-head span, .poe-head p { color: var(--muted); }

.poe-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.poe-summary div {
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
}

.poe-summary span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.poe-summary strong { font-size: 22px; }

.poe-outlet-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.poe-outlet-summary div {
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
}

.poe-outlet-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.poe-outlet-summary strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.35;
}

.poe-outlet {
  page-break-inside: avoid;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 16px;
}

.poe-preview-table-wrap {
  overflow-x: auto;
  margin: 12px 0 18px;
}

.poe-preview-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 11px;
}

.poe-preview-table th,
.poe-preview-table td {
  border: 1px solid #111;
  padding: 6px;
  text-align: center;
  vertical-align: middle;
}

.poe-preview-table th:nth-child(-n+3) { background: #ffff00; }
.poe-preview-table th:nth-child(n+4):nth-child(-n+6) { background: #70ad47; }
.poe-preview-table th:nth-child(7) { background: #ffc000; }
.poe-preview-table th:nth-child(n+8) { background: #ff00ff; color: #fff; }
.poe-preview-table td { background: #ffe699; }

.poe-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 8px 12px 0;
  border-bottom: 10px solid #70ad47;
  color: #595959;
  font-size: 12px;
}

.poe-footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.poe-footer-brand img {
  display: block;
  width: 54px;
  height: 18px;
  object-fit: contain;
}

.poe-footer-brand span {
  color: #808080;
  font-size: 12px;
  letter-spacing: 0;
}

.poe-overview-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 18px;
  align-items: center;
  margin: 14px 0 18px;
}

.poe-overview-preview strong {
  font-size: 18px;
}

.poe-overview-photo {
  min-height: 240px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f7f9;
  color: #536370;
  font-weight: 900;
}

.poe-overview-photo img,
.photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.poe-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.photo-triplet {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.photo-box {
  min-height: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #edf2f5;
  color: #4a5965;
  font-weight: 800;
  text-align: center;
}

.code-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 8px;
  background: #101820;
  color: #e6edf1;
  overflow-x: auto;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #101820;
  color: #fff;
  box-shadow: 0 12px 28px rgba(16, 24, 32, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 24, 32, 0.58);
}

.modal-backdrop[hidden] {
  display: none;
}

.quick-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 42;
  display: flex;
  justify-content: flex-end;
  background: rgba(16, 24, 32, 0.36);
}

.quick-drawer-backdrop[hidden] {
  display: none;
}

.quick-drawer {
  width: min(560px, 100vw);
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #f7fafb;
  box-shadow: -20px 0 60px rgba(16, 24, 32, 0.28);
  overflow: hidden;
}

.quick-drawer-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.quick-drawer-head h2 {
  margin-bottom: 0;
}

.quick-drawer-body {
  min-height: 0;
  overflow: auto;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.quick-drawer-section,
.quick-drawer-footer {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 24, 32, 0.05);
}

.quick-drawer-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.quick-drawer-section-head h3 {
  margin: 0;
  font-size: 16px;
}

.quick-drawer-reference-grid,
.quick-drawer-status-grid,
.quick-drawer-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-drawer-field,
.quick-drawer-status-grid > div {
  min-width: 0;
  padding: 10px;
  border-radius: 7px;
  background: var(--soft);
}

.quick-drawer-field span,
.quick-drawer-status-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-drawer-field strong,
.quick-drawer-status-grid strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.quick-drawer .visual-reference-photo-card {
  margin-top: 12px;
}

.quick-drawer .visual-reference-thumb {
  min-height: 220px;
}

.quick-drawer-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.quick-drawer-label input,
.quick-drawer-label textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.quick-drawer-label input {
  min-height: 40px;
  padding: 9px 10px;
}

.quick-drawer-label textarea {
  resize: vertical;
  min-height: 78px;
  padding: 9px 10px;
}

.quick-drawer-actions,
.quick-drawer-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-drawer-actions {
  margin-top: 12px;
}

.quick-drawer-footer {
  position: sticky;
  bottom: 0;
  z-index: 1;
  justify-content: flex-end;
}

.poster-modal {
  width: min(920px, 100%);
  max-height: min(840px, calc(100vh - 40px));
  overflow: auto;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(16, 24, 32, 0.3);
}

.image-preview-modal {
  position: relative;
  width: min(1120px, 96vw);
  max-height: 92vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 10px;
  background: #0b1117;
  box-shadow: 0 24px 80px rgba(16, 24, 32, 0.36);
  overflow: hidden;
}

.image-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
}

.image-preview-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-preview-modal img {
  max-width: 100%;
  max-height: calc(92vh - 54px);
  object-fit: contain;
  display: block;
  justify-self: center;
  align-self: center;
}

.image-preview-close {
  flex: 0 0 auto;
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.modal-head h2 {
  margin-bottom: 0;
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
}

#posterModalBody {
  padding: 20px;
}

.poster-editor-form {
  display: grid;
  gap: 16px;
}

.editor-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.editor-section h3 {
  margin-bottom: 12px;
}

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

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

.poster-editor-form input,
.poster-editor-form select {
  min-height: 46px;
  font-size: 15px;
}

.poster-editor-form input[type="file"] {
  padding: 10px;
}

.modal-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 0 0;
  background: #fff;
}

.ppt-import-panel {
  grid-column: 1 / -1;
}

.ppt-import-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 18px 0;
}

.ppt-file-picker {
  flex: 1 1 520px;
}

.ppt-file-picker input {
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ppt-import-preview {
  display: grid;
  gap: 16px;
}

.ppt-import-loading,
.ppt-import-error,
.ppt-import-notice,
.ppt-warning-list {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #cfdde3;
  border-radius: 8px;
  background: #f4f8fa;
}

.ppt-import-error {
  border-color: #efb7b7;
  background: #fff4f4;
  color: #9d2727;
}

.ppt-import-notice {
  border-color: #b8ddd6;
  background: #effaf7;
  color: #126f62;
  font-weight: 800;
}

.ppt-import-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.8fr) repeat(7, minmax(105px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.ppt-import-summary > div {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 78px;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

.ppt-import-summary > div:last-child {
  border-right: 0;
}

.ppt-import-summary span,
.ppt-outlet-comparison span,
.ppt-photo-detection span {
  color: var(--muted);
  font-size: 12px;
}

.ppt-import-summary strong {
  overflow-wrap: anywhere;
  font-size: 20px;
}

.ppt-import-summary > div:first-child strong {
  font-size: 14px;
}

.ppt-import-summary small {
  color: var(--muted);
  font-size: 11px;
}

.ppt-review-section {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ppt-review-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ppt-review-heading h3 {
  margin-bottom: 0;
}

.ppt-low-confidence-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ppt-low-confidence-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.4fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid #efc0bd;
  border-radius: 8px;
  background: #fff8f7;
}

.ppt-low-confidence-info,
.ppt-review-actions {
  display: grid;
  align-content: start;
  gap: 6px;
}

.ppt-low-confidence-info .badge {
  justify-self: start;
}

.ppt-review-actions label {
  display: grid;
  gap: 5px;
}

.ppt-review-actions select {
  min-height: 42px;
}

.ppt-review-choice {
  color: var(--muted);
  font-size: 13px;
}

.ppt-poster-coverage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px;
}

.ppt-poster-coverage-summary > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fa;
}

.ppt-poster-coverage-summary span {
  color: var(--muted);
  font-size: 12px;
}

.ppt-poster-coverage-summary strong {
  font-size: 22px;
}

.ppt-table-only-rows {
  margin: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fa;
}

.ppt-table-only-rows summary {
  cursor: pointer;
  font-weight: 800;
}

.ppt-code-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ppt-detected-outlets {
  display: grid;
  gap: 12px;
}

.ppt-detected-outlet {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.ppt-detected-outlet > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 16px;
  cursor: pointer;
  background: #f7f9fa;
}

.ppt-detected-outlet > summary > span:first-child {
  display: grid;
  gap: 3px;
}

.ppt-detected-outlet > summary small {
  color: var(--muted);
}

.ppt-match-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  text-align: right;
}

.ppt-detected-outlet[open] {
  padding-bottom: 18px;
}

.ppt-detected-outlet[open] > summary {
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.ppt-detected-outlet > h3,
.ppt-detected-outlet > .ppt-outlet-comparison,
.ppt-detected-outlet > .ppt-warning-list,
.ppt-detected-outlet > .ppt-preview-table-wrap,
.ppt-detected-outlet > .ppt-photo-detection-grid {
  margin-right: 16px;
  margin-left: 16px;
}

.ppt-detected-outlet > h3 {
  margin-top: 20px;
  margin-bottom: 10px;
}

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

.ppt-outlet-comparison > div {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ppt-warning-list {
  margin-top: 12px;
  border-color: #efd38c;
  background: #fff9e9;
  color: #795800;
}

.ppt-preview-table th,
.ppt-preview-table td {
  vertical-align: middle;
}

.ppt-code-mismatch {
  color: var(--danger);
  font-weight: 800;
}

.ppt-photo-detection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ppt-photo-detection {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 10px;
  min-height: 104px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.ppt-photo-thumb {
  width: 116px;
  height: 84px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: #e7edef;
}

.ppt-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ppt-photo-detection > div {
  display: grid;
  align-content: start;
  gap: 3px;
  min-width: 0;
}

.ppt-photo-detection .badge {
  justify-self: start;
  margin-top: 2px;
}

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

.user-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.user-row-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.operations-poster-page {
  display: grid;
  gap: 18px;
}

.operations-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.operations-spec-grid > div {
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.operations-spec-grid .wide {
  grid-column: span 2;
}

.operations-spec-grid dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.operations-spec-grid dd {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.operations-photo-block {
  margin-top: 14px;
  max-width: 360px;
}

.operations-remark {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  max-width: 720px;
}

.operations-remark textarea {
  min-height: 86px;
}

.operations-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.artwork-revision-alert {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff4f2;
  color: var(--danger);
}

.artwork-revision-alert span {
  font-size: 12px;
  line-height: 1.4;
}

.rework-panel {
  grid-column: 1 / -1;
}

.workflow-reset-panel {
  align-self: start;
}

.backup-export-panel {
  align-self: start;
  border-color: rgba(18, 125, 114, 0.24);
}

.full-migration-export-panel {
  align-self: start;
  border-color: rgba(18, 125, 114, 0.24);
}

.migration-dry-run-panel {
  align-self: start;
  border-color: rgba(59, 130, 246, 0.24);
}

.supabase-import-panel {
  align-self: start;
  border-color: rgba(245, 158, 11, 0.28);
}

.supabase-verification-panel {
  align-self: start;
  border-color: rgba(34, 197, 94, 0.26);
}

.supabase-mode-switch-panel {
  align-self: start;
  border-color: rgba(220, 38, 38, 0.22);
}

.backup-export-panel > p,
.backup-export-panel > small,
.full-migration-export-panel > p,
.full-migration-export-panel > small,
.migration-dry-run-panel > p,
.supabase-import-panel > p,
.supabase-import-panel > small,
.supabase-verification-panel > p,
.supabase-mode-switch-panel > p {
  color: var(--muted);
  line-height: 1.55;
}

.backup-export-panel .primary,
.full-migration-export-panel .primary {
  justify-self: start;
}

.full-migration-export-result {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.migration-dry-run-result {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.supabase-import-result {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.supabase-verification-result {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.supabase-mode-switch-result {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

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

.supabase-import-panel textarea {
  width: 100%;
  min-height: 220px;
  font-family: Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.migration-count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.workflow-reset-panel > p {
  color: var(--muted);
  line-height: 1.55;
}

.workflow-reset-confirm {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid #f5c2bd;
  border-radius: 8px;
  background: #fff8f7;
  color: var(--ink);
  line-height: 1.4;
}

.workflow-reset-confirm input {
  width: 18px;
  min-height: 18px;
  margin: 1px 0 0;
  flex: 0 0 18px;
}

.workflow-reset-panel .danger-button {
  width: 100%;
}

.poe-pdf-print-deck {
  display: none;
}

.poe-pdf-print-deck,
.poe-pdf-slide,
.poe-pdf-table th,
.poe-pdf-table td,
.poe-pdf-star,
.poe-pdf-arrow,
.poe-pdf-footer-bar,
.poe-pdf-divider {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  color-adjust: exact;
}

.poe-pdf-slide {
  background: #fff;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  height: 7.5in;
  overflow: hidden;
  page-break-after: always;
  position: relative;
  width: 13.333333in;
}

.poe-pdf-cover-logo {
  object-fit: contain;
}

.poe-pdf-cover-title {
  line-height: 1;
}

.poe-pdf-cover-subtitle {
  line-height: 1.1;
}

.poe-pdf-top-info {
  position: static;
}

.poe-pdf-top-label,
.poe-pdf-top-value {
  line-height: 1.15;
}

.poe-pdf-table {
  border-collapse: collapse;
  table-layout: fixed;
}

.poe-pdf-table th,
.poe-pdf-table td {
  border: 1px solid #000;
  box-sizing: border-box;
  color: inherit;
  line-height: 1.1;
  overflow: hidden;
  padding: 0.03in 0.04in;
  text-align: center;
  text-transform: none;
  vertical-align: middle;
  word-break: normal;
}

.poe-pdf-table th {
  font-weight: 700;
  text-transform: none;
}

.poe-pdf-table td {
  white-space: nowrap;
}

.poe-pdf-table td {
  background: #ffe699;
}

.poe-pdf-overview-photo {
  overflow: hidden;
}

.poe-pdf-photo {
  background: #edf2f5;
  border: 1px solid #cbd5df;
  color: #536370;
  display: grid;
  font-size: 0.14in;
  font-weight: 700;
  height: 100%;
  line-height: 1.2;
  object-fit: cover;
  place-items: center;
  text-align: center;
  width: 100%;
}

.poe-pdf-install-line {
  display: flex;
  align-items: center;
  gap: 0.05in;
}

.poe-pdf-install-status {
  display: flex;
  align-items: center;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14pt;
  line-height: 1;
  white-space: nowrap;
}

.poe-pdf-star {
  background: #ffe599;
  clip-path: polygon(50% 0%, 61% 32%, 95% 32%, 67% 52%, 79% 88%, 50% 66%, 21% 88%, 33% 52%, 5% 32%, 39% 32%);
  flex: 0 0 auto;
  height: 0.37in;
  width: 0.37in;
}

.poe-pdf-evidence-area {
  display: contents;
}

.poe-pdf-evidence-row {
  display: contents;
}

.poe-pdf-evidence-photo {
  overflow: hidden;
  text-align: center;
}

.poe-pdf-evidence-photo .poe-pdf-photo {
  height: 100%;
}

.poe-pdf-caption {
  display: block;
  line-height: 0.24in;
}

.poe-pdf-arrow {
  background: #f00;
  border: 0.03in solid #000;
  clip-path: polygon(0 32%, 73% 32%, 73% 0, 100% 50%, 73% 100%, 73% 68%, 0 68%);
}

.poe-pdf-arrow::after {
  content: none;
}

.poe-pdf-pending-note {
  line-height: 1.2;
}

.poe-pdf-ending-title {
  line-height: 1.2;
}

.poe-pdf-divider {
  background: #80C342;
  color: #fff;
}

.poe-pdf-footer-bar {
  background: #80C342;
}

.poe-pdf-footer,
.poe-pdf-footer-brand {
  align-items: center;
  display: flex;
}

.poe-pdf-footer img,
.poe-pdf-footer-brand img {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.poe-pdf-footer span,
.poe-pdf-footer-brand span,
.poe-pdf-confidential {
  line-height: 1;
  white-space: nowrap;
}

.poe-pdf-page-number {
  line-height: 1;
}

@media (max-width: 1180px) {
  .dashboard-grid, .admin-grid, .split-layout, .outlet-detail-grid, .poster-detail-layout, .workflow-detail-layout, .compact-poster-detail-layout {
    grid-template-columns: 1fr;
  }

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

  .outlet-cards, .poster-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .ppt-import-summary > div {
    border-bottom: 1px solid var(--line);
  }

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

  .ppt-low-confidence-card {
    grid-template-columns: 1fr;
  }

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

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

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

  .funnel-step:not(:last-child)::after {
    display: none;
  }

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

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { flex-direction: column; }
  .top-controls { width: 100%; }
  .top-controls label { flex: 1 1 220px; }
  .detail-hero {
    flex-direction: column;
  }

  .detail-progress {
    width: 100%;
  }

  .management-summary, .stage-board, .poe-summary, .poe-outlet-summary, .poe-item-grid, .poster-card-grid, .poster-card-photos, .poster-photo-grid, .form-grid.two, .visual-compare-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

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

  .poster-client-artwork-layout,
  .poster-production-layout,
  .poster-installation-layout,
  .poster-rework-layout {
    grid-template-columns: 1fr;
  }

  .visual-refresh-arrow {
    transform: rotate(0deg);
  }

  .management-filters {
    justify-content: stretch;
  }

  .management-filters label {
    flex: 1 1 180px;
    width: auto;
  }

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

  .ppt-outlet-comparison,
  .ppt-photo-detection-grid,
  .ppt-poster-coverage-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  main { padding: 16px; }
  nav, .outlet-cards, .item-spec, .status-grid, .photo-pair, .photo-triplet, .master-edit-form, .master-item-grid, .master-item-grid.visual-grid, .upload-grid, .poster-summary-grid, .editor-grid, .editor-grid.two, .poster-detail-list, .region-stats, .history-row {
    grid-template-columns: 1fr;
  }
  .detail-toolbar, .detail-actions {
    align-items: stretch;
  }
  .detail-toolbar > *, .detail-actions > * {
    width: 100%;
  }
  .modal-backdrop {
    padding: 0;
    align-items: stretch;
  }
  .poster-modal {
    min-height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  #posterModalBody {
    padding: 14px;
  }
  .quick-drawer {
    width: 100vw;
  }
  .quick-drawer-reference-grid,
  .quick-drawer-status-grid,
  .quick-drawer-form-grid {
    grid-template-columns: 1fr;
  }
  h1 { font-size: 24px; }
  .panel-head, .poe-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .poe-report { padding: 18px; }

  .ppt-import-controls,
  .ppt-detected-outlet > summary,
  .ppt-match-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .ppt-import-summary {
    grid-template-columns: 1fr;
  }

  .ppt-photo-detection {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .ppt-photo-thumb {
    width: 96px;
    height: 76px;
  }

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

  .campaign-overview-grid,
  .workflow-funnel {
    grid-template-columns: 1fr;
  }

  .outlet-filter-panel {
    grid-template-columns: 1fr;
  }

  .health-issue-grid {
    grid-template-columns: 1fr;
  }

  .user-row,
  .operations-spec-grid {
    grid-template-columns: 1fr;
  }

  .operations-spec-grid .wide {
    grid-column: auto;
  }

  .readonly-reference-grid {
    grid-template-columns: 1fr;
  }

  .readonly-reference-grid .readonly-field:nth-child(7) {
    grid-column: auto;
  }

  .poster-info-card-grid,
  .poster-info-card-grid.compact,
  .workflow-action-panel {
    grid-template-columns: 1fr;
  }

  .visual-reference-thumb {
    min-height: 180px;
  }
}

@media print {
  @page {
    margin: 0;
    size: 13.333333in 7.5in;
  }

  body { background: #fff; }
  body.printing-poe-pdf {
    margin: 0;
  }

  body.printing-poe-pdf .app-shell,
  body.printing-poe-pdf .modal-backdrop,
  body.printing-poe-pdf .toast {
    display: none !important;
  }

  body.printing-poe-pdf .poe-pdf-print-deck {
    display: block !important;
  }

  body.printing-poe-pdf,
  body.printing-poe-pdf .poe-pdf-print-deck,
  body.printing-poe-pdf .poe-pdf-slide,
  body.printing-poe-pdf .poe-pdf-table th,
  body.printing-poe-pdf .poe-pdf-table td,
  body.printing-poe-pdf .poe-pdf-star,
  body.printing-poe-pdf .poe-pdf-arrow,
  body.printing-poe-pdf .poe-pdf-footer-bar,
  body.printing-poe-pdf .poe-pdf-divider {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  body.printing-poe-pdf .poe-pdf-slide {
    break-after: page;
    page-break-after: always;
  }

  body.printing-poe-pdf .poe-pdf-table th {
    text-transform: none !important;
  }

  .sidebar, .topbar, .poe-actions, .view:not(#poe), .toast {
    display: none !important;
  }
  .app-shell { display: block; }
  main { padding: 0; }
  #poe { display: block !important; }
  .poe-report {
    max-width: none;
    border: 0;
    border-radius: 0;
    padding: 0;
  }
}

@media (max-width: 480px) {
  .login-logo { width: 200px; }
  .login-project-word { font-size: 25px; }
  .login-company { font-size: 1.35rem; }
  .login-hero { padding-top: 26px; }
  .login-thanks { font-size: 0.74rem; white-space: nowrap; }
}
