/* ============================================================
   CEA Workers App — Design System
   ============================================================ */
:root {
  --bg:          #070506;
  --bg2:         #0F0C0A;
  --card:        #141210;
  --card2:       #1B1816;
  --orange:      #E97132;
  --orange2:     #F5821F;
  --orange-dim:  rgba(233,113,50,0.18);
  --orange-glow: rgba(233,113,50,0.28);
  --white:       #FFFFFF;
  --gray:        #9A9695;
  --gray2:       #5E5C5A;
  --border:      rgba(255,255,255,0.07);
  --border-o:    rgba(233,113,50,0.20);
  --radius:      18px;
  --radius-sm:   12px;
  --h:           100dvh;
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--white);
  height: 100%; overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Background ── */
.app-bg {
  position: fixed; inset: 0;
  background: var(--bg);
  overflow: hidden;
  z-index: 0;
}
.app-bg::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 90% 5%,  rgba(233,113,50,0.22) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 10% 92%, rgba(233,113,50,0.14) 0%, transparent 60%),
    radial-gradient(ellipse 35% 30% at 85% 88%, rgba(233,113,50,0.08) 0%, transparent 55%);
}
.app-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28'%3E%3Ctext x='8' y='20' font-size='13' fill='rgba(233,113,50,0.09)'%3E%2B%3C/text%3E%3C/svg%3E");
  mask-image:
    radial-gradient(ellipse 80% 80% at 95% 5%, black 0%, transparent 55%),
    radial-gradient(ellipse 60% 60% at 5% 95%, black 0%, transparent 55%);
  -webkit-mask-image:
    radial-gradient(ellipse 80% 80% at 95% 5%, black 0%, transparent 55%),
    radial-gradient(ellipse 60% 60% at 5% 95%, black 0%, transparent 55%);
  mask-composite: add;
  -webkit-mask-composite: source-over;
}
#particles { position: absolute; inset: 0; pointer-events: none; }

/* ── Screens ── */
.screen {
  position: fixed; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center;
  overflow-y: auto; overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom, 20px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.screen.hidden     { opacity: 0; transform: translateX(100%); pointer-events: none; }
.screen.back-exit  { opacity: 0; transform: translateX(-28%); pointer-events: none; }

/* ── Logo Block ── */
.logo-block {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; user-select: none;
}

/* ── Splash logo image ── */
.splash-logo-img {
  width: 220px; height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(233,113,50,0.4));
}

/* ── Auth header logo image ── */
.auth-logo-img {
  width: 140px; height: auto;
  object-fit: contain;
  display: block;
}

/* ── Splash ── */
#screen-splash {
  justify-content: center;
  background: transparent;
}
#screen-splash .logo-block { opacity: 0; }
#screen-splash.animate .logo-block { opacity: 1; }
#screen-splash .splash-logo-img {
  opacity: 0; transform: scale(0.85);
  transition: opacity 0.6s, transform 0.7s cubic-bezier(0.34,1.56,0.64,1);
}
#screen-splash.animate .splash-logo-img { opacity: 1; transform: scale(1); }

/* ── Auth Screens ── */
.auth-wrap {
  width: 100%; max-width: 420px;
  padding: 0 24px;
  display: flex; flex-direction: column;
  min-height: 100dvh;
  padding-top: 60px;
  padding-bottom: 40px;
}
.auth-logo-row { margin-bottom: 40px; }

.auth-title {
  font-size: 26px; font-weight: 800;
  color: var(--white); margin: 0 0 6px;
}
.auth-sub {
  font-size: 14px; color: var(--gray);
  margin: 0 0 32px;
}

