/* INNAMORARSÌ APP - DESIGN SYSTEM */

:root {
  --bg-color: #0e0d0f;
  --bg-gradient: linear-gradient(135deg, #0e0d0f 0%, #17151a 100%);
  --panel-bg: rgba(26, 23, 28, 0.6);
  --panel-border: rgba(255, 255, 255, 0.06);
  --panel-border-hover: rgba(212, 175, 55, 0.25);
  
  /* Warm Relational Gradients */
  --primary: #d4af37; /* Champagne Gold */
  --primary-glow: rgba(212, 175, 55, 0.2);
  --primary-gradient: linear-gradient(135deg, #f3e5ab 0%, #d4af37 100%);
  
  --secondary: #e09f67; /* Rose Gold */
  --secondary-gradient: linear-gradient(135deg, #f4c095 0%, #e09f67 100%);
  
  --warm-rose: #d67a7a;
  --warm-rose-gradient: linear-gradient(135deg, #e89b9b 0%, #b25858 100%);
  
  --success: #81b29a; /* Sage Green */
  --success-glow: rgba(129, 178, 154, 0.15);
  --success-gradient: linear-gradient(135deg, #a8dadc 0%, #457b9d 100%);
  
  --urgent: #e07a5f; /* Terracotta Red */
  --urgent-glow: rgba(224, 122, 95, 0.25);
  --urgent-gradient: linear-gradient(135deg, #f2a65a 0%, #e07a5f 100%);

  --warning: #f2cc8f; /* Sand Yellow */
  --warning-gradient: linear-gradient(135deg, #f2cc8f 0%, #e07a5f 100%);

  --text-main: #f4f1de; /* Warm White */
  --text-muted: #a8a39d;
  --text-dark: #1e1d1f;
  
  --font-display: 'Playfair Display', 'Outfit', serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --nav-height: 72px;
  --header-height: 70px;
}

/* Base Styles & Reset */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  font-family: var(--font-body);
}

body {
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  position: relative;
  width: 100%;
}

/* Background Glowing Orbs */
.blur-orb {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(130px);
  z-index: -1;
  opacity: 0.18;
  pointer-events: none;
}

.blur-orb.warm-rose {
  top: 15%;
  left: -80px;
  background: var(--warm-rose);
  animation: floatOrb1 15s infinite alternate ease-in-out;
}

.blur-orb.gold-glow {
  bottom: 20%;
  right: -80px;
  background: var(--primary);
  animation: floatOrb2 20s infinite alternate ease-in-out;
}

@keyframes floatOrb1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(50px, 30px) scale(1.1); }
}

@keyframes floatOrb2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-40px, -50px) scale(0.9); }
}

/* App Containers */
.app-container {
  width: 100%;
  max-width: 480px;
  background: rgba(14, 13, 15, 0.7);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(12px);
  padding-bottom: calc(var(--nav-height) + 15px);
}

#auth-overlay:not(.hidden) ~ .app-container {
  display: none;
}

