@import url("/css/components.css");


/* ============================================
   CSS VARIABLES
   ============================================ */
/* Le variabili condivise (colori, radius, shadow, font) vivono in components.css.
   Qui restano solo quelle che questa pagina sovrascrive con un valore diverso. */
:root {
  --success-main: #34C759;
  --danger-strong: #FF2D55;
  --error: var(--danger-main);
  --success: var(--success-main);
  --warning: var(--warning-main);
}

/* ============================================
   RESET & BASE (mobile-first)
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 72px; /* space for bottom nav */
}

.container {
  max-width: 100%;
  padding: 0 16px;
  margin: 0 auto;
  width: 100%;
  animation: fadeInUp 0.35s ease-out;
}

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

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 92%, #4736bd 8%) 0%,
    color-mix(in srgb, var(--accent) 60%, #2f3f9f 40%) 42%,
    color-mix(in srgb, var(--accent) 72%, #9b8fff 28%) 70%,
    var(--accent) 100%
  );
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.3);
  padding: 32px 20px;
  width: 100%;
  max-width: 440px;
  animation: cardSlideUp 0.5s ease-out;
}

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

.auth-card .auth-logo {
  display: block;
  margin: 20px auto 20px;
  height: 55px;
  width: auto;
}

.auth-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: center;
  margin-bottom: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent-debole);
  background: color-mix(in srgb, var(--chip) 70%, white 30%);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-brand-pill img {
  width: 22px;
  height: 22px;
  border-radius: 8px;
}

.auth-card h1 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 0.9rem;
}

/* ============================================
   SPOTTED PUBLIC LINK (NGL-LIKE)
   ============================================ */
.spotted-public-link-head h3 {
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 6px;
}

.spotted-public-link-head p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.spotted-public-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.spotted-public-link-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--text-main);
  background: var(--neutral-surface-alt);
}

.spotted-public-link-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.spotted-public-link-status {
  font-size: 0.82rem;
  color: var(--subtext);
}

.spotted-public-link-status.is-error {
  color: var(--danger-main);
}

/* ============================================
   TABS (auth)
   ============================================ */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted);
  border: none;
  background: none;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

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

.tab:hover { color: var(--primary); }

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--text);
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  transition: border-color 0.25s, box-shadow 0.25s;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
}

.form-group input[type="checkbox"] {
  width: auto;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--focus-ring);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--input-placeholder);
}

.form-row-flex {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.form-row-inline {
  display: flex;
  gap: 12px;
}

.form-row-inline .form-group {
  flex: 1;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form-row .form-group {
  flex: 1;
  min-width: 150px;
}

.form-actions-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.form-actions-row .btn {
  width: 100%;
  justify-content: center;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  letter-spacing: -0.01em;
  gap: 6px;
  min-height: 44px; /* touch target */
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--primary);
  color: white;
  width: 100%;
  border: 1px solid transparent;
  transition: background-color 120ms ease;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  border-color: var(--neutral-line);
  background: var(--neutral-surface-alt);
}

.btn-secondary.filter-cat,
.content-area .btn-secondary {
  background: var(--border);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.btn-danger {
  background: var(--error);
  color: white;
}

.btn-danger:hover { background: #dc2626; }

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

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 3000;
}

.navbar-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1rem;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-brand img {
  height: 28px;
  width: auto;
  filter: none;
}

.navbar-nav {
  display: none; /* hidden on mobile, shown on desktop */
  align-items: center;
  gap: 8px;
  list-style: none;
}

.navbar-nav a {
  padding: 8px 16px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 999px;
  transition: all 0.25s ease;
}

.navbar-nav a:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.navbar-nav a.active {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
  font-weight: 700;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-user .user-info {
  display: none;
  font-size: 0.85rem;
  color: var(--text);
}

.navbar-user .user-role {
  font-size: 0.62rem;
  padding: 2px 8px;
}

.navbar-user .btn-sm {
  font-size: 0.8rem;
  padding: 6px 14px;
  min-height: 32px;
}

/* ============================================
   ROLE PILLS
   ============================================ */
.user-role {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.4;
}

.role-admin { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #92400e; }
.role-co_admin { background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%); color: #c2410c; }
.role-referente { background: linear-gradient(135deg, #EDEAF8 0%, #D9D3EF 100%); color: #322A77; }
.role-rappresentante { background: linear-gradient(135deg, #EDEAF8 0%, #D9D3EF 100%); color: #322A77; }
.role-studente { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); color: #166534; }

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
}

.card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

/* ============================================
   PENDING SCHOOL BANNER
   ============================================ */
.pending-school-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, #F3F1FA 0%, #EDEAF8 100%);
  border: 1px solid #D9D3EF;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.pending-school-banner.no-school-variant {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border-color: #fde047;
}
.pending-school-banner.nickname-variant {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #86efac;
}
.nickname-variant .pending-school-banner-icon { color: #16a34a; }
.pending-school-banner-icon {
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 2px;
}
.no-school-variant .pending-school-banner-icon { color: #ca8a04; }
.pending-school-banner-content { flex: 1; min-width: 0; }
.pending-school-banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--text);
}
.pending-school-banner-text {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.pending-school-banner-text strong { color: var(--text); }

/* ============================================
   HOME HERO (profile greeting)
   ============================================ */
.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 16px;
  gap: 12px;
}

.home-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.home-hero-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3F2CA4, #7D71CF);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.25);
  overflow: hidden;
}

.home-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.home-hero-info {
  min-width: 0;
}

.home-hero-greeting {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-hero-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.home-hero-classe {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 2px;
  border-radius: 999px;
  font-weight: 600;
  line-height: 1.1;
}

.home-hero-edit {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  text-decoration: none;
}

.home-hero-edit:hover {
  background: var(--primary);
  color: white;
}

/* ============================================
   HOME QUICK ACTIONS
   ============================================ */
.home-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.management-home {
  margin-bottom: 20px;
}

.management-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-action-button {
  border: 1px solid var(--border);
  background: var(--surface);
  width: 100%;
  font-family: var(--font-sans);
  cursor: pointer;
  position: relative;
}

.home-action-counter {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--error);
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.management-section-lead {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.management-filter-summary {
  font-size: 0.78rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin: 0 0 12px;
}

@media (min-width: 720px) {
  .management-actions-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.home-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.home-action-card:active {
  transform: scale(0.96);
}

.home-action-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.home-action-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

/* ============================================
   HOME FEEDS
   ============================================ */
.home-feeds {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

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

.home-feed-section {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.home-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 0;
}

.home-feed-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.home-feed-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.home-feed-link:hover {
  text-decoration: underline;
}

.home-feed-list {
  padding: 8px 0;
}

.home-feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.home-feed-item:hover {
  background: rgba(var(--primary-rgb), 0.04);
}

.home-feed-item + .home-feed-item {
  border-top: 1px solid var(--border);
}

.home-feed-item-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.home-feed-item-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3F2CA4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.6rem;
  flex-shrink: 0;
  overflow: hidden;
}

.home-feed-item-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.home-feed-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.home-feed-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-feed-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.home-feed-item-thumb,
.home-feed-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.home-feed-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-feed-item-kicker {
  font-weight: 600;
}

.home-feed-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.67rem;
  line-height: 1;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.home-feed-status.status-in_progress {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.24);
}

.home-feed-status.status-live {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.24);
}

.home-feed-status.status-published {
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.25);
}

.home-feed-status.status-completed {
  color: #475569;
  background: rgba(100, 116, 139, 0.12);
  border-color: rgba(100, 116, 139, 0.25);
}

.home-feed-status.status-cancelled,
.home-feed-status.status-draft {
  color: #7c2d12;
  background: rgba(251, 146, 60, 0.12);
  border-color: rgba(251, 146, 60, 0.28);
}

.home-feed-empty {
  padding: 16px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================
   STATS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  opacity: 0.6;
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 600;
}

/* ============================================
   RECENT USERS LIST (mini cards)
   ============================================ */
.recent-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.recent-user-item:active {
  background: var(--bg);
}

.recent-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3F2CA4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  overflow: hidden;
}

.recent-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.recent-user-info {
  flex: 1;
  min-width: 0;
}

.recent-user-name {
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-user-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.recent-user-classe {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ============================================
   DASHBOARD TABS
   ============================================ */
.dash-tabs {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.dash-tabs::-webkit-scrollbar { display: none; }

.dash-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  min-width: 0;
  -webkit-tap-highlight-color: transparent;
}

.dash-tab:hover {
  color: var(--text);
  background: var(--bg);
}

.dash-tab.active {
  color: white;
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
}

.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--error);
  color: white;
}

.dash-tab.active .tab-badge {
  background: white;
  color: var(--primary);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================
   CARD HEADER ROW
   ============================================ */
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 14px;
  gap: 10px;
}

.card-header-row h2 {
  margin-bottom: 0;
}


/* ============================================
   COMPOSE CARD (unified for post & spotted)
   ============================================ */
.compose-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  margin-top: 16px;
  overflow: hidden;
}

.compose-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.compose-header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3F2CA4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
  overflow: hidden;
}

.compose-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.compose-header-icon {
  font-size: 1.1rem;
}

.compose-header-text {
  flex: 1;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}

.compose-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-muted);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.compose-card.open .compose-chevron {
  transform: rotate(180deg);
}

.compose-body {
  max-height: 6000px;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
  opacity: 1;
  padding: 0 16px 16px;
}

.compose-body.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0 16px;
}

.compose-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.compose-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* Spotted compose card */
.spotted-compose-card {
  border: 1px solid var(--border);
  background-image: none;
  background: var(--surface);
}

.spotted-compose-input-wrap {
  position: relative;
}

.spotted-compose-input-wrap textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: var(--font-sans);
  resize: none;
  min-height: 80px;
  background: var(--bg);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.spotted-compose-input-wrap textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
  background: var(--surface);
  outline: none;
}

.spotted-compose-count {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.spotted-target-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.spotted-target-mode-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
}

.spotted-target-mode-option input {
  margin: 0;
}

.spotted-target-help {
  margin-top: 4px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

#create-post-form {
  padding-top: 4px;
}

#create-post-form textarea#post-body {
  min-height: 100px;
  line-height: 1.55;
  background: var(--bg);
}

.post-meta-pinned {
  display: flex;
  align-items: flex-end;
}

.post-pinned-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
}

.post-pinned-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

.post-pinned-toggle span {
  font-size: 0.82rem;
  font-weight: 600;
}

.post-submit-btn {
  border-radius: var(--radius-sm);
  width: auto;
  min-width: 132px;
  margin-left: auto;
}

.post-compose-footer {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
}

#discount-field,
#post-destination-field,
#post-destination-fixed {
  border: none;
  background: transparent;
  padding: 0;
}

.post-poll-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
}

.post-poll-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
}

#post-poll-fields {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg);
}

#post-poll-fields label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

#post-poll-question {
  margin-bottom: 10px;
}

.post-poll-options-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
}

.post-poll-options-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-poll-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-poll-option-row input {
  margin: 0;
}

.post-poll-option-remove {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.post-poll-option-remove:hover {
  border-color: var(--danger);
  background: #fff5f5;
}

.post-poll-help {
  margin: 8px 0 0;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.post-target-mode {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip);
  width: fit-content;
  margin-inline: auto;
}

.post-target-mode-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--subtext);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.post-target-mode-option input {
  margin: 0;
  accent-color: var(--primary);
}

.post-target-mode-option:has(input:checked) {
  border-color: rgba(var(--primary-rgb), 0.22);
  background: var(--surface);
  color: var(--accent-strong);
  box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.16);
}

.post-target-schools {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  max-height: 180px;
  overflow-y: auto;
}

.post-target-schools-list {
  display: flex;
  flex-direction: column;
}

.post-target-school-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.post-target-school-item:hover {
  background: var(--bg);
}

.post-target-school-item:last-child {
  border-bottom: none;
}

.post-target-school-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.post-target-school-checkbox {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.post-target-school-name {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}

.post-target-school-meta {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.post-target-help {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.post-target-fixed {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 10px 12px;
  font-weight: 600;
}

#create-assembly-form {
  padding-top: 4px;
}

.assembly-form-stepper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip);
  width: fit-content;
  margin-inline: auto;
  margin-bottom: 12px;
}

.assembly-step-chip {
  border: 1px solid transparent;
  background: transparent;
  color: var(--subtext);
  border-radius: 999px;
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.assembly-step-chip.is-active {
  border-color: rgba(var(--primary-rgb), 0.22);
  color: var(--accent-strong);
  background: var(--surface);
  box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.16);
}

.assembly-step-chip.is-done {
  border-color: rgba(6, 118, 71, 0.22);
  color: #067647;
  background: rgba(6, 118, 71, 0.12);
}

.assembly-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}

#create-assembly-form textarea#assembly-description {
  min-height: 96px;
  line-height: 1.5;
  background: var(--bg);
}

#assembly-destination-field,
#assembly-destination-fixed {
  border: none;
  background: transparent;
  padding: 0;
}

.assembly-school-wrap {
  margin-top: 10px;
  margin-bottom: 0;
}

