/* Service planner, plans list, songs, home and guest pages. */
.section-h { margin: 6px 0 0; font-size: 18px; font-weight: 800; }
.warn-text { color: #ffd79a; }

/* Plans list */
.plan-card { display: flex; gap: 16px; align-items: stretch; padding: 16px 18px; border-radius: var(--radius); background: var(--glass); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: transform .15s, background .2s, border-color .2s; min-width: 0; }
.plan-card:hover { transform: translateY(-1px); background: var(--glass-2); }
.plan-card.published { border-color: rgba(52,211,153,.3); }
.plan-card.late { border-color: rgba(255,77,106,.4); }
.pc-date { flex: 0 0 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; background: linear-gradient(160deg, rgba(182,61,101,.35), rgba(138,92,246,.25)); }
.pc-date b { font-size: 26px; line-height: 1; font-family: var(--head); }
.pc-date span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.pc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pc-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pc-top h3 { margin: 0; font-size: 17px; margin-right: auto; }
.pc-people { display: flex; gap: 6px 18px; flex-wrap: wrap; }
.pc-songs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Builder */
.plan-head .card-head { align-items: flex-start; }
.ph-status { margin-top: 6px; }
.ph-actions { justify-content: flex-end; align-items: center; }
.ph-actions .btn { padding: 10px 14px; font-size: 14px; }
.people-row { margin-top: 16px; }
.people-row label small { color: var(--muted); font-weight: 600; }
.plan-grid { display: grid; grid-template-columns: 210px minmax(0, 1fr) 320px; gap: var(--gap); align-items: start; }
.planner.readonly .plan-grid, .plan-grid:not(:has(.plan-side)) { grid-template-columns: 210px minmax(0, 1fr); }
.planner.readonly .plan-grid { grid-template-columns: minmax(0, 1fr) 320px; }
.palette { position: sticky; top: 20px; padding: 18px; }
.palette h2 { font-size: 16px; }
.palette-list { display: flex; flex-direction: column; gap: 6px; }
.pal-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: grab; text-align: left; border-left: 4px solid var(--c, var(--muted)); transition: background .15s, transform .15s; }
.pal-item:hover { background: var(--glass-2); transform: translateX(2px); }
.drag { color: var(--muted); cursor: grab; letter-spacing: -2px; user-select: none; touch-action: none; padding: 4px 6px; font-weight: 900; }

