:root {
  --spesapp-primary: #E86030;
  --piazza-primary: #5A6F8C;
  --switcher-bg: #FFFFFF;
  --switcher-border: #E5E7EB;
  --switcher-text: #4B5563;
  --switcher-text-strong: #111827;
  --switcher-hover: #F3F4F6;
}

.app-switcher {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--switcher-bg);
  border-bottom: 1px solid var(--switcher-border);
  z-index: 1000;
}

.app-switcher-inner {
  max-width: 480px;
  margin: 0 auto;
  height: 50px;
  padding: 0 16px;
  display: flex;
  align-items: stretch;
  gap: 4px;
}

.app-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--switcher-text);
  cursor: pointer;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.app-tab:hover {
  background: var(--switcher-hover);
  color: var(--switcher-text-strong);
}

.app-tab svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: color 0.18s ease;
}

.app-tab.is-active {
  font-weight: 700;
}

.app-tab[data-app="spesapp"].is-active {
  color: var(--spesapp-primary);
  border-bottom-color: var(--spesapp-primary);
}

.app-tab[data-app="spesapp"].is-active svg {
  color: var(--spesapp-primary);
}

.app-tab[data-app="piazza"].is-active {
  color: var(--piazza-primary);
  border-bottom-color: var(--piazza-primary);
}

.app-tab[data-app="piazza"].is-active svg {
  color: var(--piazza-primary);
}

@media (max-width: 520px) {
  .app-switcher-inner { padding: 0 8px; }
  .app-tab { padding: 0 6px; font-size: 13px; }
  .app-tab span.label { display: none; }
}
