/* ============================================
   SOPGo — Responsive Mobile Design System
   Mobile-first, max-width 430px centered
   ============================================ */

/* --- Brand Tokens (extracted from SOPGo logo) --- */
:root {
  --brand-navy:         #002060;
  --brand-blue:         #0060C0;
  --brand-blue-light:   #0080E0;
  --brand-blue-lighter: #00A0F0;
  --brand-orange:       #E06000;
  --brand-orange-light: #E08000;
  --brand-amber:        #E0C040;

  --brand-gradient:       linear-gradient(135deg, #0060C0 0%, #0040A0 50%, #002060 100%);
  --brand-gradient-warm:  linear-gradient(135deg, #0060C0 0%, #E06000 100%);
  --brand-gradient-soft:  linear-gradient(135deg, #EBF1FB 0%, #FFF4E5 100%);

  --bg:               #F2F4F7;
  --bg-elevated:      #FFFFFF;
  --fg:               #13161F;
  --fg-secondary:     #5C6370;
  --fg-tertiary:      #949BAA;
  --border:            #E0E3E9;
  --border-strong:     #CDD1D9;
  --separator:         #F0F1F4;

  --accent:            var(--brand-blue);
  --accent-dim:        #EBF1FB;
  --success:           #1E8E4A;
  --success-bg:        #E9F6EE;
  --warning:           #E87800;
  --warning-bg:        #FFF4E5;
  --danger:            #D93030;
  --danger-bg:         #FCEAEA;
  --info:              #0068D6;
  --info-bg:           #E9F0FA;

  --font:              -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --font-display:      -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --font-mono:         'SF Mono', 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --radius-sm:         8px;
  --radius:            12px;
  --radius-lg:          16px;
  --radius-xl:           20px;
  --radius-full:         999px;

  --shadow-sm:         0 1px 3px rgba(0,0,0,0.06);
  --shadow:            0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg:         0 8px 24px rgba(0,0,0,0.12);
}

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

html, body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
}

/* --- App Shell --- */
.app-shell {
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.app-shell.has-tabs {
  padding-bottom: 84px;
}

/* --- Navigation Bar --- */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 48px;
  flex-shrink: 0;
  gap: 12px;
}

.nav-bar .nav-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  flex: 1;
  text-align: center;
}

.nav-bar .nav-back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--accent);
  cursor: pointer;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.nav-bar .nav-back svg { width: 20px; height: 20px; }
.nav-bar .nav-action {
  font-size: 15px;
  color: var(--accent);
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  padding: 4px 8px;
}

/* --- Content Area --- */
.scroll-area {
  padding: 0 16px 24px;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* --- Bottom Tab Bar --- */
.tab-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 8px 8px max(28px, env(safe-area-inset-bottom));
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  -webkit-transform: translateZ(0);
  border-top: 0.5px solid var(--border);
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px 12px;
  color: var(--fg-tertiary);
  font-size: 10px;
  font-weight: 500;
  transition: color 0.15s;
}

.tab-item.active { color: var(--accent); }
.tab-item svg { width: 24px; height: 24px; }

/* --- Cards --- */
.card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 0.5px solid var(--border);
}

.card-sm { padding: 12px; border-radius: var(--radius); }
.card-tappable { cursor: pointer; transition: transform 0.1s, box-shadow 0.1s; }
.card-tappable:active { transform: scale(0.985); box-shadow: var(--shadow-sm); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  min-width: 44px;
}
.btn:active { transform: scale(0.975); opacity: 0.85; }

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

.btn-secondary {
  background: var(--accent-dim);
  color: var(--accent);
}

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

.btn-ghost {
  background: transparent;
  color: var(--fg-secondary);
}

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

.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; border-radius: var(--radius-sm); }

/* --- Form Elements --- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 16px;
  color: var(--fg);
  background: var(--bg-elevated);
  transition: border-color 0.15s;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-textarea {
  height: auto;
  min-height: 100px;
  padding: 12px 14px;
  resize: vertical;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23949BAA' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* --- Section Header --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
}

.section-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

/* --- List / Row Items --- */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 0.5px solid var(--separator);
  cursor: pointer;
}