#assembly-end-date-group.is-disabled {
  opacity: 0.72;
}

#assembly-shifts-fields {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg);
}

.assembly-shifts-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 700;
}

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

.assembly-shift-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 10px;
}

.assembly-shift-date-wrap {
  min-width: 170px;
}

.assembly-shift-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.assembly-shift-row-title {
  font-size: 0.82rem;
  color: var(--text);
}

.assembly-remove-shift {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.assembly-remove-shift:hover {
  border-color: var(--danger);
  background: #fff5f5;
}

.assembly-shift-activities {
  margin-top: 8px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
}

.assembly-shift-activities-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.assembly-activities-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assembly-activity-row {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  padding: 10px;
}

.assembly-activity-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.assembly-activity-row-title {
  font-size: 0.78rem;
  color: var(--text);
}

.assembly-remove-activity {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.assembly-remove-activity:hover {
  border-color: var(--danger);
  background: #fff5f5;
}

.compose-submit-btn {
  border-radius: var(--radius-sm);
  padding: 10px 24px;
}

/* ============================================
   FEED TOOLBAR
   ============================================ */
.feed-toolbar {
  position: sticky;
  top: 56px;
  z-index: 50;
  background: var(--bg);
  margin: 0 -16px;
  padding: 12px 16px 0;
}

/* ============================================
   FILTER CHIPS
   ============================================ */
.filter-chips {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 4px 0;
}

.filter-chips::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
}

.filter-chip:active {
  transform: scale(0.96);
}

.filter-chip.active {
  background: var(--primary);
  color: white;
  border-color: transparent;
  box-shadow: none;
  outline: none;
}

/* ============================================
   IG FEED COLUMN (centered narrow feed like Instagram)
   ============================================ */
.ig-feed-column {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.assembly-calendar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}

.assembly-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 10px;
}

.assembly-calendar-header h2 {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.assembly-calendar-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 9px;
}

.assembly-calendar-list {
  display: flex;
  flex-direction: column;
  padding: 0 10px 10px;
}

.assembly-calendar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  padding: 8px;
  transition: background 0.2s ease;
}

.assembly-calendar-item:hover {
  background: rgba(var(--primary-rgb), 0.06);
}

.assembly-calendar-date-pill {
  min-width: 56px;
  border-radius: 10px;
  padding: 6px 8px;
  background: var(--primary-light);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  text-align: center;
}

.assembly-calendar-day {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.assembly-calendar-month {
  display: block;
  margin-top: 2px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.assembly-calendar-content {
  min-width: 0;
}

.assembly-calendar-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

.assembly-calendar-meta {
  margin-top: 2px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.assembly-calendar-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 4px 8px 8px;
}

/* ============================================
   POST CARDS (Instagram-style)
   ============================================ */
.post-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.post-card.post-pinned {
  border-color: var(--warning);
}

/* -- Header (avatar + nome + meta) -- */
.post-ig-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

.post-ig-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3F2CA4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.65rem;
  flex-shrink: 0;
  overflow: hidden;
  text-decoration: none;
}

.post-ig-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-ig-header-info {
  flex: 1;
  min-width: 0;
}

.post-ig-author {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-ig-author:hover {
  color: var(--primary);
}

.post-ig-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.post-ig-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.post-ig-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ====== CARD MORE MENU (three-dots) ====== */
.card-more-wrap {
  position: relative;
}

.card-more-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  color: var(--text-muted);
  transition: background 0.18s, color 0.18s;
}
.card-more-btn:hover {
  background: var(--hover-bg, rgba(0,0,0,0.06));
  color: var(--text);
}
.card-more-btn svg { pointer-events: none; }

.card-more-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 140px;
  background: var(--card-bg, #fff);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  z-index: 100;
  overflow: hidden;
  padding: 4px 0;
}
.card-more-dropdown.open { display: block; }

.card-more-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text);
  text-align: left;
  transition: background 0.15s;
}
.card-more-item:hover { background: var(--hover-bg, rgba(0,0,0,0.04)); }
.card-more-item.danger { color: var(--error); }
.card-more-item.danger:hover { background: #fef2f2; }

/* -- Image container (fixed aspect ratio) -- */
.post-ig-image-wrap {
  position: relative;
  width: 100%;
  background: #f0f0f0;
  overflow: hidden;
}

.post-ig-image-wrap::before {
  content: "";
  display: block;
  padding-top: 75%; /* 4:3 default */
}

.post-ig-image-wrap.ratio-1x1::before { padding-top: 100%; }
.post-ig-image-wrap.ratio-4x5::before { padding-top: 125%; }
.post-ig-image-wrap.ratio-16x9::before { padding-top: 56.25%; }

.post-ig-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -- Body (titolo + testo) -- */
.post-ig-body {
  padding: 14px 16px;
}

.post-ig-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.35;
}

.post-assembly-date {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #EDEAF8;
  color: #322A77;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  margin-bottom: 8px;
}

.post-assembly-extra {
  font-size: 0.78rem;
  color: #322A77;
  font-weight: 600;
  margin: -2px 0 8px;
}

