/* ============================================================
   PCO-Lite Design System — NV Church App
   Planning Center-inspired: soft gradients, calm spacing,
   subtle color-shift hovers. Dark title bar + macOS traffic
   lights + bold stage colors.
   ============================================================ */

/* ----- CSS Variables ----- */
:root {
  --primary: #4A90E2;
  --primary-dark: #3D72D4;
  --primary-light: #7DD3FC;
  --bg: #F7F8FA;
  --card: #FFFFFF;
  --text: #1A1A2E;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --border: #E5E7EB;
  --red: #E53935;
  --green: #16A34A;
  --orange: #F4943E;
  --purple: #7C3AED;
  --teal: #0D9488;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   Reset & Base
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 24px 16px;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* ============================================================
   Skip Link
   ============================================================ */
.skip-link {
  position: fixed;
  top: -100%;
  left: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================================
   App Shell
   ============================================================ */
.app-shell {
  max-width: 460px;
  width: 100%;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 660px;
}

@media (min-width: 768px) {
  .app-shell {
    max-width: 720px;
  }
}

/* ============================================================
   Title Bar (macOS style + PCO gradient accent)
   ============================================================ */
.title-bar {
  background: #1A1A2E;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(to right, var(--primary), var(--primary-light)) 1;
}

.traffic-lights {
  display: flex;
  gap: 6px;
}

.traffic-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.traffic-dot.red {
  background: #FF5F57;
}

.traffic-dot.yellow {
  background: #FFBD2E;
}

.traffic-dot.green {
  background: #28C840;
}

.title-bar-right {
  display: flex;
  gap: 8px;
}

.title-bar-btn {
  background: none;
  border: none;
  color: #fff;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 150ms;
  touch-action: manipulation;
}

.title-bar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.title-bar-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================================
   Header
   ============================================================ */
.app-header {
  background: var(--card);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

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

.nv-logo {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  font-size: 30px;
  color: var(--text);
  line-height: 1;
}

.page-title-block {
  display: flex;
  flex-direction: column;
}

.page-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.page-subtitle {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-2);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-selector {
  display: flex;
  gap: 2px;
  background: var(--bg);
  padding: 2px;
  border-radius: 6px;
}

.lang-btn {
  background: none;
  border: none;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  touch-action: manipulation;
  transition: color 150ms, background 150ms, box-shadow 150ms;
}

.lang-btn.active {
  background: var(--card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.lang-btn:hover {
  color: var(--primary);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================================
   Breadcrumb
   ============================================================ */
.breadcrumb {
  background: var(--card);
  padding: 8px 20px;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.breadcrumb-link {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb-link:hover {
  text-decoration: underline;
}

.breadcrumb-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.breadcrumb-sep {
  color: var(--border);
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}

/* ============================================================
   Content
   ============================================================ */
.content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
}

@media (min-width: 768px) {
  .content {
    padding: 24px 28px;
  }
}

/* ============================================================
   Overview Card (PCO-style)
   ============================================================ */
.overview-card {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.overview-card-gradient-bar {
  height: 3px;
  background: linear-gradient(to right, var(--primary), var(--primary-light));
}

.overview-card-heading {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  padding: 18px 20px 0;
}

.overview-card-desc {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 4px;
  line-height: 1.5;
  padding: 0 20px;
}

.overview-stats {
  display: flex;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-left: 20px;
  margin-right: 20px;
  padding-bottom: 18px;
}

.stat {
  flex: 1;
  text-align: center;
}

.stat + .stat {
  border-left: 1px solid var(--border);
}

.stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
}

/* ============================================================
   Navigation Cards (white with blue left border)
   ============================================================ */
.nav-card {
  display: block;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 150ms;
  touch-action: manipulation;
}

.nav-card:hover {
  background: #F8FAFF;
}

.nav-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-card-body {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.nav-card-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.nav-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.nav-card-desc {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

.nav-card-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--border);
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.badge-red {
  background: var(--red);
}

.badge-stage {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ============================================================
   Section Title
   ============================================================ */
.section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 8px;
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

/* ============================================================
   List Group
   ============================================================ */
.list-group {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.list-group-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  transition: background 150ms;
  color: inherit;
  text-decoration: none;
}

.list-group-item:last-child {
  border-bottom: none;
}

.list-group-item:hover {
  background: #F8FAFF;
}

.list-group-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.list-group-item-link {
  cursor: pointer;
  touch-action: manipulation;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-green  { background: var(--green); }
.dot-blue   { background: var(--primary); }
.dot-orange { background: var(--orange); }
.dot-purple { background: var(--purple); }
.dot-teal   { background: var(--teal); }
.dot-red    { background: var(--red); }

.list-group-text {
  flex: 1;
  min-width: 0;
}

.list-group-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-group-action {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-top: 1px;
}

.list-group-time {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-3);
}

/* ============================================================
   Color Legend
   ============================================================ */
.color-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 0;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-2);
}

.legend-label {
  font-size: 11px;
  color: var(--text-2);
}

/* ============================================================
   Progress Bar (5-step)
   ============================================================ */
.progress-bar {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* step-dot variant (used in 03-stage1 through 05-stage3) */
.step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #D1D5DB;
  position: relative;
  z-index: 1;
}

.step-dot-green  { background: var(--green); }
.step-dot-blue   { background: var(--primary); }
.step-dot-orange { background: var(--orange); }
.step-dot-purple { background: var(--purple); }
.step-dot-teal   { background: var(--teal); }
.step-dot-gray   { background: #D1D5DB; }

/* step-circle variant (used in 06-stage4 and 07-stage5) */
.step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #D1D5DB;
  position: relative;
  z-index: 1;
}

.step-label {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 3px;
  text-align: center;
}

/* Completed step */
.progress-step.completed .step-dot,
.progress-step.completed .step-circle {
  background: var(--green);
}

/* Active step with ring */
.progress-step.active .step-dot,
.progress-step.active .step-circle {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

/* Active step color variants for step-dot (03-05 HTML) */
.progress-step.active .step-dot-green  { background: var(--green);   box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2); }
.progress-step.active .step-dot-blue   { background: var(--primary); box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2); }
.progress-step.active .step-dot-orange { background: var(--orange);  box-shadow: 0 0 0 3px rgba(244, 148, 62, 0.2); }
.progress-step.active .step-dot-purple { background: var(--purple);  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2); }
.progress-step.active .step-dot-teal   { background: var(--teal);    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2); }

/* Active step color variants for step-circle (06-07 HTML using s-* classes) */
.progress-step.active.s-green .step-circle  { background: var(--green);   box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2); }
.progress-step.active.s-blue .step-circle   { background: var(--primary); box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2); }
.progress-step.active.s-orange .step-circle { background: var(--orange);  box-shadow: 0 0 0 3px rgba(244, 148, 62, 0.2); }
.progress-step.active.s-purple .step-circle { background: var(--purple);  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2); }
.progress-step.active.s-teal .step-circle   { background: var(--teal);    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2); }

