:root {
  --pcc-cork-dark: #a77f56;
  --pcc-cork-mid: #c39a6f;
  --pcc-cork-lite: #d9b68a;
  --pcc-paper: #f6ecd9;
  --pcc-paper-2: #efe1c8;
  --pcc-ink: #362315;
  --pcc-muted: #755742;
  --pcc-line: rgba(101, 67, 33, 0.18);
  --pcc-shadow: 0 10px 30px rgba(58, 30, 0, 0.18);
  --pcc-shadow-soft: 0 6px 18px rgba(58, 30, 0, 0.12);
  --pcc-success: #49623f;
  --pcc-warn: #a26a11;
  --pcc-alert: #9b2f1e;
}

#pcc-app {
  position: relative;
  padding: 18px;
  min-height: 100%;
  overflow: auto;
  color: var(--pcc-ink);
  background:
    radial-gradient(circle at 15% 18%, rgba(255,255,255,.26), transparent 16%),
    radial-gradient(circle at 85% 12%, rgba(255,255,255,.16), transparent 14%),
    radial-gradient(circle at 22% 84%, rgba(92, 54, 24, .10), transparent 16%),
    radial-gradient(circle at 78% 76%, rgba(92, 54, 24, .08), transparent 18%),
    linear-gradient(180deg, rgba(250,243,228,.8), rgba(236,224,203,.95)),
    linear-gradient(135deg, var(--pcc-cork-dark), var(--pcc-cork-mid) 55%, var(--pcc-cork-lite));
}

#pcc-app::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(85,53,28,.10) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.08), rgba(255,255,255,0));
  background-size: 9px 9px, 15px 15px, 100% 100%;
  background-position: 0 0, 4px 5px, 0 0;
  opacity: .9;
}

#pcc-app::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(93, 58, 27, .2);
  border-radius: 18px;
  pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.14);
}

.pcc-wrap {
  position: relative;
  z-index: 1;
  max-width: 1520px;
  margin: 0 auto;
  color: var(--pcc-ink);
}

.pcc-hero,
.pcc-section-band,
.pcc-panel,
.pcc-card,
.pcc-prog-wrap {
  position: relative;
}

.pcc-hero,
.pcc-panel,
.pcc-card,
.pcc-prog-wrap,
.pcc-section-band {
  background:
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.42)),
    linear-gradient(180deg, var(--pcc-paper), var(--pcc-paper-2));
  border: 1px solid rgba(111, 73, 38, .18);
  box-shadow: var(--pcc-shadow-soft);
}

.pcc-hero {
  overflow: hidden;
  border-radius: 22px;
  padding: 18px 22px 16px;
  margin-bottom: 14px;
}

.pcc-hero::before,
.pcc-panel::before,
.pcc-card::before,
.pcc-prog-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255,255,255,.20), transparent 35%),
    radial-gradient(circle at 10% 16%, rgba(255,255,255,.18), transparent 18%),
    radial-gradient(circle at 80% 78%, rgba(132, 91, 49, .08), transparent 18%);
  mix-blend-mode: soft-light;
}

.pcc-hero::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 0;
  height: 12px;
  border-top: 1px dashed rgba(117, 87, 66, .35);
  opacity: .75;
}

.pcc-hero-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.75rem);
  letter-spacing: .05em;
  text-transform: uppercase;
  text-align: center;
  font-weight: 900;
  color: #422514;
  margin-bottom: 10px;
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
}

.pcc-meta-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  align-items: center;
  color: var(--pcc-muted);
  font-size: .92rem;
}

.pcc-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.34);
  border: 1px solid rgba(117,87,66,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

.pcc-meta-sep {
  opacity: .45;
  font-weight: 700;
}

.pcc-badge,
.pcc-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1;
}