/* Header */
.app-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--panel-border);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 13, 15, 0.9);
  backdrop-filter: blur(15px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.header-brand:hover .header-logo { border-color: rgba(212, 175, 55, 0.55); }
.header-brand:active { transform: scale(0.98); }

.header-logo {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.header-title-group h1 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff 0%, #e0c3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-title-group .subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

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

.badge-identity-level {
  background: var(--primary-gradient);
  color: var(--text-dark);
  padding: 4px 12px;
  border-radius: 30px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  box-shadow: 0 0 10px var(--primary-glow);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-label {
  font-weight: 700;
}

/* Alert Banner ("Never Miss Twice") */
.alert-banner {
  background: linear-gradient(135deg, rgba(224, 122, 95, 0.18) 0%, rgba(178, 88, 88, 0.18) 100%);
  border: 1px solid rgba(224, 122, 95, 0.4);
  margin: 15px 15px 0 15px;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.4s ease-out;
}

.alert-content-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.alert-content {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #f3c6bb;
}

.alert-icon {
  width: 16px;
  height: 16px;
  fill: #f3c6bb;
  flex-shrink: 0;
}

.btn-alert-action {
  background: rgba(224, 122, 95, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

/* App Views Layout */
.app-main-content {
  padding: 15px;
  flex: 1;
}

.app-view {
  display: none;
  animation: fadeIn 0.35s ease-out;
}

.app-view.active {
  display: block;
}

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

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

.view-header h2 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.glass {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
  border-color: var(--panel-border-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* BUTTONS */
button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: var(--font-body);
  transition: all 0.25s ease;
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--text-dark);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 15px var(--primary-glow);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.82rem;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
}

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

.btn-danger {
  background: linear-gradient(135deg, #e07a5f 0%, #b23a22 100%);
  color: white;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-success {
  background: var(--success-gradient);
  color: var(--text-dark);
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.82rem;
}

.btn-urgent {
  background: var(--urgent-gradient);
  color: white;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 8px 25px var(--urgent-glow);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: block;
  width: 100%;
  text-align: center;
  animation: pulseButton 2.5s infinite;
}

@keyframes pulseButton {
  0%, 100% { box-shadow: 0 8px 22px rgba(224, 122, 95, 0.3); }
  50% { box-shadow: 0 8px 30px rgba(224, 122, 95, 0.6); }
}

.btn-icon {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
}

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

.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.mini-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.inline {
  display: inline-block;
  vertical-align: middle;
}

.w-full {
  width: 100%;
}

.mt-15 {
  margin-top: 15px;
}

.text-center {
  text-align: center;
}

.subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* 1. NERVOUS SYSTEM SELECTOR WIDGET */
.nervous-system-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.nervous-states-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.state-btn {
  padding: 8px 4px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
  transition: all 0.2s ease;
}

.state-btn:hover {
  transform: translateY(-1px);
}

.state-btn.calmo { border-color: rgba(129, 178, 154, 0.3); }
.state-btn.attivato { border-color: rgba(242, 204, 143, 0.3); }
.state-btn.fight { border-color: rgba(224, 122, 95, 0.3); }
.state-btn.flight { border-color: rgba(224, 122, 95, 0.3); }
.state-btn.freeze { border-color: rgba(168, 163, 157, 0.3); }
.state-btn.fawn { border-color: rgba(168, 163, 157, 0.3); }

/* Active colors in JS */
.state-btn.calmo.active { background: #81b29a; color: var(--text-dark); box-shadow: 0 0 10px rgba(129,178,154,0.4); }
.state-btn.attivato.active { background: #f2cc8f; color: var(--text-dark); box-shadow: 0 0 10px rgba(242,204,143,0.4); }
.state-btn.fight.active { background: #e07a5f; color: white; box-shadow: 0 0 10px rgba(224,122,95,0.4); }
.state-btn.flight.active { background: #e07a5f; color: white; box-shadow: 0 0 10px rgba(224,122,95,0.4); }
.state-btn.freeze.active { background: #a8a39d; color: var(--text-dark); box-shadow: 0 0 10px rgba(168,163,157,0.4); }
.state-btn.fawn.active { background: #a8a39d; color: var(--text-dark); box-shadow: 0 0 10px rgba(168,163,157,0.4); }

.nervous-feedback {
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--primary);
  padding: 10px;
  border-radius: 8px;
  margin-top: 12px;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-main);
  animation: fadeIn 0.3s ease-out;
}

/* 2. ACTIVE MODULE CARD */
.active-module-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}

.module-phase-tag {
  font-size: 0.65rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.active-module-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 2px;
}

.module-description {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.btn-play-video {
  flex-shrink: 0;
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

/* 3. PRACTICES CHECKLIST */
.practices-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 16px;
}

.practices-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.practices-header h4 {
  font-size: 0.88rem;
  font-weight: 700;
}

.practices-progress-count {
  font-size: 0.72rem;
  color: var(--primary);
  background: rgba(212, 175, 55, 0.1);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
}

.practices-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Pratica Item Layout */
.practice-item {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.practice-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.1);
}

.practice-item.completed {
  border-color: rgba(129, 178, 154, 0.3);
  background: rgba(129, 178, 154, 0.04);
}

.practice-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.practice-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.practice-badge-type {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  letter-spacing: 0.3px;
}

.practice-item.completed .practice-name {
  text-decoration: line-through;
  color: var(--text-muted);
}

.practice-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.practice-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.practice-item-meta {
  font-size: 0.68rem;
  color: var(--primary);
  font-weight: 700;
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

/* Env Cue Checkbox in Practice Card */
.practice-item-cue {
  border-top: 1px dashed rgba(255, 255, 255, 0.04);
  padding-top: 6px;
  width: 100%;
  font-size: 0.7rem;
}

.practice-item-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.practice-actions {
  display: flex;
  gap: 6px;
}

.btn-check-practice {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
}

.btn-check-practice.action-complete:hover {
  background: var(--success-gradient);
  color: var(--text-dark);
  border-color: transparent;
}

.practice-status-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(129, 178, 154, 0.15);
  color: var(--success);
}

.ai-review-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 9px 10px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.035);
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.ai-review-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  margin-top: 1px;
  fill: #c7a667;
}

.course-complete-message {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid rgba(129, 178, 154, 0.28);
  border-radius: 8px;
  background: rgba(129, 178, 154, 0.07);
}

.course-complete-message span { color: var(--text-muted); font-size: 0.75rem; line-height: 1.5; }

/* 4. STATS DOUBLE ROW */
.stats-row-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.dashboard-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.stat-big-val {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
}

.stat-label-dashboard {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 6px;
}

/* Circular Chart custom gold colors */
.circular-progress-container {
  width: 70px;
  height: 70px;
}

.circular-chart {
  display: block;
  max-width: 100%;
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 3.5;
}

.circle {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease;
}

.circular-chart.purple .circle {
  stroke: var(--primary);
}

.percentage {
  fill: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.52rem;
  text-anchor: middle;
  font-weight: 800;
}

/* MAP VIEW TIMELINE */
.path-timeline {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.journey-roadmap {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.journey-roadmap-header,
.mm-privacy-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.journey-roadmap-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--primary);
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
}

.journey-roadmap-header h3,
.mm-privacy-heading h3 { font-size: 0.98rem; }
.journey-roadmap-progress { color: var(--primary); font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.journey-roadmap-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.journey-roadmap-step { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 9px; align-items: center; min-height: 56px; padding: 9px; border: 1px solid rgba(255,255,255,0.06); border-radius: 8px; background: rgba(255,255,255,0.02); }
.journey-roadmap-number { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.06); color: var(--text-muted); font-size: 0.7rem; font-weight: 700; }
.journey-roadmap-copy { min-width: 0; }
.journey-roadmap-copy strong,
.journey-roadmap-copy span { display: block; }
.journey-roadmap-copy strong { font-size: 0.76rem; }
.journey-roadmap-copy span { margin-top: 2px; color: var(--text-muted); font-size: 0.65rem; line-height: 1.35; }
.journey-roadmap-status { color: var(--text-muted); font-size: 0.62rem; font-weight: 700; white-space: nowrap; }
.journey-roadmap-step.is-done .journey-roadmap-number { background: rgba(129,178,154,0.16); color: var(--success); }
.journey-roadmap-step.is-done .journey-roadmap-status { color: var(--success); }
.journey-roadmap-step.is-active { border-color: rgba(212,175,55,0.35); }
.journey-roadmap-step.is-active .journey-roadmap-number,
.journey-roadmap-step.is-active .journey-roadmap-status { color: var(--primary); }
.journey-roadmap-step.is-locked { opacity: 0.55; }

@media (max-width: 720px) {
  .journey-roadmap-list { grid-template-columns: 1fr; }
  .journey-roadmap-step { grid-template-columns: 28px minmax(0, 1fr); }
  .journey-roadmap-status { grid-column: 2; }
}

.timeline-phase-group {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 14px;
}

.timeline-phase-header {
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.timeline-phase-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.timeline-modules-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-module-item {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 10px 12px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.timeline-module-item:hover {
  border-color: rgba(212, 175, 55, 0.2);
}

.timeline-module-item.active {
  border-color: var(--primary);
  background: rgba(212, 175, 55, 0.03);
}

.timeline-module-item.deep-link-target {
  border-color: var(--primary);
  background: rgba(212, 175, 55, 0.12);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12);
}

.timeline-module-item.locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.timeline-mod-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 75%;
}

.timeline-mod-title {
  font-size: 0.85rem;
  font-weight: 700;
}

.timeline-mod-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.timeline-mod-badge {
  font-size: 0.65rem;
  padding: 3px 6px;
  border-radius: 6px;
  font-weight: 700;
  white-space: nowrap;
}

.timeline-mod-badge.badge-active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--primary);
}

.timeline-mod-badge.badge-completed {
  background: rgba(129, 178, 154, 0.15);
  color: var(--success);
}

/* DIARY / REFLECTION SLIDERS */
.journal-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 10px;
}

.metric-slider-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-slider-group label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-slider-group strong {
  color: var(--primary);
}

.slider-input {
  -webkit-appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-gradient);
  cursor: pointer;
  box-shadow: 0 0 5px var(--primary-glow);
}

.journal-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 12px;
  border-radius: 12px;
  min-height: 100px;
  resize: none;
  font-size: 0.85rem;
  line-height: 1.4;
  width: 100%;
}

.journal-input:focus {
  outline: none;
  border-color: var(--primary);
}

.journal-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.voice-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  padding: 8px 12px;
}

.mic-dot {
  width: 8px;
  height: 8px;
  background-color: #e07a5f;
  border-radius: 50%;
  display: inline-block;
}

.mic-dot.recording {
  animation: pulseRec 1s infinite alternate;
}

@keyframes pulseRec {
  0% { transform: scale(1); opacity: 0.5; box-shadow: 0 0 0 0 rgba(224, 122, 95, 0.7); }
  100% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 8px 3px rgba(224, 122, 95, 0.2); }
}

.voice-timer {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: #e07a5f;
}

.voice-wave-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 25px;
  background: rgba(224, 122, 95, 0.05);
  border: 1px dashed rgba(224, 122, 95, 0.2);
  border-radius: 8px;
  padding: 5px;
  margin-top: 10px;
}

