/* Premium layer for the public site and the customer dashboard (loaded after app.css). */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: #12352c; color: #fff; padding: 10px 16px; border-radius: 12px; text-decoration: none; font-weight: 600; transition: top .15s; }
.skip-link:focus { top: 10px; color: #fff; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--gold, #b7791f); outline-offset: 2px; }
.seg button { min-height: 32px; }
.finder-mobile { display: none; }
.menu-toggle i { font-size: .95rem; }
.top-logout i { display: none; }
.acct-burger, .acct-close, .acct-scrim, .acct-prefs { display: none; }
.udash-user b { font-weight: 600; max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-badge { margin-left: auto; font-style: normal; font-size: .72rem; font-weight: 700; background: #c4a36a; color: #1c140c; border-radius: 999px; padding: 2px 8px; }
.acct-side nav a { min-height: 36px; }
.udash-body { max-width: none; width: 100%; }
.udash-head { padding-top: 20px; }

/* tables never overflow the page on small screens */
.udash-body table { display: block; overflow-x: auto; max-width: 100%; }

/* ---------- Public site, small screens ---------- */
@media (max-width: 860px) {
  .utility-row { padding: 6px 0; gap: 8px; }
  .utility .tools { flex-wrap: nowrap; gap: 6px; justify-content: space-between; width: 100%; }
  .utility .seg-label { display: none; }
  .utility .seg button { padding: 6px 10px; }
  .top-link, .top-cta { padding: 6px 10px; font-size: .82rem; }
  .top-user { padding: 3px 10px 3px 3px; }
  .top-user strong { max-width: 11ch; }
  .top-logout i { display: inline; }
  .mast-row { gap: 8px; }
  .brand-logo { max-height: 42px; width: auto; }
  .menu-toggle { min-height: 44px; padding: 8px 14px; }
  .mega { flex: 1 0 100%; order: 5; display: none; flex-direction: column; gap: 10px; }
  .mega.is-open { display: flex; padding: 4px 0 10px; }
  .mega .finder-mobile { display: flex; flex: 1 1 auto; width: 100%; }
  .mega:not(.has-groups).is-open .mega-links { display: flex; flex-direction: column; align-items: stretch; }
  .mega:not(.has-groups) .mega-links > a { padding: 12px 14px; }
  .mega-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
  .mega-grid a { min-height: 48px; }
  .page { padding-top: 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px 16px; }
  /* customer dashboard drawer */
  .udash-shell { grid-template-columns: minmax(0, 1fr); }
  .acct-side {
    position: fixed; inset: 0 auto 0 0; z-index: 90; width: min(86vw, 320px); height: 100dvh; padding: 18px 14px 12px;
    transform: translateX(-102%); visibility: hidden; transition: transform .24s ease, visibility 0s linear .24s; box-shadow: 18px 0 50px rgba(0, 0, 0, .3);
  }
  body.acct-open .acct-side { transform: none; visibility: visible; transition: transform .24s ease; }
  body.acct-open { overflow: hidden; }
  .acct-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(10, 14, 12, .55); }
  .acct-close, .acct-burger {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; cursor: pointer;
    border: 1px solid rgba(28, 25, 21, .1); background: var(--card, #fff); color: var(--ink, #1c1915); font-size: 1.05rem; flex: 0 0 44px;
  }
  .acct-close { position: absolute; top: 12px; right: 12px; }
  .acct-side nav a { min-height: 44px; font-size: 1.02rem; padding: 8px 10px; }
  .acct-prefs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 6px 4px; border-top: 1px solid rgba(28, 25, 21, .08); margin-top: 8px; }
  .acct-prefs .seg { background: var(--card, #fff); border-color: rgba(28, 25, 21, .1); }
  .acct-prefs .seg button { color: #5c5144; }
  .acct-prefs .seg button.is-on { background: #1c1915; color: #f6f1e6; }
  .udash-head { position: sticky; top: 0; z-index: 40; flex-wrap: nowrap; align-items: center; gap: 10px; padding: 10px 14px; background: color-mix(in srgb, var(--bg, #f4f1ea) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(28, 25, 21, .06); }
  .udash-who { flex: 1; min-width: 0; }
  .udash-who p, .udash-who > span { display: none; }
  .udash-who strong { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .udash-prefs, .udash-tools .udash-back { display: none; }
  .udash-user b { display: none; }
  .udash-user { padding: 4px; }
  .udash-body { padding: 14px 14px 24px; }
  .udash-foot { padding: 8px 14px 20px; flex-wrap: wrap; }
  .udash-out { padding: 12px 8px; min-height: 44px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .acct-stats { grid-template-columns: 1fr 1fr; }
  .acct-hero { flex-wrap: wrap; }
  .acct-flag { margin-left: 0; }
}
html[data-theme="dark"] .acct-close, html[data-theme="dark"] .acct-burger { background: #1c2420; border-color: rgba(246, 241, 232, .14); color: #f6f1e6; }
html[data-theme="dark"] .acct-prefs { border-color: rgba(246, 241, 232, .12); }
html[data-theme="dark"] .acct-prefs .seg button { color: #d9d0c2; }
html[data-theme="dark"] .acct-prefs .seg button.is-on { background: #f6f1e6; color: #14211c; }
html[data-theme="dark"] .udash-head { background: color-mix(in srgb, #141816 92%, transparent); border-color: rgba(246, 241, 232, .08); }
@media (prefers-reduced-motion: reduce) { .acct-side, .skip-link { transition: none !important; } }
.menu-toggle{gap:8px}
html[data-theme="dark"] .finder button { background: #e8c98a; color: #14211c; font-weight: 600; }
html[data-theme="dark"] .finder button:hover { background: #f3d9a2; }
.footer-grid p { margin-top: 8px; }

/* Kontrast Dark (WCAG AA): helle Entsprechungen der gedämpften Konto-Texte */
html[data-theme="dark"] .udash-head p,
html[data-theme="dark"] .udash-foot,
html[data-theme="dark"] .acct-side nav > span,
html[data-theme="dark"] .dash-kicker,
html[data-theme="dark"] .dash-kpis span,
html[data-theme="dark"] .dash-axis,
html[data-theme="dark"] .photo-slot [data-photo-empty] { color: #b0a698; }
html[data-theme="dark"] .udash-out,
html[data-theme="dark"] .acct-side nav a.is-quiet { color: #ff8f8f; }
html[data-theme="dark"] button.btn.btn-danger, html[data-theme="dark"] a.btn.btn-danger, html[data-theme="dark"] .btn-danger { background: #ff8f8f; color: #141816; }
html[data-theme="dark"] .kicker { color: var(--gold); }

/* Kundenbereich: Platz + Trennlinie unter dem Logo */
.udash-logo { margin: 4px 6px 14px; padding: 6px 0 16px; border-bottom: 1px solid rgba(28, 25, 21, .14); }
html[data-theme="dark"] .udash-logo { border-bottom-color: rgba(246, 241, 232, .16); }