.pcc-badge {
  padding: 7px 10px;
  color: #fff;
  background: linear-gradient(180deg, #87623b, #6f4a27);
  box-shadow: 0 4px 10px rgba(58, 30, 0, 0.18);
}

.pcc-prog-wrap {
  border-radius: 18px;
  padding: 16px 18px 18px;
}

.pcc-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.pcc-progress-kicker {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 900;
  color: #8a6037;
}

.pcc-progress-title {
  font-family: Georgia, serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: #43281b;
}

.pcc-progress-status {
  font-size: .78rem;
  font-weight: 800;
  color: #704f32;
}

.pcc-prog-track {
  background: rgba(99, 70, 41, .12);
  border: 1px solid rgba(101,67,33,.10);
  border-radius: 999px;
  overflow: hidden;
}

.pcc-prog-fill {
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #6f8d58, #b88b3d 64%, #9b5639 100%);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.12), 0 0 0 1px rgba(255,255,255,.16);
}

.pcc-kpi-grid,
.pcc-cards-grid,
.pcc-call-grid,
.pcc-plan-grid,
.pcc-mini-kpis {
  display: grid;
}

.pcc-kpi-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.pcc-kpi-card {
  border-radius: 16px;
  padding: 14px 14px 12px;
  background: rgba(255,255,255,.36);
  border: 1px solid rgba(113, 76, 43, .12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}

.pcc-kpi-card.is-warn {
  background: linear-gradient(180deg, rgba(255, 244, 214, .8), rgba(255, 234, 193, .62));
}

.pcc-kpi-card.is-good {
  background: linear-gradient(180deg, rgba(234, 246, 228, .85), rgba(217, 236, 205, .62));
}

.pcc-kpi-label,
.pcc-mini-kpi-label {
  display: block;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8b623b;
  font-weight: 900;
}

.pcc-kpi-value {
  font-family: Georgia, serif;
  font-size: 1.65rem;
  line-height: 1.05;
  font-weight: 900;
  color: #3b2313;
  margin: 6px 0 4px;
}

.pcc-kpi-meta {
  font-size: .72rem;
  color: #7a6048;
}

.pcc-section-band {
  overflow: hidden;
  border-radius: 18px;
  padding: 14px 18px 12px;
  margin: 16px 0 12px;
}

.pcc-section-band-tight {
  margin-top: 14px;
}

.pcc-section-band::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 16px;
  width: 120px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(205, 181, 140, .65), rgba(230, 210, 177, .18));
  transform: rotate(-2.5deg);
  opacity: .7;
}

.pcc-section-title {
  position: relative;
  z-index: 1;
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #43281b;
  margin-bottom: 4px;
}

.pcc-section-subtitle {
  position: relative;
  z-index: 1;
  font-size: .82rem;
  color: #765b46;
}

.pcc-cards-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.pcc-card {
  border-radius: 18px;
  overflow: visible;
  min-height: 100%;
  transition: transform .18s ease, box-shadow .18s ease;
}

.pcc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--pcc-shadow);
}

.pcc-card-hdr {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: -10px 0 0 18px;
  padding: 10px 18px 9px;
  border-radius: 10px 14px 10px 6px;
  color: #fff;
  font-family: Georgia, serif;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
  box-shadow: 0 10px 18px rgba(0,0,0,.12);
  border: 1px solid rgba(255,255,255,.18);
}

.pcc-card-hdr::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(255,255,255,.82);
  box-shadow: 0 0 0 2px rgba(96, 62, 33, .28);
}