.voice-wave-bar {
  width: 3px;
  height: 70%;
  background-color: #e07a5f;
  border-radius: 1px;
  animation: bounceWave 0.8s infinite ease-in-out;
}

.voice-wave-bar:nth-child(2) { animation-delay: 0.1s; }
.voice-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.voice-wave-bar:nth-child(4) { animation-delay: 0.15s; }
.voice-wave-bar:nth-child(5) { animation-delay: 0.3s; }

@keyframes bounceWave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1.1); }
}

.voice-recordings-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.voice-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 10px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.voice-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.voice-player {
  width: 100%;
  height: 30px;
}

.history-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
}

.history-item {
  background: rgba(0, 0, 0, 0.15);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.history-item-text {
  font-size: 0.8rem;
  line-height: 1.35;
}

/* MANIFESTO IDENTITÀ RELAZIONALE */
.manifesto-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.form-group label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-divider {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--primary);
  margin: 18px 0 10px 0;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.form-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  padding: 10px 12px;
  border-radius: 10px;
  width: 100%;
  font-size: 0.82rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

textarea.form-input {
  min-height: 70px;
  resize: none;
  font-size: 0.8rem;
}

/* Beautiful Manifesto Parchment/Certificate Render */
.manifesto-document-card {
  background: rgba(243, 229, 171, 0.03); /* slight cream gold tint */
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 24px;
  border-radius: 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.06);
}

.manifesto-seal {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.manifesto-document-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.manifesto-section-block {
  text-align: left;
  margin-bottom: 14px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.manifesto-section-block strong {
  color: var(--secondary);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 2px;
}

.manifesto-section-block p {
  color: var(--text-main);
  padding-left: 5px;
  border-left: 2px solid rgba(212, 175, 55, 0.15);
}

.manifesto-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  margin-top: 25px;
  padding-top: 12px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

#doc-signature {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--primary);
}

/* SETTINGS RADAR CHART */
.radar-chart-container {
  display: flex;
  justify-content: center;
  margin: 15px 0;
}

.assessment-info-box {
  background: rgba(0, 0, 0, 0.15);
  padding: 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assessment-info-box strong {
  color: var(--primary);
}

.exam-status-box-layout {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  text-align: center;
  margin-bottom: 8px;
}

.test-noti-section {
  display: flex;
  margin-top: 8px;
}

.notification-status-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--panel-border);
  padding: 12px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.status-indicator-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e07a5f;
}

.status-dot.active {
  background: var(--success);
  box-shadow: 0 0 8px rgba(129, 178, 154, 0.6);
}

.install-instructions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.instruction-tab {
  background: rgba(0, 0, 0, 0.15);
  padding: 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  line-height: 1.4;
}

.instruction-tab strong {
  display: block;
  margin-bottom: 4px;
}

.instruction-tab ol {
  padding-left: 14px;
}

.btn-group {
  display: flex;
  gap: 10px;
  width: 100%;
}

.btn-group button {
  flex: 1;
}

/* DEVELOPER MODE TOGGLE SWITCH */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: .4s;
  border-radius: 34px;
  border: 1px solid var(--panel-border);
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.switch input:checked + .slider-switch {
  background-color: var(--success);
  border-color: rgba(129, 178, 154, 0.3);
}

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

