:root {
  --primary-hue: 35;
  --color-primary: #b45309;
  --color-primary-hover: #92400e;
  --color-primary-light: #fef3c7;
  --color-primary-dark: #78350f;
  
  --color-secondary: #0284c7;
  --color-secondary-light: #e0f2fe;
  
  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-danger: #ef4444;

  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-dark: #0f172a;

  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #f8fafc;

  --border-color: #e2e8f0;
  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 20px;

  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --shadow-fab: 0 8px 20px rgba(180, 83, 9, 0.35);

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Fira Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 90px;
}

#app {
  max-width: 900px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: var(--text-light);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-warning), var(--color-primary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.brand-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  display: block;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #94a3b8;
}

.status-pending .badge-dot { background-color: var(--color-warning); }
.status-pending { color: #fef08a; }

.status-completed .badge-dot { background-color: var(--color-success); }
.status-completed { color: #6ee7b7; background: rgba(16, 185, 129, 0.15); }

/* Navigation Bar */
.nav-bar {
  display: flex;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
  position: sticky;
  top: 72px;
  z-index: 90;
  box-shadow: var(--shadow-sm);
  scrollbar-width: none;
}
.nav-bar::-webkit-scrollbar { display: none; }

.nav-tab {
  flex: 1;
  min-width: 100px;
  padding: 12px 10px;
  border: none;
  background: transparent;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--color-primary);
  background: #fffbe6;
}

.nav-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: var(--color-primary-light);
}

/* Main Container */
.main-container {
  padding: 24px;
  flex: 1;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}
.tab-pane.active {
  display: block;
}

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

/* Cards & Layout */
.hero-card {
  background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
  color: white;
  border-radius: var(--border-radius-lg);
  padding: 32px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-md);
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-text {
  font-size: 1.05rem;
  opacity: 0.95;
  margin-bottom: 20px;
  line-height: 1.65;
}

.hero-notice {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  border-left: 4px solid var(--color-warning);
  padding: 16px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 0.95rem;
  margin-top: 16px;
}
.hero-notice h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fef3c7;
  letter-spacing: -0.01em;
}

.section-card {
  background: var(--bg-card);
  border-radius: var(--border-radius-md);
  padding: 32px;
  margin-bottom: 36px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.card {
  background: var(--bg-card);
  border-radius: var(--border-radius-md);
  padding: 32px;
  margin-bottom: 36px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.card-accent {
  border-top: 4px solid var(--color-primary);
}

.card-subtle {
  background: var(--bg-subtle);
  border: 1px solid #cbd5e1;
}

.card-header {
  margin-bottom: 24px;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Principles Grid */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.principle-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.principle-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-warning);
}

.principle-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 10px;
  line-height: 1.35;
}

.principle-desc {
  font-size: 0.92rem;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.55;
}

.principle-practice {
  font-size: 0.85rem;
  background: var(--color-primary-light);
  color: var(--color-primary-dark);
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 4px solid var(--color-primary);
  line-height: 1.5;
}

/* Forms & Inputs */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.form-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
}

.form-label-lg {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.required {
  color: var(--color-danger);
}

.form-input, .form-select, .form-textarea {
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background: #ffffff;
  color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input-lg {
  font-size: 1.15rem;
  padding: 14px 18px;
  height: 52px;
  border-radius: 10px;
  font-weight: 500;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.15);
}

/* Checkbox group */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
  width: 100%;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  width: 100%;
  font-size: 1rem;
  line-height: 1.45;
}

.checkbox-label:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 0;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

.info-list li {
  margin-bottom: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.98rem;
  line-height: 1.5;
}
.info-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Signature Pad */
.signature-container {
  background: #ffffff;
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 8px;
}

canvas#signaturePad {
  width: 100%;
  max-width: 500px;
  height: 150px;
  background: #fafafa;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  touch-action: none;
}

.signature-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 500px;
  margin-top: 14px;
}

/* Toggle Switch */
.toggle-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.toggle-switch input { display: none; }

.toggle-slider {
  width: 40px;
  height: 22px;
  background-color: #cbd5e1;
  border-radius: 20px;
  position: relative;
  transition: 0.2s;
}

.toggle-slider:before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--color-success);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(18px);
}

.toggle-label {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Section Pills for Interview */
.section-pills {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 14px;
  margin-bottom: 28px;
  scrollbar-width: none;
}
.section-pills::-webkit-scrollbar { display: none; }

.pill-btn {
  padding: 10px 18px;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.pill-btn.active {
  background: var(--color-primary-dark);
  color: white;
  border-color: var(--color-primary-dark);
  box-shadow: var(--shadow-sm);
}

/* Question Card & Dividers */
.section-block {
  margin-bottom: 36px;
}

.question-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.question-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  background-color: var(--color-primary-light);
  border: 1px solid rgba(180, 83, 9, 0.25);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(180, 83, 9, 0.1);
}

.question-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.45;
}

.question-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
  margin: 36px 0;
}

