/* -------------------------------------------------------------
 * AAC Communication Tracker
 * Mobile-First Responsive Stylesheet (Smooth Touch Scrolling)
 * Version 1.1.0
 * ------------------------------------------------------------- */

:root {
  /* Colors */
  --bg-main: #090d16;
  --bg-card: rgba(18, 26, 46, 0.75);
  --bg-card-hover: rgba(26, 38, 66, 0.85);
  --border-color: rgba(13, 148, 136, 0.18);
  --border-color-active: rgba(13, 148, 136, 0.45);

  --primary: #0d9488; /* Teal */
  --primary-glow: rgba(13, 148, 136, 0.35);
  --accent: #6366f1; /* Indigo */
  --accent-glow: rgba(99, 102, 241, 0.3);

  --danger: #ef4444;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Fonts */
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Outfit', sans-serif;

  /* Radii & Dimensions */
  --border-radius-lg: 16px;
  --border-radius-md: 10px;
  --border-radius-sm: 6px;
  --nav-height: 68px;
}

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

a, button, input, select, textarea, .nav-item, .circle-tally-btn, .autocomplete-item {
  touch-action: manipulation;
}

html {
  background-color: var(--bg-main);
  height: 100%;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}

body.dark-theme {
  background-attachment: fixed;
  background-image:
    radial-gradient(at 0% 0%, rgba(13, 148, 136, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%);
}

#app-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 14px calc(var(--nav-height) + 36px + env(safe-area-inset-bottom)) 14px;
  min-height: 100vh;
  position: relative;
}

/* Views Management */
.view {
  display: none;
  flex-direction: column;
  flex: 1;
  gap: 16px;
  opacity: 0;
  animation: fadeIn 0.25s ease forwards;
  overflow-y: visible;
}

.view.active {
  display: flex;
}

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

/* Headers */
.app-header {
  margin-bottom: 8px;
  text-align: left;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.logo-icon {
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo h1 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary) 30%, #5eead4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.view-footer {
  text-align: center;
  margin-top: 16px;
  padding: 10px 0;
}

.view-footer p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}

/* Cards & Panels */
.glass-panel, .card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  padding: 16px;
}

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

.panel-header h2, .card h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.section-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Forms & Inputs */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.input-group label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

input[type="text"], input[type="date"], select, textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea {
  resize: vertical;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  user-select: none;
  touch-action: manipulation;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #0f766e 100%);
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}

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

.pulse-glow {
  animation: pulseGlow 2.4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 4px 14px var(--primary-glow); }
  50% { box-shadow: 0 4px 22px var(--primary-glow), 0 0 0 4px rgba(13, 148, 136, 0.08); }
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.secondary-btn:active {
  background: rgba(255, 255, 255, 0.14);
}

.secondary-btn-sm {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 12px;
  font-size: 12px;
}

.danger-outline-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.danger-outline-btn:active {
  background: rgba(239, 68, 68, 0.25);
  transform: scale(0.97);
}

/* Clients Setup Layout */
.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .setup-grid {
    grid-template-columns: 1fr;
  }
}

.empty-state {
  padding: 18px 4px;
  text-align: center;
}

.empty-state p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.clients-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}

.client-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.client-item:hover, .client-item:active {
  background: rgba(13, 148, 136, 0.12);
  border-color: var(--primary);
}

.active-client-border {
  border-color: var(--primary);
  background: rgba(13, 148, 136, 0.1);
}

.client-card-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-round {
  width: 38px;
  height: 38px;
  border-radius: 19px;
  background: rgba(13, 148, 136, 0.25);
  color: #5eead4;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}

.client-meta h3 {
  font-size: 14px;
  font-weight: 600;
}

.client-meta p {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.delete-client-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
}

/* Active Session Header */
.session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  gap: 10px;
}

.client-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar-letter {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

.client-details {
  min-width: 0;
}

.client-details h3 {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-details p {
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-started-label {
  color: var(--text-muted) !important;
  font-style: italic;
}

.header-actions {
  flex-shrink: 0;
}

/* Sub-tabs Navigation inside Session View */
.session-tabs-nav {
  display: flex;
  background: rgba(9, 13, 22, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 4px;
  gap: 6px;
}

.sess-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 10px 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.sess-tab-btn.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.sess-tab-btn .tab-icon {
  width: 16px;
  height: 16px;
}

/* Session Panes Container */
.session-panes-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: visible;
}

.session-pane {
  display: none;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}

.session-pane.active {
  display: flex;
}

/* Pane 1: Tally Board Entry Bar */
.quick-entry-bar {
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  align-items: center;
}

.entry-field-word {
  flex: 1;
  position: relative;
}

.entry-field-word input {
  padding: 10px 32px 10px 10px;
  font-size: 14px;
}

.clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.entry-add-btn {
  flex: 0 0 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #0f766e 100%);
  border: none;
  border-radius: var(--border-radius-sm);
  color: white;
  cursor: pointer;
}

.entry-add-btn:active {
  transform: scale(0.94);
}

/* Row 2: Modality + Function selects */
.entry-selects-row {
  display: flex;
  gap: 10px;
  padding: 10px;
}

.entry-select-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.entry-select-col label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
}

.entry-select-col select {
  padding: 9px 8px;
  font-size: 13px;
}

@media (max-width: 480px) {
  .entry-selects-row {
    flex-direction: column;
  }
}

/* Row 3: Level of Support (radio) & Cue Modality (checkbox) chip selectors — independent dimensions */
.entry-chip-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
}

.entry-chip-row .chip-group + .chip-row-label {
  margin-top: 6px;
}

.chip-row-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
}

.chip-row-sublabel {
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0.8;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-toggle-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.15s ease;
  user-select: none;
}