/* FLOATING BOTTOM NAV */
.app-bottom-nav {
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 480px;
  height: var(--nav-height);
  background: rgba(14, 13, 15, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--panel-border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  z-index: 10;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 100%;
  color: var(--text-muted);
  background: transparent;
  font-size: 0.62rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

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

.nav-item.active .nav-icon {
  transform: translateY(-1px);
  filter: drop-shadow(0 0 3px var(--primary-glow));
}

.nav-item-urgent {
  position: relative;
}

.nav-wave-emoji {
  font-size: 1.4rem;
  margin-top: -6px;
  animation: floatWave 3s infinite ease-in-out;
}

@keyframes floatWave {
  0% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

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

.hidden {
  display: none !important;
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 15px;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from { transform: scale(0.9) translateY(15px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
}

/* Onboarding step navigation classes */
.onboarding-step.hidden {
  display: none !important;
}

.onboarding-step.active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sliders-onboarding-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

/* Final Exam style inside modal */
.exam-questions-list-layout {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 5px;
}

.exam-question-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exam-q-text {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.35;
}

.exam-answers-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.exam-answer-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.75rem;
  cursor: pointer;
  line-height: 1.3;
}

.exam-answer-option input {
  margin-top: 2px;
  accent-color: var(--primary);
}

/* Final status indicators */
.exam-status-badge {
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  display: inline-block;
}

.exam-status-badge.verde {
  background: rgba(129, 178, 154, 0.15);
  color: var(--success);
}

.exam-status-badge.giallo {
  background: rgba(242, 204, 143, 0.15);
  color: #fbbf24;
}

.exam-status-badge.rosso {
  background: rgba(224, 122, 95, 0.15);
  color: var(--urgent);
}

/* NEW: Coach Dashboard Table Styles */
/* NEW: Coach Dashboard Master-Detail Layout Styles */
.coach-dashboard-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .coach-dashboard-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.coach-students-sidebar {
  padding: 15px;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
}

.coach-students-list-container {
  overflow-y: auto;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.coach-student-item {
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.coach-student-item:hover {
  background: rgba(212, 175, 55, 0.05);
  border-color: rgba(212, 175, 55, 0.2);
}

.coach-student-item.active {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.4);
}

.coach-student-item h5 {
  margin: 0 0 4px 0;
  font-size: 0.85rem;
  color: var(--text-main);
}

.coach-student-item p {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.coach-student-detail-panel {
  padding: 20px;
  min-height: 500px;
}

.coach-detail-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 15px;
}

.coach-detail-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.coach-stat-card {
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.coach-stat-card .label {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.coach-stat-card strong {
  font-size: 0.8rem;
  color: var(--primary);
}

.coach-detail-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.coach-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.coach-tab-btn:hover {
  color: var(--text-main);
}

.coach-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.coach-tab-content {
  display: none;
  padding-top: 15px;
}

.coach-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

.coach-ai-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.coach-ai-heading h4 {
  margin-bottom: 5px;
  color: var(--primary);
}

.coach-ai-heading .btn-primary {
  flex: 0 0 auto;
  padding: 9px 14px;
}

.coach-ai-status {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
  font-size: 0.72rem;
}

.coach-ai-status.is-ready { color: var(--success); }
.coach-ai-status.is-error { color: #f2cc8f; }

.coach-ai-analysis {
  display: grid;
  gap: 18px;
  padding-top: 16px;
}

.coach-ai-section {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.coach-ai-section:last-child { border-bottom: 0; }

.coach-ai-section h5 {
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 0.78rem;
}

.coach-ai-section p,
.coach-ai-section li {
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.55;
}

.coach-ai-section ul,
.coach-ai-section ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding-left: 18px;
}

.coach-ai-finding {
  margin-top: 10px;
  padding-left: 10px;
  border-left: 2px solid rgba(212, 175, 55, 0.35);
}

.coach-ai-finding strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text-main);
  font-size: 0.74rem;
}

.coach-ai-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 0.66rem;
}

.coach-ai-review {
  display: grid;
  gap: 9px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.coach-ai-review label { font-size: 0.72rem; font-weight: 700; }
.coach-ai-review .btn-secondary { justify-self: start; }

.practice-item {
  animation: fadeIn 0.3s ease-out;
}

.achievement-item {
  transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-item .nav-icon,
.nav-item {
  transition: color 0.2s ease, background 0.2s ease;
}

.exam-areas-progress-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exam-area-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

/* Responsive fixes */
@media (max-width: 480px) {
  .app-container {
    border-left: none;
    border-right: none;
    max-width: 100%;
  }
  .app-bottom-nav {
    max-width: 100%;
  }
}

/* ==========================================
   DESKTOP OPTIMIZATION
   ========================================== */
@media (min-width: 860px) {
  .app-container {
    max-width: 760px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin: 24px 0;
    min-height: calc(100vh - 48px);
    overflow: hidden;
  }

  .app-bottom-nav {
    max-width: 760px;
    border-radius: 0 0 20px 20px;
  }

  .reflection-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }

  .nervous-states-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

body.role-coach.has-desktop-console .app-container {
  max-width: 760px;
}

@media (min-width: 1200px) {
  body.role-coach .app-container {
    max-width: 1120px;
  }

  .coach-dashboard-layout {
    grid-template-columns: 360px minmax(0, 1fr);
  }
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
#toast-stack {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: calc(100% - 32px);
  max-width: 420px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(23, 21, 26, 0.92);
  border: 1px solid var(--panel-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 0.8rem;
  line-height: 1.4;
}

.toast-item.leaving {
  animation: toastOut 0.25s ease-in forwards;
}

.toast-icon {
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast-text {
  flex: 1;
  color: var(--text-main);
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0 0 0 6px;
  line-height: 1;
}

.toast-item.success { border-color: rgba(129, 178, 154, 0.35); }
.toast-item.success .toast-icon { color: var(--success); }
.toast-item.error { border-color: rgba(224, 122, 95, 0.4); }
.toast-item.error .toast-icon { color: var(--urgent); }
.toast-item.info { border-color: rgba(212, 175, 55, 0.3); }
.toast-item.info .toast-icon { color: var(--primary); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-10px) scale(0.96); }
}

/* Confirm dialog (replaces native confirm()) */
.confirm-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.confirm-modal-actions .btn-primary,
.confirm-modal-actions .btn-secondary {
  flex: 1;
}

/* ==========================================
   LOADING STATES
   ========================================== */
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--primary);
  animation: spin 0.7s linear infinite;
}

.loading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.skeleton-block {
  border-radius: 10px;
  background: linear-gradient(100deg, rgba(255,255,255,0.03) 30%, rgba(255,255,255,0.07) 50%, rgba(255,255,255,0.03) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 150% 0; }
  100% { background-position: -50% 0; }
}

.skeleton-student-item {
  height: 54px;
  margin-bottom: 10px;
}

/* ==========================================
   EMPTY STATES
   ========================================== */
.empty-state-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 16px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
  opacity: 0.7;
}

.empty-state-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.empty-state-desc {
  font-size: 0.75rem;
  max-width: 260px;
  line-height: 1.4;
}

/* ==========================================
   COACH KPI OVERVIEW
   ========================================== */
.coach-kpi-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

@media (min-width: 640px) {
  .coach-kpi-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.coach-kpi-card {
  padding: 14px;
  text-align: center;
}

.coach-kpi-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.coach-kpi-value.verde { color: var(--success); }
.coach-kpi-value.giallo { color: #fbbf24; }
.coach-kpi-value.rosso { color: var(--urgent); }

.coach-kpi-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================
   FILTER / SORT BAR (coach student list)
   ========================================== */
.coach-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.coach-filter-row select {
  flex: 1 1 120px;
  min-width: 0;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 0.72rem;
  padding: 7px 8px;
  border-radius: 8px;
  outline: none;
}

/* Inactivity badge on student list items */
.coach-student-item {
  position: relative;
}

.inactivity-badge,
.assignment-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.inactivity-badge.ok {
  background: rgba(129, 178, 154, 0.15);
  color: var(--success);
}

.inactivity-badge.warn {
  background: rgba(242, 204, 143, 0.18);
  color: #fbbf24;
}

.inactivity-badge.danger {
  background: rgba(224, 122, 95, 0.18);
  color: var(--urgent);
}

.assignment-badge.unassigned {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.assignment-badge.assigned {
  background: rgba(212, 175, 55, 0.15);
  color: var(--primary);
}

.coach-assign-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.75rem;
}

.coach-assign-row label {
  color: var(--text-muted);
  white-space: nowrap;
}

.coach-assign-row select {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 0.78rem;
  padding: 7px 8px;
  border-radius: 8px;
  outline: none;
}

/* ==========================================
   COACH PRIVATE NOTES
   ========================================== */
.coach-notes-box {
  margin-top: 15px;
}

.coach-notes-box textarea {
  min-height: 80px;
}

.coach-notes-save-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.coach-notes-saved-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ==========================================
   STUDENT ACHIEVEMENT BADGES
   ========================================== */
.achievements-card {
  margin-top: 15px;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.achievement-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.achievement-item.unlocked {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.3);
}

.achievement-icon {
  font-size: 1.35rem;
  filter: grayscale(1) opacity(0.4);
}

.achievement-item.unlocked .achievement-icon {
  filter: none;
}

.achievement-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.achievement-item.unlocked .achievement-label {
  color: var(--text-main);
}

/* ==========================================
   TREND CHART
   ========================================== */
.trend-chart-card {
  margin-top: 15px;
}

.trend-chart-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.trend-chart-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.68rem;
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
}

.trend-chart-tab-btn.active {
  background: var(--primary-gradient);
  color: var(--text-dark);
  font-weight: 700;
  border-color: transparent;
}

.trend-chart-canvas-wrapper {
  width: 100%;
  overflow: hidden;
}

/* Journal search */
.journal-search-row {
  margin-bottom: 12px;
}

/* ==========================================
   ACCESSIBILITY: FOCUS VISIBLE
   ========================================== */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ==========================================
   APP SHELL: SIDEBAR PERSISTENTE (stile HCE)
   ========================================== */
.app-shell-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 100vh;
}

/* Su mobile la sidebar è nascosta: restano header + bottom nav */
.app-sidebar { display: none; }

.sidebar-badge {
  margin-left: auto;
  background: var(--urgent);
  color: white;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

@media (min-width: 900px) {
  /* Layout applicazione a tutta larghezza con sidebar fissa */
  body {
    justify-content: flex-start;
  }
  .app-container {
    flex-direction: row;
    align-items: stretch;
    max-width: 100%;
    width: 100%;
    margin: 0;
    min-height: 100vh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding-bottom: 0;
    overflow: visible;
  }
  body.role-coach .app-container { max-width: 100%; }

  /* Su desktop l'header sparisce: brand e utente vivono nella sidebar */
  .app-header { display: none; }
  .app-bottom-nav { display: none !important; }

  .app-main-content {
    padding: 28px clamp(24px, 3vw, 48px) 56px;
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
  }

  .app-shell-main {
    width: calc(100% - 248px);
    margin-left: 248px;
    min-height: 100dvh;
  }

  .app-sidebar {
    display: flex;
    flex-direction: column;
    width: 248px;
    flex-shrink: 0;
    padding: 18px 12px;
    background: #0f0e10;
    border-right: 1px solid var(--panel-border);
    position: fixed;
    inset: 0 auto 0 0;
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    z-index: 30;
  }

  .sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 10px 16px;
    color: inherit;
  }
  .sidebar-brand-logo {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.3);
  }
  .sidebar-brand-name {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
  }
  .sidebar-brand:hover .sidebar-brand-logo { border-color: rgba(212, 175, 55, 0.6); }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
  }

  .sidebar-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
  }
  .sidebar-item:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-main); }
  .sidebar-item.active { background: rgba(212, 175, 55, 0.12); color: var(--primary); }
  .sidebar-item .nav-icon { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }

  .sidebar-footer {
    border-top: 1px solid var(--panel-border);
    padding-top: 12px;
    margin-top: 10px;
    flex: 0 0 auto;
    background: #0f0e10;
  }
  .sidebar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px 10px;
    min-height: 22px;
  }
  .sidebar-xp {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.8rem; font-weight: 700; color: var(--text-main);
  }
  .sidebar-xp-star { color: var(--primary); }
  .sidebar-bell {
    position: relative;
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); padding: 4px;
    display: flex; align-items: center;
  }
  .sidebar-bell:hover { color: var(--text-main); }
  .sidebar-bell .nav-icon { width: 19px; height: 19px; fill: currentColor; }

  .sidebar-user-row { display: flex; align-items: center; gap: 6px; }
  .sidebar-user {
    display: flex; align-items: center; gap: 10px;
    flex: 1; min-width: 0;
    background: none; border: none; cursor: pointer;
    padding: 8px; border-radius: 10px; text-align: left; color: inherit;
  }
  .sidebar-user:hover { background: rgba(255, 255, 255, 0.05); }
  .sidebar-user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    flex-shrink: 0; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-gradient); color: var(--text-dark);
    font-size: 0.72rem; font-weight: 700;
  }
  .sidebar-user-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
  .sidebar-user-info strong {
    font-size: 0.78rem; color: var(--text-main);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sidebar-user-info small {
    font-size: 0.66rem; color: var(--text-muted);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sidebar-logout {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); padding: 8px; border-radius: 8px;
    display: flex; align-items: center; flex-shrink: 0;
  }
  .sidebar-logout:hover { color: #e8a29a; background: rgba(224, 122, 95, 0.1); }
  .sidebar-logout .nav-icon { width: 18px; height: 18px; fill: currentColor; }
}

@media (max-width: 899px) {
  .app-container {
    padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 15px);
  }

  .app-bottom-nav {
    height: calc(var(--nav-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
  }

  .nav-item,
  .btn-primary,
  .btn-secondary {
    min-height: 44px;
  }
}

/* ==========================================
   HEADER: USER MENU & NOTIFICATION BELL
   ========================================== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-menu-btn {
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
}

.user-menu-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.user-menu-btn .nav-icon {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.notif-bell-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--urgent);
  border: 1.5px solid var(--bg-color);
}

.user-menu {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  padding: 5px 10px 5px 5px;
  cursor: pointer;
  color: var(--text-main);
}

.user-menu-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: var(--text-dark);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-menu-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  max-width: 110px;
  overflow: hidden;
}

.user-menu-name,
.user-menu-role {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

@media (max-width: 420px) {
  .user-menu-info {
    display: none;
  }
  .user-menu-trigger {
    padding: 5px;
  }
  .header-title-group .subtitle {
    display: none;
  }
}

.user-menu-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-main);
}

.user-menu-role {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.user-menu-caret {
  width: 16px;
  height: 16px;
  fill: var(--text-muted);
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: rgba(20, 18, 22, 0.97);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  padding: 6px;
  z-index: 50;
  animation: toastIn 0.18s ease-out;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text-main);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
}

.user-menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.user-menu-item .nav-icon {
  width: 17px;
  height: 17px;
  fill: currentColor;
  flex-shrink: 0;
}

.user-menu-divider {
  height: 1px;
  background: var(--panel-border);
  margin: 6px 4px;
}

.user-menu-item-danger {
  color: #e8a29a;
}

.user-menu-item-danger:hover {
  background: rgba(224, 122, 95, 0.12);
}

/* ==========================================
   COACH PRIORITY BLOCK & QUICK ACTIONS
   ========================================== */
.coach-priority-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border-color: rgba(224, 122, 95, 0.3);
  flex-wrap: wrap;
}

.coach-review-queue {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 8px;
}

.coach-review-head,
.coach-review-item,
.coach-review-actions,
.coach-matchmaking-gate {
  display: flex;
  align-items: center;
}

.coach-review-head { justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.coach-review-head h3 { font-size: 1rem; }
.coach-review-head p { margin-top: 3px; color: var(--text-muted); font-size: 0.72rem; }
.coach-review-list { display: flex; flex-direction: column; gap: 8px; }

.coach-review-item {
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  background: rgba(255,255,255,0.025);
}

.coach-review-item.is-gate { border-color: rgba(129,178,154,0.3); background: rgba(129,178,154,0.055); }
.coach-review-copy { min-width: 0; }
.coach-review-copy strong { display: block; margin-top: 2px; font-size: 0.8rem; }
.coach-review-copy p { margin-top: 3px; color: var(--text-muted); font-size: 0.7rem; line-height: 1.4; }
.coach-review-copy time { display: block; margin-top: 5px; color: var(--text-muted); font-size: 0.62rem; }
.coach-review-type { color: #c7a667; font-size: 0.6rem; font-weight: 700; text-transform: uppercase; }
.coach-review-actions { flex: 0 0 auto; gap: 6px; }
.coach-review-actions .btn-secondary { padding: 6px 9px; font-size: 0.68rem; }
.coach-review-empty { padding: 14px 4px; color: var(--text-muted); font-size: 0.74rem; }

.coach-matchmaking-gate {
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(129,178,154,0.22);
  background: rgba(129,178,154,0.045);
}

.coach-matchmaking-gate .label { display: block; color: var(--text-muted); font-size: 0.62rem; text-transform: uppercase; }
.coach-matchmaking-gate strong { display: block; margin-top: 3px; font-size: 0.82rem; }
.coach-matchmaking-gate p { margin-top: 3px; color: var(--text-muted); font-size: 0.68rem; line-height: 1.35; }

.coach-priority-text h4 {
  color: var(--urgent);
  font-size: 0.85rem;
  margin-bottom: 3px;
}

.coach-priority-text p {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.coach-quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.coach-quick-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  padding: 8px 14px;
}

.coach-quick-action-btn .nav-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ==========================================
   COACH KPI CARDS: CLICKABLE
   ========================================== */
.coach-kpi-card {
  cursor: pointer;
  text-align: center;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.coach-kpi-card:hover {
  border-color: var(--panel-border-hover);
  transform: translateY(-1px);
}

.coach-kpi-hint {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.8;
}

/* ==========================================
   SEARCH CLEAR / FILTER META / CHIPS
   ========================================== */
.coach-search-bar-wrapper {
  position: relative;
  margin-bottom: 10px;
}

.coach-search-bar-wrapper input {
  width: 100%;
  padding: 8px 32px 8px 12px;
  font-size: 0.8rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  outline: none;
}

.coach-search-clear-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 4px 6px;
}

.coach-search-clear-btn:hover {
  color: var(--text-main);
}

.coach-filter-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin: 8px 0;
}

.coach-clear-filters-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
}

.coach-active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.coach-active-filter-chips:empty {
  display: none;
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--primary);
  font-size: 0.66rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 20px;
  cursor: pointer;
}

