* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--sc-bg);
  color: var(--sc-text);
  font-family: var(--sc-font-family);
}

a {
  color: var(--sc-primary);
}

.sc-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 104px;
  padding: 0 2rem;
  background: linear-gradient(135deg, var(--sc-hero-gradient-start), var(--sc-hero-gradient-end));
  color: var(--sc-on-primary);
  overflow: hidden;
}

.sc-header__diagonals {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sc-header__brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.sc-header__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 48px;
  flex-shrink: 0;
  border: 2.5px solid var(--sc-on-primary);
}

.sc-header__badge-name {
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
}

.sc-header__badge-year {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  margin-top: 2px;
}

.sc-header__title {
  font-size: 19px;
  font-weight: 600;
}

.sc-header__right {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.6rem;
  height: 100%;
  padding: 16px 0;
}

.sc-header__meta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sc-header__user {
  color: var(--sc-hero-muted);
  font-size: 13px;
}

.sc-header__logout {
  background: color-mix(in srgb, var(--sc-on-primary) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--sc-on-primary) 30%, transparent);
  color: var(--sc-on-primary);
  border-radius: 7px;
  padding: 0.4rem 0.9rem;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Language switcher (BFF-1182 M3). Sits beside the logout button because that row
   is on every page and never collapses. Colours come from the theme variables, as
   everywhere else here — the header is re-themed per fair. */
.sc-locale {
  display: flex;
  gap: 2px;
  margin-right: 0.25rem;
}

.sc-locale__option {
  background: transparent;
  border: 1px solid transparent;
  color: var(--sc-on-primary);
  border-radius: 7px;
  padding: 0.4rem 0.55rem;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0.6;
}

.sc-locale__option:hover {
  opacity: 0.85;
}

.sc-locale__option:focus-visible {
  outline: 2px solid var(--sc-on-primary);
  outline-offset: 1px;
  opacity: 1;
}

/* The active language is not a pressed button you can un-press, so it is marked
   with aria-current and simply reads as the current state. */
.sc-locale__option[aria-current='true'] {
  background: color-mix(in srgb, var(--sc-on-primary) 14%, transparent);
  border-color: color-mix(in srgb, var(--sc-on-primary) 30%, transparent);
  opacity: 1;
  cursor: default;
}

.sc-shell {
  display: flex;
  align-items: stretch;
}

.sc-sidebar {
  position: sticky;
  top: 104px;
  height: calc(100vh - 104px);
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: var(--sc-sidebar-bg);
  border-right: 1px solid var(--sc-sidebar-border);
  padding: 1.25rem 0.625rem;
  overflow-y: auto;
}

.sc-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 40px;
  padding: 0 0.875rem;
  border-radius: 9px;
  color: var(--sc-nav-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.sc-sidebar__icon {
  display: flex;
  flex-shrink: 0;
  color: var(--sc-nav-icon);
}

.sc-sidebar__link:hover {
  background: color-mix(in srgb, var(--sc-sidebar-bg) 60%, var(--sc-sidebar-border));
}

.sc-sidebar__link--active {
  background: var(--sc-nav-active-bg);
  color: var(--sc-nav-active-text);
  box-shadow: 0 3px 5px color-mix(in srgb, var(--sc-nav-active-bg) 28%, transparent);
}

.sc-sidebar__link--active:hover {
  background: var(--sc-nav-active-bg);
}

.sc-sidebar__link--active .sc-sidebar__icon {
  color: var(--sc-nav-active-text);
}

.sc-sidebar__brand {
  margin-top: auto;
  padding: 24px 0.875rem 4px;
}

.sc-sidebar__logo {
  display: block;
  width: 84px;
  height: auto;
}

.sc-main {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.sc-headline {
  margin: 0 0 0.35rem;
  color: var(--sc-headline);
  font-family: var(--sc-font-family);
  font-size: 23px;
  font-weight: 600;
}

.sc-subtitle {
  margin: 0;
  color: var(--sc-subtitle);
  font-size: 14.5px;
}

.sc-section-headline {
  margin: 2rem 0 0.75rem;
  color: var(--sc-headline);
  font-family: var(--sc-font-family);
  font-size: 18px;
  font-weight: 600;
}

.sc-tile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .sc-tile-grid {
    grid-template-columns: 1fr;
  }
}

.sc-tile {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--sc-surface);
  border: 1px solid var(--sc-card-border);
  border-radius: var(--sc-card-radius);
  box-shadow: var(--sc-card-shadow);
  padding: 24px;
  color: inherit;
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.sc-tile:hover {
  border-color: var(--sc-primary);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--sc-primary) 18%, transparent);
  transform: translateY(-2px);
}