.pcc-card-hdr-script { background: linear-gradient(180deg, #8a5e3d, #72462a); }
.pcc-card-hdr-cast { background: linear-gradient(180deg, #d29a42, #ab7426); }
.pcc-card-hdr-props { background: linear-gradient(180deg, #567b91, #355c72); }
.pcc-card-hdr-wardrobe { background: linear-gradient(180deg, #70814c, #4b5b2f); }

.pcc-card-body {
  padding: 18px 16px 16px;
}

.pcc-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: .82rem;
  color: #5a402c;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(101,67,33,.14);
}

.pcc-stat-row:last-child { border-bottom: none; }

.pcc-stat-val {
  text-align: right;
  font-weight: 900;
  color: #3d2718;
}

.pcc-stat-val.good { color: var(--pcc-success); }
.pcc-stat-val.warn { color: var(--pcc-warn); }
.pcc-stat-val.alert { color: var(--pcc-alert); }

.pcc-divider {
  height: 10px;
  border-bottom: 1px dashed rgba(101,67,33,.18);
  margin: 4px 0 2px;
}

.pcc-panel {
  overflow: hidden;
  border-radius: 20px;
  padding: 16px 16px 14px;
}

.pcc-panel-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 12px;
  padding: 8px 16px;
  border-radius: 10px 14px 10px 6px;
  background: linear-gradient(180deg, #d3b07d, #b99158);
  color: #4a2a14;
  font-family: Georgia, serif;
  font-weight: 900;
  font-size: 1.15rem;
  box-shadow: 0 6px 12px rgba(64, 39, 16, .12);
}

.pcc-mini-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.pcc-mini-kpi {
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.38);
  border: 1px solid rgba(111,73,38,.10);
}

.pcc-mini-kpi strong {
  display: block;
  margin-top: 5px;
  font-size: .95rem;
  color: #3c2416;
}

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

.pcc-call-grid > div {
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(255,255,255,.32);
  border: 1px solid rgba(111,73,38,.10);
}

.pcc-plan-grid {
  grid-template-columns: 1.02fr 1.25fr 1.25fr .92fr;
  gap: 14px;
  align-items: start;
}

.pcc-loc-item,
.pcc-risk-item,
.pcc-note-item {
  border-radius: 12px;
  padding: 10px 11px;
  background: rgba(255,255,255,.34);
  border: 1px solid rgba(111,73,38,.10);
}

.pcc-loc-item + .pcc-loc-item,
.pcc-risk-item + .pcc-risk-item,
.pcc-note-item + .pcc-note-item {
  margin-top: 8px;
}

.pcc-loc-name,
.pcc-scene-num {
  font-family: Georgia, serif;
  font-weight: 900;
  color: #3d2515;
}

.pcc-loc-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 5px;
  font-size: .72rem;
  color: #664c38;
}

.pcc-check-ok,
.pcc-check-warn {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: .66rem;
  font-weight: 900;
  flex-shrink: 0;
}

.pcc-check-ok {
  background: rgba(73, 98, 63, .14);
  color: var(--pcc-success);
}

.pcc-check-warn {
  background: rgba(162, 106, 17, .14);
  color: var(--pcc-warn);
}

.pcc-schedule-stat {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: .8rem;
  border-bottom: 1px dashed rgba(101,67,33,.14);
  color: #5f4633;
}

.pcc-schedule-stat strong { color: #392314; }

.pcc-status-badge {
  margin-top: 10px;
  padding: 9px 12px;
}

.pcc-status-badge.ahead { background: rgba(73, 98, 63, .14); color: var(--pcc-success); }
.pcc-status-badge.behind { background: rgba(155, 47, 30, .12); color: var(--pcc-alert); }
.pcc-status-badge.on-track { background: rgba(53, 92, 114, .12); color: #355c72; }

.pcc-scenes-strip {
  display: grid;
  gap: 10px;
}

.pcc-scene-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
  align-items: stretch;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255,255,255,.4);
  border: 1px solid rgba(111,73,38,.11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}

.pcc-scene-slug {
  margin-top: 4px;
  font-family: Georgia, serif;
  font-weight: 900;
  font-size: 1.06rem;
  color: #3c2415;
}

.pcc-scene-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 7px;
  font-size: .72rem;
  color: #6e533e;
}

.pcc-scene-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pcc-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(162,106,17,.12);
  color: #7b5311;
  font-size: .66rem;
  font-weight: 800;
}

.pcc-scene-thumb {
  min-height: 110px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: rgba(87, 61, 37, .72);
  font-size: 2rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,.24), rgba(0,0,0,.03)),
    linear-gradient(135deg, #d8c0a0, #b58d62 60%, #a47c55);
  border: 1px solid rgba(101,67,33,.14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24);
}

.pcc-risk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #563525;
  font-size: .78rem;
}

.pcc-risk-icon,
.pcc-note-icon {
  flex-shrink: 0;
  font-size: .9rem;
}

.pcc-notes-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.pcc-note-add {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(111,73,38,.18);
  background: rgba(255,255,255,.55);
  padding: 10px 12px;
  color: #3a2417;
  resize: vertical;
  min-height: 72px;
}

.pcc-note-add:focus {
  outline: 2px solid rgba(184, 139, 61, .35);
  border-color: rgba(184, 139, 61, .46);
}

.pcc-empty {
  padding: 18px 12px;
  text-align: center;
  color: #7a6048;
  font-size: .82rem;
}

#pcc-app button {
  font: inherit;
}

#pcc-app button:hover {
  filter: brightness(.985);
}