/* ── Input ── */
.input-group { margin-bottom: 16px; }
.input-label {
  font-size: 12px; font-weight: 600;
  color: var(--gray); letter-spacing: 0.5px;
  margin-bottom: 8px; display: block;
}
.input-wrap {
  position: relative; display: flex; align-items: center;
}
.input-icon {
  position: absolute; left: 16px;
  width: 20px; height: 20px;
  color: var(--gray2);
  pointer-events: none; flex-shrink: 0;
}
.input-wrap input, .input-wrap select {
  width: 100%; height: 54px;
  padding: 0 50px 0 48px;
  background: var(--card2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 16px;
  color: var(--white); outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none; appearance: none;
}
.input-wrap input::placeholder { color: var(--gray2); }
.input-wrap input:focus, .input-wrap select:focus { border-color: var(--orange); }
.input-wrap .eye-btn {
  position: absolute; right: 14px;
  background: none; border: none; cursor: pointer;
  color: var(--gray2); padding: 8px;
  display: flex; align-items: center;
}
.input-wrap .eye-btn:hover { color: var(--orange); }
.input-err { font-size: 12px; color: #E84646; margin-top: 5px; display: none; }
.input-err.show { display: block; }

/* ── Phone prefix ── */
.phone-wrap { display: flex; gap: 10px; }
.phone-prefix {
  width: 88px; flex-shrink: 0;
  height: 54px; background: var(--card2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--white); font-weight: 600;
  letter-spacing: 1px; user-select: none;
}
.phone-wrap .input-wrap { flex: 1; }
.phone-wrap .input-wrap input { padding-left: 16px; }

/* ── Forgot password ── */
.forgot-link {
  text-align: right; margin-top: -8px; margin-bottom: 20px;
}
.forgot-link a {
  font-size: 13px; color: var(--orange); text-decoration: none;
}

/* ── Button ── */
.btn-primary {
  width: 100%; height: 56px;
  background: linear-gradient(135deg, var(--orange2), var(--orange));
  border: none; border-radius: var(--radius-sm);
  color: var(--white); font-size: 16px; font-weight: 700;
  cursor: pointer; letter-spacing: 0.3px;
  box-shadow: 0 4px 20px rgba(233,113,50,0.32);
  transition: opacity 0.15s, transform 0.12s;
  position: relative; overflow: hidden;
}
.btn-primary:active { transform: scale(0.98); opacity: 0.9; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary.loading::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.2);
}

.btn-ghost {
  background: none; border: 1.5px solid var(--border-o);
  width: 100%; height: 50px;
  border-radius: var(--radius-sm); color: var(--orange);
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.15s;
}
.btn-ghost:hover { background: var(--orange-dim); }

.btn-link {
  background: none; border: none; color: var(--orange);
  font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 0; text-decoration: none;
}

.divider-row {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0;
}
.divider-row span { font-size: 13px; color: var(--gray2); }
.divider-line { flex: 1; height: 1px; background: var(--border); }

.switch-auth-row {
  text-align: center; margin-top: 28px;
  font-size: 14px; color: var(--gray);
}

/* ── OTP Screen ── */
.otp-digits {
  display: flex; gap: 10px; justify-content: center;
  margin: 32px 0;
}
.otp-digits input {
  width: 52px; height: 62px;
  background: var(--card2); border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 24px; font-weight: 700;
  color: var(--white); text-align: center; outline: none;
  transition: border-color 0.2s;
}
.otp-digits input:focus { border-color: var(--orange); }
.otp-resend {
  text-align: center; font-size: 14px; color: var(--gray);
  margin-bottom: 24px;
}
.otp-timer { color: var(--orange); font-weight: 600; }

/* ── Dept. Select ── */
.dept-wrap {
  width: 100%; max-width: 420px; padding: 20px 20px 40px;
  min-height: 100dvh;
}
.dept-header {
  padding: 40px 0 32px;
}
.welcome-tag {
  font-size: 13px; color: var(--gray); margin-bottom: 4px;
}
.dept-title {
  font-size: 22px; font-weight: 800; color: var(--white);
  margin: 0 0 6px;
}
.dept-sub { font-size: 14px; color: var(--gray); margin: 0; }

.dept-pastor-greeting {
  font-size: 15px; margin-bottom: 4px; color: var(--white);
}
.dept-pastor-greeting b { color: var(--orange); }

.dept-list { display: flex; flex-direction: column; gap: 12px; }

.dept-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-decoration: none; color: inherit;
}
.dept-card:active { background: var(--card2); border-color: var(--border-o); }
.dept-card-active { background: var(--card2) !important; }

.dept-icon-wrap {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--orange-dim); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.dept-icon-wrap svg { width: 22px; height: 22px; color: var(--orange); }

.dept-card-name {
  flex: 1; font-size: 16px; font-weight: 600; color: var(--white);
}
.dept-card-arrow { color: var(--orange); flex-shrink: 0; }
.dept-card-arrow svg { width: 20px; height: 20px; }

/* ── Dashboard ── */
.dashboard-wrap {
  width: 100%; max-width: 420px;
  padding: 20px 20px 90px;
  min-height: 100dvh;
}
.dash-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 48px 0 8px;
}
.dash-dept-label {
  font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--orange);
  font-weight: 700;
}
.dash-title {
  font-size: 24px; font-weight: 800;
  color: var(--white); margin: 2px 0 0;
}
.dash-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--orange-dim); border: 2px solid var(--border-o);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; overflow: hidden;
}
.dash-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dash-avatar span {
  font-size: 16px; font-weight: 700; color: var(--orange);
}

/* ── Stats cards ── */
.stats-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin: 24px 0;
}
.stat-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 18px;
}
.stat-label {
  font-size: 12px; color: var(--gray); font-weight: 500;
  letter-spacing: 0.3px;
}
.stat-num {
  font-size: 32px; font-weight: 800; color: var(--white);
  margin: 4px 0 0; line-height: 1;
}
.stat-num span { font-size: 14px; color: var(--orange); font-weight: 600; }

/* ── Action buttons ── */
.action-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 24px;
}
.action-btn {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 16px;
  cursor: pointer; transition: border-color 0.2s;
  display: flex; flex-direction: column; gap: 10px;
  text-align: left;
}
.action-btn:active { border-color: var(--border-o); background: var(--card2); }
.action-btn .ab-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--orange-dim);
  display: flex; align-items: center; justify-content: center;
}
.action-btn .ab-icon svg { width: 20px; height: 20px; color: var(--orange); }
.action-btn .ab-label {
  font-size: 14px; font-weight: 700; color: var(--white);
}
.action-btn .ab-sub {
  font-size: 12px; color: var(--gray); margin-top: -6px;
}