.post-ig-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-ig-text.collapsed {
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-ig-read-more {
  display: inline;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  border: none;
  background: none;
  padding: 0;
  margin-top: 2px;
}

/* -- Footer (category badge + actions) -- */
.post-ig-footer {
  padding: 8px 16px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-poll-card {
  margin: 0 16px 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.post-poll-question {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.post-poll-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.post-poll-option-btn {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 9px 10px;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

.post-poll-option-btn:hover:not(:disabled) {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.post-poll-option-btn:disabled {
  cursor: default;
  opacity: 0.86;
}

.post-poll-option-btn.is-loading {
  opacity: 0.65;
}

.post-poll-option-btn.is-voted {
  border-color: var(--primary);
}

.post-poll-option-bg {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(var(--primary-rgb), 0.12);
  pointer-events: none;
}

.post-poll-option-text,
.post-poll-option-stats {
  position: relative;
  z-index: 1;
}

.post-poll-option-text {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}

.post-poll-option-stats {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
}

.post-poll-meta {
  margin-top: 8px;
  font-size: 0.73rem;
  color: var(--text-muted);
}

.post-ig-badges {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.post-category {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.post-destination {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  max-width: 240px;
}

.post-destination svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.post-destination-label {
  display: inline-block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-destination-global {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.post-destination-school {
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.cat-avviso { background: #fef3c7; color: #92400e; }
.cat-evento { background: #EDEAF8; color: #322A77; }
.cat-assemblea { background: #EDEAF8; color: #322A77; }
.cat-circolare { background: var(--primary-light); color: #322A77; }
.cat-altro { background: #f1f5f9; color: #475569; }
.cat-convenzione {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

/* Bordo post convenzione */
.post-convenzione {
  border: 1.5px solid #10b981;
}

.post-assemblea {
  border: 1.5px solid #C7C0EA;
}

/* Pill sconto (accanto alla pill categoria nel footer) */
.post-discount-pill {
  display: inline-block;
  padding: 2px 8px;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 600;
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid #a7f3d0;
}

/* Ribbon Pending (per post in attesa approvazione) */
.pending-ribbon {
  position: absolute;
  top: 12px;
  right: -32px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 4px 36px;
  font-size: 0.7rem;
  font-weight: 700;
  transform: rotate(45deg);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
  z-index: 10;
}

/* Styling per post pending */
.post-pending {
  position: relative;
  border: 2px dashed #f59e0b;
  opacity: 0.85;
  overflow: hidden;
}

/* Azioni moderazione (bottoni Approva/Rifiuta) */
.post-moderate-actions {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* Bottone Approva */
.btn-approve {
  flex: 1;
  padding: 8px 16px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-approve:hover {
  background: linear-gradient(135deg, #059669, #047857);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-approve:active {
  transform: translateY(0);
}

/* Bottone Rifiuta */
.btn-reject {
  flex: 1;
  padding: 8px 16px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-reject:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-reject:active {
  transform: translateY(0);
}

.post-pin {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--warning), #f97316);
  color: white;
}

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

/* Card senza immagine: corpo ha bordo top */
.post-ig-body-only {
  border-top: 1px solid var(--border);
}

/* ============================================
   SPOTTED IG CARDS
   ============================================ */
.spotted-ig-card {
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--border);
}

.spotted-ig-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.spotted-ig-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.72rem;
  color: white;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.spotted-ig-author {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.spotted-ig-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
}

.spotted-ig-time {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

.spotted-ig-header .spotted-pending-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  margin: 0;
  font-size: 0.6rem;
  padding: 3px 10px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  color: #92400e;
  border-radius: 999px;
  font-weight: 700;
}

.spotted-ig-body {
  padding: 14px 16px;
  background: var(--surface);
}

.spotted-user-search-card {
  padding: 14px;
}

.spotted-user-search-head h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.spotted-user-search-head p {
  margin: 5px 0 0;
  font-size: 0.77rem;
  color: var(--text-muted);
}

.spotted-user-search-box {
  margin-top: 10px;
}

.spotted-user-search-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.86rem;
  font-family: var(--font-sans);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.spotted-user-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.14);
}

.spotted-user-search-status {
  margin: 8px 2px 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.spotted-user-search-status.is-loading {
  color: var(--primary);
}

.spotted-user-search-status.is-error {
  color: var(--error);
}

.spotted-user-search-results {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.spotted-user-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.spotted-user-search-item:hover,
.spotted-user-search-item:focus {
  border-color: rgba(var(--primary-rgb), 0.45);
  background: var(--primary-light);
  transform: translateY(-1px);
  outline: none;
}

.spotted-user-search-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--primary), #3F2CA4);
}

.spotted-user-search-item-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.spotted-user-search-item-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotted-user-search-item-meta {
  margin: 0;
  font-size: 0.73rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotted-mention-suggestions {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.spotted-mention-suggestion {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 9px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.spotted-mention-suggestion:hover,
.spotted-mention-suggestion:focus {
  background: #f8fafc;
  outline: none;
}

.spotted-mention-suggestion-nick {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotted-mention-suggestion-name {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spotted-ig-text {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.spotted-mention {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.spotted-mention:hover {
  text-decoration: underline;
}

.spotted-ig-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.spotted-ig-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.spotted-ig-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* .spotted-ig-delete replaced by .card-more-wrap */

/* Like & Comment buttons */
.btn-like {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
}

.btn-like:active { transform: scale(0.92); }

.btn-like.liked {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-color: #ef4444;
  color: #ef4444;
}

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.btn-like.liked .like-count { animation: heartPop 0.3s ease; }

.btn-comment {
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
}

.btn-comment:active { transform: scale(0.92); }

.comment-label { display: none; }

.comment-count {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ============================================
   COMMENTS
   ============================================ */
.comments-section {
  padding: 12px 14px 14px;
  border-top: 1px solid var(--border);
}

.spotted-ig-card .comments-section {
  margin-top: 0;
}

.comments-list {
  margin-bottom: 10px;
}

.comment {
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.comment:last-child { border-bottom: none; }

.comment-body { flex: 1; }

.comment-author {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-right: 8px;
}

.comment-text {
  font-size: 0.88rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.btn-delete-comment {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 4px;
  line-height: 1;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.comment-input {
  flex: 1;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  transition: border-color 0.2s;
  min-height: 40px;
}

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

.comment-mention-suggestions {
  margin-top: 0;
  position: relative;
  z-index: 260;
}

/* ============================================
   MY PROFILE EDIT HEADER
   ============================================ */
.myprofile-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.myprofile-edit-header h2 {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0;
}

/* ============================================
   PROFILE AVATAR UPLOAD
   ============================================ */
.profile-card {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 16px;
}

.profile-avatar-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}

.profile-avatar-wrapper {
  position: relative;
  width: 88px;
  height: 88px;
  cursor: pointer;
}

.profile-avatar-large {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3F2CA4, #7D71CF);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.6rem;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.3);
  overflow: hidden;
  position: relative;
}

.profile-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.profile-avatar-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  border: 2px solid var(--surface);
  transition: transform 0.2s ease;
}

.profile-avatar-overlay:active { transform: scale(0.9); }

.avatar-hint {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.char-count {
  display: block;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.text-muted {
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================
   TABLE (fallback)
   ============================================ */
.table-container { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}

tbody td {
  padding: 10px 12px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

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

.empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.empty-icon svg {
  stroke: var(--primary);
}

.empty-state p { font-size: 0.9rem; }

/* ============================================
   LOADING
   ============================================ */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 40px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

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

.hidden { display: none !important; }

/* ============================================
   FILTER ROW
   ============================================ */
.filter-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-row-inline {
  margin-top: 12px;
}

.filter-row .form-group {
  flex: 1;
  min-width: 0;
}

.filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.filter-actions .btn {
  white-space: nowrap;
}

.list-pagination {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.list-pagination-range {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.list-pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.list-page-label {
  font-size: 0.78rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.list-pagination .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   PROFILE SUMMARY (dashboard)
   ============================================ */
.profile-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3F2CA4, #7D71CF);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
  position: relative;
  overflow: hidden;
}

.profile-details p {
  margin-bottom: 2px;
  font-size: 0.88rem;
}

/* ============================================
   USER CARDS (admin)
   ============================================ */
.user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 10px;
  transition: all 0.25s ease;
  background: var(--surface);
  text-align: center;
}

.user-card.user-banned {
  opacity: 0.55;
  background: #fef2f2;
  border-color: #fecaca;
}

.user-card.user-me {
  border-color: var(--primary);
  background: var(--primary-light);
}

.user-card-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3F2CA4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2);
  overflow: hidden;
}

.user-info-block {
  min-width: 0;
}

.user-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}


.user-email {
  font-size: 0.78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.user-classe {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.user-school {
  font-size: 0.72rem;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 700;
}

.user-status {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.status-active { background: #f0fdf4; color: #16a34a; }
.status-banned { background: #fef2f2; color: var(--error); }
.status-suspended { background: #fff7ed; color: #c2410c; }

.user-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  align-items: flex-start;
}

.user-actions-accordion {
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.user-actions-summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-actions-summary::-webkit-details-marker {
  display: none;
}

.user-actions-summary::after {
  content: "\25BE";
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: transform var(--motion-fast) var(--motion-ease);
}

.user-actions-accordion[open] .user-actions-summary {
  border-bottom: 1px solid var(--border);
}

.user-actions-accordion[open] .user-actions-summary::after {
  transform: rotate(180deg);
}

.user-actions-body {
  margin-top: 0;
  padding: 10px;
  border-top: 0;
}

.role-switch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  justify-content: center;
  width: 100%;
}

.role-switch .role-select,
.school-switch .school-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: var(--font-sans);
  background: white;
  color: var(--text);
  cursor: pointer;
  width: 100%;
  min-height: 36px;
}

.school-switch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  justify-content: center;
  width: 100%;
}

.btn-save-role,
.btn-save-school {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  justify-content: center;
  white-space: nowrap;
  align-self: flex-start;
}

.ban-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  width: 100%;
}

.ban-actions .btn {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  justify-content: center;
  white-space: nowrap;
  align-self: flex-start;
}

.btn-ban {
  background: none;
  border: 1px solid var(--error);
  color: var(--error);
  font-weight: 600;
  flex: 1;
}

.btn-ban:hover { background: var(--error); color: white; }

.btn-unban {
  background: none;
  border: 1px solid var(--success);
  color: var(--success);
  font-weight: 600;
  flex: 1;
}

.btn-unban:hover { background: var(--success); color: white; }

/* ============================================
   MODERATION CARDS
   ============================================ */
.mod-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #fde68a;
  background: #fffbeb;
  margin-bottom: 10px;
  text-align: center;
}

.mod-card-body {
  flex: 1;
  min-width: 0;
}

.mod-text {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 6px;
}

.mod-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.mod-card-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.mod-card-actions .btn { flex: 1; }

.btn-approve {
  background: none;
  border: 1px solid var(--success);
  color: var(--success);
  font-weight: 600;
}

.btn-approve:hover { background: var(--success); color: white; }

.btn-reject {
  background: none;
  border: 1px solid var(--error);
  color: var(--error);
  font-weight: 600;
}

.btn-reject:hover { background: var(--error); color: white; }

/* Pending badge */
.spotted-pending-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  margin-bottom: 10px;
}

/* ============================================
   SCHOOL CARDS
   ============================================ */
.schools-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.school-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  text-decoration: none;
  color: inherit;
}

.school-card-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.school-card-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 4px;
  flex-shrink: 0;
}

.school-card-logo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.school-card-info { min-width: 0; }

.school-card-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.school-card-location {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.school-card-address {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.65;
  margin-top: 1px;
}

.school-card-desc {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: 4px;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.btn-edit-school {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  align-self: flex-end;
}

.btn-edit-school:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.school-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-self: flex-end;
}

.btn-delete-school {
  background: var(--danger-surface);
  color: var(--danger-strong);
  border: 1px solid var(--danger-line);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
}

.btn-delete-school:hover {
  border-color: var(--danger-main);
  color: #ffffff;
  background: var(--danger-main);
}

.school-logo-preview {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.school-logo-preview img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 4px;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-overlay.hidden { display: none; }

.modal {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 460px;
  overflow: hidden;
  margin: 16px;
  max-height: 85vh;
  overflow-y: auto;
}

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

.modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  min-height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body { padding: 18px 20px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.ban-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ban-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.ban-option:hover { border-color: var(--primary); }

.ban-option input[type="radio"] {
  margin-top: 3px;
  accent-color: var(--primary);
}

.ban-option-content { display: flex; flex-direction: column; }

.ban-option-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

.ban-option-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================
   IMAGE UPLOAD
   ============================================ */
.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.image-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.image-upload-area.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.image-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon { font-size: 1.8rem; margin-bottom: 6px; display: block; }

.upload-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.upload-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  opacity: 0.7;
}

.image-preview-container {
  position: relative;
  display: none;
  margin-top: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 180px;
  background: #000;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.image-preview-container:active { cursor: grabbing; }

.image-preview-container.has-image { display: block; }

.image-preview {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: auto;
  pointer-events: none;
  will-change: transform;
  transform-origin: center center;
  transform: translate(-50%, -50%);
}

.image-preview-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  pointer-events: none;
  backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity 0.4s;
}
.image-preview-hint.fade { opacity: 0; }

.image-preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.upload-progress { display: none; margin-top: 12px; }
.upload-progress.active { display: block; }

.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
  animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  margin-top: 8px;
  font-size: 0.85rem;
  display: none;
  font-weight: 600;
  border: 1px solid var(--line);
  animation: alertSlide 0.3s ease-out;
}

@keyframes alertSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert.show { display: block; }

.alert-error {
  border-color: color-mix(in srgb, var(--error) 50%, var(--line) 50%);
  background: var(--danger-surface);
  color: var(--error);
}

.alert-success {
  border-color: color-mix(in srgb, var(--success) 50%, var(--line) 50%);
  background: var(--success-surface);
  color: var(--success);
}

.alert-warning {
  border-color: color-mix(in srgb, var(--warning) 50%, var(--line) 50%);
  background: var(--warning-surface);
  color: var(--warning);
}

/* ============================================
   SOCIAL ENHANCEMENTS
   ============================================ */
.spotted-card textarea,
#spotted-body {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  background: var(--bg) !important;
  transition: border-color 0.25s, box-shadow 0.25s !important;
}

.spotted-card textarea:focus,
#spotted-body:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1) !important;
  background: var(--surface) !important;
}

select {
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px !important;
}

textarea {
  font-family: var(--font-sans);
  resize: vertical;
  min-height: 80px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(var(--primary-rgb), 0.2); border-radius: 3px; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  padding: 20px 20px;
  margin-top: 48px;
  font-size: 0.8rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer-brand img { height: 20px; width: auto; }

.footer-credits {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.footer-credits a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

/* ============================================
   MOBILE BOTTOM NAVIGATION
   ============================================ */
.bottom-nav {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  z-index: 200;
  padding: 6px 0;
  padding-bottom: calc(6px + env(safe-area-inset-bottom));
}

.bottom-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 500px;
  margin: 0 auto;
}

.bottom-nav-items a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 10px;
  transition: color 0.2s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-items a .nav-icon {
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bottom-nav-items a .nav-icon svg {
  width: 20px;
  height: 20px;
}

.bottom-nav-items a.active {
  color: var(--primary);
}

.bottom-nav-items a.active .nav-icon svg {
  stroke-width: 2.5;
}

/* ============================================
   FORGOT PASSWORD / OTP
   ============================================ */
.login-stepper {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.login-step {
  flex: 1;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  background: #F3F1FA;
  border: 1px solid #EDEAF8;
  border-radius: 999px;
  padding: 7px 10px;
  text-align: center;
  transition: all 0.2s ease;
}

.login-step.active {
  color: #ffffff;
  border-color: transparent;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

.login-step.done {
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), 0.25);
  background: rgba(var(--primary-rgb), 0.1);
}

#login-email-step,
#login-password-step {
  animation: authStepFade 0.22s ease-out;
}

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

.login-email-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(var(--primary-rgb), 0.24);
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--primary);
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.84rem;
}

.login-email-pill span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.login-email-pill button {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.legacy-explainer {
  margin-top: 14px;
  border: 1px solid var(--brand-line);
  background: var(--brand-surface-alt);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.legacy-explainer h3 {
  font-size: 0.83rem;
  margin-bottom: 5px;
  color: var(--brand-strong);
}

.legacy-explainer p {
  font-size: 0.77rem;
  line-height: 1.5;
  color: var(--neutral-strong);
}

.legacy-explainer::after {
  content: none;
}

.btn-magic-link {
  width: 100%;
  margin-top: 8px;
  border-color: var(--brand-line);
  color: var(--brand-strong);
  background: var(--brand-surface-alt);
}

.btn-magic-link:hover {
  border-color: rgba(var(--primary-rgb), 0.28);
  background: var(--brand-surface-soft);
}

.magic-link-note {
  margin-top: 7px;
  text-align: center;
  font-size: 0.73rem;
  color: var(--text-muted);
}

.legacy-reset-info {
  margin: -2px 0 18px;
  border: 1px solid var(--warning-line);
  background: linear-gradient(145deg, var(--warning-surface) 0%, #fff8ea 100%);
  border-radius: 14px;
  padding: 12px 14px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.legacy-reset-info h4 {
  font-size: 0.83rem;
  margin-bottom: 5px;
  color: var(--warning-deep);
}

.legacy-reset-info p {
  font-size: 0.77rem;
  line-height: 1.5;
  color: var(--warning-main);
}

.forced-reset .legacy-reset-info {
  transform: translateY(0);
  box-shadow: 0 12px 24px rgba(168, 96, 23, 0.12);
  animation: forcedResetPulse 1.8s ease-in-out infinite;
}

@keyframes forcedResetPulse {
  0%, 100% { box-shadow: 0 12px 24px rgba(168, 96, 23, 0.08); }
  50% { box-shadow: 0 16px 30px rgba(168, 96, 23, 0.2); }
}

/* ============================================
   PASSWORD TOGGLE
   ============================================ */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-right: 44px !important;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.password-toggle:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
}

.password-toggle:active {
  background: rgba(var(--primary-rgb), 0.15);
}

.password-toggle svg.hidden {
  display: none;
}

.password-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding-left: 2px;
}

.signup-login-link {
  text-align: center;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.signup-login-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.signup-login-link a:hover {
  text-decoration: underline;
}

.forgot-password-link {
  text-align: center;
  margin-top: 12px;
  font-size: 0.82rem;
}

.forgot-password-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.otp-header {
  text-align: center;
  margin-bottom: 20px;
}

.otp-header .otp-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 8px;
}

.otp-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.otp-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.otp-header strong { color: var(--primary); font-weight: 700; }

.otp-inputs {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 20px;
}

.otp-digit {
  width: 42px;
  height: 50px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  font-family: var(--font-sans);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: all 0.2s ease;
  caret-color: var(--primary);
}

.otp-digit:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.otp-digit.filled {
  border-color: var(--primary);
  background: var(--primary-light);
}

.otp-expiry {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.7;
}

.otp-resend, .otp-back {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 12px;
  color: var(--text-muted);
}

.otp-resend a, .otp-back a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-divider span {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.oauth-buttons {
  display: flex;
  gap: 10px;
}

.btn-oauth {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  min-height: 44px;
}

.btn-oauth:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.oauth-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.oauth-soon {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.6;
}

.btn-oauth svg { flex-shrink: 0; }

/* ============================================
   PAGE HEADER (fallback for pages that use it)
   ============================================ */
.page-header {
  padding: 20px 0 12px;
  text-align: center;
}

.page-header h1 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 2px;
  text-align: center;
}

/* ============================================
   VIEW PROFILE PAGE
   ============================================ */
.view-profile-hero {
  max-width: 600px;
  margin: 20px auto 20px;
}

.view-profile-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  margin-bottom: 24px;
}

.view-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3F2CA4, #7D71CF);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.3);
  overflow: hidden;
  position: relative;
}

.view-profile-avatar::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(var(--primary-rgb), 0.15);
}

.view-profile-info {
  flex: 1;
  min-width: 0;
}

.view-profile-info h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text);
}

.view-profile-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.vp-classe:empty {
  display: none;
}

.vp-classe {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.vp-nickname {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

.vp-bio-section {
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  text-align: center;
}

.vp-bio-section h3 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.vp-bio-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
}

.vp-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vp-detail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
}

.vp-detail-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.vp-detail-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.vp-school-link {
  display: inline-block;
  max-width: 100%;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.vp-school-link:hover {
  text-decoration: underline;
}

.vp-school-link:not([href]) {
  color: var(--text-muted);
  text-decoration: none;
  cursor: default;
  pointer-events: none;
}

/* ============================================
   VIEW SCHOOL PAGE
   ============================================ */
.view-school-hero {
  max-width: 700px;
  margin: 0 auto 20px;
}

.vs-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  margin-bottom: 20px;
}

.vs-logo {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--border);
}

.vs-info {
  flex: 1;
  min-width: 0;
}

.vs-info h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text);
}

.vs-location {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.vs-address {
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.7;
  margin-top: 2px;
}

.vs-description {
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  text-align: center;
}

.vs-description h3 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.vs-description p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text);
}

.vs-stats {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.vs-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  flex: 1;
  min-width: 0;
}

.vs-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
}

.vs-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

#vs-members-card {
  max-width: 700px;
  margin: 0 auto 20px;
}

.vs-members-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.vs-member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.vs-member-card:active { background: var(--bg); }

.vs-member-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #3F2CA4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
  overflow: hidden;
}

.vs-member-info { flex: 1; min-width: 0; }

.vs-member-name {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vs-member-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

.vs-member-classe {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ============================================
   NO SCHOOL BANNER
   ============================================ */
.no-school-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--primary-light), #EDEAF8);
  border: 1.5px solid var(--primary);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
}

.no-school-banner-icon { font-size: 2rem; flex-shrink: 0; }

.no-school-banner-text {
  flex: 1;
  min-width: 0;
}

.no-school-banner-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 2px;
}

.no-school-banner-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================
   SELECT SCHOOL PAGE
   ============================================ */
.select-school-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, #5B43D6 0%, #3F2CA4 40%, #7D71CF 70%, #5B43D6 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

.select-school-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.3);
  padding: 28px 20px;
  width: 100%;
  max-width: 520px;
  text-align: center;
  animation: cardSlideUp 0.5s ease-out;
}

.select-school-card .auth-logo {
  display: block;
  margin: 0 auto 20px;
  height: 48px;
  width: auto;
}

.select-school-card h1 {
  font-size: 1.4rem;
  margin: 0 0 4px;
  font-weight: 800;
  color: var(--primary);
}

.select-school-card .subtitle {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.88rem;
}

.select-school-step { text-align: left; }

.select-school-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  margin-top: 12px;
  padding-right: 4px;
}

.select-school-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  width: 100%;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  min-height: 44px;
}

.select-school-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.select-school-item:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.select-school-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.select-school-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.select-school-item-name {
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-school-item-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.select-school-item-address {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.select-school-item-arrow {
  font-size: 1.3rem;
  color: var(--text-muted);
  font-weight: 300;
  flex-shrink: 0;
  margin-left: 8px;
}

.select-school-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 3px;
  flex-shrink: 0;
}

.select-school-logo-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.select-school-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 20px;
  font-size: 0.88rem;
}

.btn-back {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.88rem;
  padding: 0;
  margin-bottom: 16px;
  display: inline-block;
  font-family: inherit;
}

.selected-city-badge {
  margin-bottom: 16px;
}

.school-request-divider {
  display: flex;
  align-items: center;
  margin: 20px 0 14px;
}

.school-request-divider::before,
.school-request-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.school-request-divider span {
  padding: 0 14px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-request-school-action {
  width: 100%;
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 12px;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  min-height: 44px;
}

.btn-request-school-action:hover {
  background: var(--primary);
  color: white;
}

.request-sent-icon { font-size: 3rem; margin-bottom: 12px; }

.select-school-skip {
  margin-top: 20px;
  text-align: center;
}

.select-school-skip a {
  color: var(--text-muted);
  font-size: 0.82rem;
  text-decoration: none;
  font-weight: 600;
}

/* ============================================
   DESKTOP OVERRIDES (min-width: 769px)
   ============================================ */
@media (min-width: 769px) {
  body {
    padding-bottom: 0;
  }

  .container {
    max-width: 740px;
    padding: 0 32px;
  }

  .navbar {
    padding: 0 20px;
  }

  .navbar-content {
    height: 64px;
  }

  .navbar-brand {
    font-size: 1.1rem;
  }

  .navbar-brand img {
    height: 32px;
  }

  .navbar-nav {
    display: flex;
  }

  .navbar-user .user-info {
    display: inline;
  }

  .navbar-user .user-role {
    font-size: 0.7rem;
  }

  .bottom-nav {
    display: none;
  }

  .site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* Home hero */
  .home-hero {
    padding: 32px 0 24px;
  }

  .home-hero-avatar {
    width: 64px;
    height: 64px;
    font-size: 1.3rem;
  }

  .home-hero-greeting {
    font-size: 1.5rem;
  }

  .home-hero-edit {
    width: 44px;
    height: 44px;
  }

  /* Quick actions */
  .home-quick-actions {
    gap: 16px;
    margin-bottom: 28px;
  }

  .home-preview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .home-preview-grid .home-feed-section:first-child {
    grid-column: 1 / -1;
  }

  .home-action-card {
    padding: 20px 12px;
  }

  .home-action-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
  }

  .home-action-icon {
    font-size: 1.8rem;
  }

  .home-action-label {
    font-size: 0.85rem;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
  }

  .stat-card {
    padding: 24px;
  }

  .stat-card .stat-value {
    font-size: 2.2rem;
  }

  .stat-card .stat-label {
    font-size: 0.85rem;
  }

  .stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
  }

  .stat-card::before {
    opacity: 0;
    transition: opacity 0.3s;
  }

  .stat-card:hover::before {
    opacity: 1;
  }

  /* Cards */
  .card {
    padding: 28px;
    margin-bottom: 20px;
  }

  .card:hover {
    box-shadow: var(--shadow);
  }

  .card h2 {
    font-size: 1.2rem;
  }

  /* Post cards */
  .post-card {
    margin-bottom: 20px;
  }

  .post-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
  }

  .post-ig-body {
    padding: 16px 20px;
  }

  .post-ig-header {
    padding: 14px 20px;
  }

  .post-ig-footer {
    padding: 8px 20px 16px;
  }

  .post-ig-title {
    font-size: 1.1rem;
  }

  .post-ig-text {
    font-size: 0.93rem;
  }

  /* Spotted cards */
  .spotted-ig-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
  }

  .spotted-ig-header {
    padding: 14px 18px;
  }

  .spotted-ig-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.75rem;
  }

  .spotted-ig-name {
    font-size: 0.88rem;
  }

  .spotted-ig-body {
    padding: 18px 20px;
  }

  .spotted-ig-text {
    font-size: 0.95rem;
  }

  .spotted-ig-bar {
    padding: 10px 18px;
  }

  .comment-label {
    display: inline;
  }

  .comment-form {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
  }

  .comment-form .comment-input-wrap {
    flex: 1;
  }

  .comment-form button[type="submit"] {
    flex-shrink: 0;
    align-self: flex-start;
  }

  /* Compose section */
  .compose-body {
    padding: 0 24px 24px;
  }

  .compose-body.collapsed {
    padding: 0 24px;
  }

  .compose-header {
    padding: 16px 24px;
  }

  .compose-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  /* Filter chips */
  .filter-chips {
    gap: 8px;
    margin-bottom: 20px;
  }

  .filter-chip {
    padding: 8px 18px;
    font-size: 0.82rem;
  }

  .filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
  }

  /* Feed toolbar */
  .feed-toolbar {
    margin: 0 -32px;
    padding: 16px 32px 0;
  }

  /* Form */
  .form-row-flex {
    flex-direction: row;
    gap: 16px;
  }

  .form-row-flex .form-group {
    flex: 1;
  }

  #create-post-form .form-row-flex {
    align-items: stretch;
  }

  #create-post-form textarea#post-body {
    min-height: 125px;
  }

  .post-meta-pinned {
    justify-content: flex-end;
  }

  .post-target-schools {
    max-height: 220px;
  }

  .form-actions-row {
    flex-direction: row;
    align-items: center;
  }

  .form-actions-row .btn {
    width: auto;
  }

  .filter-row {
    flex-direction: row;
  }

  .filter-row-inline {
    align-items: flex-end;
  }

  .filter-row .form-group {
    min-width: 150px;
  }

  .filter-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .list-pagination {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .list-pagination-controls {
    justify-content: flex-end;
  }

  /* Dash tabs */
  .dash-tabs {
    margin-bottom: 24px;
    justify-content: center;
  }

  .dash-tab {
    padding: 10px 16px;
    font-size: 0.88rem;
  }

  /* User cards - actions under user details on desktop too */
  .user-card {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    padding: 16px;
  }

  .user-card-left {
    flex-direction: row;
    align-items: center;
    text-align: left;
  }

  .user-name {
    justify-content: flex-start;
  }

  .user-meta {
    justify-content: flex-start;
  }

  .user-card-actions {
    flex-direction: column;
    width: 100%;
    flex-shrink: 1;
    align-items: flex-start;
  }

  .role-switch,
  .school-switch {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .role-switch .role-select,
  .school-switch .school-select {
    width: auto;
    flex: 1;
    min-width: 220px;
  }

  .ban-actions {
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  /* Mod cards - horizontal on desktop */
  .mod-card {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }

  .mod-card-actions {
    flex-shrink: 0;
  }

  /* School cards */
  .school-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .school-card:hover {
    border-color: rgba(var(--primary-rgb), 0.15);
    box-shadow: 0 1px 6px rgba(var(--primary-rgb), 0.06);
    transform: none;
  }

  .btn-edit-school {
    align-self: center;
  }

  .school-card-actions {
    align-self: center;
  }

  /* Profile page */
  .profile-card {
    max-width: 560px;
  }

  .profile-avatar-wrapper {
    width: 96px;
    height: 96px;
  }

  .profile-avatar-large {
    width: 96px;
    height: 96px;
    font-size: 1.8rem;
  }

  .profile-avatar-overlay {
    width: 32px;
    height: 32px;
  }

  .profile-avatar-overlay:hover {
    transform: scale(1.1);
  }

  /* View profile */
  .view-profile-top {
    flex-direction: row;
    text-align: left;
    gap: 24px;
  }

  .view-profile-avatar {
    width: 96px;
    height: 96px;
    font-size: 1.8rem;
  }

  .view-profile-meta {
    justify-content: flex-start;
  }

  .vp-nickname {
    text-align: left;
  }

  .vp-bio-section {
    text-align: left;
  }

  .vp-detail-item {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  /* View school */
  .vs-top {
    flex-direction: row;
    text-align: left;
    gap: 24px;
  }

  .vs-logo {
    width: 80px;
    height: 80px;
    font-size: 2.2rem;
  }

  .vs-description {
    text-align: left;
  }

  .vs-stats {
    gap: 24px;
  }

  .vs-stat {
    padding: 16px 28px;
    min-width: 120px;
  }

  .vs-stat-value {
    font-size: 1.8rem;
  }

  .vs-members-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .vs-member-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.06);
    transform: none;
  }

  /* No school banner */
  .no-school-banner {
    flex-direction: row;
    text-align: left;
    padding: 20px 24px;
    gap: 16px;
  }

  /* Select school */
  .select-school-card {
    padding: 48px 40px;
    border-radius: 24px;
  }

  .select-school-list {
    max-height: 360px;
  }

  /* Auth card */
  .auth-card {
    border-radius: 24px;
    padding: 48px 40px;
  }

  /* Button sizing */
  .btn-primary {
    width: auto;
  }

  .auth-card .btn-primary {
    width: 100%;
  }

  .card p > .btn {
    width: auto !important;
  }

  /* Page header */
  .page-header {
    padding: 32px 0 24px;
    text-align: left;
  }

  .page-header h1 {
    font-size: 1.6rem;
  }

  .page-header p {
    text-align: left;
  }

  /* Image upload */
  .image-upload-area {
    padding: 24px;
  }

  /* Modal */
  .modal {
    margin: 0;
  }

  /* Table */
  tbody tr:hover {
    background: #f8fafc;
  }
}

/* ============================================
   SMALL PHONE OVERRIDES (max-width: 400px)
   ============================================ */
@media (max-width: 400px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .auth-card {
    padding: 28px 16px;
  }

  .login-step {
    font-size: 0.68rem;
    padding: 7px 8px;
  }

  .login-email-pill {
    font-size: 0.76rem;
    padding: 9px 10px;
  }

  .legacy-explainer,
  .legacy-reset-info {
    padding: 10px 11px;
  }

  .otp-digit {
    width: 38px;
    height: 46px;
    font-size: 1.1rem;
  }

  .otp-inputs {
    gap: 4px;
  }

  .oauth-buttons {
    flex-direction: column;
  }

  .home-hero-greeting {
    font-size: 1.05rem;
  }

  .home-hero-avatar {
    width: 44px;
    height: 44px;
    font-size: 0.95rem;
  }
}

/* ============================================
   FLAT POLISH OVERRIDES (minimal/professional)
   ============================================ */
:root {
  --bg-base: #f6f7fa;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 2px 8px rgba(15, 23, 42, 0.08);
  --radius: 14px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: none !important;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.auth-container,
.select-school-container {
  background: var(--bg-base) !important;
  animation: none !important;
}

.auth-card,
.select-school-card,
.card,
.compose-card,
.post-card,
.spotted-ig-card,
.modal-content,
.bottom-nav,
.navbar {
  box-shadow: var(--shadow) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.auth-card,
.select-school-card {
  background: var(--surface) !important;
}

.btn,
.card,
.post-card,
.spotted-ig-card,
.auth-container,
.auth-card,
.select-school-container,
.select-school-card,
.post-category,
.post-pin,
.pending-school-banner,
.no-school-banner,
.legacy-explainer,
.legacy-reset-info,
.alert,
.progress-bar-fill,
.spotted-ig-header {
  background-image: none !important;
}

.btn-primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  box-shadow: none !important;
}

.btn-primary:hover {
  background: var(--primary-hover) !important;
}

.btn {
  box-shadow: none !important;
}

.btn-secondary {
  background: #ffffff !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.btn-approve,
.btn-unban {
  background: #15803d !important;
  border-color: #15803d !important;
  color: #fff !important;
}

.btn-reject,
.btn-danger,
.btn-delete-school {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
}

.btn-ban {
  background: #b45309 !important;
  border-color: #b45309 !important;
  color: #fff !important;
}

.btn-edit-school {
  background: var(--primary-light) !important;
  border-color: var(--border) !important;
  color: var(--primary-hover) !important;
}

.role-admin { background: #fef3c7 !important; color: #92400e; }
.role-co_admin { background: #ffedd5 !important; color: #9a3412; }
.role-referente { background: #edeaf8 !important; color: #322a77; }
.role-rappresentante { background: #edeaf8 !important; color: #322a77; }
.role-studente { background: #ecfdf3 !important; color: #166534; }

.spotted-ig-header {
  background: var(--primary-light) !important;
}

.progress-bar-fill { background: var(--primary) !important; }
.alert-error { background: var(--danger-surface) !important; }
.alert-success { background: var(--success-surface) !important; }
.alert-warning { background: var(--warning-surface) !important; }
.pending-school-banner,
.legacy-explainer,
.legacy-reset-info {
  background: var(--warning-surface) !important;
  border: 1px solid var(--warning-line);
}

.no-school-banner {
  background: var(--primary-light) !important;
  border: 1px solid var(--border);
}

.post-category {
  background: var(--primary-light) !important;
  color: var(--primary-hover);
}

.post-pin {
  background: #0f766e !important;
  color: #fff;
}

/* Utility/semantic classes replacing inline styles */

.auth-card-center { text-align: center; }
.spinner-center { margin: 32px auto; }
.callback-state-icon { margin: 16px 0; display: flex; justify-content: center; }
.callback-login-link { margin-top: 16px; }
.subtitle-no-margin { margin-bottom: 0; }

.empty-state-card { text-align: center; padding: 48px 24px; }
.empty-state-title { margin-top: 12px; }
.empty-state-text { color: var(--text-muted); margin-top: 8px; }
.empty-state-cta { width: auto; margin-top: 20px; border-radius: 999px; padding: 10px 28px; }

.form-group-mb-12 { margin-bottom: 12px; }
.form-row-mt-10 { margin-top: 10px; }
.form-group-mt-10 { margin-top: 10px; }
.form-group-mt-12 { margin-top: 12px; }
.form-group-mt-16 { margin-top: 16px; }

.btn-full { width: 100%; }
.btn-auto-width { width: auto; }
.btn-inline-nowrap { width: auto; white-space: nowrap; }

.select-school-request-title { margin-bottom: 8px; }
.select-school-request-subtitle { margin-bottom: 20px; }
.subtitle-mt-12 { margin-top: 12px; }
.inline-cta-link { display: inline-block; margin-top: 20px; text-decoration: none; }

.profile-nickname-banner { margin-bottom: 16px; }
.banner-edit-nickname-btn { margin-top: 10px; border-radius: 999px; padding: 8px 24px; }
.btn-pill-full { border-radius: 999px; margin-top: 20px; width: 100%; }
.btn-pill-compact { border-radius: 999px; padding: 6px 18px; }
.btn-pill-submit { border-radius: 999px; margin-top: 8px; }
.btn-icon-inline { vertical-align: -2px; margin-right: 6px; }
.profile-view-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.profile-view-actions .btn-pill-full { margin-top: 0; }

.dashboard-banner-cta {
  margin-top: 10px;
  border-radius: 999px;
  padding: 8px 24px;
  display: inline-block;
  text-decoration: none;
}

.btn-add-school {
  font-size: 0.78rem;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  font-weight: 700;
}

.school-form-wrapper {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.btn-neutral-flat {
  background: var(--border);
  color: var(--text);
  border: none;
}

.modal-intro { margin-bottom: 16px; }
.modal-intro-sm { margin-bottom: 14px; }
.referente-scope-error {
  margin-top: 12px;
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
}

.avatar-img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-img-contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 16px;
}

.spinner-sm {
  width: 24px;
  height: 24px;
  border-width: 3px;
}

.user-role-tight { font-size: 0.62rem; padding: 1px 8px; }
.user-role-xs { font-size: 0.6rem; padding: 1px 8px; }
.user-avatar-link-reset { text-decoration: none; color: white; }
.user-name-link-reset { color: inherit; text-decoration: none; }
.text-protected-small { color: var(--text-muted); font-size: 0.8rem; }
.mod-text-strong { font-weight: 700; font-size: 1.05rem; }
.mod-meta { margin: 4px 0; color: var(--text-muted); }
.mod-meta-sm { margin: 2px 0; color: var(--text-muted); font-size: 0.85rem; }
.mod-meta-muted { margin: 6px 0; font-size: 0.85rem; color: var(--text-muted); }
.school-card-readonly { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; }
.school-card-link-reset { text-decoration: none; color: inherit; }
.is-disabled-link { pointer-events: none; }
.input-highlight {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15) !important;
}

.comment-submit-btn { border-radius: 999px; }
.comment-empty-text { color: var(--text-muted); font-size: 0.85rem; padding: 8px 0; }
.comment-error-text { color: var(--error); font-size: 0.85rem; }
.spotted-ig-header-flat { background: var(--primary-light); }
.spotted-ig-avatar-soft { background: rgba(255, 255, 255, 0.5); }
.post-poll-option-bg { width: var(--poll-width, 0%); }

/* ============================================
   DESIGN SYSTEM TOKENS (v2)
   ============================================ */
:root {
  --line: rgba(15, 23, 42, 0.08);
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #eef2f7;
  --primary: #5565f5;
  --primary-hover: #4f5bf0;
  --primary-soft: #c7c3fb;
  --bg-page: #f4f5fa;
  --ink-strong: #0f172a;
  --shadow-soft: rgba(12, 10, 48, 0.12);
  --shadow-card: rgba(12, 10, 48, 0.14);
  --shadow-accent: rgba(97, 85, 245, 0.24);

  --control-bg: #ffffff;
  --control-border: #d7dcea;
  --control-border-hover: #64748b;
  --control-border-focus: #b5a8ff;
  --control-focus-ring: rgba(97, 85, 245, 0.18);
  --control-radius: 16px;
  --control-height: 48px;

  --btn-radius: 16px;
  --btn-height: 48px;
  --btn-padding-x: 16px;
  --btn-icon-gap: 8px;
  --oauth-border: var(--control-border);
  --oauth-border-hover: var(--control-border-hover);
  --oauth-bg: #ffffff;
  --oauth-bg-hover: #f8fafc;
  --oauth-text: var(--text-main);
  --oauth-divider-text: #64748b;

  --radius-card: 24px;
  --radius-tab: 16px;
  --radius-tab-item: 14px;
  --radius-chip: 999px;

  --logo-height: 40px;
  --logo-max-width: 170px;
  --logo-accent-filter: none;

  --motion-fast: 120ms;
  --motion-base: 180ms;
  --motion-slow: 260ms;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-auth-enter: var(--motion-base);
  --motion-auth-feedback: var(--motion-fast);
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-sans) !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.auth-title,
.navbar-brand {
  font-family: var(--font-display) !important;
}

body {
  color: var(--text-main) !important;
  background: var(--bg-page) !important;
}

.container {
  animation: none !important;
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea,
.role-switch .role-select,
.school-switch .school-select,
select,
input[type="text"],
input[type="email"],
input[type="password"] {
  background: var(--control-bg);
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  min-height: var(--control-height);
  color: var(--text-main);
  transition:
    border-color var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease),
    background-color var(--motion-fast) var(--motion-ease);
}

.form-group input:not([type="checkbox"]):not([type="radio"]):hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: var(--control-border-hover);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
select:focus,
input:focus,
textarea:focus {
  border-color: var(--control-border-focus) !important;
  box-shadow: 0 0 0 2px var(--control-focus-ring) !important;
}

.btn {
  min-height: var(--btn-height);
  border-radius: var(--btn-radius);
  padding: 10px var(--btn-padding-x);
  font-weight: 700;
  transition:
    background-color var(--motion-fast) var(--motion-ease),
    border-color var(--motion-fast) var(--motion-ease),
    color var(--motion-fast) var(--motion-ease),
    opacity var(--motion-fast) var(--motion-ease),
    transform var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease);
}

.btn-primary {
  background: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 10px 24px rgba(var(--primary-rgb), 0.18) !important;
}

.btn-primary:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(var(--primary-rgb), 0.22) !important;
}

.btn-secondary {
  background: var(--surface) !important;
  border: 1px solid var(--control-border) !important;
  color: var(--text-main) !important;
}

.tabs {
  background: #eef2f7;
  border: 1px solid #cfd7e6;
  border-radius: var(--radius-tab);
  padding: 4px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.tab {
  border: 0;
  border-radius: var(--radius-tab-item);
  margin: 0;
  color: #334155;
  font-weight: 700;
  transition:
    background-color var(--motion-fast) var(--motion-ease),
    color var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-fast) var(--motion-ease);
}

.tab.active {
  background: #ffffff;
  color: #0f172a;
  border-bottom-color: transparent;
  box-shadow:
    0 0 0 1px #d5deee,
    0 8px 20px rgba(12, 10, 48, 0.1);
}

.tab:hover {
  color: #1e293b;
  background: rgba(255, 255, 255, 0.72);
}

.tab:focus-visible {
  outline: 3px solid rgba(58, 109, 255, 0.28);
  outline-offset: 2px;
}

.navbar {
  background: #ffffff !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow:
    0 1px 0 rgba(215, 220, 234, 0.9),
    0 8px 22px rgba(12, 10, 48, 0.05) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.auth-container,
.select-school-container {
  background: var(--bg-page) !important;
}

.auth-card-modern,
.auth-card,
.select-school-card {
  background: #ffffff !important;
  border: 1px solid var(--line) !important;
  box-shadow:
    0 22px 52px rgba(12, 10, 48, 0.1),
    0 2px 8px rgba(12, 10, 48, 0.06) !important;
  border-radius: var(--radius-card) !important;
  animation: none !important;
}

.auth-card-modern {
  max-width: 500px;
  padding: 32px 26px;
}

.auth-title {
  margin-bottom: 6px;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-strong) !important;
  text-align: center;
}

.auth-subtitle {
  margin-bottom: 20px !important;
  color: var(--subtext) !important;
  font-size: 0.95rem;
  text-align: center;
}

.brand-logo,
.brand-logo-filter,
.auth-logo,
.vendor-check-logo {
  filter: none !important;
  display: block;
  height: var(--logo-height);
  width: auto;
  max-width: var(--logo-max-width);
  margin: 0 auto 14px;
}

.login-stepper {
  display: none !important;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-tab-item);
  padding: 4px;
  gap: 4px;
}

.login-step {
  border: 0;
  background: transparent;
  color: var(--subtext);
  border-radius: 8px;
}

.login-step.active {
  background: #ffffff;
  color: var(--primary);
}

.legacy-explainer,
.legacy-reset-info,
.login-email-pill {
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%) !important;
  border: 1px solid var(--line) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.legacy-explainer h3,
.legacy-reset-info h4,
.login-email-pill span {
  color: var(--ink-strong) !important;
}

.auth-footer {
  color: var(--subtext);
  font-size: 0.82rem;
}

.auth-footer a {
  color: var(--primary);
  font-weight: 700;
}

.auth-divider {
  margin: 18px 0 14px;
}

.auth-divider span {
  color: var(--oauth-divider-text);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.oauth-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.btn-oauth {
  border: 1px solid var(--oauth-border) !important;
  background: var(--oauth-bg) !important;
  color: var(--oauth-text) !important;
  font-weight: 700;
  min-height: 48px;
  box-shadow: 0 8px 24px rgba(12, 10, 48, 0.04);
}

.btn-oauth:hover {
  border-color: var(--oauth-border-hover) !important;
  background: var(--oauth-bg-hover) !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(12, 10, 48, 0.08);
}

.btn-oauth i {
  font-size: 0.95rem;
  line-height: 1;
}

/* Stile dedicato "Sign in with Apple" */
.btn-oauth.btn-apple {
  background: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-weight: 600;
}

.btn-oauth.btn-apple:hover {
  background: #1f1f1f !important;
  border-color: #1f1f1f !important;
  color: #ffffff !important;
}

.btn-oauth.btn-apple:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.28);
  outline-offset: 2px;
}

.btn-oauth.btn-apple:disabled {
  background: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
}

.btn-oauth.btn-apple i {
  color: #ffffff !important;
  font-size: 1rem;
}

.auth-title-icon {
  margin-right: 10px;
  color: var(--primary);
  font-size: 0.95em;
}

.auth-tab-icon {
  margin-right: 6px;
  font-size: 0.86em;
}

.auth-inline-icon {
  margin-right: var(--btn-icon-gap);
}

.callback-fa-icon {
  font-size: 2rem;
  line-height: 1;
  color: var(--primary);
}

.callback-fa-error {
  color: var(--error);
}

.callback-fa-success {
  color: var(--success);
}

/* ============================================
   POSTS / SPOTTED POLISH (font, motion, responsive)
   ============================================ */
.ig-feed-column {
  width: 100%;
  max-width: 700px;
}

.filter-chips {
  scroll-snap-type: x proximity;
}

.filter-chip {
  scroll-snap-align: start;
}

.compose-card,
.post-card,
.spotted-ig-card {
  transition:
    transform var(--motion-base) var(--motion-ease),
    border-color var(--motion-fast) var(--motion-ease),
    box-shadow var(--motion-base) var(--motion-ease);
}

.post-card,
.spotted-ig-card {
  animation: feed-card-enter var(--motion-base) var(--motion-ease);
}

@keyframes feed-card-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (hover: hover) {
  .post-card:hover,
  .spotted-ig-card:hover {
    transform: translateY(-1px);
    border-color: var(--control-border);
  }
}

.post-ig-meta,
.post-ig-footer,
.post-ig-actions,
.spotted-ig-bar,
.spotted-ig-actions,
.spotted-ig-meta {
  flex-wrap: wrap;
}

.post-ig-footer,
.spotted-ig-bar {
  row-gap: 8px;
}

.post-ig-text,
.spotted-ig-text {
  text-wrap: pretty;
}

/* Spotted header accent */
.spotted-ig-header,
.spotted-ig-header-flat {
  background: var(--primary) !important;
  color: #ffffff;
}

.spotted-ig-name {
  color: #ffffff;
}

.spotted-ig-time {
  color: rgba(255, 255, 255, 0.82);
}

.spotted-ig-avatar-soft {
  background: rgba(255, 255, 255, 0.2) !important;
}

@media (max-width: 768px) {
  .feed-toolbar {
    margin: 0 -16px;
    padding: 10px 16px 0;
  }

  .filter-chips {
    gap: 6px;
    margin-bottom: 14px;
  }

  .filter-chip {
    padding: 7px 12px;
    font-size: 0.75rem;
  }

  .compose-header {
    padding: 12px 14px;
  }

  .compose-body {
    padding: 0 14px 14px;
  }

  .compose-body.collapsed {
    padding: 0 14px;
  }

  .post-ig-header {
    padding: 11px 14px;
  }

  .post-ig-body {
    padding: 12px 14px;
  }

  .post-ig-footer {
    padding: 8px 14px 12px;
    justify-content: space-between;
  }

  .post-poll-card {
    margin: 0 14px 10px;
  }

  .spotted-ig-header {
    padding: 11px 14px;
  }

  .spotted-ig-body {
    padding: 12px 14px;
  }

  .spotted-ig-bar {
    padding: 9px 14px;
    justify-content: space-between;
  }

  .comments-section {
    padding: 10px 12px 12px;
  }

  .btn-like,
  .btn-comment {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 0.8rem;
  }
}

@media (max-width: 430px) {
  .post-ig-avatar,
  .spotted-ig-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.62rem;
  }

  .post-ig-title {
    font-size: 0.96rem;
  }

  .post-ig-text,
  .spotted-ig-text {
    font-size: 0.86rem;
    line-height: 1.55;
  }

  .post-ig-time,
  .spotted-ig-time {
    font-size: 0.68rem;
  }
}

@media (max-width: 900px) {
  .role-switch,
  .school-switch,
  .ban-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
  }

  .role-switch .role-select,
  .school-switch .school-select {
    width: 100% !important;
    min-width: 0 !important;
  }

  .user-card-actions .btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    align-self: stretch !important;
  }
}

/* ============================================
   CONVENTIONS FEATURE
   ============================================ */
.conventions-pass-card {
  margin-bottom: 16px;
}

@media (min-width: 769px) {
  #conventions-content {
    margin-top: 16px;
  }
}

.conventions-pass-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.convention-qr-wrapper {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--surface-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.convention-qr {
  width: 180px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
}

.convention-qr-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.conventions-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.convention-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.convention-card-image {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  flex-shrink: 0;
}

.convention-card-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--surface-soft);
}

.convention-card-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}