.coach-empty-support-link {
  display: block;
  margin-top: 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-decoration: underline;
}

/* ==========================================
   STUDENT LIST ITEM: AVATAR ROW
   ========================================== */
.coach-student-item-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.coach-student-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.12);
  color: var(--primary);
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.coach-student-item-info {
  flex: 1;
  min-width: 0;
}

.coach-student-item-info h5 {
  display: flex;
  align-items: center;
  gap: 6px;
}

.student-item-alert-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--urgent);
  flex-shrink: 0;
}

/* ==========================================
   PROFILE VIEW
   ========================================== */
.profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-upload {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.1);
  border: 1px dashed rgba(212, 175, 55, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
}

.profile-avatar-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-upload span {
  font-size: 1.6rem;
  color: var(--primary);
}

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

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

.profile-attachments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.profile-attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 0.76rem;
}

.profile-attachment-item a {
  color: var(--primary);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-attachment-remove-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.profile-attachment-remove-btn:hover {
  color: var(--urgent);
}

.profile-visibility-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.profile-visibility-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.profile-visibility-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* Bug reports */
.bug-report-settings-card {
  border-color: rgba(129, 178, 154, 0.18);
}

.bug-report-modal-card {
  max-width: 620px;
  border-radius: 8px;
  gap: 18px;
}

.bug-report-modal-header,
.bug-report-label-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.bug-report-modal-header .subtitle {
  margin-top: 4px;
  max-width: 500px;
}

#bug-report-description {
  min-height: 150px;
  resize: vertical;
}