.chip-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.chip-toggle-label:has(.chip-toggle-input:checked) {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--primary-glow);
}

.chip-toggle-label:has(.chip-toggle-input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Quick Word Options & Checkbox */
.quick-vocab-options-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
}

.quick-save-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  cursor: pointer;
  user-select: none;
}

.quick-save-label input[type="checkbox"] {
  accent-color: #f59e0b;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.vocab-backup-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* -------------------------------------------------------------
 * DYNAMIC TYPEAHEAD FILTER AUTOCOMPLETE DROPDOWN
 * ------------------------------------------------------------- */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #0b1120;
  border: 1px solid rgba(45, 212, 191, 0.45);
  border-radius: var(--border-radius-md);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65), 0 4px 10px rgba(0, 0, 0, 0.4);
  max-height: 240px;
  overflow-y: auto;
  z-index: 120;
  list-style: none;
  padding: 4px;
  margin: 0;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.autocomplete-dropdown.hidden {
  display: none;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  min-height: 44px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.12s ease;
  touch-action: manipulation;
}

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

.autocomplete-item:hover,
.autocomplete-item:active {
  background: rgba(45, 212, 191, 0.18);
}

.autocomplete-item.target-match {
  background: rgba(245, 158, 11, 0.12);
  border-left: 3px solid #f59e0b;
}

.ac-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.ac-word-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ac-word {
  font-weight: 700;
  font-size: 14px;
  color: #f8fafc;
}

.ac-modality {
  font-size: 11px;
  color: #94a3b8;
}

.star-target-btn {
  background: none;
  border: none;
  font-size: 13px;
  cursor: pointer;
  padding: 0 3px 0 0;
  color: var(--text-muted);
  opacity: 0.45;
  transition: all 0.15s ease;
  touch-action: manipulation;
  vertical-align: middle;
}

.star-target-btn.active-star {
  opacity: 1;
  color: #f59e0b;
  transform: scale(1.15);
}

/* Backup & Restore Action Card Styles */
.vocab-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.backup-action-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.backup-btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.email-backup-btn,
.export-btn,
.import-btn-label,
.clear-vocab-btn {
  flex: 1;
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  touch-action: manipulation;
}

.email-backup-btn {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  color: white;
  border: 1px solid rgba(45, 212, 191, 0.4);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

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

.backup-safe-note {
  font-size: 11.5px;
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  line-height: 1.4;
  margin-top: 10px;
}

/* Message Bank Explorer */
.explorer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.explorer-header h2 {
  margin-bottom: 0;
}

.search-box {
  flex: 1;
  min-width: 160px;
  max-width: 260px;
}

.search-box input {
  padding: 7px 10px;
  font-size: 13px;
}

.vocab-table-container {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  background: rgba(9, 13, 22, 0.2);
}

.vocab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.vocab-table th {
  background: rgba(9, 13, 22, 0.6);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vocab-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.modality-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #c7d2fe;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
}

/* Session Communication Log Table */
.log-table-container {
  max-height: 420px;
  overflow-y: auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  background: rgba(9, 13, 22, 0.2);
}

.utterance-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.utterance-table th {
  background: rgba(9, 13, 22, 0.6);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  position: sticky;
  top: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.utterance-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.table-empty-message {
  text-align: center;
  color: var(--text-muted);
  padding: 30px 12px;
  font-size: 12.5px;
}

.cat-badge {
  display: inline-block;
  background: rgba(13, 148, 136, 0.15);
  border: 1px solid rgba(13, 148, 136, 0.3);
  color: #5eead4;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.event-meta-line {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tally-action-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.circle-tally-btn {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

.circle-tally-btn:active {
  background: var(--primary);
}

.tally-number {
  min-width: 20px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
}

.action-btns {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.trash-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

/* Pane 2: Details & Analysis Layout */
.scrollable-pane {
  overflow-y: visible;
}

.session-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.context-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

@media (max-width: 560px) {
  .context-fields-grid {
    grid-template-columns: 1fr;
  }
}

.context-fields-grid .input-group {
  margin-bottom: 0;
}

.context-checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.context-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.context-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* Analytics Stats Panel */
.stats-summary-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

@media (max-width: 480px) {
  .stats-summary-tiles {
    grid-template-columns: 1fr 1fr;
  }
}

.summary-tile {
  background: rgba(9, 13, 22, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-md);
  padding: 10px;
  text-align: center;
}

.summary-tile .tile-value {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: #5eead4;
}

.summary-tile .tile-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  margin-top: 2px;
}

.stats-grid-layouts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.stat-category-box {
  background: rgba(9, 13, 22, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--border-radius-md);
  padding: 12px;
}

.stat-category-box h3 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 4px;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.analytic-summary-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.no-data-note {
  font-size: 12px;
  color: var(--text-muted);
}

.stat-bar-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 500;
  gap: 8px;
}

.stat-bar-labels span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-bar-bg {
  background: rgba(255, 255, 255, 0.05);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.stat-bar-fill {
  background: var(--primary);
  height: 100%;
  border-radius: 3px;
  transition: width 0.2s ease;
}

.stat-bar-fill.accent-bar {
  background: var(--accent);
}

/* Notes & Completion */
.spacing-top {
  margin-top: 14px;
}

.notes-area {
  margin-bottom: 0;
}

.completion-actions-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.completion-actions-group .btn {
  width: 100%;
}

/* Fixed Bottom Navigation Bar */
.app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(9, 13, 22, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 14px;
  transition: all 0.15s;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: calc(var(--nav-height) + 10px);
  right: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  background: #1e293b;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  border-left: 4px solid var(--primary);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  pointer-events: auto;
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.warning {
  border-left-color: #f59e0b;
}

.toast.info {
  border-left-color: var(--accent);
}

.toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}

.hidden {
  display: none !important;
}
