:root {
  color-scheme: light;
  --blue: #b32616;
  --blue-dark: #76130d;
  --blue-soft: #fff0e8;
  --ink: #18212f;
  --muted: #5f6b7a;
  --line: #eadbd5;
  --surface: #ffffff;
  --surface-soft: #fff8f5;
  --gold: #c98216;
  --green: #13795b;
  --danger: #b42318;
  --flame: #f97316;
  --ember: #3a0d0a;
  --shadow: 0 12px 28px rgba(89, 28, 13, 0.14);
  font-family: Inter, Roboto, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--surface-soft);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 0%, rgba(249, 115, 22, 0.16), rgba(255, 248, 245, 0) 310px),
    linear-gradient(180deg, rgba(179, 38, 22, 0.09), rgba(255, 248, 245, 0) 260px),
    var(--surface-soft);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

select {
  cursor: pointer;
}

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 16px 14px 104px;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 2px 16px;
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.brand-mark {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(179, 38, 22, 0.16);
  border-radius: 20px;
  color: #fff;
  background: #fff;
  box-shadow: 0 10px 22px rgba(179, 38, 22, 0.18);
  font-size: 22px;
  font-weight: 800;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.25);
}

.brand-copy {
  min-width: 0;
}

.brand-copy p,
.eyebrow {
  margin: 0 0 4px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.02;
}

.brand-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
}

.icon-action {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--blue-dark);
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(89, 28, 13, 0.08);
}

.icon-action.ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.focus-band {
  display: grid;
  gap: 18px;
  margin: 4px 0 22px;
  padding: 22px;
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 194, 92, 0.32), transparent 34%),
    linear-gradient(135deg, rgba(63, 13, 10, 0.98), rgba(163, 32, 22, 0.94) 48%, rgba(238, 94, 16, 0.9)),
    url("../icons/capacitacao.svg") center/cover no-repeat;
  box-shadow: var(--shadow);
}

body:not([data-view="agendaView"]) .focus-band {
  display: none;
}

.focus-copy h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(26px, 6vw, 42px);
  line-height: 1.03;
}

.focus-copy p:last-child {
  max-width: 720px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  line-height: 1.55;
}

.focus-band .eyebrow {
  color: #ffe5c2;
}

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

.focus-panel div {
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.focus-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
}

.focus-panel span {
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  line-height: 1.4;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: viewIn 0.18s ease;
}

@keyframes viewIn {
  from {
    transform: translateY(8px);
    opacity: 0.7;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

.section-head h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.08;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 800;
}

.primary-button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue) 55%, var(--flame));
  box-shadow: 0 10px 22px rgba(179, 38, 22, 0.24);
}

.secondary-button {
  border: 1px solid var(--line);
  color: var(--blue-dark);
  background: var(--surface);
}

.danger-button {
  border: 1px solid rgba(180, 35, 24, 0.22);
  color: var(--danger);
  background: #fff5f4;
}