.list-item:last-child { border-bottom: none; }
.list-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 20px;
}

.list-item-content { flex: 1; min-width: 0; }
.list-item-title { font-size: 16px; font-weight: 500; color: var(--fg); }
.list-item-sub { font-size: 13px; color: var(--fg-tertiary); margin-top: 2px; }
.list-item-trailing { color: var(--fg-tertiary); flex-shrink: 0; }

/* --- Badges / Pills --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-accent  { background: var(--accent-dim); color: var(--accent); }
.badge-neutral { background: #F2F4F7;           color: var(--fg-secondary); }

/* --- Progress Bar --- */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.3s;
}

.progress-fill.success { background: var(--success); }
.progress-fill.warning { background: var(--warning); }

/* --- Stats Grid --- */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 14px;
  border: 0.5px solid var(--border);
}

.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.1;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--fg-tertiary);
  margin-top: 4px;
}

/* --- Quiz Options --- */
.quiz-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-height: 44px;
}

.quiz-option.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.quiz-option.correct {
  border-color: var(--success);
  background: var(--success-bg);
}

.quiz-option.wrong {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.quiz-option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.quiz-option.selected .quiz-option-letter {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.quiz-option.correct .quiz-option-letter {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.quiz-option.wrong .quiz-option-letter {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.quiz-option-text { font-size: 15px; line-height: 1.4; flex: 1; }

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}

.empty-state-desc {
  font-size: 14px;
  color: var(--fg-tertiary);
  max-width: 260px;
  line-height: 1.5;
}

/* --- Search Bar --- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  background: #EBEEF2;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.search-bar svg { width: 16px; height: 16px; color: var(--fg-tertiary); flex-shrink: 0; }

.search-bar input {
  flex: 1;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 15px;
  color: var(--fg);
  outline: none;
}

/* --- Toast / Snackbar --- */
.toast {
  position: absolute;
  bottom: 100px;
  left: 16px;
  right: 16px;
  padding: 14px 18px;
  background: var(--fg);
  color: #fff;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  z-index: 50;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Divider --- */
.divider {
  height: 0.5px;
  background: var(--border);
  margin: 16px 0;
}

.divider-thick {
  height: 8px;
  background: var(--bg);
  margin: 0 -16px;
}

/* --- Home Header --- */
.home-header {
  padding: 12px 0 20px;
}

.home-greeting {
  font-size: 13px;
  color: var(--fg-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.home-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
  margin-top: 2px;
}

/* --- Onboarding / Splash --- */
.splash-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 32px 32px;
  text-align: center;
}

.splash-logo {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  margin-bottom: 20px;
}

.splash-logo-img {
  width: 200px;
  max-width: 70%;
  max-height: 100px;
  height: auto;
  object-fit: contain;
  margin-bottom: 8px;
}

.splash-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}

.splash-tagline {
  font-size: 15px;
  color: var(--fg-secondary);
  line-height: 1.5;
  max-width: 280px;
}

.splash-actions {
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.indicator-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding-bottom: 40px;
}

.slogan {
  font-size: 13px;
  color: var(--fg-secondary);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* --- Feature Row --- */
.feature-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  margin-bottom: 8px;
  border: 0.5px solid var(--border);
}

.feature-row-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.feature-row-text { flex: 1; }
.feature-row-title { font-size: 15px; font-weight: 600; color: var(--fg); }
.feature-row-desc { font-size: 13px; color: var(--fg-tertiary); margin-top: 2px; }

/* --- Checklist Row --- */
.checklist-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  cursor: pointer;
}

.checklist-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}

.checklist-check.done {
  background: var(--success);
  border-color: var(--success);
}

.checklist-check.done svg { display: block; color: #fff; width: 14px; height: 14px; }
.checklist-check svg { display: none; }

.checklist-text { font-size: 15px; color: var(--fg); flex: 1; }
.checklist-text.done { color: var(--fg-tertiary); text-decoration: line-through; }

/* --- Segmented Control --- */
.segmented {
  display: flex;
  background: #EBEEF2;
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}

.segmented-btn {
  flex: 1;
  height: 32px;
  border: none;
  background: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.segmented-btn.active {
  background: var(--bg-elevated);
  color: var(--fg);
  box-shadow: var(--shadow-sm);
}

/* --- Lesson Content --- */
.lesson-content {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
}

.lesson-content h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin: 20px 0 8px;
}

.lesson-content p { margin-bottom: 12px; }
.lesson-content ul { padding-left: 20px; margin-bottom: 12px; }
.lesson-content li { margin-bottom: 6px; }

/* --- Confirm Box --- */
.confirm-box {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}

.confirm-box .confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-dim);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.confirm-box .confirm-text {
  font-size: 15px;
  color: var(--fg-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* --- Pricing Card --- */
.pricing-card {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.15s;
}

.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.pricing-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
}

.pricing-price {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--fg);
  margin: 8px 0;
}

.pricing-price .period {
  font-size: 14px;
  font-weight: 400;
  color: var(--fg-tertiary);
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.pricing-features li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--fg-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Step Indicator --- */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0;
}

.step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-strong);
}