.sc-tile:focus-visible {
  outline: 2px solid var(--sc-primary);
  outline-offset: 2px;
}

.sc-tile__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sc-primary);
  color: var(--sc-on-primary);
}

.sc-tile__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sc-tile__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--sc-headline);
}

.sc-tile__desc {
  font-size: 13px;
  color: var(--sc-subtitle);
}

.sc-tile__chevron {
  display: flex;
  flex-shrink: 0;
  color: var(--sc-nav-icon);
}

.sc-card {
  background: var(--sc-surface);
  border: 1px solid var(--sc-card-border);
  border-radius: var(--sc-card-radius);
  box-shadow: var(--sc-card-shadow);
  padding: 1.5rem;
}

.sc-card--error {
  border-color: var(--sc-primary);
}

.sc-widget-mount {
  background: var(--sc-surface);
  border: 1px solid var(--sc-card-border);
  border-radius: var(--sc-card-radius);
  box-shadow: var(--sc-card-shadow);
  padding: 1.5rem;
}

/* s-showcase-styling round 2 (Tobias, de-yellow §task 4): both md-vue-voucher-widget and
   md-vue-voucher-mailing derive Vuetify's on-primary AND on-cta roles from the single
   `data-color-button` attribute (useTheme.ts buildVuetifyColors) — there is no separate
   input for each. Round 1 needed a specific navy value there to keep a yellow CTA button's
   text readable (that token has since been dropped, round 3 — the CTA is navy now too),
   which broke every OTHER bg-primary element (navy text/icon on navy bg) and had to be
   patched with CSS var overrides (`.voucher-table-search-btn.bg-primary`, then a general
   `--v-theme-on-primary` override for both widgets). Round 2 changes the design instead:
   both widget mounts now get `colorBgButton = theme.primary` / `colorButton =
   theme.onPrimary` (app.js `mountVoucher`/`mountMailing`) — CTA buttons are filled navy
   with white text, same as every other bg-primary element, so on-primary and on-cta
   resolve to the same white value BY CONSTRUCTION. All three round-1 CSS overrides above
   are now dead and have been removed:
   - `#voucher-widget .voucher-table-search-btn.bg-primary { color: var(--sc-on-primary) !important }`
   - `#voucher-widget .v-theme--voucher { --v-theme-on-primary: 255 255 255 }`
   - `#voucher-mailing-widget .v-theme--voucherMailing { --v-theme-on-primary: 255 255 255 }`
   Verified via getComputedStyle after removal: the search button and "Details ausblenden"
   still render white-on-navy with no override present. */

/* Deliberate exception: "Statusanzeige öffnen" (VConfigPanel.vue's
   .voucher-config-panel__progress) is the one button Tobias wants outline-style rather
   than filled, now that bg-primary defaults to filled navy/white everywhere else in the
   mailing widget. Vuetify's own `.bg-primary`/`.text-primary` utilities carry `!important`
   (and are specificity-neutralized under `:where(.v-theme--voucherMailing)` by the
   widget's own theme-stylesheet scoping, main.ts THEME_SCOPE) — matched here with
   `!important` too; the ID + 3 classes selector out-ranks the zero-specificity utility. */
#voucher-mailing-widget .voucher-config-panel__progress .v-btn.bg-primary {
  background-color: transparent !important;
  color: var(--sc-primary) !important;
  border: 1px solid var(--sc-primary);
}

.sc-primary-button,
button.sc-primary-button {
  background: var(--sc-primary);
  color: var(--sc-on-primary);
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
}