.notification-status {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: -2px 0 14px;
  border: 1px solid rgba(179, 38, 22, 0.12);
  border-radius: 18px;
  padding: 12px 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.notification-status strong {
  color: var(--blue-dark);
}

.notification-status.success {
  border-color: rgba(19, 121, 91, 0.26);
  color: var(--green);
  background: rgba(230, 244, 239, 0.74);
}

.notification-status.warning {
  border-color: rgba(201, 130, 22, 0.28);
  color: #875a10;
  background: #fff8e8;
}

.full {
  width: 100%;
}

.tools-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.segment {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
}

.segment.active {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.search-box {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 14px;
  background: var(--surface);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.calendar-panel {
  display: grid;
  gap: 14px;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(89, 28, 13, 0.08);
}

.calendar-head,
.selected-date-panel,
.week-summary-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.calendar-head h3,
.week-summary-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
}

.calendar-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.calendar-actions strong {
  min-width: 144px;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  text-transform: capitalize;
}

.calendar-actions .icon-action {
  width: 40px;
  height: 40px;
  border-color: var(--line);
  background: var(--surface);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-legend span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 900;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.legend-dot.regional,
.day-dots b.regional {
  background: var(--gold);
}

.legend-dot.local,
.day-dots b.local {
  background: var(--green);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekday {
  display: grid;
  min-height: 28px;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.calendar-day {
  position: relative;
  display: grid;
  min-height: 58px;
  place-items: start center;
  border: 1px solid #f0dfd8;
  border-radius: 16px;
  padding: 8px 4px 6px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 3px 9px rgba(89, 28, 13, 0.04);
}

.calendar-day.outside {
  color: #a9b0bb;
  background: rgba(255, 248, 245, 0.58);
}

.calendar-day.today {
  border-color: rgba(249, 115, 22, 0.45);
}

.calendar-day.selected {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(179, 38, 22, 0.12);
}

.calendar-day span {
  font-size: 15px;
  font-weight: 900;
}

.calendar-day small {
  min-height: 15px;
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
}

.day-dots {
  display: flex;
  min-height: 8px;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.day-dots b {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.selected-date-panel {
  border: 1px solid rgba(179, 38, 22, 0.12);
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255, 240, 232, 0.82), #fff);
}

.selected-date-panel div {
  display: grid;
  gap: 4px;
}

.selected-date-panel strong {
  text-transform: capitalize;
}

.selected-date-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.week-summary {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.week-summary-head span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  padding: 0 11px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 900;
}

.week-events {
  display: grid;
  gap: 8px;
}

.week-event {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.week-event span {
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: capitalize;
}

.week-event strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.25;
}

.week-event small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.week-event.regional {
  border-left: 5px solid var(--gold);
}

.week-event.local {
  border-left: 5px solid var(--green);
}

.empty-week {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 14px;
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.stat-card,
.event-card,
.module-card,
.sermon-card,
.guide-block,
.course-intro,
.video-intro,
.video-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 6px 18px rgba(30, 45, 70, 0.08);
}

.stat-card {
  padding: 14px;
}

.stat-card strong {
  display: block;
  font-size: 24px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.event-list,
.sermon-list,
.guide-content,
.video-list {
  display: grid;
  gap: 12px;
}

.guide-block-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.guide-block-head span,
.guide-block-head strong {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.guide-block-head span {
  color: var(--blue-dark);
  background: rgba(249, 115, 22, 0.12);
}

.guide-block-head strong {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.sector-guide-block {
  padding: 18px;
}

.sector-guide-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.sector-guide-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(179, 38, 22, 0.14);
  border-radius: 18px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 248, 245, 0.95), #fff);
}

.sector-guide-title {
  display: grid;
  gap: 4px;
}

.sector-guide-title h4 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.sector-guide-title span,
.sector-note,
.sector-footnote {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.sector-unit-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sector-unit-list li {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

.sector-unit-list span {
  width: max-content;
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--blue-dark);
  background: rgba(249, 115, 22, 0.12);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.sector-unit-list strong {
  color: var(--ink);
}

.sector-unit-list em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.event-card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.event-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
}

.date-box {
  display: grid;
  width: 70px;
  min-height: 78px;
  place-items: center;
  border-radius: 18px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  text-align: center;
}

.date-box strong {
  font-size: 26px;
  line-height: 1;
}

.date-box span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.event-card h3,
.module-card h3,
.sermon-card h3,
.guide-block h3,
.course-intro h3,
.video-intro h3,
.video-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

.event-card p,
.module-card p,
.sermon-card p,
.guide-block p,
.course-intro p,
.video-intro p,
.video-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.event-schedule {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.event-schedule .pill {
  background: #fff8e8;
}

.pill,
.access-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 800;
}

.pill.local {
  color: var(--green);
  background: #e6f4ef;
}

.pill.regional {
  color: var(--gold);
  background: #fff5dc;
}

.event-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.schedule-editor {
  display: grid;
  gap: 12px;
  margin: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
  background: var(--surface-soft);
}

.schedule-head,
.schedule-row {
  display: grid;
  gap: 10px;
  align-items: end;
}

.schedule-head {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.schedule-head h3 {
  margin: 0;
  font-size: 18px;
}

.schedule-head p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.schedule-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr) auto;
  border: 1px solid rgba(179, 38, 22, 0.1);
  border-radius: 18px;
  padding: 10px;
  background: #fff;
}

.schedule-row label {
  margin: 0;
}

.course-intro {
  padding: 18px;
  margin-bottom: 14px;
}

.course-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin: 0 0 14px;
  border: 1px solid rgba(179, 38, 22, 0.14);
  border-radius: 22px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 240, 232, 0.94), rgba(255, 255, 255, 0.94));
  box-shadow: 0 6px 18px rgba(89, 28, 13, 0.08);
}

.course-progress h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.course-progress p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

.progress-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #f2ded7;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--flame), #f6b73c);
}

.progress-number {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-dark), var(--blue), var(--flame));
  font-size: 22px;
  font-weight: 900;
}

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

.module-card {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  padding: 18px;
}

.module-card.completed {
  border-color: rgba(19, 121, 91, 0.32);
  background: linear-gradient(180deg, rgba(230, 244, 239, 0.72), #fff 48%);
}

.module-card.completed .module-number {
  color: var(--green);
}

.module-progress-mini {
  display: grid;
  gap: 7px;
  margin: 14px 0 4px;
  border: 1px solid rgba(179, 38, 22, 0.12);
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 248, 245, 0.78);
}

.module-progress-mini span {
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.mini-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #f2ded7;
}

.mini-track div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--flame), #f6b73c);
}