.step-dot.active { background: var(--accent); width: 24px; border-radius: 3px; }
.step-dot.done { background: var(--success); }

/* --- Utility --- */
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mx-16 { margin-left: 16px; margin-right: 16px; }
.px-16 { padding-left: 16px; padding-right: 16px; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.flex-1 { flex: 1; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.d-flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.w-full { width: 100%; }
.text-accent { color: var(--accent); }
.text-muted { color: var(--fg-tertiary); }
.text-sm { font-size: 14px; }
.text-xs { font-size: 12px; }

/* --- Brand Logo Components --- */

/* Logo icon mark — capsule badge with blue gradient fill + checkmark */
.logo-mark {
  width: 80px;   height: 80px;
  border-radius: 24px;
  background: var(--brand-gradient);
  display: flex;  align-items: center;  justify-content: center;
  position: relative;
  overflow: visible;
  box-shadow: 0 8px 32px rgba(0,96,192,0.25);
}
.logo-mark-sm { width: 48px; height: 48px; border-radius: 16px; }
.logo-mark-lg { width: 96px; height: 96px; border-radius: 28px; }

/* The orange accent triangle at top-right of logo */
.logo-mark::after {
  content: '';
  position: absolute;
  top: 0;  right: 0;
  width: 32px;  height: 32px;
  background: var(--brand-orange);
  clip-path: polygon(100% 0, 75% 25%, 100% 25%);
  border-radius: 0 24px 0 0;
}
.logo-mark .logo-icon {
  position: relative;  z-index: 1;
  width: 40px;  height: 40px;
}
.logo-mark .logo-icon svg { width: 100%; height: 100%; }

/* Wordmark — "SOP" bold blue + "Go" light orange */
.logo-wordmark {
  display: flex;  align-items: baseline;
  gap: 0;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand-blue);
  line-height: 1;
}
.logo-wordmark .logo-go {
  font-weight: 300;
  color: var(--brand-orange);
}
.logo-wordmark-sm { font-size: 22px; }

/* Combined logo block (icon + wordmark) */
.logo-block {
  display: flex;  flex-direction: column;
  align-items: center;  gap: 16px;
}

/* Brand decorative top bar — thin gradient line */
.brand-topbar {
  height: 3px;
  background: var(--brand-gradient-warm);
  flex-shrink: 0;
}

/* Brand splash background gradient */
.brand-splash-bg {
  background: linear-gradient(180deg, var(--brand-gradient-soft) 0%, var(--bg) 60%);
}

/* Brand card — elevated surface with subtle blue tint */
.brand-card {
  background: var(--bg-elevated);
  border: 0.5px solid var(--border);
  border-left: 3px solid var(--brand-blue);
  border-radius: var(--radius-lg);
  padding: 16px;
}

/* Brand pill — blue-orange gradient accent badge */
.brand-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: var(--brand-gradient-soft);
  color: var(--brand-blue);
  font-size: 12px;
  font-weight: 600;
}