#bug-report-char-count,
.bug-report-field-hint {
  color: var(--text-muted);
  font-size: 0.68rem;
}

#bug-report-char-count.invalid,
.bug-report-field-hint.invalid {
  color: #e6a3a3;
}

.bug-report-upload {
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 7px;
  border: 1px dashed rgba(129, 178, 154, 0.42);
  border-radius: 8px;
  background: rgba(129, 178, 154, 0.045);
  color: var(--text-main);
  cursor: pointer;
}

.bug-report-upload:hover,
.bug-report-upload:focus-visible {
  border-color: var(--primary);
  background: rgba(129, 178, 154, 0.08);
}

.bug-report-upload .icon {
  width: 20px;
  height: 20px;
  fill: var(--primary);
}

.bug-report-screenshot-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.bug-report-preview-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
}

.bug-report-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bug-report-preview-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(15, 15, 17, 0.9);
  color: white;
  cursor: pointer;
}

.bug-report-privacy-note {
  margin: 14px 0;
  padding: 10px 12px;
  border-left: 3px solid #81b29a;
  background: rgba(129, 178, 154, 0.06);
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

@media (max-width: 520px) {
  .bug-report-screenshot-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bug-report-modal-header {
    align-items: flex-start;
  }
}

.profile-share-link-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.profile-share-link-row input {
  flex: 1;
  min-width: 0;
}

@media (max-width: 560px) {
  .profile-fields-grid { grid-template-columns: 1fr; }
  .profile-avatar-row { align-items: flex-start; }
  .profile-share-link-row { flex-direction: column; }
  .profile-share-link-row .btn-secondary { width: 100%; }
}

/* Public shared profile page */
.public-profile-card {
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;
}

.public-profile-avatar-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(212, 175, 55, 0.35);
}

.public-profile-bio {
  margin-top: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
  color: var(--text-main);
}

/* ==========================================
   MATCHMAKING
   ========================================== */
.mm-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.mm-status-label {
  display: block;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}
.mm-status-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-main);
  margin-top: 2px;
}
.mm-status-badge {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
.mm-status-badge.ok { background: rgba(129,178,154,0.16); color: var(--success); }
.mm-status-badge.wait { background: rgba(242,204,143,0.16); color: #fbbf24; }

.mm-course-progress > div:first-child { display: flex; justify-content: space-between; gap: 12px; font-size: 0.7rem; }
.mm-course-progress-track { height: 6px; margin-top: 6px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,0.07); }
.mm-course-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #81b29a; transition: width 240ms ease; }

.mm-color-preview { display: flex; align-items: center; gap: 10px; }
.mm-color-preview small { display: block; color: var(--text-muted); font-size: 0.62rem; }
.mm-color-preview strong { display: block; margin-top: 2px; font-size: 0.76rem; }
.mm-color-dot { width: 22px; height: 22px; flex: 0 0 22px; border: 1px dashed rgba(255,255,255,0.25); border-radius: 50%; }
.mm-color-dot.assigned { border-style: solid; box-shadow: 0 0 0 3px rgba(255,255,255,0.04); }

.mm-lock-card { border-color: rgba(212,175,55,0.25); background: rgba(212,175,55,0.045); }
.mm-lock-card h3 { font-size: 0.92rem; }
.mm-privacy-card { border-color: rgba(129,178,154,0.2); }
.mm-privacy-card.is-complete { background: rgba(129,178,154,0.045); }
.mm-privacy-consent { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 10px; color: var(--text-main); font-size: 0.74rem; line-height: 1.5; cursor: pointer; }
.mm-privacy-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--success); }
.mm-privacy-card .btn-primary { margin-top: 12px; }
.ai-consent-card { border-color: rgba(212,175,55,0.18); }
.ai-consent-card.is-complete { background: rgba(129,178,154,0.04); border-color: rgba(129,178,154,0.22); }
.mm-section-locked { opacity: 0.48; }
.mm-section-locked input,
.mm-section-locked select,
.mm-section-locked button { cursor: not-allowed; }