.module-number {
  width: max-content;
  margin-bottom: 12px;
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-card ul,
.sermon-card ul,
.guide-block ul,
.module-detail ul,
.module-detail ol {
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.module-card .secondary-button {
  margin-top: auto;
}

.locked-note {
  margin-top: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.sermon-card,
.guide-block {
  padding: 18px;
}

.dialog {
  width: min(760px, calc(100% - 22px));
  max-height: min(88vh, 860px);
  border: 0;
  border-radius: 28px;
  padding: 0;
  background: transparent;
}

.compact-dialog {
  width: min(420px, calc(100% - 22px));
}

.dialog::backdrop {
  background: rgba(12, 20, 32, 0.48);
  backdrop-filter: blur(5px);
}

.dialog-card {
  max-height: min(88vh, 860px);
  overflow: auto;
  padding: 22px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.settings-card {
  display: grid;
  gap: 16px;
}

.settings-section {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  background: var(--surface-soft);
}

.settings-section h3 {
  margin: 0;
  font-size: 18px;
}

.settings-section p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.settings-section .notification-status {
  margin: 0;
}

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

.analytics-grid article {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(179, 38, 22, 0.12);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}

.analytics-grid span,
.analytics-daily b {
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.analytics-grid strong {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.analytics-grid em,
.analytics-daily em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.analytics-daily {
  display: grid;
  gap: 8px;
}

.analytics-daily span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
}

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

.formation-report-summary article {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(179, 38, 22, 0.12);
  border-radius: 16px;
  padding: 12px;
  background: #fff;
}

.formation-report-summary strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

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

.formation-report-list {
  display: grid;
  gap: 12px;
  max-height: min(58vh, 620px);
  overflow: auto;
  padding-right: 4px;
}

.formation-user-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(179, 38, 22, 0.14);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}

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

.formation-user-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.formation-user-head strong {
  color: var(--ink);
  font-size: 17px;
}

.formation-user-head small,
.formation-user-card p {
  color: var(--muted);
  line-height: 1.4;
}

.formation-user-head b {
  flex: 0 0 auto;
  border-radius: 14px;
  padding: 9px 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-dark), var(--flame));
}

.formation-module-list {
  display: grid;
  gap: 7px;
}

.formation-module-list span {
  display: grid;
  gap: 3px;
  border-radius: 14px;
  padding: 10px 12px;
  background: #f6f3ee;
}

.formation-module-list span.done {
  background: #eaf7ef;
}

.formation-module-list span.partial {
  background: #fff3db;
}

.formation-module-list b {
  color: var(--ink);
  font-size: 13px;
}

.formation-module-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.settings-card .form-actions {
  justify-content: stretch;
}

.settings-card .form-actions button {
  flex: 1 1 150px;
}

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

.dialog-head h2 {
  margin: 0;
  font-size: 26px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--ink);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  outline: 0;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(179, 38, 22, 0.12);
}

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

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.muted {
  color: var(--muted);
  line-height: 1.5;
}

.module-detail h3 {
  margin: 22px 0 8px;
  font-size: 20px;
}

.module-detail p {
  color: var(--muted);
  line-height: 1.7;
}

.module-detail h4 {
  margin: 16px 0 6px;
  color: var(--ink);
  font-size: 17px;
}

.module-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.module-meta span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  border-radius: 999px;
  padding: 0 11px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 900;
}