.plan-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pi { background: var(--glass); border: 1px solid var(--line); border-left: 5px solid var(--c, var(--muted)); border-radius: 14px; box-shadow: var(--shadow); transition: background .2s; }
.pi.open { background: var(--glass-2); }
.pi.ghost { opacity: .35; }
.pi-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 52px; flex-wrap: wrap; }
.pi-n { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.08); font-size: 13px; font-weight: 800; }
.pi-type { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--c, var(--muted)); font-weight: 800; flex: 0 0 auto; }
.pi-title { flex: 1 1 160px; min-width: 0; text-align: left; background: none; border: 0; color: var(--text); font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; padding: 4px 0; }
.pi-title:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.pi-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-s { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: rgba(255,255,255,.08); white-space: nowrap; }
.chip-s.key { background: rgba(138,92,246,.25); color: #d9c9ff; }
.chip-s.mic { background: rgba(14,165,233,.2); color: #a5e3ff; }
.chip-s.warn { background: rgba(255,181,71,.16); color: #ffd79a; }
.chip-s.bad { background: rgba(255,77,106,.18); color: #ffb3c0; }
.pi-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 12px; animation: rise .3s both; }
.pi-body label small { color: var(--muted); font-weight: 600; }
.item-foot { justify-content: flex-end; }

/* Item colours */
.t-welcome { --c: #f472b6; } .t-song { --c: #a78bfa; } .t-reading { --c: #fbbf24; } .t-prayer { --c: #60a5fa; }
.t-notices { --c: #94a3b8; } .t-sermon { --c: #e2578a; } .t-communion { --c: #f87171; } .t-video { --c: #22d3ee; }
.t-kids_out, .t-kids_back { --c: #34d399; } .t-custom { --c: #cbd5e1; }

/* Pickers */
.picker { position: relative; display: flex; gap: 8px; }
.picker input { flex: 1; }
.pick-list { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; max-height: 300px; overflow: auto; background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.pick-list[hidden] { display: none; }
.pick { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); font: inherit; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.pick:hover, .pick:focus { background: var(--glass-2); outline: none; }
.pick small { color: var(--muted); }
.pick small.artist { display: block; }
.pick.oneoff { color: #ffc2d6; border-top: 1px solid var(--line); margin-top: 4px; }

/* Media */
.media-block { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.media-block h4 { margin: 0; font-size: 14px; }
.media-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.media { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.2); }
.m-kind { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.m-name { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.m-st { font-size: 12px; color: #ffd79a; }
.m-err { flex-basis: 100%; font-size: 12px; color: #ffb3c0; }
.media.m-failed { box-shadow: inset 3px 0 0 var(--over); }
.media.m-ready { box-shadow: inset 3px 0 0 var(--ok); }
.media .btn { padding: 6px 10px; font-size: 13px; }
.upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.upl { cursor: pointer; }
.progress { position: relative; height: 26px; border-radius: 99px; background: rgba(0,0,0,.3); overflow: hidden; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--brand), var(--violet)); transition: width .3s; }
.progress span { position: relative; display: block; padding: 3px 12px; font-size: 13px; font-weight: 700; }
.link-row input[name=url] { flex: 2 1 220px; width: auto; }
.link-row input[name=title] { flex: 1 1 140px; width: auto; }
.stream-tick { display: flex; gap: 8px; align-items: center; font-weight: 700; }

/* Side: required tech and history */
.plan-side { position: sticky; top: 20px; }
.req-list, .history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.req-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; background: rgba(0,0,0,.18); }
.req-list li.done { opacity: .65; }
.req-list li.changed { box-shadow: inset 3px 0 0 var(--warn); opacity: 1; }
.req-list .tick { flex: 0 0 28px; height: 28px; border-radius: 8px; border: 2px solid var(--line); background: none; color: var(--ok); font-weight: 900; cursor: pointer; }
.req-list li.done .tick { border-color: var(--ok); background: rgba(52,211,153,.15); }
.history summary { cursor: pointer; list-style: none; }
.history summary h2 { display: inline; font-size: 16px; }
.history-list li { font-size: 14px; }

/* Menus, toasts, guest box */
details.menu { position: relative; }
details.menu summary { list-style: none; }
details.menu summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); display: flex; flex-direction: column; gap: 6px; padding: 8px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 170px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; padding: 12px 18px; border-radius: 12px; background: #10b981; color: #052e22; font-weight: 800; box-shadow: var(--shadow); transition: transform .3s, opacity .3s; max-width: calc(100vw - 32px); }
.toast.bad { background: #ff4d6a; color: #fff; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.guest-box .secret { overflow-wrap: anywhere; }

/* Home dashboard */
.next-card { display: flex; gap: 16px; align-items: center; }
.next-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.next-list li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.next-list .what { flex: 1 1 200px; }

/* Songs */
.song-row-pending { box-shadow: inset 3px 0 0 var(--warn); }

@media (max-width: 1250px) {
  .plan-grid, .planner.readonly .plan-grid { grid-template-columns: 190px minmax(0, 1fr); }
  .plan-side { grid-column: 1 / -1; position: static; }
  .planner.readonly .plan-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .palette { position: static; padding: 14px; order: 2; }
  .plan-col { order: 1; }
  .plan-side { order: 3; }
  .palette-list { flex-direction: row; flex-wrap: wrap; }
  .pal-item { width: auto; padding: 8px 10px; font-size: 13px; }
  .palette .drag { display: none; }
  .ph-actions { justify-content: flex-start; }
  .pi-head { gap: 8px; }
  .pi-type { display: none; }
  .menu-pop { left: 0; right: auto; }
}

/* Tech desk: required tech tab and the preacher from the plan */
.d-required { display: none; }
.mode-required .d-checks { display: none; }
.mode-required .d-required { display: flex; }
.mode-required .d-main { grid-template-columns: minmax(0, 1.55fr) minmax(330px, 1fr); }
.mode-required .d-dialrow { grid-template-columns: 1fr; }
.mode-required .d-dialrow .mini-dial { max-width: 190px; }
.req-head { display: flex; flex-direction: column; gap: 10px; }
.req-head b { font-family: var(--head); font-size: 18px; }
.d-preacher { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 6px 14px; border-radius: 14px; background: rgba(0,0,0,.2); border: 1px solid var(--line); }
.d-preacher small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.d-preacher b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preacher-name { padding: 11px 13px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
@media (max-width: 1000px) { .mode-required .d-main { grid-template-columns: 1fr; } }

/* Guest preacher upload page (no sidebar) */
body.admin.guest-page { display: block; }
.guest-page .main { max-width: 760px; margin: 0 auto; }
.guest-page .top { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.guest-page .top img { height: 40px; }