.convention-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.convention-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: max-content;
}

.convention-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
}

.convention-card-text {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.convention-card-location {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.45;
  word-break: break-word;
}

.convention-card-location-label {
  color: var(--text);
  font-weight: 700;
}

.convention-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.convention-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.68rem;
  color: var(--text);
  background: var(--surface-soft);
}

.conventions-admin-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

.convention-admin-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.convention-admin-left {
  display: flex;
  gap: 10px;
  min-width: 0;
}

.convention-admin-image {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  border: 1px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}

.convention-admin-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--surface-soft);
}

.convention-admin-content {
  min-width: 0;
  flex: 1;
}

.convention-admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.convention-admin-head h3 {
  margin: 0;
  font-size: 0.9rem;
}

.convention-admin-text {
  margin: 6px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

.convention-admin-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.convention-admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-input-row input[type="color"] {
  width: 42px;
  height: 38px;
  padding: 2px 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  flex-shrink: 0;
}

.color-input-row input[type="text"] {
  flex: 1;
  min-width: 0;
}

.convention-categories-admin-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.convention-category-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 10px;
}

.convention-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.convention-category-head h3 {
  margin: 0;
  font-size: 0.9rem;
}

.convention-category-slug {
  margin: 6px 0 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.vendor-check-body {
  margin: 0;
  background: #edf1f7;
  min-height: 100vh;
}

.vendor-check-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 14px;
}