.course-section {
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: #fff;
}

.course-section.soft {
  background: linear-gradient(180deg, rgba(255, 248, 245, 0.92), #fff);
}

.course-submodules > p {
  margin-top: 0;
}

.submodule-list {
  display: grid;
  gap: 14px;
}

.submodule-card {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(179, 38, 22, 0.14);
  border-radius: 20px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(89, 28, 13, 0.06);
}

.submodule-card.completed {
  border-color: rgba(19, 121, 91, 0.28);
  background: linear-gradient(180deg, rgba(230, 244, 239, 0.72), #fff 56%);
}

.submodule-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.submodule-head span,
.submodule-head strong {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.submodule-head span {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.submodule-head strong {
  color: var(--green);
  background: #e6f4ef;
}

.submodule-card h4 {
  margin: 0;
  font-size: 20px;
  line-height: 1.16;
}

.submodule-card h5,
.sermon-section h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
}

.submodule-aim {
  margin: 0;
  color: var(--blue-dark);
  font-weight: 800;
}

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

.submodule-grid > div,
.submodule-assignment,
.sermon-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--surface-soft);
}

.submodule-assignment p {
  margin: 0;
}

.submodule-card .primary-button,
.submodule-card .secondary-button {
  width: 100%;
}

.lesson-step {
  margin: 12px 0;
  border-left: 3px solid var(--flame);
  padding-left: 12px;
}

.completion-row {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 10px;
  margin: 24px -22px -22px;
  border-top: 1px solid var(--line);
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.module-detail blockquote {
  margin: 18px 0;
  border-left: 4px solid var(--blue);
  padding: 12px 16px;
  border-radius: 0 16px 16px 0;
  color: var(--ink);
  background: var(--surface-soft);
}

.sermon-study {
  display: grid;
  gap: 12px;
}

.sermon-summary-card {
  display: grid;
  gap: 12px;
}

.sermon-summary-card > p {
  margin: 0;
}

.sermon-summary-card .secondary-button {
  width: 100%;
}

.sermon-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.sermon-card-head span,
.sermon-card-head strong {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.sermon-card-head span {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.sermon-card-head strong {
  color: var(--gold);
  background: #fff5dc;
}

.sermon-study > p {
  margin: 0;
}

.sermon-section p {
  margin: 0;
}

.sermon-section ul,
.sermon-section ol {
  margin: 0;
}

.video-intro {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 240, 232, 0.92), rgba(255, 255, 255, 0.94)),
    var(--surface);
}

.video-status {
  min-height: 22px;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.video-card {
  display: grid;
  grid-template-columns: minmax(230px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  overflow: hidden;
  padding: 14px;
}

.video-media {
  min-width: 0;
}

.video-thumb,
.video-frame {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 18px;
  background: #130b08;
}

.video-thumb {
  padding: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.22s ease;
}

.video-thumb:hover img {
  transform: scale(1.035);
}

.video-thumb span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(58, 13, 10, 0.05), rgba(58, 13, 10, 0.46));
}

.video-thumb svg {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  padding: 13px;
  background: rgba(179, 38, 22, 0.92);
  filter: drop-shadow(0 10px 22px rgba(58, 13, 10, 0.3));
}

.video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 4px 4px 4px 0;
}

.video-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.video-actions .secondary-button {
  min-height: 44px;
  text-decoration: none;
}

.video-load-more {
  justify-self: center;
  width: min(360px, 100%);
  margin: 4px auto 0;
}

.bottom-nav {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  left: max(14px, env(safe-area-inset-left));
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  width: min(680px, calc(100% - 28px));
  margin: 0 auto;
  border: 1px solid rgba(223, 229, 238, 0.9);
  border-radius: 28px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.nav-item {
  display: grid;
  min-height: 62px;
  place-items: center;
  gap: 4px;
  border: 0;
  border-radius: 22px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.nav-item.active {
  color: var(--blue-dark);
  background: var(--blue-soft);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 100px;
  z-index: 40;
  max-width: min(420px, calc(100% - 32px));
  transform: translateY(18px);
  border-radius: 18px;
  padding: 14px 16px;
  color: #fff;
  background: #18212f;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

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

.empty-state {
  padding: 26px;
  border: 1px dashed var(--line);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

@media (max-width: 860px) {
  .app-shell {
    padding: 12px 12px 108px;
  }

  .brand-mark {
    width: 56px;
    height: 56px;
  }

  .brand-copy h1 {
    font-size: 23px;
  }

  .focus-band {
    padding: 18px;
    border-radius: 24px;
  }

  .focus-copy h2 {
    font-size: 30px;
  }

  .focus-copy p:last-child {
    font-size: 15px;
  }

  .focus-panel div {
    min-height: auto;
  }

  .focus-panel,
  .module-grid,
  .submodule-grid,
  .tools-row,
  .stats-strip,
  .course-progress {
    grid-template-columns: 1fr;
  }

  body:not([data-view="agendaView"]) .section-head {
    position: sticky;
    top: 0;
    z-index: 12;
    margin: 6px -12px 14px;
    border-bottom: 1px solid var(--line);
    padding: 12px;
    background: rgba(255, 248, 245, 0.96);
    backdrop-filter: blur(12px);
  }

  .section-head {
    align-items: flex-start;
  }

  .section-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .calendar-panel {
    margin-right: -2px;
    margin-left: -2px;
    padding: 14px;
    border-radius: 22px;
  }

  .calendar-head,
  .selected-date-panel,
  .week-summary-head {
    align-items: flex-start;
  }

  .calendar-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-actions {
    justify-content: space-between;
  }

  .calendar-actions strong {
    min-width: 0;
    flex: 1;
  }

  .calendar-grid {
    gap: 5px;
  }

  .calendar-day {
    min-height: 52px;
    border-radius: 14px;
  }

  .selected-date-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .week-event {
    grid-template-columns: 48px 1fr;
  }

  .week-event small {
    grid-column: 2;
    white-space: normal;
  }

  .event-main {
    grid-template-columns: 1fr;
  }

  .event-card {
    padding: 15px;
  }

  .video-card {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .video-copy {
    padding: 2px 2px 4px;
  }

  .video-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .date-box {
    display: flex;
    width: 100%;
    min-height: 54px;
    justify-content: center;
    gap: 8px;
  }

  .date-box strong {
    font-size: 22px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .schedule-head,
  .schedule-row {
    grid-template-columns: 1fr;
  }

  .form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .bottom-nav {
    border-radius: 26px;
  }

  .nav-item {
    min-height: 58px;
    border-radius: 20px;
    font-size: 10.5px;
  }
}

@media (min-width: 861px) {
  .focus-band {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: end;
  }
}