.section-nav-buttons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.clarifications-box {
  background: var(--bg-subtle);
  border-left: 3px solid var(--color-secondary);
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: var(--text-main);
}
.clarification-item {
  margin-top: 4px;
}

/* Audio Recorder Widget */
.audio-recorder-widget {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-md);
  padding: 18px 20px;
  margin-top: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.recorder-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-rec {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  padding: 12px 22px;
  border-radius: 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-rec:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45);
}

.btn-rec:active {
  transform: scale(0.96);
}

.btn-rec.recording {
  animation: pulseRec 1.2s infinite;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
}

@keyframes pulseRec {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 14px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.rec-timer {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.rec-status-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rec-status {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.rec-saved-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.audio-preview {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

audio {
  width: 100%;
  max-width: 480px;
  height: 42px;
  border-radius: 20px;
}

/* Formula Box */
.formula-box {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fef3c7;
  padding: 18px 24px;
  border-radius: var(--border-radius-md);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.formula-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.formula-code {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 6px;
  color: #fef3c7;
}

/* Data Tables */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  background: #ffffff;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.92rem;
  background: white;
}

.data-table th, .data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #f1f5f9;
  border-right: 1px solid #f1f5f9;
  text-align: left;
  line-height: 1.5;
}

.data-table th:last-child, .data-table td:last-child {
  border-right: none;
}

.data-table th {
  background: #f8fafc;
  font-family: var(--font-heading);
  font-weight: 700;
  color: #334155;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #e2e8f0;
}

.data-table tbody tr {
  transition: background 0.15s ease;
}

.data-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.data-table tbody tr:hover {
  background: #f1f5f9;
}

/* H&S Checklist Grid & Header Redesign */
.hs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 20px;
}

.hs-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-md);
  padding: 22px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hs-card:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-md);
}

.hs-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid #f1f5f9;
}

.hs-index-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-warning), var(--color-primary));
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.25);
  flex-shrink: 0;
}

.hs-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.hs-desc {
  font-size: 0.94rem;
  color: #334155;
  margin-bottom: 14px;
  line-height: 1.55;
}

.hs-checkbox-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-sm);
  padding: 12px 16px;
}

.hs-checkbox-label {
  background: transparent;
  border: none;
  padding: 0;
}

.hs-checkbox-text {
  font-weight: 600;
  color: #0f172a;
}

/* Enhanced Buttons System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 12px 22px;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  box-sizing: border-box;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #b45309 0%, #78350f 100%);
  box-shadow: 0 6px 18px rgba(180, 83, 9, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.25);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.35);
  transform: translateY(-1px);
}

.btn-tertiary {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  color: #334155;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.btn-tertiary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-menu-sessions {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
  border-radius: 20px;
}

.btn-menu-sessions:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
  box-shadow: 0 6px 16px rgba(109, 40, 217, 0.45);
  transform: translateY(-1px);
}

#downloadZipBtn {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: white;
  border-radius: 18px;
  min-height: 56px;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.35);
}

#downloadZipBtn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.45);
}

#saveConsentBtn {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border-radius: 18px;
  min-height: 54px;
  font-size: 1.05rem;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
}

#saveConsentBtn:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.45);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.84rem;
  min-height: 36px;
  border-radius: 12px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  min-height: 50px;
  border-radius: 16px;
}

.btn-block {
  width: 100%;
}

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

/* Floating Action Button for Camera */
.fab-camera {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-warning), var(--color-primary));
  color: white;
  border: none;
  box-shadow: var(--shadow-fab);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-camera:active { transform: scale(0.92); }

/* Modals & Sessions Manager */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

.modal-card {
  background: white;
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-card-lg {
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header-flex h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 8px;
  transition: color 0.15s;
}

.btn-close:hover { color: #0f172a; }

.modal-body {
  overflow-y: auto;
  padding-right: 4px;
}

.session-meta-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 14px 18px;
  margin-top: 10px;
  font-size: 0.95rem;
  line-height: 1.6;
}

.saved-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.session-item-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.session-item-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.session-item-card.active-session-card {
  border: 2px solid var(--color-primary);
  background: #fffbe6;
}

.session-item-info h5 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.session-item-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.session-item-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.photo-preview-container img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: var(--border-radius-sm);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

/* Photo Gallery & Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.stat-card {
  background: var(--bg-subtle);
  border-radius: var(--border-radius-sm);
  padding: 14px;
  text-align: center;
}
.stat-value {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.photo-thumb {
  position: relative;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--border-color);
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-thumb .photo-caption-tag {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 0.7rem;
  padding: 4px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Alerts */
.alert-box {
  padding: 14px 18px;
  border-radius: var(--border-radius-sm);
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  font-size: 0.9rem;
}
.alert-warning {
  background: var(--color-warning-light);
  color: #78350f;
  border-left: 4px solid var(--color-warning);
}

/* Responsive */
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .app-header { padding: 12px 14px; }
  .brand-title { font-size: 1rem; }
  .main-container { padding: 14px; }
  .fab-camera { bottom: 18px; right: 18px; width: 54px; height: 54px; }
}
