/* Shared palette and layout */
:root {
  --royal-blue: #0b4dbb;
  --royal-blue-dark: #073786;
  --royal-blue-soft: #eaf2ff;
  --orange: #f58220;
  --orange-dark: #d9670f;
  --orange-soft: #fff1e6;
  --ink: #172033;
  --muted: #667085;
  --surface: #fff;
  --surface-soft: #f6f8fc;
  --border: #dce3ed;
  --success: #18794e;
  --danger: #b42318;
  --radius: 14px;
  --gutter: clamp(16px, 3vw, 40px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-width: 280px; min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--surface-soft);
}
h1, h2, h3 { color: var(--royal-blue-dark); line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
h1 { margin: 0 0 24px; font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 750; }
h2 { margin: 0 0 16px; font-size: 1.35rem; }
h3 { margin: 0 0 12px; font-size: 1.1rem; }
p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }
a { color: var(--royal-blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
img, svg { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
button, .btn, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--royal-blue); outline-offset: 3px;
}
.muted, small { color: var(--muted); }
.wrap { width: min(1160px, calc(100% - var(--gutter) * 2)); margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid > *, .head-row > *, .admin-layout > *, .field { min-width: 0; }
.card, .panel, .metric {
  padding: clamp(20px, 3vw, 32px); border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface); overflow-wrap: anywhere;
}
/* Public website */
.topbar { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.4rem; color: var(--royal-blue); letter-spacing: -.03em; }
.brand::before { content: ""; width: 8px; height: 28px; border-radius: 4px; background: var(--orange); }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.nav > a:not(.btn) { color: var(--ink); font-weight: 600; }
.topbar.home-topbar { align-items: center; flex-wrap: wrap; }
.home-topbar .nav { margin-left: auto; max-width: 100%; justify-content: flex-end; gap: 12px clamp(8px, 3vw, 24px); }
.home-topbar .nav > a { display: inline-flex; align-items: center; min-height: 44px; }
.home-topbar .home-language { flex-shrink: 0; }
.hero { background: var(--royal-blue); color: white; padding-block: clamp(48px, 7vw, 96px); }
.hero h1 { max-width: 900px; margin: 16px 0 24px; color: white; font-size: clamp(2.25rem, 5.3vw, 4.25rem); line-height: 1.08; letter-spacing: -.04em; }
.hero p:not(.muted) { max-width: 740px; margin-bottom: 32px; font-size: clamp(1rem, 2vw, 1.15rem); color: #edf3ff; }
.hero .muted { color: #ffe0c4; font-size: .9rem; font-weight: 650; }
footer { border-top: 1px solid var(--border); }
/* Controls */
.btn, button, input[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; max-width: 100%; padding: 11px 20px;
  border: 1px solid transparent; border-radius: 10px;
  background: var(--orange); color: #172033; font-weight: 700; line-height: 1.4;
  text-align: center; white-space: normal; overflow-wrap: anywhere; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.btn:hover, button:hover, input[type="submit"]:hover { background: #ffa04d; color: #172033; text-decoration: none; }
.btn.secondary { background: white; color: var(--royal-blue); border-color: var(--border); }
.btn.secondary:hover { background: var(--royal-blue-soft); border-color: #adc4e9; }
button:disabled, input[type="submit"]:disabled { opacity: .55; cursor: not-allowed; }
label { display: block; margin-bottom: 8px; color: var(--ink); font-size: .95rem; font-weight: 650; }
.field { margin-bottom: 24px; }
.field small { display: block; margin-top: 8px; line-height: 1.5; }
input, select, textarea {
  width: 100%; min-width: 0; min-height: 48px; padding: 11px 14px;
  border: 1px solid #b8c5d8; border-radius: 9px; background: white; color: var(--ink);
}
input:hover, select:hover, textarea:hover { border-color: #879bb8; }
input:focus, select:focus, textarea:focus { border-color: var(--royal-blue); }
input:disabled, select:disabled, textarea:disabled { color: var(--muted); background: #f0f3f7; cursor: not-allowed; }
textarea { min-height: 144px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; padding: 0; flex-shrink: 0; accent-color: var(--royal-blue); }
input[type="file"] { padding: 8px; font-size: .9rem; }
input::file-selector-button { border: 0; border-radius: 5px; padding: 7px 10px; margin-right: 12px; background: var(--royal-blue-soft); color: var(--royal-blue-dark); cursor: pointer; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 10px 0; margin: 0; font-weight: 500; cursor: pointer; }
.actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); }
.notice { margin-block: 16px; padding: 14px 16px; border: 1px solid #f5c89f; border-left: 3px solid var(--orange); border-radius: 9px; background: var(--orange-soft); overflow-wrap: anywhere; }
.notice:empty { display: none; }
.notice.error { color: var(--danger); background: #fff1f0; border-color: #f5c1bb; }
.badge, .status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: var(--royal-blue-soft); color: var(--royal-blue-dark); font-size: .8rem; font-weight: 650; }
.badge.orange, .status.warn { color: #8a450a; background: var(--orange-soft); }
.status.ok { color: var(--success); background: #eaf6ef; }
.status.bad { color: var(--danger); background: #fff1f0; }
.status-online { color: var(--success); font-weight: 650; }
.status-offline { color: var(--danger); font-weight: 650; }
/* Employee flow and login screens */
.app-shell { min-height: 100vh; min-height: 100dvh; }
.app-head { background: white; border-bottom: 1px solid var(--border); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 960px; margin-inline: auto; padding: 16px var(--gutter); }
.head-row > strong, .head-row > .company-home { color: var(--royal-blue); font-size: 1.2rem; overflow-wrap: anywhere; }
.stepbar, .progress { height: 4px; background: #e3eaf5; overflow: hidden; }
.stepbar > span, .progress > span { display: block; height: 100%; background: var(--orange); }
.wizard { width: min(800px, 100%); margin-inline: auto; padding: clamp(24px, 4vw, 48px) var(--gutter); }
#root > .wizard { max-width: 600px; padding-top: clamp(32px, 8vh, 96px); }
.panel > .muted:first-child { margin-bottom: 8px; font-size: .875rem; }
.email-login #human-check { width: 100%; }
.email-login #login-status:not(:empty) { margin-top: 16px; }
.email-login #email { font-size: 16px; }
/* Keep 300px available for the horizontal widget on small phones. */
@media (max-width: 380px) {
  #root > .wizard.email-login { padding-inline: 8px; }
  .email-login > .panel { padding-inline: 0; border: 0; background: transparent; }
}
@media (max-width: 560px) {
  .email-login .actions > .btn { width: 100%; }
  .email-login .actions > span:empty { display: none; }
}
.choices { display: grid; gap: 12px; }
.choice { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 64px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 10px; background: white; color: var(--ink); text-align: left; font-weight: 500; }
button.choice:hover { color: var(--royal-blue-dark); border-color: #adc4e9; background: var(--royal-blue-soft); }
.choice > :first-child { min-width: 0; overflow-wrap: anywhere; }
.choice > :last-child { flex-shrink: 0; }
.blank-preset-section { margin-bottom: 32px; }
.blank-preset-grid { width: 100%; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.choice.blank-preset-tile { aspect-ratio: 1; min-height: 0; padding: 16px; flex-direction: column; justify-content: center; gap: 10px; text-align: center; }
.blank-preset-tile > b { width: 100%; min-height: 4.2em; display: flex; align-items: center; justify-content: center; line-height: 1.4; text-wrap: balance; }
.blank-preset-tile > span { color: var(--royal-blue); font-size: 1.5rem; line-height: 1; }
@media (max-width: 480px) {
  .blank-preset-grid { gap: 6px; }
  .choice.blank-preset-tile { padding: 12px; font-size: .9rem; }
}
.allergen-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin-bottom: 24px; }
.allergen-grid .check { align-items: center; font-weight: 400; padding: 12px; border: 1px solid var(--border); border-radius: 9px; }
.allergen-grid .check:has(input:checked) { border-color: var(--royal-blue); background: var(--royal-blue-soft); }
.allergen-subgroup { min-width: 0; margin: 0 0 24px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; }
.allergen-subgroup legend { padding: 0 8px; color: var(--royal-blue-dark); font-weight: 700; }
.allergen-subgroup .allergen-grid { margin-bottom: 0; }
.qty { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 24px 0; }
.home-return { margin-top: 16px; }
.home-return .btn { width: 100%; }
.qty button { width: 48px; padding: 10px; }
.qty b { min-width: 3ch; text-align: center; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.label-preview { box-sizing: border-box; display: flex; flex-direction: column; width: min(100%, var(--label-width, 101mm)); min-height: var(--label-height, 54mm); aspect-ratio: var(--label-width, 101) / var(--label-height, 54); padding: clamp(4px, 1.8vw, 14px); margin-bottom: 8px; border: 1px solid #aeb9c8; border-radius: 8px; background: white; color: #111; overflow: hidden; overflow-wrap: anywhere; }
.label-title { margin-bottom: clamp(3px, 1vw, 8px); font-size: clamp(.65rem, 2.6vw, 1.1rem); font-weight: 800; line-height: 1.15; }
.label-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2px clamp(5px, 1.5vw, 10px); padding-bottom: clamp(3px, 1vw, 8px); margin-bottom: clamp(3px, 1vw, 8px); border-bottom: 1px solid #ddd; font-size: clamp(.48rem, 1.7vw, .78rem); line-height: 1.15; }
.allergen-line { display: flex; flex-wrap: wrap; gap: clamp(2px, .7vw, 6px) clamp(5px, 1.2vw, 10px); margin-top: clamp(3px, .8vw, 6px); font-size: clamp(.45rem, 1.5vw, .72rem); line-height: 1.1; }
.allergen-line span { text-decoration: underline; font-weight: 400; }
.allergen-icon { width: 16.8px; height: 16.8px; flex: 0 0 16.8px; vertical-align: middle; }
.allergen-image { width: clamp(12px, 5vw, 28px); height: clamp(12px, 5vw, 28px); flex-basis: clamp(12px, 5vw, 28px); object-fit: contain; background: white; filter: grayscale(1) brightness(.6) contrast(20); }
.allergen-line span { display: inline-flex; align-items: center; gap: clamp(2px, .7vw, 5px); max-width: 100%; }
.label-allergens { margin-top: auto; }
.label-dimensions { margin: 0 0 20px; color: var(--muted); font-size: .875rem; }
.allergen-line i { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 6px; border: 1px solid #ccc; border-radius: 4px; font-style: normal; font-size: .75rem; }
/* Compact language dropdown */
.language-picker { position: relative; flex-shrink: 0; }
.language-picker summary { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: white; color: var(--royal-blue-dark); cursor: pointer; list-style: none; font-weight: 650; }
.global-language-picker { min-height: 44px; padding: 8px 28px 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: white; color: var(--royal-blue-dark); font-weight: 650; }
.language-picker summary::-webkit-details-marker { display: none; }
.language-picker summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-top: -4px; }
#current-language, #home-current-language, .language-current { display: inline-flex; align-items: center; gap: 8px; }
.language-options { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 116px; padding: 5px; background: white; border: 1px solid #b8c5d8; border-radius: 10px; }
.language-options button { display: flex; width: 100%; min-height: 44px; padding: 8px 12px; gap: 8px; border-radius: 6px; background: white; color: var(--ink); }
.language-options button:hover, .language-options button[aria-pressed="true"] { background: var(--royal-blue-soft); color: var(--royal-blue-dark); }
.flag { display: inline-block; width: 24px; height: 16px; flex-shrink: 0; box-shadow: 0 0 0 1px #0002; }
.flag-nl { background: linear-gradient(#ae1c28 33.33%, white 33.33% 66.66%, #21468b 66.66%); }
.flag-de { background: linear-gradient(#000 33.33%, #d00 33.33% 66.66%, #ffce00 66.66%); }
.flag-fr { background: linear-gradient(90deg, #002395 33.33%, white 33.33% 66.66%, #ed2939 66.66%); }
.flag-en { background: url('/assets/flag-gb.svg') center / cover; }


/* Account menu inside the shared application header. */
.account-control { position: relative; flex: 0 0 auto; margin-left: auto; }
.account-dropdown > summary { position: relative; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; list-style: none; cursor: pointer; color: var(--royal-blue); background: var(--royal-blue-soft); border: 1px solid var(--border); border-radius: 50%; }
.account-dropdown > summary::-webkit-details-marker { display: none; }
.account-dropdown > summary:hover, .account-dropdown[open] > summary { background: #dce8ff; }
.account-dropdown > summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.account-status-dot { position: absolute; right: 1px; bottom: 1px; width: 10px; height: 10px; border: 2px solid white; border-radius: 50%; background: #16834a; }
.account-menu { position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; width: min(320px, calc(100vw - 32px)); padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: white; box-shadow: 0 12px 36px #071b3d24; }
.account-company, .account-identity, .account-email { display: block; overflow-wrap: anywhere; }
.account-company { color: var(--royal-blue-dark); margin-bottom: 6px; }
.account-identity { color: var(--muted); font-size: .875rem; }
.account-email { margin-top: 6px; font-size: .875rem; }
.account-email[hidden] { display: none; }
.account-control .account-menu .account-logout { width: 100%; margin-top: 16px; min-height: 44px; }
.account-error { margin: 12px 0 0; color: var(--danger); font-size: .875rem; }
.app-head { position: relative; z-index: 35; }
.head-row > .language-picker { margin-left: auto; }
.head-row > .language-picker + .account-control { margin-left: 0; }

/* Administration */
.admin-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; overflow-y: auto; padding: 32px 20px; background: white; border-right: 1px solid var(--border); }
.side h2 { padding: 0 12px; margin-bottom: 28px; font-size: 1.2rem; }
.side nav { display: grid; gap: 6px; }
.side nav a { display: flex; align-items: center; min-height: 44px; padding: 10px 12px; border-radius: 8px; color: #344054; font-size: .95rem; font-weight: 600; }
.side nav a:hover, .side nav a[aria-current="page"] { color: var(--royal-blue); background: var(--royal-blue-soft); text-decoration: none; }
.main { width: 100%; max-width: 1440px; padding: var(--gutter); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.metric span { color: var(--muted); font-size: .875rem; }
.metric strong { font-size: clamp(1.5rem, 2.5vw, 2rem); line-height: 1.2; color: var(--royal-blue-dark); font-variant-numeric: tabular-nums; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: white; }
.table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
.table th, .table td { padding: 16px 20px; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.table th { background: #eef3fa; color: var(--royal-blue-dark); font-weight: 650; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #f9fbfe; }
/* Tablet */
@media (max-width: 1100px) {
  .admin-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .main .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .admin-layout { display: block; }
  .side { position: static; height: auto; padding: 20px var(--gutter); border-right: 0; border-bottom: 1px solid var(--border); }
  .side h2 { padding: 0; margin-bottom: 16px; }
  .side nav { display: flex; overflow-x: auto; gap: 8px; padding-bottom: 4px; }
  .side nav a { flex-shrink: 0; white-space: nowrap; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .topbar { flex-wrap: wrap; gap: 16px; }
  .table { min-width: 560px; }
}
/* Mobile */
@media (max-width: 560px) {
  .topbar { align-items: flex-start; }
  .nav { width: 100%; gap: 12px 20px; }
  .nav .btn { margin-left: auto; padding-inline: 14px; }
  .grid, .main .grid, .allergen-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(2rem, 9vw, 3rem); }
  .hero .btn { width: 100%; }
  .wizard { padding: 24px 16px; }
  .panel { padding: 20px; }
  .actions { gap: 12px; margin-top: 24px; padding-top: 20px; }
  .actions .btn { flex: 1 1 120px; }
  .actions > span:empty { display: none; }
  .metric-grid { gap: 12px; }
  .metric { padding: 16px; }
  .label-preview { padding: 16px; }
  .label-meta { gap: 8px 12px; font-size: .9rem; }
  .choice { padding: 16px; }
  .table th, .table td { padding: 12px 16px; }
}
/* Smaller application controls; the public homepage retains its original sizes.
   Standard height and horizontal padding are 65% of the previous 48px / 20px.
   Keep readable text and allow long labels to wrap rather than clipping them. */
.application-page :is(button, .btn, input[type="submit"]) {
  min-height: 31.2px; padding: 4.8px 13px; gap: 5.2px;
  font-size: 14px; line-height: 1.4; border-radius: 6.5px;
}
.application-page .choice { min-height: 41.6px; padding: 11.7px 13px; gap: 10.4px; }
.application-page .qty button { width: 31.2px; padding: 4.8px; }
.application-page .language-options button { min-height: 28.6px; padding: 3.5px 7.8px; }
.application-page .choice.blank-preset-tile { min-height: 80px; padding: 6px; gap: 4px; font-size: clamp(11px, 2.8vw, 14px); }
.application-page input::file-selector-button { padding: 4.55px 6.5px; }
.administration-page :is(.main, .card, .field, section, form) { min-width: 0; }
.administration-page .main { overflow-wrap: anywhere; }
.administration-page :is(input, select, textarea) { max-width: 100%; font-size: 16px; }
.administration-page .main img { max-width: 100% !important; height: auto; }
.administration-page .table td > .btn { margin-block: 4px; }
@media (max-width: 820px) {
  .administration-page .side nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .administration-page .side nav a { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .administration-page .side { padding-block: 12px; }
  .administration-page .side h2 { margin-bottom: 8px; }
}
@media (max-width: 560px) {
  .administration-page .main { padding: 16px 12px 28px; }
  .administration-page :is(.card, .panel) { padding: 16px 12px; }
  .administration-page .field { margin-bottom: 18px; }
  .administration-page .actions { gap: 12px; }
  .administration-page .table-scroll:has(.mobile-table) { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .administration-page .mobile-table { display: block; min-width: 0; }
  .administration-page .mobile-table thead {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .administration-page .mobile-table tbody { display: grid; gap: 16px; }
  .administration-page .mobile-table tbody tr {
    display: block; min-width: 0; border: 1px solid var(--border);
    border-radius: 10px; background: white;
  }
  .administration-page .mobile-table td { display: block; padding: 10px 12px; border: 0; }
  .administration-page .mobile-table td + td { border-top: 1px solid var(--border); }
  .administration-page .mobile-table td::before {
    content: attr(data-label); display: block; margin-bottom: 4px;
    color: var(--royal-blue-dark); font-weight: 650; font-size: .8rem;
  }
}
@media (max-width: 380px) {
  .administration-page .email-login > .panel { padding-inline: 0; }
  .administration-page .metric-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.label-preview.label-preview-svg{padding:0;min-height:0;height:auto;max-width:100%;overflow:hidden}.label-preview-svg>svg{display:block;width:100%;height:auto}

.label-font-picker { width:100%; border:1px solid var(--border); border-radius:8px; }
.label-font-picker summary { cursor:pointer; padding:12px; overflow-wrap:anywhere; }
.label-font-picker fieldset { margin:0; padding:8px; border:0; max-height:340px; overflow-y:auto; }
.label-font-picker legend { padding:4px; font-size:14px; }
.label-font-picker fieldset label { display:flex; align-items:center; gap:12px; min-height:48px; padding:8px; cursor:pointer; overflow-wrap:anywhere; }
.label-font-picker input[type=radio] { width:18px; min-width:18px; height:18px; margin:0; }
.label-font-picker label:has(input:checked) { background:var(--royal-blue-soft); }
.label-font-picker label:focus-within { outline:2px solid var(--royal-blue); }

/* Action feedback stays visible when an admin view is redrawn. */
.admin-feedback { position:fixed; right:16px; bottom:max(16px,env(safe-area-inset-bottom)); z-index:2000; width:min(400px,calc(100vw - 32px)); display:grid; gap:8px; pointer-events:none; }
.admin-feedback-message { padding:12px 16px; border:1px solid var(--border); border-left:4px solid var(--royal-blue); border-radius:8px; background:#fff; color:#172033; box-shadow:0 4px 18px #0002; overflow-wrap:anywhere; font-size:14px; }
.admin-feedback-message[data-state="success"] { border-left-color:#16803c; }
.admin-feedback-message[data-state="error"] { border-left-color:var(--danger); }
.administration-page .feedback-pressed { outline:3px solid var(--royal-blue); outline-offset:2px; }
.administration-page [aria-busy="true"] { cursor:progress; }
.administration-page button[aria-busy="true"]::after { content:""; display:inline-block; width:.8em; height:.8em; margin-left:6px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:admin-feedback-spin .8s linear infinite; }
@keyframes admin-feedback-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .administration-page button[aria-busy="true"]::after { animation:none; } }

.server-card { margin-top:20px; overflow-wrap:anywhere; }
.server-card[hidden] { display:none; }
.server-card h3 { margin-top:20px; }
.server-printer { padding:12px 0; border-bottom:1px solid var(--border); }
.server-card .check { margin:12px 0; }

.server-card fieldset { min-width:0; margin:12px 0; border:1px solid var(--border); border-radius:8px; padding:12px; }
.server-card .actions { flex-wrap:wrap; }
.server-card button { white-space:normal; }

.backup-restore-dialog { width:min(680px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; box-sizing:border-box; border:1px solid var(--border); border-radius:12px; padding:20px; }
.backup-restore-dialog::backdrop { background:#0008; }
.backup-restore-dialog li { margin-bottom:12px; }

.queue-job { flex-wrap: wrap; }
.queue-job > :first-child { flex: 1 1 160px; }
.queue-job > button { white-space: normal; }

.flag-da{background:linear-gradient(90deg,transparent 28%,white 28% 40%,transparent 40%),linear-gradient(0deg,#c8102e 40%,white 40% 57%,#c8102e 57%)}

/* Keep each page's existing navigation visible while scrolling. */
body > .wrap:has(> .topbar), body > .topbar, .app-head {
  position:sticky;top:0;z-index:35;background:#fff;box-shadow:0 4px 20px #07378608;
}
html{scroll-padding-top:calc(var(--page-header-height,0px) + 16px)}
@media print{body > .wrap:has(> .topbar),body > .topbar,.app-head{position:static;box-shadow:none}}

.topbar .nav{flex-wrap:wrap;justify-content:flex-end}.site-navigation-link{display:inline-flex;align-items:center;min-height:44px}.app-head>.site-navigation{max-width:960px;margin-inline:auto;padding:0 var(--gutter) 12px}.administration-page .admin-navigation{flex-wrap:wrap}.admin-navigation>.site-navigation{order:10;flex-basis:100%;gap:8px 20px}.app-head>.site-navigation{gap:8px 20px}

/* Full-width navigation with the same inset on every page. */
body>.wrap:has(>.topbar),body>.topbar{width:100%;max-width:none}
body>.wrap>.topbar,body>.topbar{padding-inline:var(--gutter)}
.app-head>.head-row,.app-head>.site-navigation{max-width:none}

.reprint-batch-dialog{box-sizing:border-box;width:min(520px,calc(100% - 24px));max-height:90dvh;overflow:auto;padding:22px;border:1px solid var(--line,#dce3f2);border-radius:16px;color:var(--text,#172c49);background:#fff}.reprint-batch-dialog::backdrop{background:#14244399}.reprint-batch-dialog h2{margin-top:0}.reprint-batch-dialog p{overflow-wrap:anywhere}.reprint-batch-dialog .check{display:flex;align-items:center;gap:10px;margin:14px 0}.reprint-batch-dialog .check input{width:20px;height:20px;margin:0}.reprint-batch-dialog [role=alert]{color:var(--danger,#aa243b)}.reprint-batch-dialog [hidden]{display:none!important}.reprint-batch-dialog .actions{display:flex;gap:12px;margin-top:20px;flex-wrap:wrap}@media(max-width:480px){.reprint-batch-dialog{padding:16px}.reprint-batch-dialog .actions .btn{flex:1}}

/* Compact language control: 65% of the original dimensions. */
html .language-picker>summary{min-height:29px;padding:6px 8px;gap:8px;border-radius:6px;font-size:10px;line-height:1.3;align-items:center}
html .language-picker>summary::after{width:4px;height:4px;margin-top:-3px}
html .language-picker :is(#current-language,#home-current-language,.language-current){gap:5px;align-items:center}
html .language-picker summary .flag{width:16px;height:10px}
html .global-language-picker{min-height:29px;padding:5px 18px 5px 8px;border-radius:6px;font-size:10px}
.topbar .nav,.head-row{align-items:center}

html .language-picker{width:max-content;max-width:100%}

/* Text links remain identifiable without colour perception. */
:is(p,li,dd,small,.muted,.faq-intro,.review-consent) a:not(.btn){text-decoration:underline;text-underline-offset:.18em;text-decoration-thickness:1.5px}

.flag-es{background:linear-gradient(#aa151b 25%,#f1bf00 25% 75%,#aa151b 75%)}
.flag-it{background:linear-gradient(90deg,#009246 33.33%,#fff 33.33% 66.66%,#ce2b37 66.66%)}