button:disabled { cursor: not-allowed; opacity: 0.5; }

@media (max-width: 620px) {
  .coach-ai-heading { align-items: stretch; flex-direction: column; }
  .coach-ai-heading .btn-primary { width: 100%; }
  .coach-review-item,
  .coach-matchmaking-gate { align-items: stretch; flex-direction: column; }
  .coach-review-actions { width: 100%; }
  .coach-review-actions .btn-secondary { flex: 1; }
  .coach-matchmaking-gate .btn-primary { width: 100%; }
}

.mm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
@media (min-width: 700px) { .mm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mm-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; }
.mm-field > span { font-size: 0.72rem; color: var(--text-muted); }
.mm-field-full { grid-column: 1 / -1; }

.mm-req-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.mm-req-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 0.8rem;
}
.mm-req-select { max-width: 150px; flex-shrink: 0; }

.mm-area-group { margin-top: 16px; }
.mm-area-title {
  color: var(--primary);
  font-size: 0.82rem;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  margin-bottom: 10px;
}
.mm-slider-row {
  display: grid;
  grid-template-columns: 1fr 120px;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.mm-slider-row label { font-size: 0.78rem; color: var(--text-main); }

/* Matchmaker dashboard */
.mm-dash-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.mm-dash-tab {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-muted);
  font-size: 0.76rem; font-weight: 600;
  padding: 8px 16px; border-radius: 20px; cursor: pointer;
}
.mm-dash-tab.active { background: var(--primary-gradient); color: var(--text-dark); border-color: transparent; }

.mm-member-meta { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

.mm-candidate-card { padding: 14px; margin-bottom: 10px; }
.mm-candidate-head { display: flex; align-items: center; gap: 12px; }
.mm-candidate-score {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 700;
  flex-shrink: 0;
}
.mm-candidate-score.band-verde { background: rgba(129,178,154,0.18); color: var(--success); }
.mm-candidate-score.band-giallo { background: rgba(242,204,143,0.18); color: #fbbf24; }
.mm-candidate-score.band-rosso { background: rgba(224,122,95,0.18); color: var(--urgent); }
.mm-candidate-info { flex: 1; min-width: 0; }
.mm-candidate-info h5 { font-size: 0.9rem; }
.mm-band-label { font-size: 0.72rem; }
.band-text-verde { color: var(--success); }
.band-text-giallo { color: #fbbf24; }
.band-text-rosso { color: var(--urgent); }
.mm-warn-chip {
  font-size: 0.62rem; font-weight: 700; color: var(--urgent);
  background: rgba(224,122,95,0.15); padding: 3px 8px; border-radius: 20px; flex-shrink: 0;
}
.mm-candidate-actions { display: flex; gap: 8px; margin-top: 12px; }

/* Detail modal */
.mm-detail-scores { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: end; }
.mm-detail-score-box {
  text-align: center; padding: 10px 6px; border-radius: 10px;
  background: rgba(255,255,255,0.03);
}
.mm-detail-score-box span { display: block; font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.mm-detail-score-box small { font-size: 0.6rem; color: var(--text-muted); line-height: 1.2; display: block; margin-top: 2px; }
.mm-detail-score-box.big span { font-size: 1.8rem; }
.mm-detail-score-box.big.band-verde span { color: var(--success); }
.mm-detail-score-box.big.band-giallo span { color: #fbbf24; }
.mm-detail-score-box.big.band-rosso span { color: var(--urgent); }

.mm-area-scores { display: flex; flex-direction: column; gap: 8px; }
.mm-area-score-row { display: grid; grid-template-columns: 1fr 80px 28px; align-items: center; gap: 8px; font-size: 0.74rem; }
.mm-area-weight { font-size: 0.62rem; color: var(--text-muted); }
.mm-area-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.06); overflow: hidden; }
.mm-area-bar-fill { height: 100%; border-radius: 3px; }
.mm-area-bar-fill.band-verde { background: var(--success); }
.mm-area-bar-fill.band-giallo { background: #fbbf24; }
.mm-area-bar-fill.band-rosso { background: var(--urgent); }
.mm-area-score-row strong { text-align: right; font-size: 0.78rem; }

.mm-detail-block { margin-top: 14px; }
.mm-detail-block h5 { font-size: 0.78rem; margin-bottom: 6px; }
.mm-detail-block h5.verde { color: var(--success); }
.mm-detail-block h5.giallo { color: #fbbf24; }
.mm-detail-block h5.rosso { color: var(--urgent); }
.mm-detail-block ul { margin: 0; padding-left: 18px; }
.mm-detail-block li { font-size: 0.76rem; margin-bottom: 3px; }

/* Matches list */
.mm-match-card { padding: 14px; margin-bottom: 10px; }
.mm-match-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mm-match-head h5 { font-size: 0.88rem; }
.mm-match-score {
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  color: var(--primary); flex-shrink: 0;
}
.mm-match-feedback-row { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ==========================================
   DASHBOARD HERO + LEVEL CARD
   ========================================== */
.dash-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.dash-hero-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  color: var(--text-dark);
  font-weight: 700;
  font-size: 1.1rem;
  border: 2px solid rgba(212, 175, 55, 0.4);
}
.dash-hero-text { min-width: 0; }
.dash-hero-text h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}
.dash-hero-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dash-level-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.dash-level-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  border: 2px solid var(--primary);
  background: rgba(212, 175, 55, 0.08);
}
.dash-level-body { flex: 1; min-width: 0; }
.dash-level-top { display: flex; align-items: center; justify-content: space-between; }
.dash-level-title { font-size: 0.86rem; font-weight: 700; color: var(--text-main); }
.dash-level-star { color: var(--primary); }
.dash-level-bar {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin: 10px 0 6px;
}
.dash-level-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--primary-gradient);
  transition: width 0.5s ease;
}
.dash-level-hint { font-size: 0.7rem; color: var(--text-muted); }

/* ==========================================
   VIDEO LEZIONE — PLAYER MODALE
   ========================================== */
#video-modal {
  padding: 0;
  align-items: center;
  justify-content: center;
}

.video-modal-card {
  width: 100%;
  max-width: 900px;
  max-height: 92vh;
  overflow-y: auto;
  background: #131115;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: modalPop 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
  margin: 16px;
}

.video-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px 12px;
}

.video-modal-titles { min-width: 0; }

.video-modal-phase {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 3px;
}

.video-modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