/* Nav bar with brand bottom border */
.nav-brand {
  border-bottom: 2px solid var(--brand-blue);
}

/* ============================================
   Screen-specific Components
   ============================================ */

/* --- employee-home: Lesson cards, quick stat --- */
.lesson-card { margin-bottom: 10px; }
.lesson-card .card { display: flex; flex-direction: column; gap: 10px; }
.lesson-meta { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--fg-tertiary); }
.lesson-meta span { display: flex; align-items: center; gap: 4px; }
.quick-stat { background: var(--accent-dim); border-radius: var(--radius-lg); padding: 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.quick-stat .qs-icon { width: 40px; height: 40px; border-radius: var(--radius); background: var(--accent); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; }
.quick-stat .qs-value { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--fg); }
.quick-stat .qs-label { font-size: 12px; color: var(--fg-secondary); }

/* --- employee-profile: Avatar, cert items --- */
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 30px; font-weight: 700; margin: 0 auto 12px; }
.cert-item { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg-elevated); border-radius: var(--radius); border: 0.5px solid var(--border); margin-bottom: 8px; }
.cert-item .cert-icon { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--success-bg); display: flex; align-items: center; justify-content: center; color: var(--success); flex-shrink: 0; }

/* --- owner-dashboard: Alert, branch chips, section cards --- */
.alert-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #FFF4E5; border-radius: var(--radius); border: 0.5px solid #F0D080; margin-bottom: 16px; }
.alert-row .alert-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--warning); display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; font-weight: 700; font-size: 16px; }
.branch-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--accent-dim); border-radius: var(--radius-full); font-size: 13px; font-weight: 500; color: var(--accent); }
.section-card { padding: 16px; background: var(--bg-elevated); border-radius: var(--radius-lg); border: 0.5px solid var(--border); margin-bottom: 12px; }

/* --- employees: Employee rows --- */
.emp-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 0.5px solid var(--separator); }
.emp-row:last-child { border-bottom: none; }
.emp-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; font-weight: 700; flex-shrink: 0; }
.emp-name { font-size: 15px; font-weight: 600; color: var(--fg); }
.emp-meta { font-size: 12px; color: var(--fg-tertiary); margin-top: 2px; }

/* --- Subsection label (used in employees, reports, etc.) --- */
.subsection-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

/* --- employee-progress: Progress cards --- */
.progress-card { background: var(--bg-elevated); border-radius: var(--radius-lg); border: 0.5px solid var(--border); padding: 16px; margin-bottom: 12px; }

/* --- reports: Report bars --- */
.report-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.report-bar .bar-label { font-size: 13px; color: var(--fg-secondary); width: 80px; flex-shrink: 0; text-align: right; }
.report-bar .bar-wrap { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.report-bar .bar-fill { height: 100%; border-radius: 4px; }
.report-bar .bar-val { font-size: 13px; font-weight: 600; color: var(--fg); width: 36px; flex-shrink: 0; text-align: right; }

/* --- quiz-take: Quiz components --- */
.quiz-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.quiz-q-counter { font-size: 13px; color: var(--fg-tertiary); font-weight: 500; }
.quiz-question { font-size: 17px; font-weight: 600; color: var(--fg); line-height: 1.5; margin-bottom: 16px; }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }

/* --- quiz-result: Answer review, result circle --- */
.answer-review { border-radius: var(--radius); padding: 14px; margin-bottom: 8px; border: 0.5px solid var(--border); }
.answer-review.correct { background: #F6FBF8; border-color: var(--success); }
.answer-review.wrong   { background: #FEF8F6; border-color: var(--danger); }
.result-circle { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.result-circle.pass { background: #E9F6EE; border: 4px solid var(--success); }
.result-circle.fail { background: #FCEAEA; border: 4px solid var(--danger); }
.result-circle .result-score { font-family: var(--font-display); font-size: 36px; font-weight: 700; }
.result-circle .result-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* --- assign-lesson: Assignment sections --- */
.assign-section { margin-bottom: 20px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 0.5px solid var(--separator); cursor: pointer; }
.check-row:last-child { border-bottom: none; }
.check-circle { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.check-circle.checked { background: var(--accent); border-color: var(--accent); }
.check-circle.checked svg { display: block; }
.check-circle svg { display: none; width: 12px; height: 12px; color: #fff; }

/* --- ai-create: AI prompt card, result card --- */
.ai-prompt-card { background: linear-gradient(135deg, #EBF1FB 0%, #F5F0FF 100%); border: 1.5px solid var(--accent); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.result-card { background: #F6FBF8; border: 1px solid var(--success); border-radius: var(--radius-lg); padding: 16px; margin-top: 16px; }
.gen-stat { text-align: center; padding: 8px; }
.gen-stat .gen-num { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--accent); }
.gen-stat .gen-lbl { font-size: 11px; color: var(--fg-tertiary); }

/* --- sop-templates: Industry cards, template rows --- */
.industry-card { background: var(--bg-elevated); border-radius: var(--radius-lg); border: 0.5px solid var(--border); padding: 16px; margin-bottom: 10px; cursor: pointer; }
.industry-card.selected { border-color: var(--accent); border-width: 2px; }
.template-row { display: flex; align-items: center; justify-content: space-between; }

/* --- pricing: Plan grid --- */
.plan-grid { display: flex; flex-direction: column; gap: 12px; }
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.pricing-name {
  font-size: 18px; font-weight: 700; color: var(--fg); margin-bottom: 4px;
}
.pricing-price {
  font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--fg); margin: 4px 0;
}
.pricing-price .period { font-size: 14px; font-weight: 400; color: var(--fg-tertiary); }
.pricing-features { list-style: none; padding: 0; margin: 12px 0 0; }
.pricing-features li { padding: 5px 0; font-size: 14px; color: var(--fg-secondary); display: flex; align-items: center; gap: 8px; }

/* --- join-business: Code input, business card --- */
.code-input { letter-spacing: 4px; font-family: var(--font-mono); font-size: 22px; font-weight: 700; text-align: center; text-transform: uppercase; }
.business-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--bg-elevated); border-radius: var(--radius-lg); border: 0.5px solid var(--border); margin-top: 12px; }
.business-card .biz-avatar { width: 48px; height: 48px; border-radius: var(--radius); background: var(--brand-blue); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 20px; flex-shrink: 0; }

/* --- lesson-view: Content, tip card --- */
.lesson-content { font-size: 16px; line-height: 1.65; color: var(--fg); }
.lesson-content h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin: 20px 0 8px; }
.lesson-content p { margin-bottom: 12px; }
.lesson-content ul { padding-left: 20px; margin-bottom: 12px; }
.lesson-content li { margin-bottom: 6px; }

/* --- confirm: Confirm box --- */
.confirm-box { background: var(--bg-elevated); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 20px; text-align: center; margin-bottom: 12px; }
.confirm-box .confirm-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-dim); margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.confirm-box .confirm-text { font-size: 15px; color: var(--fg-secondary); line-height: 1.5; margin-bottom: 20px; }

/* --- create-lesson: Media placeholder --- */
.media-placeholder { width: 100%; height: 160px; background: #EBEEF2; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--border-strong); cursor: pointer; margin-bottom: 16px; }
.media-placeholder span { font-size: 13px; color: var(--fg-tertiary); text-align: center; }
.add-question-btn { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--accent-dim); border-radius: var(--radius); color: var(--accent); font-size: 14px; font-weight: 600; border: none; cursor: pointer; width: 100%; justify-content: center; }

/* --- Utility extras --- */
.tab-active-dot { position:absolute; top:0; left:50%; transform:translateX(-50%); width:20px; height:3px; background:var(--brand-gradient-warm); border-radius:0 0 2px 2px; }

/* --- Floating back-to-gallery button --- */
.fab-back {
  position: fixed;
  bottom: 20px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
  color: var(--fg-secondary);
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.fab-back:active { transform: scale(0.92); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.fab-back svg { width: 22px; height: 22px; }

/* Push FAB up when tab bar is present */
.has-tabs .fab-back { bottom: 100px; }