.vendor-check-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 20px;
  text-align: center;
}

.vendor-check-logo {
  height: 52px;
  margin-bottom: 10px;
}

.vendor-check-card h1 {
  margin: 0 0 6px;
  font-size: 1.3rem;
}

.vendor-check-subtitle {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.vendor-check-loading {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.vendor-check-entry {
  width: 100%;
  text-align: left;
  margin-bottom: 14px;
}

.vendor-check-entry label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.vendor-check-entry input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
  background: #fff;
  color: var(--text);
}

.vendor-check-entry .btn {
  width: 100%;
  margin-top: 8px;
}

.vendor-check-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.vendor-check-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.vendor-check-success {
  color: #166534;
  background: #ecfdf3;
  border-color: #86efac;
}

.vendor-check-warning {
  color: #92400e;
  background: #fef3c7;
  border-color: #fcd34d;
}

.vendor-check-error {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

.vendor-check-result h2 {
  margin: 0;
  font-size: 1.05rem;
}

.vendor-check-result p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.vendor-check-action {
  width: 100%;
  margin-top: 12px;
  text-align: left;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.vendor-check-action label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.vendor-check-action input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
  background: #fff;
  color: var(--text);
}

.vendor-check-action .btn {
  width: 100%;
  margin-top: 10px;
}

.vendor-check-action-feedback {
  margin: 10px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
}

.vendor-check-action-feedback-warning {
  color: #92400e;
}

.vendor-check-action-feedback-error {
  color: #991b1b;
}

.bottom-nav-items li {
  flex: 1;
  min-width: 0;
}

.bottom-nav-items a {
  width: 100%;
  padding: 4px 8px;
}

@media (min-width: 769px) {
  .convention-admin-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .convention-admin-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
  }
}

@media (max-width: 520px) {
  .convention-admin-actions .btn {
    width: 100%;
  }
}

/* ============================================
   CONVENTION CARD ACTIONS
   ============================================ */
.convention-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.convention-card-actions .btn {
  flex: 0 0 auto;
}

/* ============================================
   CONVENTIONS PAGE POLISH (compact cards + unified controls)
   ============================================ */
#conventions-content .btn {
  font-family: var(--font-sans);
  font-weight: 700;
  border-radius: 10px;
}