/* ── Section header ── */
.section-hd {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.section-hd h3 {
  font-size: 16px; font-weight: 700; color: var(--white); margin: 0;
}
.section-hd button {
  background: none; border: none; color: var(--orange);
  font-size: 13px; font-weight: 600; cursor: pointer;
}

/* ── Submission card (live list) ── */
.sub-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
  margin-bottom: 10px; display: flex; align-items: center; gap: 14px;
}
.sub-avatar {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--orange-dim); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: var(--orange);
}
.sub-name { font-size: 15px; font-weight: 700; color: var(--white); }
.sub-meta { font-size: 12px; color: var(--gray); margin-top: 2px; }
.sub-badge {
  margin-left: auto; flex-shrink: 0;
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: 20px; letter-spacing: 0.3px;
}
.sub-badge.live { background: rgba(30,180,80,0.18); color: #4DE88A; border: 1px solid rgba(30,180,80,0.3); }
.sub-badge.done { background: rgba(233,113,50,0.15); color: var(--orange); border: 1px solid var(--border-o); }
.sub-badge.filling { background: rgba(90,120,255,0.15); color: #8BA4FF; border: 1px solid rgba(90,120,255,0.3); }

.empty-state {
  text-align: center; padding: 40px 20px;
  color: var(--gray); font-size: 14px;
}
.empty-state svg { width: 48px; height: 48px; color: var(--gray2); margin-bottom: 12px; }

/* ── Bottom Nav ── */
#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,8,6,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: none; /* shown via JS when in dept */
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
}
#bottom-nav.visible { display: flex; }
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer;
  color: var(--gray2); padding: 6px 4px;
  transition: color 0.2s;
}
.nav-item svg { width: 24px; height: 24px; }
.nav-item span { font-size: 10px; font-weight: 600; letter-spacing: 0.3px; }
.nav-item.active { color: var(--orange); }

/* ── Scanner ── */
.scanner-wrap {
  width: 100%; max-width: 420px; padding: 20px; min-height: 100dvh;
}
.scanner-header {
  display: flex; align-items: center; gap: 16px; padding: 44px 0 24px;
}
.back-btn {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; color: var(--white);
}
.back-btn svg { width: 20px; height: 20px; }
.scanner-title { font-size: 22px; font-weight: 800; color: var(--white); }

#camera-view {
  width: 100%; aspect-ratio: 4/3;
  background: #0A0806; border-radius: var(--radius);
  overflow: hidden; position: relative;
  border: 1px solid var(--border);
}
#camera-video {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
#camera-canvas { display: none; }
#camera-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; color: var(--gray);
}
#camera-placeholder svg { width: 52px; height: 52px; color: var(--gray2); }
#camera-placeholder p { font-size: 14px; margin: 0; text-align: center; }

.camera-controls {
  display: flex; gap: 12px; margin-top: 14px; margin-bottom: 20px;
}
.cam-btn {
  flex: 1; height: 50px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-o); background: none;
  color: var(--orange); font-size: 14px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 8px;
  transition: background 0.15s;
}
.cam-btn:active { background: var(--orange-dim); }
.cam-btn.primary-cam {
  background: linear-gradient(135deg, var(--orange2), var(--orange));
  border-color: transparent; color: #fff;
  box-shadow: 0 4px 16px rgba(233,113,50,0.3);
}
.cam-btn svg { width: 18px; height: 18px; }

.ocr-status {
  font-size: 13px; color: var(--gray); text-align: center;
  padding: 10px; min-height: 20px;
}
.ocr-status.processing { color: var(--orange); }
.ocr-status.success { color: #4DE88A; }

.scan-form { margin-top: 8px; }
.scan-form-title {
  font-size: 16px; font-weight: 700; color: var(--white);
  margin-bottom: 16px;
}

/* ── Live Monitor ── */
.monitor-wrap {
  width: 100%; max-width: 420px; padding: 20px; min-height: 100dvh;
}
.monitor-header { padding: 44px 0 24px; }
.live-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #4DE88A; font-weight: 600;
}
.live-dot::before {
  content: '';
  width: 8px; height: 8px; border-radius: 50%;
  background: #4DE88A;
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}
.monitor-title { font-size: 22px; font-weight: 800; color: var(--white); margin: 4px 0 0; }

/* ── Report Form ── */
.report-wrap {
  width: 100%; max-width: 420px; padding: 20px 20px 100px;
  min-height: 100dvh;
}
.report-header { padding: 44px 0 24px; }
.report-title { font-size: 22px; font-weight: 800; color: var(--white); }

.report-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 18px;
  margin-bottom: 16px;
}
.report-section h4 {
  font-size: 14px; font-weight: 700; color: var(--orange);
  letter-spacing: 0.5px; margin: 0 0 16px;
  text-transform: uppercase; font-size: 11px;
}
.report-row {
  display: flex; gap: 12px;
}
.report-row .input-group { flex: 1; }