.video-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
}
.video-modal-close:hover { background: rgba(255, 255, 255, 0.12); color: var(--text-main); }
.video-modal-close svg { width: 18px; height: 18px; fill: currentColor; }

/* Contenitore 16:9 responsivo */
.video-modal-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}
.video-modal-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Stato di caricamento del player */
.video-modal-player .video-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.video-modal-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px 16px;
  flex-wrap: wrap;
}
.video-modal-footer-copy {
  flex: 1;
  min-width: min(100%, 260px);
}
.video-modal-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}
.video-modal-completion-hint {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.4;
}
.video-modal-completion-hint.is-complete { color: var(--success); }
.video-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.video-modal-external {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.video-modal-external:hover { text-decoration: underline; }
.video-complete-btn {
  min-height: 44px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 7px;
  background: var(--primary);
  color: #17130b;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}
.video-complete-btn:hover:not(:disabled) { filter: brightness(1.08); }
.video-complete-btn:disabled { cursor: default; opacity: 0.72; }
.video-complete-btn.is-complete {
  background: rgba(129, 178, 154, 0.14);
  border-color: rgba(129, 178, 154, 0.4);
  color: var(--success);
}
.video-complete-btn svg { width: 17px; height: 17px; fill: currentColor; flex: 0 0 auto; }

@media (max-width: 600px) {
  .video-modal-card {
    margin: 0;
    border-radius: 0;
    max-height: 100vh;
    height: auto;      /* si adatta al contenuto: niente vuoto sotto il player */
    align-self: center;
  }
  .video-modal-header { padding: 14px 14px 10px; }
  .video-modal-footer { padding: 12px 14px 16px; }
  .video-modal-actions { width: 100%; justify-content: space-between; }
  .video-complete-btn { flex: 1; }
}
/* Submission reports */
.submission-ai-settings { padding: 24px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.submission-ai-actions { display:flex; gap:10px; flex-wrap:wrap; margin:16px 0; }
.submission-ai-path-note { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:14px 0; font-size:14px; color:var(--text-muted); }
.submission-ai-item { border-bottom:1px solid rgba(255,255,255,.12); padding:16px 0; overflow-wrap:anywhere; }
.submission-ai-item summary { cursor:pointer; display:flex; flex-wrap:wrap; gap:10px; justify-content:space-between; }
.submission-ai-item summary span { font-size:13px; color:var(--text-muted); }
.submission-ai-item h4 { margin:18px 0 8px; }
.submission-ai-item p,.submission-ai-item ul { margin:12px 0; line-height:1.6; }
.submission-ai-item ul { padding-left:20px; }
.submission-ai-report { white-space:pre-wrap; }
.submission-ai-item textarea { display:block; width:100%; margin:10px 0; }
@media(max-width:600px) { .submission-ai-actions button { flex:1 1 140px; min-height:44px; } }
/* Guided questionnaire: only the answer area scrolls, navigation stays visible. */
.inner-status-hub {display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 0;border-block:1px solid #343434;margin:24px 0;}
.inner-status-hub h3 {margin:6px 0;font-size:22px;}
.inner-kicker {font-size:12px;font-weight:600;color:#d9c777;letter-spacing:0;display:block;}
#inner-status-dialog {padding:0;margin:auto;inset:0;border:1px solid #414141;border-radius:8px;width:min(840px,calc(100% - 32px));height:min(850px,92dvh);max-height:92dvh;background:#171719;color:#f5f5f3;overflow:hidden;}
#inner-status-dialog .sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
#inner-status-dialog[open] {display:flex;flex-direction:column;}
#inner-status-dialog::backdrop {background:rgba(0,0,0,.76);}
.inner-header {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 28px;flex:none;}
#inner-status-counter {display:block;font-size:14px;color:#ccc;margin-top:5px;}
#inner-status-progress {appearance:none;width:100%;height:4px;border:0;flex:none;background:#383838;}
#inner-status-progress::-webkit-progress-bar {background:#383838;}
#inner-status-progress::-webkit-progress-value {background:#d9c777;}
#inner-status-progress::-moz-progress-bar {background:#d9c777;}
#inner-status-body {overflow-y:auto;min-height:0;flex:1;padding:28px 36px;overscroll-behavior:contain;}
#inner-status-question {font-size:25px;line-height:1.35;margin:12px 0 16px;overflow-wrap:anywhere;letter-spacing:0;}
#inner-status-help,.inner-review-item p {white-space:pre-wrap;overflow-wrap:anywhere;}
#inner-status-help:empty {display:none;}
.inner-field {display:flex;flex-direction:column;gap:10px;margin:20px 0;}
.inner-field[hidden] {display:none;}
.inner-field textarea {resize:vertical;min-height:90px;line-height:1.6;}
.inner-field .form-input {font-size:16px;width:100%;box-sizing:border-box;}
.inner-age {max-width:180px;}
.inner-options {padding:0;margin:22px 0;border:0;display:grid;gap:8px;}
.inner-option {display:flex;gap:12px;align-items:center;padding:13px 15px;border:1px solid #454545;border-radius:6px;cursor:pointer;min-height:48px;}
.inner-option:has(input:checked) {border-color:#d9c777;background:#292923;}
.inner-option input {width:19px;height:19px;flex:none;accent-color:#d9c777;}
.inner-option span {overflow-wrap:anywhere;min-width:0;}
.inner-footer {display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center;border-top:1px solid #383838;padding:18px 28px;flex:none;}
#inner-status-save-state {font-size:13px;line-height:1.4;color:#bfc9c7;text-align:center;overflow-wrap:anywhere;}
#inner-status-save-state[data-error="true"] {color:#eadcb0;}
.inner-review-item {border-bottom:1px solid #3b3b3b;padding:15px 0;}
.inner-review-item summary {cursor:pointer;line-height:1.5;overflow-wrap:anywhere;}
.inner-review-item p {line-height:1.6;color:#d3d3d0;margin:12px 0;}
.inner-coach-questionnaire {margin-top:24px;border-top:1px solid #3b3b3b;padding-top:20px;}
.inner-coach-questionnaire > button {margin:16px 0;}
#inner-status-dialog button:disabled {opacity:.5;cursor:default;}
#inner-status-dialog :focus-visible {outline:2px solid #ded192;outline-offset:3px;}
@media(max-width:600px) {
 .inner-status-hub {align-items:flex-start;flex-direction:column;gap:14px;}
 #inner-status-dialog {width:100%;height:100dvh;max-height:100dvh;max-width:100%;border-radius:0;border:0;margin:0;}
 .inner-header {padding:14px 18px;}
 #inner-status-body {padding:22px 20px;}
 #inner-status-question {font-size:22px;}
 .inner-footer {padding:14px 18px max(14px,env(safe-area-inset-bottom));grid-template-columns:1fr 1fr;gap:10px;}
 #inner-status-save-state {grid-column:1/-1;grid-row:1;min-height:19px;}
 .inner-footer button {width:100%;min-height:44px;}
}