#conventions-content .btn.btn-sm {
  min-height: 36px;
}

#conventions-content .conventions-grid {
  gap: 8px;
}

#conventions-content .convention-card-actions {
  gap: 6px;
  margin-top: 0;
  justify-content: flex-end;
}

#conventions-content .convention-card-actions .btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 132px;
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.76rem;
}

@media (max-width: 700px) {
  .convention-card {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: flex-start;
    gap: 9px;
  }

  .convention-card-image {
    width: 44px;
    height: 44px;
  }

  .convention-card-footer {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-end;
    padding-top: 2px;
  }
}

/* ============================================
   QR ACTIVATION MODAL
   ============================================ */
.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: qrModalFadeIn 0.25s ease-out;
}

.qr-modal.hidden {
  display: none;
}

@keyframes qrModalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.qr-modal-content {
  position: relative;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.35);
  padding: 32px 24px;
  width: calc(100% - 32px);
  max-width: 380px;
  text-align: center;
  animation: qrModalSlideUp 0.3s ease-out;
}

@keyframes qrModalSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.qr-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.qr-modal-close:hover {
  background: var(--border);
  color: var(--text);
}

.qr-modal-header {
  margin-bottom: 20px;
}

.qr-modal-header h2 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.qr-modal-discount {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 6px 18px;
  border-radius: 999px;
  margin-top: 8px;
}

.qr-modal-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin: 0 auto 20px;
  width: fit-content;
}

.qr-modal-qr canvas,
.qr-modal-qr img {
  display: block;
}

.qr-modal-qr img {
  display: none;
}

.qr-modal-info {
  margin-bottom: 16px;
}

.qr-modal-user {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}

.qr-modal-time {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 2px;
}

.qr-modal-expires {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

.qr-modal-note {
  font-size: 0.78rem;
  color: var(--neutral-faint);
  margin: 12px 0 0;
  font-style: italic;
}

.qr-modal-code-wrap {
  margin: 4px 0 14px;
  border: 2px solid rgba(63, 44, 164, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, #f7f5ff 0%, #ffffff 100%);
  padding: 10px 12px 12px;
}

.qr-modal-code-label {
  margin: 0 0 7px;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4c3f90;
  font-weight: 700;
}

.qr-modal-code {
  margin: 0;
  padding: 10px 8px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px dashed rgba(76, 63, 144, 0.35);
  font-family: "Courier New", Courier, monospace;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.1;
  text-align: center;
  color: #241b57;
  word-break: normal;
  user-select: all;
}

#qr-modal-copy {
  margin-top: 8px;
}

@media (max-width: 480px) {
  .qr-modal-code {
    font-size: 1.28rem;
    letter-spacing: 0.14em;
  }
}

/* ============================================
   VENDOR CHECK - OFFER DETAILS
   ============================================ */
.vendor-check-details {
  margin-top: 16px;
  width: 100%;
  text-align: left;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.vendor-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  gap: 12px;
}

.vendor-detail-row:last-child {
  border-bottom: none;
}

.vendor-detail-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.vendor-detail-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  text-align: right;
  word-break: break-word;
}

.vendor-detail-discount {
  background: linear-gradient(135deg, var(--primary) 0%, #3F2CA4 100%);
  color: #fff;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
}

/* ============================================
   CONVENTIONS MAP
   ============================================ */
.conventions-map-wrap {
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #f8f9fc;
}

.conventions-map {
  width: 100%;
  min-height: 340px;
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #eef1f6;
  position: relative;
  z-index: 1;
}

.conventions-map-section {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

.conventions-map-section h3 {
  margin: 0 0 6px;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.conventions-map-section-text {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.conventions-map-wrap-secondary {
  margin-bottom: 0;
  background: var(--surface-soft);
}

.conventions-map-wrap-secondary .conventions-map {
  min-height: 280px;
}

.conventions-map .leaflet-pane {
  z-index: 20;
}

.conventions-map .leaflet-top,
.conventions-map .leaflet-bottom {
  z-index: 30;
}

.conventions-map .leaflet-control {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid rgba(148, 163, 184, 0.36);
}

.conventions-map .leaflet-control-zoom a {
  color: var(--brand-strong);
  background: #ffffff;
  border-color: rgba(91, 67, 214, 0.18);
}

.conventions-map .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.86);
  color: var(--text-muted);
  font-size: 0.68rem;
  border-top-left-radius: 8px;
}

.conventions-map-summary {
  margin: 10px 4px 2px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.convention-map-pin {
  background: transparent;
  border: none;
}

.convention-map-pin span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: #5b43d6;
  box-shadow: none;
}

.convention-map-popup {
  min-width: 0;
  width: 100%;
  max-width: 180px;
}

.convention-map-popup-name {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}

.convention-map-open-card.btn {
  width: 100%;
  min-height: 32px;
  font-size: 0.76rem;
}

.conventions-map .leaflet-popup-content-wrapper {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  box-shadow: none;
}

.conventions-map .leaflet-popup-content {
  margin: 8px;
}

.conventions-map .leaflet-popup-tip {
  box-shadow: none;
}

.convention-card-focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.16);
}