#pcc-app button[onclick*="setView"] {
  border-radius: 10px;
}

body.dark #pcc-app {
  background:
    radial-gradient(circle at 15% 18%, rgba(255,255,255,.08), transparent 16%),
    radial-gradient(circle at 85% 12%, rgba(255,255,255,.05), transparent 14%),
    radial-gradient(circle at 22% 84%, rgba(0,0,0,.18), transparent 16%),
    radial-gradient(circle at 78% 76%, rgba(0,0,0,.14), transparent 18%),
    linear-gradient(180deg, rgba(55,42,31,.92), rgba(40,30,23,.96)),
    linear-gradient(135deg, #5f4835, #6e533d 55%, #7c6046);
}

body.dark #pcc-app::after {
  border-color: rgba(255,255,255,.06);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

body.dark .pcc-hero,
body.dark .pcc-panel,
body.dark .pcc-card,
body.dark .pcc-prog-wrap,
body.dark .pcc-section-band {
  background:
    linear-gradient(180deg, rgba(80,60,44,.90), rgba(58,43,31,.95)),
    linear-gradient(180deg, #6f533d, #564130);
  border-color: rgba(255,255,255,.06);
}

body.dark .pcc-hero-title,
body.dark .pcc-section-title,
body.dark .pcc-kpi-value,
body.dark .pcc-scene-slug,
body.dark .pcc-loc-name,
body.dark .pcc-panel-title,
body.dark .pcc-progress-title,
body.dark .pcc-stat-val,
body.dark .pcc-call-grid > div,
body.dark .pcc-mini-kpi strong {
  color: #f7e7cf;
}

body.dark .pcc-meta-bar,
body.dark .pcc-kpi-meta,
body.dark .pcc-section-subtitle,
body.dark .pcc-stat-row,
body.dark .pcc-schedule-stat,
body.dark .pcc-risk-item,
body.dark .pcc-loc-check,
body.dark .pcc-empty,
body.dark .pcc-progress-status,
body.dark .pcc-progress-kicker,
body.dark .pcc-kpi-label,
body.dark .pcc-mini-kpi-label,
body.dark .pcc-note-add {
  color: #ead6bb;
}

body.dark .pcc-note-add,
body.dark .pcc-call-grid > div,
body.dark .pcc-mini-kpi,
body.dark .pcc-kpi-card,
body.dark .pcc-loc-item,
body.dark .pcc-risk-item,
body.dark .pcc-note-item,
body.dark .pcc-scene-card {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}

body.dark .pcc-scene-thumb {
  color: rgba(255,255,255,.7);
  background: linear-gradient(135deg, #7a5e44, #5f4835 60%, #503d2e);
}

@media (max-width: 1280px) {
  .pcc-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pcc-plan-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pcc-plan-grid > div:nth-child(2) {
    grid-column: span 1 !important;
  }
}

@media (max-width: 880px) {
  #pcc-app { padding: 12px; }

  .pcc-hero,
  .pcc-panel,
  .pcc-prog-wrap,
  .pcc-section-band { border-radius: 16px; }

  .pcc-hero-title {
    font-size: 1.45rem;
    letter-spacing: .04em;
  }

  .pcc-kpi-grid,
  .pcc-mini-kpis,
  .pcc-call-grid,
  .pcc-plan-grid,
  .pcc-cards-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pcc-scene-card {
    grid-template-columns: 1fr;
  }

  .pcc-scene-thumb {
    min-height: 84px;
  }
}

@media (max-width: 560px) {
  #pcc-app {
    padding: 10px 10px 90px;
  }

  .pcc-hero {
    padding: 14px 14px 12px;
  }

  .pcc-meta-bar {
    justify-content: flex-start;
    gap: 8px;
  }

  .pcc-meta-sep {
    display: none;
  }

  .pcc-kpi-grid,
  .pcc-mini-kpis,
  .pcc-call-grid,
  .pcc-plan-grid,
  .pcc-cards-grid {
    grid-template-columns: 1fr;
  }

  .pcc-card-hdr,
  .pcc-panel-title {
    font-size: .96rem;
    margin-left: 10px;
  }

  .pcc-card-body,
  .pcc-panel,
  .pcc-prog-wrap,
  .pcc-section-band {
    padding-left: 12px;
    padding-right: 12px;
  }

  .pcc-progress-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .pcc-section-title {
    font-size: 1.15rem;
  }
}

/* Production Calendar */
.pcc-tab-row {
  display: flex;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  margin: 12px 0 16px;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid rgba(101,67,33,.18);
  border-radius: 8px;
  background: rgba(246,236,217,.82);
}

.pcc-command-tab {
  min-height: 36px;
  padding: 7px 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #65472f;
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.pcc-command-tab.active {
  background: #55341f;
  color: #fff8e8;
  box-shadow: 0 3px 9px rgba(58,30,0,.18);
}

.pcc-calendar-wrap { padding-bottom: 20px; }

.pcc-calendar-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.pcc-calendar-copy {
  max-width: 760px;
  margin-top: 7px;
  color: #70513b;
  font-size: .84rem;
  line-height: 1.5;
}

.pcc-primary-btn,
.pcc-secondary-btn,
.pcc-danger-btn,
.pcc-today-btn,
.pcc-icon-btn {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 7px;
  font-size: .76rem;
  font-weight: 850;
  cursor: pointer;
}

.pcc-primary-btn {
  border: 1px solid #55341f;
  background: #55341f;
  color: #fff8e8;
}

.pcc-secondary-btn,
.pcc-today-btn,
.pcc-icon-btn {
  border: 1px solid rgba(101,67,33,.22);
  background: rgba(255,255,255,.58);
  color: #51331f;
}

.pcc-danger-btn {
  border: 1px solid rgba(155,47,30,.35);
  background: rgba(155,47,30,.08);
  color: #8d291c;
}

.pcc-icon-btn {
  width: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 1.3rem;
}

.pcc-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.pcc-calendar-nav,
.pcc-calendar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pcc-calendar-nav strong {
  min-width: 150px;
  margin-left: 5px;
  color: #3d2515;
  font-family: Georgia, serif;
  font-size: 1.05rem;
}

.pcc-calendar-filter {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #70513b;
  font-size: .72rem;
  font-weight: 800;
}

.pcc-calendar-filter select {
  min-height: 38px;
  max-width: 190px;
  padding: 7px 28px 7px 9px;
  border: 1px solid rgba(101,67,33,.22);
  border-radius: 7px;
  background: rgba(255,255,255,.68);
  color: #51331f;
  font: inherit;
}

.pcc-calendar-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.pcc-calendar-summary span {
  padding: 5px 9px;
  border: 1px solid rgba(101,67,33,.13);
  border-radius: 6px;
  background: rgba(255,255,255,.38);
  color: #71533d;
  font-size: .7rem;
}

.pcc-calendar-summary strong { color: #3d2515; }

.pcc-calendar-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(270px,330px);
  gap: 12px;
  align-items: start;
}

.pcc-calendar-panel,
.pcc-agenda-panel {
  overflow: hidden;
  border: 1px solid rgba(101,67,33,.18);
  border-radius: 8px;
  background: rgba(246,236,217,.88);
  box-shadow: var(--pcc-shadow-soft);
}

.pcc-calendar-scroll { overflow-x: auto; }

.pcc-cal-weekdays,
.pcc-cal-grid {
  min-width: 700px;
  display: grid;
  grid-template-columns: repeat(7,minmax(96px,1fr));
}

.pcc-cal-weekdays {
  border-bottom: 1px solid rgba(101,67,33,.18);
  background: rgba(93,59,34,.07);
}

.pcc-cal-weekdays span {
  padding: 8px 7px;
  color: #76573f;
  font-size: .64rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.pcc-cal-cell {
  min-width: 0;
  height: 112px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 6px;
  border: 0;
  border-right: 1px solid rgba(101,67,33,.12);
  border-bottom: 1px solid rgba(101,67,33,.12);
  border-radius: 0;
  background: rgba(255,255,255,.35);
  color: #49301f;
  text-align: left;
  cursor: pointer;
}

.pcc-cal-cell:nth-child(7n) { border-right: 0; }
.pcc-cal-cell.outside { background: rgba(82,58,39,.035); color: #aa927c; }
.pcc-cal-cell.today { box-shadow: inset 0 0 0 2px #a06a20; }
.pcc-cal-cell.selected { background: rgba(185,145,88,.18); box-shadow: inset 0 0 0 2px #694329; }

.pcc-cal-day-number {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 900;
}

.pcc-cal-cell.today .pcc-cal-day-number { background: #a06a20; color: white; }
.pcc-cal-day-events { min-width: 0; display: grid; gap: 3px; }

.pcc-cal-chip {
  display: block;
  overflow: hidden;
  padding: 3px 5px;
  border-left: 3px solid #76583e;
  border-radius: 3px;
  background: rgba(118,88,62,.11);
  color: #543823;
  font-size: .59rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pcc-cal-chip.type-shoot, .pcc-agenda-item.type-shoot { border-color:#2f6d61; background:rgba(47,109,97,.09); }
.pcc-cal-chip.type-call, .pcc-agenda-item.type-call { border-color:#416f92; background:rgba(65,111,146,.09); }
.pcc-cal-chip.type-deadline, .pcc-agenda-item.type-deadline { border-color:#a34836; background:rgba(163,72,54,.09); }
.pcc-cal-chip.type-release, .pcc-agenda-item.type-release { border-color:#6a538f; background:rgba(106,83,143,.09); }
.pcc-cal-chip.type-off, .pcc-agenda-item.type-off { border-color:#7c8290; background:rgba(124,130,144,.11); }
.pcc-cal-chip.type-hold, .pcc-agenda-item.type-hold { border-color:#aa7626; background:rgba(170,118,38,.10); }
.pcc-cal-chip.type-meeting, .pcc-agenda-item.type-meeting { border-color:#426f8a; background:rgba(66,111,138,.09); }
.pcc-cal-chip.type-location, .pcc-agenda-item.type-location { border-color:#597b49; background:rgba(89,123,73,.09); }

.pcc-cal-more {
  padding-left: 5px;
  color: #7b604b;
  font-size: .58rem;
  font-weight: 800;
}

.pcc-agenda-panel { min-height: 430px; padding: 12px; }

.pcc-agenda-date {
  padding: 2px 2px 10px;
  color: #3d2515;
  font-family: Georgia, serif;
  font-size: 1rem;
  font-weight: 900;
}

.pcc-agenda-item {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) 14px;
  gap: 8px;
  align-items: start;
  margin-bottom: 7px;
  padding: 9px;
  border: 1px solid rgba(101,67,33,.12);
  border-left-width: 4px;
  border-radius: 6px;
  color: #4b3020;
  text-align: left;
  cursor: pointer;
}

.pcc-agenda-item:disabled { cursor: default; opacity: 1; }
.pcc-agenda-icon { font-size: .9rem; line-height: 1.5; }
.pcc-agenda-body { min-width: 0; display: grid; gap: 2px; }
.pcc-agenda-body strong { overflow-wrap: anywhere; font-size: .76rem; }
.pcc-agenda-body span, .pcc-agenda-body small { color:#735640; font-size:.66rem; line-height:1.35; }

.pcc-agenda-body em {
  margin-top: 3px;
  color: #896b51;
  font-size: .59rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.pcc-agenda-arrow { color:#735640; font-size:1.1rem; }

.pcc-calendar-empty {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 20px;
  color: #765b46;
  text-align: center;
}

.pcc-calendar-empty strong { color:#3d2515; }
.pcc-calendar-empty span { font-size:.72rem; line-height:1.4; }

.pcc-calendar-empty button {
  margin-top: 5px;
  padding: 7px 10px;
  border: 1px solid #694329;
  border-radius: 6px;
  background: #694329;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.pcc-calendar-source-note { margin-top:9px; color:#7b604b; font-size:.66rem; line-height:1.45; }

.pcc-calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(28,17,10,.58);
}

.pcc-calendar-dialog {
  width: min(680px,100%);
  max-height: min(760px,calc(100dvh - 32px));
  overflow-y: auto;
  padding: 18px;
  border: 1px solid rgba(101,67,33,.25);
  border-radius: 8px;
  background: #f7eddc;
  color: #3d2515;
  box-shadow: 0 24px 80px rgba(20,10,3,.35);
}

.pcc-calendar-dialog-head,
.pcc-calendar-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.pcc-calendar-dialog-head h2 { margin:2px 0 0; font-family:Georgia,serif; font-size:1.3rem; }

.pcc-calendar-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin: 16px 0;
}

.pcc-calendar-form label {
  display: grid;
  gap: 5px;
  color: #62452f;
  font-size: .7rem;
  font-weight: 850;
}

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

.pcc-calendar-form input,
.pcc-calendar-form select,
.pcc-calendar-form textarea {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  padding: 8px 9px;
  border: 1px solid rgba(101,67,33,.24);
  border-radius: 6px;
  background: rgba(255,255,255,.72);
  color: #352114;
  font: inherit;
  font-size: .78rem;
}

.pcc-calendar-form textarea { resize:vertical; }
.pcc-calendar-dialog-actions > div { display:flex; gap:8px; }

body.dark .pcc-tab-row,
body.dark .pcc-calendar-panel,
body.dark .pcc-agenda-panel { background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.08); }

body.dark .pcc-calendar-copy,
body.dark .pcc-calendar-filter,
body.dark .pcc-calendar-summary span,
body.dark .pcc-calendar-source-note,
body.dark .pcc-agenda-body span,
body.dark .pcc-agenda-body small,
body.dark .pcc-agenda-body em { color:#dcc7ad; }

body.dark .pcc-command-tab,
body.dark .pcc-calendar-nav strong,
body.dark .pcc-calendar-summary strong,
body.dark .pcc-agenda-date,
body.dark .pcc-agenda-body strong { color:#f7e7cf; }

body.dark .pcc-command-tab.active { background:#e2c49c; color:#3a2417; }
body.dark .pcc-cal-cell { background:rgba(255,255,255,.025); color:#ead6bb; border-color:rgba(255,255,255,.07); }
body.dark .pcc-cal-cell.outside { color:#927a64; }
body.dark .pcc-calendar-dialog { background:#4a3729; color:#f7e7cf; }
body.dark .pcc-calendar-dialog-head h2,
body.dark .pcc-calendar-form label { color:#f7e7cf; }

@media (max-width: 880px) {
  .pcc-calendar-layout { grid-template-columns:1fr; }
  .pcc-agenda-panel { min-height:0; }
}

@media (max-width: 560px) {
  .pcc-calendar-hero,
  .pcc-calendar-toolbar { align-items:stretch; flex-direction:column; }
  .pcc-calendar-hero .pcc-primary-btn { width:100%; }
  .pcc-calendar-nav, .pcc-calendar-actions { min-width:0; flex-wrap:wrap; }
  .pcc-calendar-nav strong { min-width:0; flex:1; text-align:right; }
  .pcc-calendar-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; }
  .pcc-calendar-filter select { min-width:0; max-width:100%; }
  .pcc-calendar-form { grid-template-columns:1fr; }
  .pcc-calendar-form label.wide { grid-column:auto; }
  .pcc-calendar-dialog-actions { align-items:stretch; flex-direction:column-reverse; }
  .pcc-calendar-dialog-actions > div { display:grid; grid-template-columns:1fr 1fr; }
  .pcc-danger-btn { width:100%; }
}