textarea.input-field {
  width: 100%; min-height: 90px; padding: 14px 16px;
  background: var(--card2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--white);
  font-size: 15px; font-family: inherit; outline: none;
  resize: vertical; transition: border-color 0.2s;
}
textarea.input-field:focus { border-color: var(--orange); }
textarea.input-field::placeholder { color: var(--gray2); }

/* standalone input without icon */
input.input-field, select.input-field {
  width: 100%; height: 52px; padding: 0 16px;
  background: var(--card2); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--white);
  font-size: 15px; outline: none; transition: border-color 0.2s;
  -webkit-appearance: none; appearance: none;
}
input.input-field:focus, select.input-field:focus { border-color: var(--orange); }
input.input-field::placeholder { color: var(--gray2); }
select.input-field { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239A9695' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
select.input-field option { background: #1B1816; }

/* ── Profile ── */
.profile-wrap {
  width: 100%; max-width: 420px; padding: 20px 20px 100px;
  min-height: 100dvh;
}
.profile-header { padding: 44px 0 28px; text-align: center; }
.profile-pic-wrap {
  width: 88px; height: 88px; border-radius: 50%;
  background: var(--orange-dim); border: 3px solid var(--orange);
  margin: 0 auto 16px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
}
.profile-pic-wrap img { width: 100%; height: 100%; object-fit: cover; }
.profile-pic-wrap .pp-initials {
  font-size: 28px; font-weight: 800; color: var(--orange);
}
.profile-pic-edit {
  position: absolute; bottom: 0; right: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--orange); border: 2px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.profile-pic-edit svg { width: 13px; height: 13px; color: white; }
.profile-name {
  font-size: 22px; font-weight: 800; color: var(--white); margin: 0 0 4px;
}
.profile-username {
  font-size: 14px; color: var(--orange); font-weight: 600;
}
.profile-role-badge {
  display: inline-flex; margin-top: 8px;
  font-size: 11px; font-weight: 700; padding: 5px 14px;
  border-radius: 20px; background: var(--orange-dim);
  border: 1px solid var(--border-o); color: var(--orange);
  letter-spacing: 0.5px; text-transform: uppercase;
}
.profile-info-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 14px;
}
.profile-info-row {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.profile-info-row:last-child { border-bottom: none; }
.profile-info-row svg { width: 20px; height: 20px; color: var(--orange); flex-shrink: 0; }
.profile-info-label { font-size: 11px; color: var(--gray); }
.profile-info-val { font-size: 15px; color: var(--white); font-weight: 600; }

.logout-btn {
  width: 100%; height: 54px;
  background: rgba(232,70,70,0.12); border: 1.5px solid rgba(232,70,70,0.25);
  border-radius: var(--radius-sm); color: #E84646;
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.2s;
}
.logout-btn:active { background: rgba(232,70,70,0.22); }
.logout-btn svg { width: 20px; height: 20px; }

/* ── Toast ── */
#toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 999; background: var(--card2); border: 1px solid var(--border-o);
  border-radius: 30px; padding: 12px 22px;
  font-size: 14px; font-weight: 600; color: var(--white);
  opacity: 0; transition: opacity 0.3s, transform 0.3s;
  pointer-events: none; white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.success { border-color: rgba(77,232,138,0.4); }
#toast.error { border-color: rgba(232,70,70,0.4); color: #F87070; }

/* ── Loader ── */
.spinner {
  width: 22px; height: 22px; border: 2.5px solid rgba(255,255,255,0.2);
  border-top-color: var(--white); border-radius: 50%;
  animation: spin 0.75s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ── */
.mt8  { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.mb16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-orange { color: var(--orange); }
.text-gray { color: var(--gray); font-size: 13px; }
.dept-note { font-size: 11px; color: var(--gray); margin: 6px 0 0; opacity: 0.8; }
.tag-dept {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 10px;
  background: var(--orange-dim); color: var(--orange);
  border: 1px solid var(--border-o); margin: 2px 3px;
}

/* ═══════════════════════════════════════════════════════
   DEPT VIEW — Screen 11 (tabbed dept environment)
═══════════════════════════════════════════════════════ */
#screen-dept-view       { align-items: stretch; }
#screen-pastor-overview { align-items: stretch; }
#screen-new-members     { align-items: stretch; }
#screen-announcements   { align-items: stretch; }

#dept-view-container { flex: 1; width: 100%; }

/* ── Dept view header ── */
.dv-header {
  padding: 54px 16px 16px;
}
.dv-back-row {
  display: flex; align-items: center; margin-bottom: 14px;
}
.dv-dept-badge {
  display: inline-block; padding: 4px 12px;
  border-radius: 20px; font-size: 10px; font-weight: 800;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px;
}
.dv-title { font-size: 22px; font-weight: 900; color: #fff; margin: 0; line-height: 1.2; }
.dv-sub   { color: var(--gray); font-size: 13px; margin-top: 4px; }

/* ── Tab bar ── */
.dv-tabs {
  display: flex; gap: 4px; padding: 0 12px 12px;
  overflow-x: auto; scrollbar-width: none;
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.dv-tabs::-webkit-scrollbar { display: none; }
.dv-tab {
  flex-shrink: 0; height: 34px; padding: 0 14px;
  background: transparent; border: 1px solid transparent;
  border-radius: 8px; color: var(--gray);
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all 0.18s; white-space: nowrap;
  --tc: var(--orange);
}
.dv-tab.active {
  background: color-mix(in srgb, var(--tc) 14%, transparent);
  border-color: color-mix(in srgb, var(--tc) 30%, transparent);
  color: var(--tc, var(--orange));
}

/* ── Tab content ── */
.dv-content { padding: 16px 16px 90px; }

/* ── Date line ── */
.dv-date-line {
  font-size: 11px; color: var(--gray); text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: 10px;
}
.today-banner {
  border: 1px solid; border-radius: 12px;
  padding: 10px 14px; font-size: 13px; font-weight: 600;
  margin-bottom: 12px; line-height: 1.4;
}

/* ── Info row (home tab) ── */
.dv-info-row   { display: flex; gap: 10px; margin-bottom: 16px; }
.dv-info-card  {
  flex: 1; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px; display: flex; gap: 10px; align-items: center;
}
.dv-info-icon  {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.dv-info-icon svg { width: 18px; height: 18px; }
.dv-info-label { font-size: 10px; color: var(--gray); text-transform: uppercase; letter-spacing: 0.8px; }
.dv-info-val   { font-size: 16px; font-weight: 800; color: #fff; margin-top: 2px; }

/* ── Meeting cards ── */
.meeting-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.mc-day {
  font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 8px; white-space: nowrap; flex-shrink: 0;
}
.mc-info  { flex: 1; min-width: 0; }
.mc-title { font-size: 14px; font-weight: 700; color: #fff; }
.mc-meta  { font-size: 11px; color: var(--gray); margin-top: 2px; }
.mc-time  { font-size: 15px; font-weight: 800; flex-shrink: 0; }

.meeting-card-full {
  background: var(--card); border: 1px solid var(--border);
  border-left: 3px solid var(--mc, var(--orange));
  border-radius: 14px; padding: 14px 16px; margin-bottom: 10px;
}
.mcf-top    { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mcf-day-badge { font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px; }
.mcf-time   { color: var(--gray); font-size: 13px; margin-left: auto; }
.mcf-del    { background: none; border: none; color: var(--gray); cursor: pointer; font-size: 16px; margin-left: 6px; }
.mcf-fixed-badge {
  font-size: 10px; color: var(--gray); background: var(--card2);
  padding: 2px 8px; border-radius: 20px; margin-left: 6px;
}
.mcf-title  { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.mcf-meta   { display: flex; gap: 16px; font-size: 12px; color: var(--gray); }

/* ═══════════════════════════════════════════════════════
   ABOUT TAB
═══════════════════════════════════════════════════════ */
.about-head-card {
  background: var(--card); border-radius: 16px; padding: 16px;
  display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px;
  border: 1px solid var(--border);
}
.about-head-icon {
  width: 50px; height: 50px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.about-head-icon svg { width: 24px; height: 24px; }
.about-dept-name { font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 4px; }
.about-dept-desc { font-size: 12px; color: var(--gray); line-height: 1.5; }

.about-section       { margin-bottom: 24px; }
.about-section-label {
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; margin-bottom: 10px; display: block;
}
.about-text {
  font-size: 14px; line-height: 1.65; color: rgba(255,255,255,0.85);
  background: var(--card); border-radius: 12px; padding: 14px;
  border: 1px solid var(--border);
}
.leader-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 12px;
}
.leader-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; flex-shrink: 0;
}
.leader-name   { font-size: 15px; font-weight: 700; color: #fff; }
.leader-role   { font-size: 12px; color: var(--gray); margin-top: 2px; }
.leader-badge  {
  margin-left: auto; flex-shrink: 0; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}
.module-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px;
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px;
}
.module-num {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
}
.module-title  { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.module-topics { font-size: 11px; color: var(--gray); line-height: 1.5; }

/* ═══════════════════════════════════════════════════════
   TEAM TAB
═══════════════════════════════════════════════════════ */
.team-member-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.tm-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; flex-shrink: 0;
}
.tm-info    { flex: 1; min-width: 0; }
.tm-name    { font-size: 14px; font-weight: 700; color: #fff; }
.tm-role    { font-size: 12px; margin-top: 2px; }
.tm-contact { font-size: 11px; color: var(--gray); }
.tm-joined  { font-size: 10px; color: var(--gray); }
.tm-remove  {
  background: none; border: none; color: var(--gray);
  cursor: pointer; padding: 4px; opacity: 0.6; flex-shrink: 0;
}
.role-card {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.role-card:last-child { border-bottom: none; }
.role-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.role-title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.role-desc  { font-size: 11px; color: var(--gray); line-height: 1.4; }
.add-member-form,
.add-meeting-form {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px;
}

/* ═══════════════════════════════════════════════════════
   FOLLOW-UP PIPELINE TAB
═══════════════════════════════════════════════════════ */
.pipeline-stats {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none; margin-bottom: 16px;
}
.pipeline-stats::-webkit-scrollbar { display: none; }
.ps-item {
  flex-shrink: 0; min-width: 70px; border-radius: 12px;
  border: 1px solid transparent; padding: 8px 10px; text-align: center;
}
.ps-num   { font-size: 20px; font-weight: 900; line-height: 1; }
.ps-label { font-size: 10px; color: var(--gray); margin-top: 3px; line-height: 1.2; }

.stage-section { margin-bottom: 22px; }
.stage-header  {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.5px;
  text-transform: uppercase; margin-bottom: 10px;
}
.stage-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.member-pipeline-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px; margin-bottom: 8px;
  display: flex; gap: 10px; align-items: flex-start;
}
.mpc-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.mpc-info    { flex: 1; min-width: 0; }
.mpc-name    { font-size: 14px; font-weight: 700; color: #fff; }
.mpc-meta    { font-size: 11px; color: var(--gray); margin-top: 1px; }
.mpc-notes   { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 4px; font-style: italic; }
.mpc-date    { font-size: 10px; color: var(--gray); margin-top: 4px; }
.mpc-actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.mpc-stage-select {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 8px; color: inherit; font-size: 11px; padding: 4px 6px; cursor: pointer;
  max-width: 100px;
}
.mpc-del { background: none; border: none; color: var(--gray); cursor: pointer; font-size: 15px; }

/* ═══════════════════════════════════════════════════════
   REHEARSAL TAB (Singers)
═══════════════════════════════════════════════════════ */
.song-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 12px; display: flex; gap: 10px;
  align-items: center; margin-bottom: 8px;
}
.song-num {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.song-info  { flex: 1; min-width: 0; }
.song-title { font-size: 14px; font-weight: 700; color: #fff; }
.song-meta  { font-size: 11px; color: var(--gray); margin-top: 2px; }
.voice-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.voice-card:last-child { border-bottom: none; }
.vc-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.vc-name { font-size: 14px; font-weight: 600; color: #fff; }

/* ═══════════════════════════════════════════════════════
   EVENTS TAB (Programs)
═══════════════════════════════════════════════════════ */
.event-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px; display: flex; gap: 12px;
  align-items: flex-start; margin-bottom: 10px;
}
.event-date  {
  width: 52px; border-radius: 12px; text-align: center;
  padding: 6px 4px; flex-shrink: 0;
}
.event-day   { font-size: 22px; font-weight: 900; line-height: 1; }
.event-month { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.event-info  { flex: 1; min-width: 0; }
.event-title { font-size: 14px; font-weight: 700; color: #fff; }
.event-meta  { font-size: 11px; color: var(--gray); margin-top: 2px; }
.event-notes { font-size: 12px; color: rgba(255,255,255,0.7); margin-top: 4px; }

/* ═══════════════════════════════════════════════════════
   TASKS TAB (Church Staff)
═══════════════════════════════════════════════════════ */
.task-card {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.task-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--gray2); background: none; cursor: pointer;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.task-check.done { border-color: transparent; }
.task-check svg { width: 12px; height: 12px; }
.task-text     { flex: 1; font-size: 14px; color: #fff; }
.task-assigned { font-size: 11px; color: var(--gray); white-space: nowrap; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════
   LOGISTICS TAB (Deaconry)
═══════════════════════════════════════════════════════ */
.duty-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
}
.duty-area   { font-size: 11px; font-weight: 700; flex-shrink: 0; max-width: 110px; line-height: 1.3; }
.duty-person { flex: 1; font-size: 14px; color: #fff; font-weight: 600; }
.duty-notes  { font-size: 11px; color: var(--gray); }

/* ═══════════════════════════════════════════════════════
   PASTOR OVERVIEW — Screen 12
═══════════════════════════════════════════════════════ */
#pastor-view-container { flex: 1; width: 100%; }

.pastor-header {
  padding: 54px 0 20px;
  background: linear-gradient(180deg, rgba(233,113,50,0.06) 0%, transparent 100%);
}

.pastor-dept-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin-bottom: 20px;
}
.pastor-dept-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px; cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}
.pastor-dept-card:active { transform: scale(0.97); }
.pdc-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.pdc-icon svg { width: 22px; height: 22px; }
.pdc-name  { font-size: 13px; font-weight: 800; color: #fff; margin-bottom: 2px; line-height: 1.2; }
.pdc-head  { font-size: 11px; margin-bottom: 8px; }
.pdc-stats { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray); }

/* ═══════════════════════════════════════════════════════
   ANNOUNCEMENTS
═══════════════════════════════════════════════════════ */
.ann-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px; margin-bottom: 10px;
}
.ann-card.important { border-color: rgba(233,113,50,0.4); background: rgba(233,113,50,0.05); }
.ann-badge {
  display: inline-block; background: var(--orange); color: #fff;
  font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 20px;
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
.ann-title { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 5px; }
.ann-body  { font-size: 13px; color: rgba(255,255,255,0.8); line-height: 1.5; margin-bottom: 8px; }
.ann-meta  { font-size: 11px; color: var(--gray); }
.ann-del   { float: right; background: none; border: none; color: var(--gray); cursor: pointer; font-size: 16px; margin-left: 8px; }

/* ═══════════════════════════════════════════════════════
   NEW MEMBERS PAGE WRAP — Screen 13
═══════════════════════════════════════════════════════ */
.members-page-wrap {
  width: 100%; max-width: 480px;
  padding: 0 16px 90px; min-height: 100%;
}

/* ═══════════════════════════════════════════════════════
   ANNOUNCEMENTS PAGE WRAP — Screen 14
═══════════════════════════════════════════════════════ */
.announcements-page-wrap {
  width: 100%; max-width: 480px;
  padding: 0 16px 90px; min-height: 100%;
}

/* ═══════════════════════════════════════════════════════
   SHARED UTILITIES (additions)
═══════════════════════════════════════════════════════ */
.btn-ghost {
  width: 100%; height: 48px; background: transparent;
  border: 1px solid var(--border); border-radius: 14px;
  font-size: 14px; font-weight: 600; cursor: pointer; color: var(--gray);
  transition: all 0.2s;
}
.btn-ghost:active { background: rgba(255,255,255,0.04); }

.mt8  { margin-top: 8px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.mb8  { margin-bottom: 8px; }
.mb16 { margin-bottom: 16px; }

/* Ensure screens 11–16 are full-screen like other screens */
#screen-dept-view,
#screen-pastor-overview,
#screen-new-members,
#screen-announcements,
#screen-prayer,
#screen-directory {
  display: flex; flex-direction: column; align-items: center;
}

/* ═══════════════════════════════════════════════════════
   OFFLINE BANNER
═══════════════════════════════════════════════════════ */
#offline-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  background: #1a1208; border-bottom: 1px solid rgba(233,113,50,0.35);
  padding: 8px 16px; text-align: center;
  font-size: 12px; font-weight: 600; color: var(--orange);
  display: none; align-items: center; justify-content: center; gap: 8px;
  transform: translateY(-100%); transition: transform 0.3s ease;
}
#offline-banner.show {
  display: flex; transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════
   FIRST TIMERS — SHARED
═══════════════════════════════════════════════════════ */
.ft-page-wrap {
  flex: 1; overflow-y: auto; padding: 0 16px 100px;
  -webkit-overflow-scrolling: touch;
}

.ft-avatar {
  width: 48px; height: 48px; min-width: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800;
  background: var(--orange-dim);
  border: 2px solid var(--border-o);
  position: relative; overflow: hidden;
}
.ft-avatar-lg {
  width: 86px; height: 86px; min-width: 86px;
  font-size: 28px;
}
.ft-photo-edit-badge {
  position: absolute; bottom: 0; right: 0;
  width: 26px; height: 26px;
  background: var(--orange); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 2px solid var(--bg);
}
.ft-status-dot {
  width: 7px; height: 7px; border-radius: 50%; display: block;
}
.ft-badge {
  font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: 20px; border: 1px solid transparent;
}
.ft-badge-green  { background: rgba(52,211,153,0.12); color:#34D399; border-color:rgba(52,211,153,0.25); }
.ft-badge-blue   { background: rgba(96,165,250,0.12); color:#60A5FA; border-color:rgba(96,165,250,0.25); }
.ft-badge-purple { background: rgba(167,139,250,0.12); color:#A78BFA; border-color:rgba(167,139,250,0.25); }
.ft-badge-gray   { background: rgba(255,255,255,0.06); color:var(--gray); border-color:var(--border); }
.ft-hdr-btn {
  background: rgba(255,255,255,0.07); border: none; border-radius: 10px;
  color: var(--white); cursor: pointer; padding: 8px 14px;
  font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px;
}
.ft-hdr-btn:active { opacity: 0.7; }
.ft-hdr-btn.danger { background: rgba(239,68,68,0.15); color: #EF4444; }

/* ═══════════════════════════════════════════════════════
   SCREEN 17 — FT PROFILES LIST
═══════════════════════════════════════════════════════ */
.ft-list-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg); padding: 12px 0 8px;
}
.ft-search-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 14px; padding: 0 14px; margin-bottom: 10px;
}
.ft-search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--white); font-size: 14px; padding: 11px 0;
  font-family: inherit;
}
.ft-search-input::placeholder { color: var(--gray2); }
.ft-filter-tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding-bottom: 2px;
}
.ft-filter-tabs::-webkit-scrollbar { display: none; }
.ft-tab {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 14px;
  font-size: 12px; font-weight: 600; color: var(--gray);
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.ft-tab.active {
  background: var(--orange-dim); border-color: var(--border-o);
  color: var(--orange);
}
.ft-mini-stats {
  display: flex;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; margin-bottom: 14px; overflow: hidden;
}
.ft-stat-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; padding: 10px 6px;
  border-right: 1px solid var(--border);
}
.ft-stat-item:last-child { border-right: none; }
.ft-stat-num { font-size: 20px; font-weight: 800; line-height: 1; }
.ft-stat-lbl { font-size: 10px; color: var(--gray); margin-top: 3px; font-weight: 600; }
.ft-profile-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px;
  margin-bottom: 8px; cursor: pointer;
  transition: background 0.15s;
}
.ft-profile-card:active { background: var(--card2); }
.ft-card-info { flex: 1; min-width: 0; }
.ft-card-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-card-meta { font-size: 12px; color: var(--gray); margin-top: 3px; display: flex; flex-direction: column; gap: 2px; }
.ft-card-status { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.ft-fab {
  position: fixed; bottom: 88px; right: 20px; z-index: 50;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--orange); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(233,113,50,0.45);
  transition: transform 0.15s;
}
.ft-fab:active { transform: scale(0.92); }

/* ═══════════════════════════════════════════════════════
   SCREEN 18 — FT PROFILE DETAIL
═══════════════════════════════════════════════════════ */
.profile-info-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px;
}
.profile-info-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.profile-info-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.profile-info-label { font-size: 11px; color: var(--gray); font-weight: 600; margin-bottom: 3px; text-transform: uppercase; letter-spacing: .6px; }
.profile-info-val { font-size: 14px; font-weight: 500; }
.ft-status-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.ft-status-row:last-child { border-bottom: none; }
.ft-toggle {
  width: 42px; height: 24px; border-radius: 12px;
  background: rgba(255,255,255,0.1); border: 1px solid var(--border);
  flex-shrink: 0; position: relative; transition: background 0.2s;
}
.ft-toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gray); transition: transform 0.2s, background 0.2s;
}
.ft-toggle.on { background: rgba(52,211,153,0.25); border-color: rgba(52,211,153,0.4); }
.ft-toggle.on::after { transform: translateX(18px); background: #34D399; }
.ft-timeline {
  display: flex; align-items: center; justify-content: space-between;
}
.ft-week { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.ft-week-dot {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--card2); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--gray);
}
.ft-week.done .ft-week-dot { background: rgba(52,211,153,0.15); border-color: rgba(52,211,153,0.4); color: #34D399; }
.ft-week.current .ft-week-dot { background: var(--orange-dim); border-color: var(--border-o); color: var(--orange); }
.ft-week-label { font-size: 10px; color: var(--gray); font-weight: 600; }
.ft-week-line { flex: 1; height: 2px; background: var(--border); margin: 0 2px; }
.ft-followup-modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.75);
  display: none; align-items: flex-end;
}
.ft-modal-content {
  width: 100%; max-height: 90vh; overflow-y: auto;
  background: var(--bg2); border-radius: 24px 24px 0 0;
  padding: 20px 20px 40px;
}
.ft-modal-handle {
  width: 36px; height: 4px; background: var(--gray2);
  border-radius: 2px; margin: 0 auto 18px;
}

/* ═══════════════════════════════════════════════════════
   SCREEN 19 — FT ADD/EDIT FORM
═══════════════════════════════════════════════════════ */
.ft-photo-wrap {
  display: flex; flex-direction: column; align-items: center;
  margin: 20px 0;
}
.ft-photo-circle {
  width: 90px; height: 90px; border-radius: 50%;
  background: var(--card2); border: 2px dashed var(--border-o);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; overflow: hidden;
}
.ft-photo-circle img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.ft-photo-initials { font-size: 28px; font-weight: 800; color: var(--orange); }
.ft-section-label {
  font-size: 11px; font-weight: 700; color: var(--gray);
  text-transform: uppercase; letter-spacing: .8px;
  margin: 18px 0 10px;
}
.ft-check-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: 8px; cursor: pointer;
}
.ft-check {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid var(--border); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--card2);
}
.ft-check.checked { background: var(--orange-dim); border-color: var(--border-o); color: var(--orange); }
.ft-check-label { font-size: 14px; font-weight: 500; }

/* ═══════════════════════════════════════════════════════
   SCREEN 20 — FT BULK IMPORT
═══════════════════════════════════════════════════════ */
.ft-drop-zone {
  border: 2px dashed var(--border-o); border-radius: 16px;
  padding: 40px 20px; text-align: center;
  cursor: pointer; transition: background 0.2s;
  margin: 16px 0;
}
.ft-drop-zone.drag-over { background: var(--orange-dim); }
.ft-drop-zone-icon { font-size: 40px; margin-bottom: 10px; }
.ft-import-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ft-import-table th {
  background: var(--card2); padding: 8px 10px; text-align: left;
  color: var(--gray); font-weight: 700; font-size: 11px;
  border-bottom: 1px solid var(--border);
}
.ft-import-table td {
  padding: 7px 10px; border-bottom: 1px solid var(--border);
  color: rgba(255,255,255,0.8); max-width: 120px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ═══════════════════════════════════════════════════════
   SCREEN 21 — FT PRE-SERVICE CHECKLIST
═══════════════════════════════════════════════════════ */
.cl-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: opacity 0.15s;
}
.cl-item:last-child { border-bottom: none; }
.cl-item.done { opacity: 0.55; }
.cl-item.done span { text-decoration: line-through; }
.cl-check {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  border: 2px solid var(--border); background: var(--card2);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px; transition: background 0.15s, border-color 0.15s;
}
.cl-check.checked { background: rgba(52,211,153,0.15); border-color: rgba(52,211,153,0.4); }
.cl-item span { font-size: 14px; line-height: 1.5; }
.cl-expected-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px;
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
