/* Weekly Reports: readable controls isolated from legacy sidebar/form styles.
   The step navigation is a <nav>; broad app rules otherwise apply sidebar
   colors and hide its labels when the sidebar is collapsed. */
.cn-weekly {
  --wr-navy:#0b2f50; --wr-blue:#146799; --wr-text:#163650;
  --wr-muted:#405c73; --wr-line:#c6d5e1;
  max-width:1500px; margin:auto; padding:18px 0;
  color:var(--wr-text); font-size:16px; line-height:1.55;
}
.cn-weekly .cn-wr-heading,
.cn-weekly .cn-wr-section > header,
.cn-weekly .cn-wr-footer,
.cn-weekly .cn-wr-history-list > div {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.cn-weekly .cn-wr-heading { align-items:flex-start; flex-wrap:wrap; }
.cn-weekly .cn-wr-heading h3 { font-size:28px; line-height:1.25; margin:5px 0 8px; }
.cn-weekly .cn-wr-heading p { margin:4px 0 16px; }
.cn-weekly .cn-wr-kicker { font-size:14px; font-weight:750; letter-spacing:.06em; color:var(--wr-blue); }
.cn-weekly .cn-wr-card {
  background:#fff; border:1px solid var(--wr-line); border-radius:14px;
  margin:18px 0; overflow:hidden; padding:24px;
}
.cn-weekly .cn-wr-card h4 { font-size:20px; line-height:1.35; margin:0 0 14px; }
.cn-weekly .cn-wr-card h4 span { font-weight:400; color:var(--wr-muted); }

/* Legacy desktop labels have ID-level specificity and 10px uppercase text. */
.cn-weekly label {
  color:var(--wr-text) !important; font-size:15px !important;
  font-weight:650 !important; line-height:1.5; letter-spacing:normal !important;
  text-transform:none !important; margin-bottom:0 !important;
}
.cn-weekly .cn-wr-dates { display:flex; align-items:end; flex-wrap:wrap; gap:16px; }
.cn-weekly .cn-wr-dates label { display:grid; gap:8px; }
.cn-weekly .cn-wr-dates input {
  min-width:176px; max-width:100%; min-height:46px; padding:10px 12px;
  border:1px solid var(--wr-line); border-radius:8px;
  font-size:16px !important; font-weight:500; line-height:1.4;
}
.cn-weekly .cn-wr-muted,
.cn-weekly .cn-wr-empty,
.cn-weekly .cn-wr-item small,
.cn-weekly .cn-wr-photo small,
.cn-weekly .cn-wr-history-list small {
  color:var(--wr-muted); font-size:14px; line-height:1.6;
  letter-spacing:normal; text-transform:none;
}

/* Explicit solid colors also beat collapsed-sidebar rules and contrast classes. */
.cn-weekly .cn-wr-steps {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px;
  padding:8px !important; background:#edf3f7; border:1px solid var(--wr-line);
  border-radius:12px; margin:24px 0; overflow:visible;
}
.cn-weekly .cn-wr-steps button {
  display:flex; align-items:center; justify-content:center !important;
  width:100%; min-width:0; min-height:50px; margin:0; padding:12px 14px !important;
  border:1px solid #9eb5c7 !important; border-radius:8px;
  background:#fff !important; color:var(--wr-navy) !important;
  font-family:inherit; font-size:16px !important; font-weight:750; line-height:1.4;
  letter-spacing:normal; text-align:center; text-transform:none; white-space:normal;
  overflow-wrap:anywhere; text-shadow:none; box-shadow:none !important; cursor:pointer;
}
.cn-weekly .cn-wr-steps button:hover:not(:disabled) {
  background:#e0edf7 !important; border-color:var(--wr-blue) !important;
  color:var(--wr-navy) !important;
}
.cn-weekly .cn-wr-steps button.active,
.cn-weekly .cn-wr-steps button.active:hover:not(:disabled) {
  background:var(--wr-navy) !important; border-color:var(--wr-navy) !important;
  color:#fff !important; box-shadow:inset 0 -3px 0 #e4b24b !important;
}
.cn-weekly .cn-wr-steps button::after { display:none !important; }
.cn-weekly .btn {
  min-height:46px; padding:11px 16px; font-size:15px !important;
  line-height:1.4; font-weight:700; white-space:normal;
}
.cn-weekly .cn-wr-fields { padding:0; border:0; min-width:0; margin:0; }
.cn-weekly .cn-wr-section { padding:20px 0; border-bottom:1px solid var(--wr-line); }
.cn-weekly .cn-wr-section:last-child { border-bottom:0; }
.cn-weekly .cn-wr-section > header { flex-wrap:wrap; margin-bottom:12px; }
.cn-weekly .cn-wr-section > header h4 { margin:0; }
.cn-weekly .cn-wr-item {
  display:grid; grid-template-columns:24px minmax(0,1fr); align-items:start;
  gap:12px; margin:18px 0;
}
.cn-weekly .cn-wr-item > input {
  margin-top:37px; width:21px; height:21px; accent-color:var(--wr-blue);
}
.cn-weekly .cn-wr-item label { display:grid; gap:8px; min-width:0; }
.cn-weekly textarea {
  resize:vertical; width:100%; box-sizing:border-box; border:1px solid var(--wr-line);
  border-radius:8px; padding:12px; font:inherit; font-size:16px !important;
  font-weight:400; line-height:1.55; background:#fff; color:var(--wr-text);
}
.cn-weekly .cn-wr-item:has(input:not(:checked)) textarea {
  background:#f4f7fa !important; color:#405c73 !important;
}
.cn-weekly .cn-wr-footer {
  flex-wrap:wrap; border-top:1px solid var(--wr-line); margin:24px -24px -24px;
  padding:18px 24px; background:#f3f7fa; position:sticky; bottom:0; z-index:3;
}
.cn-weekly .cn-wr-footer > span { font-size:15px; font-weight:700; }
.cn-weekly .cn-wr-footer > div { display:flex; flex-wrap:wrap; gap:10px; }
.cn-weekly .cn-wr-status:empty { display:none; }
.cn-weekly .cn-wr-status {
  padding:14px 18px; background:#e9f5ee; border:1px solid #a6cdb8;
  border-radius:8px; color:#204d38; font-size:15px; line-height:1.55;
}
.cn-weekly .cn-wr-status.error { background:#fff0ed; border-color:#dba298; color:#872d27; }
.cn-weekly .cn-wr-photo-grid {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(min(250px,100%),1fr));
  gap:18px; margin:18px 0 28px;
}
.cn-weekly .cn-wr-photo {
  border:1px solid var(--wr-line); border-radius:10px; padding:14px;
  display:flex; flex-direction:column; gap:12px; background:#fbfcfd; min-width:0;
}
.cn-weekly .cn-wr-photo.selected { border:2px solid #287db0; background:#f3f9fd; }
.cn-weekly .cn-wr-photo-pick { display:flex; align-items:center; gap:10px; }
.cn-weekly .cn-wr-photo-pick input { width:21px; height:21px; flex:0 0 21px; accent-color:var(--wr-blue); }
.cn-weekly .cn-wr-image {
  height:190px; position:relative; border-radius:7px; overflow:hidden;
  background:#e9eff4; display:grid; place-items:center;
}
.cn-weekly .cn-wr-image img { width:100%; height:190px; object-fit:contain; }
.cn-weekly .cn-wr-image span {
  position:absolute; text-align:center; font-size:14px; max-width:90%;
  background:#e9eff4; color:var(--wr-text); padding:8px;
}
.cn-weekly .cn-wr-photo-order { display:flex; flex-wrap:wrap; gap:8px; }
.cn-weekly .cn-wr-photo-order .btn { font-size:14px !important; padding:10px 12px; }
.cn-weekly .cn-wr-check { display:flex; align-items:center; gap:10px; min-height:44px; }
.cn-weekly .cn-wr-check input { width:21px; height:21px; flex:0 0 21px; accent-color:var(--wr-blue); }
.cn-weekly .cn-wr-appendices { display:flex; gap:12px 28px; flex-wrap:wrap; margin:16px 0 22px; }
.cn-weekly .cn-wr-preview {
  display:block; width:100%; max-height:850px; overflow:auto; padding:12px;
  box-sizing:border-box; border:1px solid var(--wr-line); border-radius:8px; background:#e9eff4;
}
.cn-weekly .cn-wr-preview canvas { display:block; margin:0 auto 16px; box-shadow:0 3px 12px #173e5822; }
.cn-weekly .cn-wr-history-list > div { flex-wrap:wrap; padding:18px 0; border-top:1px solid var(--wr-line); }
.cn-weekly .cn-wr-history-list > div > span { flex:1; min-width:190px; display:grid; gap:5px; }
.cn-weekly button:disabled,
.cn-weekly .btn:disabled,
.cn-weekly .cn-wr-steps button:disabled {
  opacity:1 !important; color:#405a70 !important; background:#e5edf4 !important;
  border-color:#afc1d0 !important; box-shadow:none !important; cursor:wait;
}
.cn-weekly button:focus-visible,
.cn-weekly input:focus-visible,
.cn-weekly textarea:focus-visible {
  outline:3px solid #175da1 !important; outline-offset:3px !important;
}

@media (max-width:700px) {
  .cn-weekly .cn-wr-card { padding:16px; }
  .cn-weekly .cn-wr-heading h3 { font-size:26px; }
  .cn-weekly .cn-wr-steps { grid-template-columns:1fr; gap:8px; }
  .cn-weekly .cn-wr-steps button { justify-content:flex-start !important; text-align:left; }
  .cn-weekly .cn-wr-dates { align-items:stretch; }
  .cn-weekly .cn-wr-dates label { flex:1 1 180px; min-width:0; }
  .cn-weekly .cn-wr-dates input { min-width:0; width:100%; box-sizing:border-box; }
  .cn-weekly .cn-wr-dates > button { align-self:end; }
  .cn-weekly .cn-wr-appendices { display:grid; gap:12px; }
  .cn-weekly .cn-wr-check { align-items:flex-start; }
  .cn-weekly .cn-wr-check input { margin-top:2px; }
  .cn-weekly .cn-wr-footer { margin:24px -16px -16px; padding:16px; }
  .cn-weekly .cn-wr-footer > div { width:100%; }
  .cn-weekly .cn-wr-footer > div > button { flex:1 1 150px; }
  .cn-weekly .cn-wr-history-list > div { align-items:stretch; flex-direction:column; }
  .cn-weekly .cn-wr-history-list > div > span { min-width:0; }
  .cn-weekly .cn-wr-preview { max-height:600px; padding:6px; }
}