/* Connectors */
.progress-connector {
  flex: 0.5;
  height: 2px;
  background: #D1D5DB;
  margin-bottom: 16px;
}

.progress-connector.done,
.progress-connector-filled {
  background: var(--green);
}

/* ============================================================
   Stage Header
   ============================================================ */
.stage-header {
  padding: 12px 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1);
}

.stage-header svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Stage header color variants — class on element (06-07 HTML) */
.stage-header.green  { background: var(--green); }
.stage-header.blue   { background: var(--primary); }
.stage-header.orange { background: var(--orange); }
.stage-header.purple { background: var(--purple); }
.stage-header.teal   { background: var(--teal); }

/* Stage header color variants — BEM style (03-05 HTML) */
.stage-header-green  { background: var(--green); }
.stage-header-blue   { background: var(--primary); }
.stage-header-orange { background: var(--orange); }
.stage-header-purple { background: var(--purple); }
.stage-header-teal   { background: var(--teal); }

.stage-heading {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 11px;
  font-weight: 700;
  padding: 0 7px;
}

/* ============================================================
   Stage Form
   ============================================================ */
.stage-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ============================================================
   Form Elements
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  transition: border-color 150ms, box-shadow 150ms;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.12);
}

.form-input[readonly] {
  background: var(--bg);
  color: var(--text-2);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-textarea {
  min-height: 72px;
  resize: vertical;
}

.form-hint {
  font-size: 11px;
  color: var(--text-3);
}

.form-row-2col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 768px) {
  .form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* Radio group: generic (used in 06-stage4) */
.radio-group {
  display: flex;
  gap: 16px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* Radio group: form variant (used in 03-stage1, 05-stage3) */
.form-radio-group {
  display: flex;
  gap: 16px;
}

.form-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

.form-radio-label input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* ============================================================
   Info Card
   ============================================================ */
.info-card {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-left: 2px solid var(--primary);
  padding: 14px 18px;
}

.info-card.accent-blue   { border-left-color: var(--primary); }
.info-card.accent-green  { border-left-color: var(--green); }
.info-card.accent-orange { border-left-color: var(--orange); }
.info-card.accent-purple { border-left-color: var(--purple); }
.info-card.accent-teal   { border-left-color: var(--teal); }
.info-card.accent-red    { border-left-color: var(--red); }

/* info-row / info-label / info-value (used in 06-07) */
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

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

.info-label {
  font-weight: 600;
  color: var(--text-2);
}

.info-value {
  color: var(--text);
}

/* info-card-row / info-card-label / info-card-value (used in 04-stage2) */
.info-card-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.info-card-row:last-child {
  border-bottom: none;
}

.info-card-label {
  font-weight: 600;
  color: var(--text-2);
}

.info-card-value {
  color: var(--text);
}

/* ============================================================
   Contact Banner (orange/yellow)
   ============================================================ */
.contact-banner {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  color: #92400E;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-banner strong {
  color: #78350F;
}

.contact-banner svg {
  width: 18px;
  height: 18px;
  stroke: #D97706;
  flex-shrink: 0;
}

/* ============================================================
   Info Box (blue callout)
   ============================================================ */
.info-box {
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  color: #1E40AF;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.info-box.accent-blue {
  background: #EFF6FF;
  border-color: #BFDBFE;
  color: #1E40AF;
}

.info-box svg {
  width: 18px;
  height: 18px;
  stroke: #3B82F6;
  flex-shrink: 0;
}

/* ============================================================
   Question Block (interview day)
   ============================================================ */
.question-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.question-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.question-block textarea {
  min-height: 40px;
  font-size: 13px;
}

/* ============================================================
   Approval Box
   ============================================================ */
.approval-box {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.approval-box.accent-teal {
  border-color: var(--teal);
}

.approval-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.approval-btns {
  display: flex;
  gap: 10px;
}

.approval-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid;
  transition: background 150ms, color 150ms;
  touch-action: manipulation;
}

.approval-btn.yes {
  background: #F0FDF4;
  color: var(--green);
  border-color: var(--green);
}

.approval-btn.yes:hover {
  background: var(--green);
  color: #fff;
}

.approval-btn.no {
  background: #FEF2F2;
  color: var(--red);
  border-color: var(--red);
}

.approval-btn.no:hover {
  background: var(--red);
  color: #fff;
}

.approval-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.approval-result {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.approval-result.approved {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: var(--green);
}

/* ============================================================
   Action Bar
   ============================================================ */
.action-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.action-bar-secondary {
  display: flex;
  gap: 8px;
}

.action-bar-secondary .btn {
  flex: 1;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: filter 150ms;
  font-family: inherit;
  touch-action: manipulation;
}

.btn:hover {
  filter: brightness(0.95);
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-green {
  background: var(--green);
}

.btn-blue {
  background: var(--primary);
}

.btn-orange {
  background: var(--orange);
}

.btn-purple {
  background: var(--purple);
}

.btn-teal {
  background: var(--teal);
}

.btn-full {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 700;
}

.btn-block {
  width: 100%;
}

.btn-outline {
  background: var(--card);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg);
  filter: none;
}

.btn-outline.btn-outline-red {
  color: var(--red);
  border-color: var(--red);
}

.btn-outline.btn-outline-red:hover {
  background: #FEF2F2;
}

.btn-link {
  background: none;
  border: none;
  padding: 4px;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

.btn-link:hover {
  filter: none;
}

.btn-destructive {
  color: var(--red);
  display: block;
  text-align: center;
  margin-top: 4px;
}

.btn-destructive:hover {
  color: #C62828;
}

.btn-destructive:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ============================================================
   Pipeline Cards (renewal dashboard)
   ============================================================ */
.pipeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (min-width: 768px) {
  .pipeline-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.full-span {
  grid-column: 1 / -1;
}

.pipeline-card {
  border-radius: var(--radius-md);
  padding: 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  box-shadow: var(--shadow-sm);
}

.pipeline-count {
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.pipeline-label {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
}

.pipeline-blue   { background: var(--primary); }
.pipeline-green  { background: var(--green); }
.pipeline-orange { background: var(--orange); }
.pipeline-purple { background: var(--purple); }
.pipeline-red    { background: var(--red); }
.pipeline-teal   { background: var(--teal); }

/* ============================================================
   Status Badges (renewal list)
   ============================================================ */
.status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
  flex-shrink: 0;
  white-space: nowrap;
}

.status-badge.sent      { background: #DBEAFE; color: #1D4ED8; }
.status-badge.waiting   { background: #FEF3C7; color: #92400E; }
.status-badge.pastoral  { background: #EDE9FE; color: #5B21B6; }
.status-badge.escalated { background: #FEE2E2; color: #B91C1C; }
.status-badge.completed { background: #DCFCE7; color: #166534; }

/* ============================================================
   Settings
   ============================================================ */
.settings-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.toggle-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.toggle-desc {
  font-size: 11px;
  color: var(--text-3);
}

.toggle-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 22px;
  background: #D1D5DB;
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  transition: background 150ms;
  touch-action: manipulation;
}

.toggle-checkbox::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 150ms;
}

.toggle-checkbox:checked {
  background: var(--primary);
}

.toggle-checkbox:checked::after {
  transform: translateX(20px);
}

.toggle-checkbox:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================================
   User List (admin)
   ============================================================ */
.user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 10px;
  color: #fff;
}

.role-badge.admin       { background: var(--primary); }
.role-badge.supervisor  { background: var(--green); }
.role-badge.interviewer { background: var(--purple); }
.role-badge.pastor      { background: var(--teal); }

/* ============================================================
   Translation Table
   ============================================================ */
.trans-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.trans-table th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px;
  border-bottom: 2px solid var(--border);
}

.trans-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
}

.trans-table td.key {
  font-weight: 600;
  color: var(--purple);
  font-family: "SF Mono", SFMono-Regular, Consolas, "Liberation Mono",
    Menlo, monospace;
  font-size: 11px;
}

.check-mark {
  color: var(--green);
  font-size: 16px;
  text-align: center;
}

.edit-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: background 150ms;
  touch-action: manipulation;
}

.edit-btn:hover {
  background: var(--bg);
}

.edit-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ============================================================
   Utility Classes
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.text-2  { color: var(--text-2); }
.text-sm { font-size: 13px; }

/* ============================================================
   Accessibility — Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