@media (max-width: 720px) {
  .conventions-map {
    min-height: 300px;
  }

  .conventions-map-wrap-secondary .conventions-map {
    min-height: 250px;
  }

  .conventions-map-wrap {
    padding: 6px;
    border-radius: 14px;
  }
}

/* =========================================================
   BACHECA WEB V2 (assemblee/cogestione + post + tornei)
   ========================================================= */
.board-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--chip);
  width: fit-content;
  max-width: min(100%, 560px);
  margin-inline: auto;
  margin-top: 12px;
  margin-bottom: 14px;
}

.board-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--subtext);
  border-radius: 999px;
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.board-tab:hover {
  border-color: rgba(var(--primary-rgb), 0.2);
  color: var(--accent-strong);
  background: rgba(var(--primary-rgb), 0.08);
}

.board-tab.active {
  background: var(--surface);
  border-color: rgba(var(--primary-rgb), 0.22);
  color: var(--accent-strong);
  box-shadow: 0 3px 12px rgba(var(--primary-rgb), 0.16);
}

.board-tab-tag {
  font-size: 0.72rem;
  line-height: 1;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.08);
  color: inherit;
}

.board-tab.active .board-tab-tag {
  background: rgba(255, 255, 255, 0.2);
}

.board-section {
  display: block;
}

.board-hero-card,
.board-flow-card,
.board-events-card,
.board-dev-card {
  background: #fff;
  border: 1px solid var(--border-color, #e4e7ec);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.board-hero-head,
.board-events-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}


.board-flow-card h3,
.board-dev-card h3,
.board-events-card h3,
.board-hero-card h2 {
  margin: 0;
}

.board-hero-card p,
.board-dev-card p {
  margin: 8px 0 0;
  color: var(--text-muted, #667085);
}

.board-flow-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.board-flow-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.board-flow-step {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent-color, #5e52ff);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.board-flow-list p {
  margin: 3px 0 0;
  color: var(--text-muted, #667085);
  font-size: 0.9rem;
}

.board-count {
  font-size: 0.82rem;
  color: var(--text-muted, #667085);
  font-weight: 700;
}

.sale-listings-head-right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sale-scope-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--chip);
}

.sale-scope-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--subtext);
  border-radius: 999px;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sale-scope-btn.active {
  background: var(--surface);
  color: var(--accent-strong);
  border-color: rgba(var(--primary-rgb), 0.22);
  box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.16);
}

.board-empty {
  color: var(--text-muted, #667085);
  padding: 8px 0;
}

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

.sale-listing-item {
  border: 1px solid var(--border-color, #e4e7ec);
  border-radius: 14px;
  padding: 10px;
  background: linear-gradient(180deg, #fff 0%, #fcfcff 100%);
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 12px;
}

.sale-listing-media {
  border-radius: 10px;
  overflow: hidden;
  background: #f2f4f7;
  min-height: 120px;
}

.sale-listing-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sale-listing-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #667085;
  font-size: 0.78rem;
  text-align: center;
  padding: 10px;
}

.sale-listing-content {
  min-width: 0;
}

.sale-listing-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.sale-listing-delete-btn {
  border: 1px solid #f3c5c5;
  background: #fff5f5;
  color: #b42318;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.sale-listing-delete-btn:hover:not(:disabled) {
  border-color: #e67b7b;
  background: #ffe9e9;
}

.sale-listing-delete-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.sale-listing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sale-listing-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sale-kind-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 700;
}

.sale-kind-badge.libro {
  color: #175cd3;
  background: rgba(23, 92, 211, 0.12);
}

.sale-kind-badge.appunti {
  color: #027a48;
  background: rgba(2, 122, 72, 0.12);
}

.sale-kind-badge.tutoraggio {
  color: #b54708;
  background: rgba(245, 158, 11, 0.18);
}

.sale-category-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6b2bbf;
  background: rgba(107, 43, 191, 0.12);
}

.sale-listing-time {
  font-size: 0.76rem;
  color: #667085;
}

.sale-listing-title {
  margin: 6px 0 0;
  font-size: 0.98rem;
  color: var(--text-color, #101828);
}

.sale-listing-description {
  margin: 8px 0 0;
  color: #667085;
  font-size: 0.9rem;
}

.sale-listing-phone-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.86rem;
}

.sale-listing-phone-label {
  color: #475467;
  font-weight: 700;
}

.sale-listing-phone-link {
  color: var(--accent-color, #5e52ff);
  text-decoration: none;
  font-weight: 700;
}

.sale-listing-phone-link:hover {
  text-decoration: underline;
}

.sale-listing-phone-text {
  color: #101828;
  font-weight: 700;
}

.assembly-event-item {
  border: 1px solid var(--border-color, #e4e7ec);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #fff 0%, #fcfcff 100%);
}

.assembly-event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.assembly-kind-badge,
.assembly-status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 700;
}

.assembly-kind-badge.assemblea {
  color: #4b3fd2;
  background: rgba(94, 82, 255, 0.12);
}

.assembly-kind-badge.cogestione {
  color: #0e7090;
  background: rgba(14, 112, 144, 0.12);
}

.assembly-status-badge.published {
  color: #067647;
  background: rgba(6, 118, 71, 0.12);
}

.assembly-status-badge.draft {
  color: #b54708;
  background: rgba(181, 71, 8, 0.12);
}

.assembly-status-badge.archived,
.assembly-status-badge.cancelled,
.assembly-status-badge.unknown {
  color: #475467;
  background: rgba(71, 84, 103, 0.12);
}

.assembly-event-title {
  margin: 0;
  font-size: 1rem;
  color: var(--text-color, #101828);
}

.assembly-event-description {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted, #667085);
}

.assembly-event-meta {
  margin-top: 6px;
  font-size: 0.86rem;
  color: var(--text-muted, #667085);
}

.assembly-event-stats {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assembly-event-stats span {
  font-size: 0.78rem;
  font-weight: 700;
  color: #344054;
  background: #f2f4f7;
  border-radius: 999px;
  padding: 4px 8px;
}

.assembly-event-actions {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.assembly-view-detail-btn,
.assembly-edit-draft-btn {
  border: 1px solid var(--border-color, #d0d5dd);
  background: #fff;
  color: var(--accent-color, #5e52ff);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.assembly-view-detail-btn:hover,
.assembly-edit-draft-btn:hover {
  border-color: var(--accent-color, #5e52ff);
  background: rgba(94, 82, 255, 0.06);
}

.assembly-event-detail-wrap {
  margin-top: 10px;
  border: 1px solid var(--border-color, #e4e7ec);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.assembly-detail-loading,
.assembly-detail-empty {
  font-size: 0.83rem;
  color: var(--text-muted, #667085);
}

.assembly-detail-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #fecdca;
  background: #fff5f4;
  color: #b42318;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.8rem;
  font-weight: 600;
}

.assembly-detail-reload-btn {
  border: 1px solid #fda29b;
  background: #fff;
  color: #b42318;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.assembly-shifts-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.assembly-shift-card {
  border: 1px solid var(--border-color, #e4e7ec);
  border-radius: 10px;
  background: #fcfcff;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.assembly-shift-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.assembly-shift-title-row strong {
  color: #101828;
  font-size: 0.85rem;
}

.assembly-shift-status,
.assembly-activity-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
}

.assembly-shift-meta {
  font-size: 0.78rem;
  color: var(--text-muted, #667085);
}

.assembly-shift-meta.strong {
  color: #344054;
  font-weight: 700;
}

.assembly-activities-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assembly-activity-card {
  border: 1px solid var(--border-color, #e4e7ec);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.assembly-activity-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.assembly-activity-title-row strong {
  color: #101828;
  font-size: 0.8rem;
}

.assembly-activity-description {
  margin: 0;
  color: var(--text-muted, #667085);
  font-size: 0.76rem;
}

.assembly-activity-meta {
  color: #344054;
  font-size: 0.75rem;
  font-weight: 700;
}

.assembly-enroll-btn {
  border: 1px solid #cfd4ff;
  background: rgba(94, 82, 255, 0.08);
  color: #4b3fd2;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  align-self: flex-start;
}

.assembly-enroll-btn:hover:not(:disabled) {
  border-color: #5e52ff;
  background: rgba(94, 82, 255, 0.16);
}

.assembly-enroll-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ============================================
   PRIVACY + SECURITY
   ============================================ */
.privacy-security-linkbox {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line, var(--border));
}

.privacy-security-linkbox h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--ink-strong, #0f172a);
}

.privacy-security-linkbox p {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--subtext, var(--text-muted));
}

.privacy-security-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line, #d7dcea);
  color: var(--primary, #5e52ff);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  background: rgba(248, 250, 252, 0.9);
}

.privacy-security-link:hover {
  border-color: var(--primary, #5e52ff);
  background: rgba(238, 242, 255, 0.9);
}

.privacy-security-page {
  min-height: 100vh;
  background: var(--bg-page, #f8f9fb);
  padding: 24px 14px;
}

.privacy-security-page-card {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--line, #d7dcea);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 14px 34px rgba(12, 10, 48, 0.08);
}

.privacy-security-page-head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line, #d7dcea);
}

.privacy-security-page-head h1 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  color: var(--ink-strong, #0f172a);
}

.privacy-security-page-head p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--subtext, var(--text-muted));
}

.privacy-security-page-section {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line, #d7dcea);
  border-radius: 12px;
  background: var(--surface-soft, #f8fafc);
}

.privacy-security-page-section h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--ink-strong, #0f172a);
}

.privacy-security-page-section ul,
.privacy-security-page-section ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text, #111827);
}

.privacy-security-page a {
  color: var(--primary, #5e52ff);
  font-weight: 700;
  text-decoration: none;
}

.privacy-security-page a:hover {
  text-decoration: underline;
}

.privacy-security-page code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  padding: 1px 5px;
  border-radius: 6px;
  border: 1px solid var(--line, #d7dcea);
  background: rgba(255, 255, 255, 0.95);
}

/* ============================================
   TOURNAMENTS WEB V1
   ============================================ */
.tournament-schools-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: #fbfcff;
}

.tournament-school-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tournament-school-main {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
}

.tournament-school-main input[type="checkbox"] {
  margin: 0;
}

.tournament-school-name {
  font-weight: 700;
  color: var(--text);
}

.tournament-school-own {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  color: #2d1f8c;
  background: rgba(91, 67, 214, 0.12);
  border-radius: 999px;
  padding: 2px 8px;
}

.tournament-school-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.tournaments-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.tournament-invite-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tournament-invite-item p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text);
}

.tournament-invite-item small {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.tournament-invite-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tournament-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tournament-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tournament-card-head-left h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}

.tournament-card-organizer {
  margin: 4px 0 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}


.tournament-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}


.tournament-description {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.tournament-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.tournament-card-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.tournament-card-section h4 {
  margin: 0 0 8px;
  font-size: 0.86rem;
  color: var(--text);
}

.tournament-inline-empty {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tournament-inline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tournament-inline-list li {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  background: #fcfcff;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tournament-inline-list li > span:first-child {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.tournament-inline-list li > small {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.tournament-inline-chip {
  align-self: flex-start;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f3f4f8;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #475467;
}

.tournament-actions-panel {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tournament-actions-panel h5 {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text);
}

.tournament-field-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.tournament-team-name-input,
.tournament-roster-input,
.tournament-score-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 0.78rem;
}

.tournament-score-row {
  display: grid;
  grid-template-columns: 56px 16px 56px auto;
  gap: 6px;
  align-items: center;
}

.tournament-match-report-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fcfcff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tournament-match-report-item p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text);
}

.tournament-match-report-item small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tournament-phase-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tournament-phase-line {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tournament-phase-line strong {
  color: var(--text);
}

.tournament-standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.tournament-standings-table th,
.tournament-standings-table td {
  padding: 5px 4px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.tournament-standings-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.tournament-standings-table td {
  color: var(--text);
}

.tornei-main-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.tornei-hero {
  margin-bottom: 16px;
  padding: 18px;
}

.tornei-list-shell {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.tornei-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tornei-sidebar,
.tornei-detail-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#tournament-create-section {
  margin-bottom: 16px;
}

.tornei-create-shell {
  max-width: 1160px;
  margin: 0 auto 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tornei-create-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px;
}

.tornei-create-head h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text);
}

.tornei-create-head p {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  max-width: 760px;
}

.tornei-alert-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tornei-alert-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  min-height: 86px;
}

.tornei-alert-card h5 {
  margin: 0 0 6px;
  font-size: 0.76rem;
  color: var(--text);
}

.tornei-alert-card p {
  margin: 0;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.38;
}

.tornei-alert-card.is-info {
  border-color: #bfd7ff;
  background: #f6faff;
}

.tornei-alert-card.is-warning {
  border-color: #f8d7a4;
  background: #fff9ef;
}

.tornei-alert-card.is-success {
  border-color: #b7e3c6;
  background: #f3fbf6;
}

.tornei-alert-card.is-neutral {
  border-color: var(--border);
  background: #fbfcff;
}

.tornei-create-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.tornei-helper-sticky {
  position: sticky;
  top: 86px;
}

.tornei-create-form-card .compose-body {
  padding: 12px;
}

.tornei-selected {
  border-color: rgba(var(--primary-rgb), 0.4);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.14);
}

.tornei-stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.tournament-create-helper {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px;
  background: #fbfcff;
  margin-bottom: 0;
}

.tournament-create-helper-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tournament-create-helper-head h5 {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text);
}

.tournament-helper-summary {
  margin: 10px 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.tournament-helper-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tournament-helper-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tournament-helper-jump {
  border: 0;
  background: transparent;
  width: 100%;
  padding: 9px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.tournament-helper-item.is-current {
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.16);
}

.tournament-helper-item.is-done {
  border-color: rgba(6, 118, 71, 0.3);
  background: #f3fbf6;
}

.tournament-helper-item.is-pending {
  border-color: rgba(180, 83, 9, 0.3);
  background: #fff8ee;
}

.tournament-helper-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text);
}

.tournament-helper-detail {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tournament-step-hint {
  margin: 0 0 11px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.tornei-step-panel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  margin-bottom: 10px;
}

.tornei-step-panel .form-group {
  margin-bottom: 12px;
}

.tornei-step-panel .form-row-inline {
  margin-bottom: 2px;
}

.tornei-step-panel .form-row-inline:last-child {
  margin-bottom: 0;
}

#create-tournament-form .compose-footer {
  margin-top: 2px;
  padding-top: 8px;
}

.tornei-detail-stepper {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tornei-detail-stepper .tornei-step-btn {
  white-space: nowrap;
}

.tornei-step-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tornei-step-index {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #475467;
  background: #f8f9fc;
}

.tornei-step-label {
  font-size: 0.75rem;
  font-weight: 700;
}

.tornei-step-btn.is-active {
  border-color: rgba(var(--primary-rgb), 0.35);
  color: var(--accent-strong);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.14);
}

.tornei-step-btn.is-active .tornei-step-index {
  border-color: rgba(var(--primary-rgb), 0.3);
  background: rgba(var(--primary-rgb), 0.14);
  color: var(--accent-strong);
}

#tournament-create-section .tornei-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

#tournament-create-section .tornei-step-btn {
  min-height: 42px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 8px 10px;
  justify-content: flex-start;
}

.tornei-inline-select {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  background: #fff;
  color: var(--text);
  font-size: 0.78rem;
}

.tornei-cover {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.tornei-inline-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (min-width: 840px) {
  .tournament-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tornei-main-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tornei-hero {
    padding: 14px;
    margin-bottom: 12px;
  }

  #tournament-create-section {
    margin-bottom: 12px;
  }

  .tornei-create-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .tornei-alert-cards {
    grid-template-columns: 1fr;
  }

  .tornei-create-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tornei-helper-sticky {
    position: static;
  }

  .tornei-list-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .tournament-create-helper-head {
    flex-wrap: wrap;
  }

  .tornei-stepper {
    gap: 8px;
    margin-bottom: 12px;
  }

  #tournament-create-section .tornei-stepper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tournament-create-section .tornei-step-btn {
    justify-content: flex-start;
  }

  .sale-listings-head-right {
    width: 100%;
    justify-content: flex-start;
  }

  .sale-listing-item {
    grid-template-columns: 1fr;
  }

  .sale-listing-media {
    min-height: 180px;
  }
}

/* ============================================
   APP-LIKE NAV (Expo-aligned icons)
   Desktop: left sidebar (Instagram-style)
   Mobile: keep bottom nav
   ============================================ */
.navbar-nav a::before,
.bottom-nav-items a .nav-icon::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.82;
  transform: scale(1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.bottom-nav-items a .nav-icon {
  position: relative;
  width: 22px;
  height: 22px;
}

.bottom-nav-items a .nav-icon svg {
  display: none;
}

.navbar-nav a[href*="dashboard.html"]::before,
.bottom-nav-items a[href*="dashboard.html"] .nav-icon::before {
  background-image: url("/img/tab-icons/home_tab.png");
}

.navbar-nav a[href*="spotted.html"]::before,
.bottom-nav-items a[href*="spotted.html"] .nav-icon::before {
  background-image: url("/img/tab-icons/spotted_tab.png");
}

.navbar-nav a[href*="posts.html"]::before,
.bottom-nav-items a[href*="posts.html"] .nav-icon::before {
  background-image: url("/img/tab-icons/school_tab.png");
}

.navbar-nav a[href*="tornei.html"]::before,
.bottom-nav-items a[href*="tornei.html"] .nav-icon::before {
  background-image: url("/img/tab-icons/school_tab.png");
}

.navbar-nav a[href*="convenzioni.html"]::before,
.bottom-nav-items a[href*="convenzioni.html"] .nav-icon::before {
  background-image: url("/img/tab-icons/sconti_tab.png");
}

.navbar-nav a[href*="profile.html"]::before,
.bottom-nav-items a[href*="profile.html"] .nav-icon::before {
  background-image: url("/img/tab-icons/profile_tab.png");
}

.navbar-nav a:hover::before,
.navbar-nav a.active::before,
.bottom-nav-items a.active .nav-icon::before {
  opacity: 1;
  transform: scale(1.05);
}

@media (min-width: 769px) {
  .navbar-nav a[href*="avvisi.html"],
  .navbar-nav a[href*="tornei.html"] {
    display: none;
  }

  body {
    --web-sidebar-width: 248px;
    --web-content-max: 1080px;
    padding-bottom: 0;
  }

  .bottom-nav {
    display: none !important;
  }

  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--web-sidebar-width);
    height: 100vh;
    border-right: 1px solid var(--border);
    border-bottom: none;
    padding: 14px 12px;
    box-shadow: 1px 0 14px rgba(12, 10, 48, 0.07);
  }

  .navbar-content {
    max-width: none;
    margin: 0;
    height: 100%;
    padding-bottom: 72px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
  }

  .navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 8px 12px;
    border-radius: 14px;
  }

  .navbar-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin: 2px 0 0;
  }

  .navbar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--subtext);
  }

  .navbar-user {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .navbar-user .user-info {
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
  }

  .navbar-user .user-role {
    align-self: flex-start;
  }

  .navbar-user .btn-sm {
    width: 100%;
    justify-content: center;
  }

  .navbar ~ .container,
  .navbar ~ main.container {
    position: relative;
    left: calc(var(--web-sidebar-width) + ((100vw - var(--web-sidebar-width)) / 2));
    transform: translateX(-50%);
    width: min(var(--web-content-max), calc(100vw - var(--web-sidebar-width) - 48px));
    max-width: var(--web-content-max);
    margin: 0;
    padding-inline: clamp(12px, 2.1vw, 28px);
  }

  .site-footer {
    display: block;
    position: fixed;
    left: 0;
    bottom: 12px;
    width: var(--web-sidebar-width);
    margin: 0;
    padding: 0 12px 12px;
    border: none;
    background: transparent;
    z-index: 3205;
    pointer-events: none;
  }

  .site-footer .footer-content {
    max-width: none;
    margin: 0;
    width: 100%;
  }

  .site-footer .footer-brand {
    display: none;
  }

  .site-footer .footer-credits {
    pointer-events: auto;
    font-size: 0.72rem;
    line-height: 1.35;
    color: var(--text-muted);
  }

  .site-footer .footer-credits a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
  }
}

@media (min-width: 769px) and (max-width: 1199px) {
  body {
    --web-sidebar-width: 92px;
  }

  .navbar {
    padding-inline: 8px;
  }

  .navbar-content {
    padding-bottom: 64px;
  }

  .navbar-brand {
    justify-content: center;
    font-size: 0;
    gap: 0;
    padding-inline: 0;
  }

  .navbar-nav a {
    justify-content: center;
    font-size: 0;
    gap: 0;
    padding-inline: 0;
  }

  .navbar-user .user-info,
  .navbar-user .user-role {
    display: none !important;
  }

  .navbar-user .btn-sm {
    min-height: 40px;
    padding-inline: 8px;
  }

  .site-footer {
    padding-inline: 8px;
  }

  .site-footer .footer-credits {
    font-size: 0;
  }

  .site-footer .footer-credits a {
    width: 100%;
    justify-content: center;
    font-size: 0;
    min-height: 36px;
    padding-inline: 0;
  }

  .site-footer .footer-credits a::before {
    content: "Team";
    font-size: 0.68rem;
    letter-spacing: 0.01em;
  }
}

/* ============================================
   LOGIN SPLIT (legacy auth pages)
   ============================================ */
body.login-page {
  padding-bottom: 0;
  overflow: auto;
  background: var(--bg-base) !important;
}

.login-page .auth-container {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: 18px;
  align-items: stretch;
  justify-content: center;
  min-height: 100vh;
  height: auto;
  padding: 20px;
  background: transparent !important;
  animation: none;
}

.login-page .auth-card.auth-card-modern {
  grid-column: 2;
  margin: 0;
  width: 100%;
  max-width: 520px;
  min-height: auto;
  padding: 24px 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(12, 10, 48, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-page .auth-card.auth-card-modern > * {
  width: 100%;
}

.login-page .auth-card.auth-card-modern .auth-subtitle {
  margin-bottom: 14px !important;
}

.login-page .auth-card.auth-card-modern .tabs,
.login-page .auth-card.auth-card-modern .chip-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8f9ff;
  margin-bottom: 16px;
}

.login-page .auth-card.auth-card-modern .tab,
.login-page .auth-card.auth-card-modern .chip-selector-item {
  flex: 1;
  border: none;
  margin: 0;
  border-radius: 999px;
  min-height: 38px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--subtext);
  background: transparent;
}

.login-page .auth-card.auth-card-modern .tab:hover,
.login-page .auth-card.auth-card-modern .chip-selector-item:hover {
  color: var(--accent-strong);
  background: rgba(var(--primary-rgb), 0.08);
}

.login-page .auth-card.auth-card-modern .tab.active,
.login-page .auth-card.auth-card-modern .chip-selector-item.active {
  color: var(--accent-strong);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px #d5deee;
}

.auth-showcase {
  grid-column: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  border: none;
  background: transparent;
  overflow: visible;
}

.auth-showcase-inner {
  width: 100%;
  max-width: 680px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(24px, 3.8vw, 46px);
}

.auth-showcase-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: block;
  margin-bottom: 14px;
}

.auth-showcase-kicker {
  margin: 0 0 10px;
  color: var(--subtext);
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.auth-showcase-title {
  margin: 0;
  max-width: 16ch;
  color: #1c2236;
  font-size: clamp(1.9rem, 3.1vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.auth-showcase-title span {
  color: var(--accent);
}

.auth-showcase-copy {
  margin: 14px 0 20px;
  max-width: 42ch;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-showcase-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-showcase-card {
  min-height: 84px;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1c2236;
  border: 1px solid rgba(85, 101, 245, 0.14);
  background: #f8f9ff;
}

.auth-showcase-card.card-posts,
.auth-showcase-card.card-spotted,
.auth-showcase-card.card-deals {
  background: #f8f9ff;
}

.auth-showcase-card-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  align-self: flex-start;
}

.auth-showcase-card span {
  margin-top: auto;
}

.login-links-footer {
  position: static;
  transform: none;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 8px 0 16px;
  font-size: 0.82rem;
}

.login-links-footer a {
  color: #4f5971;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.login-links-footer a:hover {
  color: #33406b;
}

@media (max-width: 1320px) {
  .login-page .auth-container {
    grid-template-columns: minmax(0, 560px);
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 24px 16px;
  }

  .login-page .auth-card.auth-card-modern {
    grid-column: 1;
    width: min(560px, 100%);
    max-width: 560px;
  }

  .auth-showcase {
    display: none;
  }
}

@media (max-width: 640px) {
  .login-page .auth-card.auth-card-modern {
    padding: 20px 14px 16px;
  }

  .login-page .auth-card.auth-card-modern .tab {
    min-height: 36px;
  }
}

/* ============================================
   Unified Sidebar/Bottombar Navigation
   ============================================ */
.navbar-nav a.active,
.bottom-nav-items a.active {
  color: var(--accent) !important;
}

.nav-meta-hidden {
  display: none !important;
}

.site-footer {
  display: none !important;
}

@media (min-width: 769px) {
  .navbar-content {
    padding-bottom: 0;
    gap: 8px;
  }

  .navbar-brand {
    margin-top: 0;
    margin-bottom: 6px;
  }

  .navbar-nav {
    margin-top: 0;
    margin-bottom: 0;
  }

  .navbar-user {
    display: none !important;
  }
}

/* ============================================
   Global Action Buttons (No Glow)
   Uniforma i pulsanti azione al look dashboard avvisi
   ============================================ */
.btn-primary,
.btn-primary:focus,
.btn-primary:focus-visible,
.btn-primary:active {
  background: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-primary:hover {
  background: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-primary::after {
  display: none !important;
  opacity: 0 !important;
}

