/*
 * Customer PWA (app.<brand>). Mobile-first and self-contained: nothing here
 * shares tokens with the desktop hub or POS stylesheets on purpose.
 * Every selector is namespaced under .app-* because application.css does a
 * require_tree . and slurps this file into the main bundle as well.
 */

:root {
  --app-accent: #0d6efd;
  --app-bg: #f4f6fb;
  --app-surface: #ffffff;
  --app-border: #e2e8f0;
  --app-text: #16202f;
  --app-muted: #64748b;
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);
  /* +1mm above Android gesture/nav so the footer sits just above and taps work. */
  --app-gesture-gap: 1mm;
  --app-bottom-inset: calc(var(--app-safe-bottom) + var(--app-gesture-gap));
  --app-navheight: 62px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --app-bg: #0d1117;
    --app-surface: #161b22;
    --app-border: #263041;
    --app-text: #e6edf7;
    --app-muted: #8b98a9;
  }
}

body.app-body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--app-bg);
  color: var(--app-text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding-top: var(--app-safe-top);
  overscroll-behavior-y: contain;
  -webkit-tap-highlight-color: transparent;
}

/* ---------------------------------------------------------------- topbar */
.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-topbar__brand { display: flex; align-items: center; min-width: 0; }
.app-topbar__logo { max-height: 30px; width: auto; }
.app-topbar__name { font-weight: 700; letter-spacing: -0.01em; }
.app-topbar__actions { display: flex; align-items: center; gap: 6px; }

.app-bell {
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--app-border);
  border-radius: 50%;
  background: var(--app-surface);
  color: var(--app-text);
  font-size: 19px;
  cursor: pointer;
}
.app-bell.is-on { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }
.app-bell.is-blocked { opacity: 0.55; }
.app-bell.is-busy { opacity: 0.6; pointer-events: none; }
.app-bell__dot {
  position: absolute; top: 7px; right: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  background: #ef4444;
  border: 2px solid var(--app-surface);
}
.app-topbar__signout,
.app-topbar__signout button {
  border: none; background: none; color: var(--app-muted);
  font-size: 20px; padding: 8px; cursor: pointer;
}
.app-topbar__signout { display: inline-block; margin: 0; }

/* ------------------------------------------------------------------ main */
.app-main {
  flex: 1 1 auto;
  padding: 14px 14px calc(var(--app-navheight) + 16px + var(--app-bottom-inset));
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}
.app-main--bare { padding-bottom: calc(24px + var(--app-bottom-inset)); }

.app-banner { padding: 10px 14px; font-size: 14px; }
.app-banner--info { background: #e0f2fe; color: #075985; }
.app-banner--alert { background: #fee2e2; color: #991b1b; }

.app-note {
  margin-top: 16px; padding: 10px 12px;
  border: 1px dashed var(--app-border); border-radius: 10px;
  color: var(--app-muted); font-size: 13px;
}
.app-muted { color: var(--app-muted); font-size: 14px; }
.app-link { color: var(--app-accent); text-decoration: none; font-size: 14px; }

/* ------------------------------------------------------------------ hero */
.app-hero {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
}
.app-hero__greeting { margin: 0 0 14px; font-size: 22px; font-weight: 700; }
.app-hero__qr {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px; border-radius: 12px;
  background: var(--app-accent); color: #fff;
  font-weight: 600; text-decoration: none;
}
.app-hero__qr .bi { font-size: 22px; }

/* ----------------------------------------------------------------- cards */
.app-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.app-card {
  background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: 14px; padding: 14px;
}
.app-card__label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--app-muted); }
.app-card__value { font-size: 28px; font-weight: 700; line-height: 1.2; }
.app-card__hint { font-size: 12px; color: var(--app-muted); }

/* --------------------------------------------------------------- section */
.app-section { margin-bottom: 22px; }
.app-section__head { display: flex; align-items: baseline; justify-content: space-between; }
.app-section__title { font-size: 16px; font-weight: 700; margin: 0 0 10px; }

.app-list { display: flex; flex-direction: column; gap: 8px; }
.app-listitem {
  display: flex; gap: 12px; align-items: center;
  background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: 12px; padding: 12px;
}
.app-listitem__when {
  display: flex; flex-direction: column; align-items: center;
  min-width: 58px; padding-right: 12px; border-right: 1px solid var(--app-border);
}
.app-listitem__day { font-size: 12px; color: var(--app-muted); }
.app-listitem__time { font-size: 17px; font-weight: 700; }
.app-listitem__body { display: flex; flex-direction: column; min-width: 0; }
.app-listitem__title { font-weight: 600; }
.app-listitem__meta { font-size: 13px; color: var(--app-muted); }

.app-rows { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 12px; }
.app-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--app-border); }
.app-row:last-child { border-bottom: none; }
.app-row__label { color: var(--app-muted); font-size: 14px; }
.app-row__value { font-weight: 600; text-align: right; word-break: break-word; }

/* -------------------------------------------------------------- switcher */
.app-switcher, .app-langs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; }
.app-switcher form, .app-langs form { margin: 0; }
.app-chip {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--app-border); border-radius: 999px;
  background: var(--app-surface); color: var(--app-text);
  padding: 6px 12px; font-size: 14px; white-space: nowrap; cursor: pointer;
}
.app-chip.is-active { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }
.app-chip__avatar {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0,0,0,.08); font-size: 11px; font-weight: 700;
}

/* ------------------------------------------------------------------ pass */
.app-pass { text-align: center; padding-top: 8px; }
.app-pass__name { font-size: 20px; font-weight: 700; margin-bottom: 14px; }
.app-pass__qr {
  background: #fff; border-radius: 18px; padding: 18px;
  display: inline-block; max-width: 100%;
}
.app-pass__qr svg { width: 100%; height: auto; max-width: 320px; display: block; }
.app-pass__hint { color: var(--app-muted); font-size: 14px; margin: 14px 0 18px; }

/* ------------------------------------------------------------------ auth */
.app-auth { max-width: 380px; margin: 8vh auto 0; }
.app-auth__head { text-align: center; margin-bottom: 22px; }
.app-auth__logo { max-height: 56px; width: auto; margin-bottom: 16px; }
.app-auth__title { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
.app-auth__sub { color: var(--app-muted); font-size: 14px; margin: 0; }
.app-auth__links { text-align: center; margin-top: 18px; }

.app-form { display: flex; flex-direction: column; gap: 14px; }
.app-field { display: flex; flex-direction: column; gap: 6px; }
.app-field__label { font-size: 13px; color: var(--app-muted); }
.app-input {
  width: 100%; box-sizing: border-box;
  padding: 13px 14px; font-size: 16px; /* 16px stops iOS zoom-on-focus */
  border: 1px solid var(--app-border); border-radius: 12px;
  background: var(--app-surface); color: var(--app-text);
}
.app-input:focus { outline: 2px solid var(--app-accent); outline-offset: -1px; }

.app-btn {
  display: inline-block; width: 100%; box-sizing: border-box;
  padding: 14px; font-size: 16px; font-weight: 600;
  border-radius: 12px; border: 1px solid var(--app-border);
  background: var(--app-surface); color: var(--app-text);
  cursor: pointer; text-align: center;
}
.app-btn--primary { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }
.app-btn--ghost { color: #b91c1c; }

/* ----------------------------------------------------------------- empty */
.app-empty { text-align: center; padding: 40px 16px; color: var(--app-muted); }
.app-empty__icon { font-size: 40px; display: block; margin-bottom: 12px; }
.app-empty__title { font-size: 20px; color: var(--app-text); margin: 0 0 8px; }
.app-empty__text { margin: 0 0 18px; }

/* ----------------------------------------------------------------- toast */
.app-toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--app-navheight) + 18px + var(--app-bottom-inset));
  max-width: min(92vw, 420px); z-index: 60;
  background: #16202f; color: #fff;
  padding: 12px 16px; border-radius: 12px;
  font-size: 14px; line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.app-toast[hidden] { display: none; }

/* ------------------------------------------------------------- bottomnav */
.app-bottomnav {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--app-surface);
  border-top: 1px solid var(--app-border);
  padding-bottom: var(--app-bottom-inset);
}
.app-navitem {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 4px; text-decoration: none;
  color: var(--app-muted); font-size: 11px;
  min-width: 0;
}
/* Fuenf Eintraege auf einem schmalen Telefon: lieber kuerzen als umbrechen,
   sonst waechst die fixe Leiste in den Inhalt hinein. */
.app-navitem span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-navitem .bi { font-size: 20px; }
.app-navitem.is-active { color: var(--app-accent); }

/* --------------------------------------------------------------- install */
.app-install__lang { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.app-install__lang a {
  font-size: 12px; font-weight: 700; letter-spacing: 0.03em;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--app-border); color: var(--app-muted); text-decoration: none;
}
.app-install__lang a.is-current { background: var(--app-accent); border-color: var(--app-accent); color: #fff; }

.app-install__intro { text-align: center; margin-bottom: 22px; }
.app-install__eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--app-accent);
}
.app-install__title { font-size: 22px; font-weight: 800; margin: 6px 0 10px; }
.app-install__lede { color: var(--app-muted); font-size: 15px; line-height: 1.5; margin: 0 auto; max-width: 32em; }
.app-install__lede b { color: var(--app-text); }

.app-install__steps { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.app-install__step {
  display: flex; gap: 14px; padding: 16px;
  background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 16px;
}
.app-install__icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  background: var(--app-bg); display: grid; place-items: center;
  font-size: 20px; color: var(--app-accent);
}
.app-install__tag {
  display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--app-muted); margin-bottom: 2px;
}
.app-install__step h2 { font-size: 16px; font-weight: 700; margin: 2px 0 4px; }
.app-install__step p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--app-muted); }
.app-install__step p b { color: var(--app-text); }
.app-install__note { margin-top: 8px; font-size: 13px; color: var(--app-muted); }

.app-install__chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--app-bg); border: 1px solid var(--app-border); border-radius: 8px;
  padding: 1px 8px 1px 6px; font-weight: 700; color: var(--app-text); white-space: nowrap;
}

.app-install__result {
  margin-top: 22px; text-align: center; padding: 18px 16px 20px;
  background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 16px;
}
.app-install__result h2 { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.app-install__grid {
  display: inline-grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  padding: 14px 18px; background: var(--app-bg); border-radius: 14px; border: 1px solid var(--app-border);
}
.app-install__slot { width: 38px; height: 38px; border-radius: 10px; background: var(--app-border); opacity: 0.45; }
.app-install__slot.is-app {
  opacity: 1; background: #fff; display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25); position: relative;
}
.app-install__slot.is-app img { width: 100%; height: 100%; border-radius: 10px; }
.app-install__slot.is-app::after {
  content: ""; position: absolute; inset: -3px; border-radius: 13px;
  border: 2px solid var(--app-accent); opacity: 0.55;
}
.app-install__result-label { margin-top: 10px; font-size: 13px; color: var(--app-muted); }

.app-install__tip { display: flex; gap: 10px; margin-top: 18px; padding: 14px 16px; background: var(--app-bg); border-radius: 14px; }
.app-install__tip i { flex: none; color: var(--app-accent); font-size: 18px; margin-top: 1px; }
.app-install__tip p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--app-text); }
.app-install__tip p b { color: var(--app-accent); }

/* ----------------------------------------------------------- staff RH folders */
.app-folders { display: flex; flex-direction: column; gap: 10px; }
.app-folder {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 14px;
  overflow: hidden;
}
.app-folder__summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  cursor: pointer;
  user-select: none;
}
.app-folder__summary::-webkit-details-marker { display: none; }
.app-folder__icon { color: var(--app-accent); font-size: 18px; }
.app-folder__name { font-weight: 700; flex: 1; min-width: 0; }
.app-folder__count {
  min-width: 24px; height: 24px; padding: 0 8px;
  border-radius: 999px; background: rgba(0,0,0,.06);
  font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.app-folder__chevron { color: var(--app-muted); transition: transform .15s ease; }
.app-folder[open] .app-folder__chevron { transform: rotate(180deg); }
.app-folder__body { padding: 0 12px 12px; }
.app-listitem--link:active { opacity: .85; }

/* ----------------------------------------------------------- staff calendar */
.app-cal { background: var(--app-surface); border: 1px solid var(--app-border); border-radius: 14px; padding: 10px; }
.app-cal__head, .app-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.app-cal__dow { text-align: center; font-size: 11px; color: var(--app-muted); padding: 4px 0 8px; text-transform: uppercase; }
.app-cal__cell {
  min-height: 64px; border-radius: 10px; padding: 6px 4px;
  background: transparent; border: 1px solid transparent;
}
.app-cal__cell.is-muted { opacity: .35; }
.app-cal__cell.is-today { border-color: var(--app-accent); }
.app-cal__cell.has-shift { background: color-mix(in srgb, var(--app-accent) 12%, transparent); }
.app-cal__day { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.app-cal__dot {
  font-size: 10px; line-height: 1.2; color: var(--app-accent); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-cal__more { font-size: 10px; color: var(--app-muted); }
.app-cal__chip {
  display: block;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  padding: 1px 3px;
  border-radius: 4px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-cal__chip--absence {
  background: color-mix(in srgb, var(--app-text) 14%, transparent);
  color: var(--app-text);
}
.app-cal__chip--pending {
  background: transparent;
  color: var(--app-muted);
  border: 1px dashed var(--app-muted);
}
.app-cal__cell.has-absence {
  background: color-mix(in srgb, var(--app-text) 6%, transparent);
}
.app-cal__cell.has-pending:not(.has-shift) {
  background: color-mix(in srgb, var(--app-muted) 8%, transparent);
}
button.app-cal__cell {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.app-weekday {
  background: var(--app-surface); border: 1px solid var(--app-border);
  border-radius: 14px; padding: 12px; margin-bottom: 8px;
}
.app-weekday.is-today { border-color: var(--app-accent); }
.app-weekday__head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px; gap: 8px;
}
.app-weekday__off { margin: 0; font-size: 13px; }

.app-pos-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; text-decoration: none; margin-top: 8px;
}

/* ----------------------------------------------------------- staff POS iframe */
.app-main--pos {
  padding: 0 !important;
  max-width: none;
}
.app-pos-shell {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--app-topbar-height, 56px));
  min-height: 70vh;
}
.app-pos-shell__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  flex-shrink: 0;
}
.app-pos-shell__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--app-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.app-pos-shell__title {
  font-weight: 700;
  font-size: 15px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-pos-shell__frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #fff;
  min-height: 0;
}


/* ----------------------------------------------- staff device permissions */
body.app-permissions-open { overflow: hidden; }
.app-permissions__dialog {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px 16px calc(16px + var(--app-safe-bottom));
  background: rgba(15, 23, 42, 0.45);
}
.app-permissions__dialog[hidden] { display: none !important; }
.app-permissions__card {
  width: min(420px, 100%);
  background: var(--app-surface);
  color: var(--app-text);
  border: 1px solid var(--app-border);
  border-radius: 18px;
  padding: 18px 16px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.app-permissions__title { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.app-permissions__text { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: var(--app-muted); }
.app-permissions__list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.app-permissions__list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--app-bg); border: 1px solid var(--app-border);
  font-size: 14px; font-weight: 600;
}
.app-permissions__list .bi { color: var(--app-accent); font-size: 18px; }
.app-permissions__status { min-height: 1.2em; margin: 0 0 10px; font-size: 13px; color: var(--app-muted); }
.app-permissions__actions { display: flex; flex-direction: column; gap: 8px; }
.app-permissions__actions .app-btn { width: 100%; justify-content: center; }


.app-langs {
  padding-bottom: 0;
  overflow: visible;
}
.app-langs__form { margin: 0; }
.app-langs__select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--app-surface, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center;
  background-size: 10px;
  border: 1.5px solid var(--app-border);
  border-radius: 10px;
  color: var(--app-text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 28px 8px 12px;
  max-width: 100%;
  cursor: pointer;
}
.app-langs--topbar {
  gap: 0;
  padding-bottom: 0;
  overflow: visible;
  max-width: 45vw;
  justify-content: flex-end;
}
.app-langs--topbar .app-langs__select {
  font-size: 12px;
  padding: 6px 26px 6px 10px;
  border-radius: 8px;
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}


.app-auth__divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.app-auth__divider-line {
  flex: 1;
  height: 1px;
  background: var(--app-border);
}

.app-magic {
  margin: 0 0 8px;
}
.app-magic__toggle {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--app-border);
  background: transparent;
  color: var(--app-text);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}
.app-magic__toggle::-webkit-details-marker { display: none; }
.app-magic__toggle::marker { content: ""; }
.app-magic[open] .app-magic__toggle {
  border-color: var(--app-accent);
  color: var(--app-accent);
  margin-bottom: 12px;
}
.app-magic__panel {
  padding: 0 2px 4px;
}
.app-magic__hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--app-muted);
  line-height: 1.45;
}


/* ---- Staff planning ---- */
.app-planning__header { margin-bottom: 16px; }
.app-planning__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.app-planning .app-section__title { font-size: 22px; margin: 0; }
.app-planning__request-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  color: var(--app-text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.app-planning__request-link:hover { color: var(--app-text); background: color-mix(in srgb, var(--app-accent) 8%, var(--app-surface)); border-color: color-mix(in srgb, var(--app-accent) 35%, var(--app-border)); }
.app-planning__request-link .bi { font-size: 14px; color: var(--app-accent); }
.app-seg--secondary {
  margin-top: -6px;
  margin-bottom: 14px;
  background: transparent;
  border: 1px solid var(--app-border);
  padding: 3px;
}
.app-seg--secondary .app-seg__btn { font-size: 12px; padding: 7px 8px; font-weight: 650; }
.app-shift--team { padding: 10px 12px; }
.app-shift--team .app-shift__from { font-size: 15px; }
.app-shift--team .app-shift__to { font-size: 13px; }
.app-shift--team .app-shift__role { font-weight: 600; font-size: 14px; }
.app-planning__sub {
  font-size: 15px;
  font-weight: 700;
  margin: 18px 0 10px;
}

.app-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--app-border);
  border-radius: 12px;
  margin-bottom: 14px;
}
.app-seg__btn {
  text-align: center;
  text-decoration: none;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 10px;
  border-radius: 9px;
}
.app-seg__btn.is-active {
  background: var(--app-surface);
  color: var(--app-text);
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}

.app-period-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.app-period-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  color: var(--app-text);
  text-decoration: none;
  flex-shrink: 0;
}
.app-period-nav__label {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
}

.app-shift-list { display: flex; flex-direction: column; gap: 14px; }

/* ---- Week strip (horizontal scroll) + day schedule ---- */
.app-week-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 14px;
  margin: 0 -4px 8px;
  scrollbar-width: none;
}
.app-week-strip::-webkit-scrollbar { display: none; }
.app-week-strip__pill {
  flex: 0 0 auto;
  scroll-snap-align: center;
  text-decoration: none;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 650;
  padding: 10px 16px;
  border-radius: 999px;
  background: transparent;
  white-space: nowrap;
  border: 1px solid transparent;
}
.app-week-strip__pill.is-active {
  background: color-mix(in srgb, var(--app-accent) 18%, #fff);
  color: var(--app-accent);
  border-color: color-mix(in srgb, var(--app-accent) 35%, transparent);
  font-weight: 750;
}

.app-week-schedule {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 24px;
}
.app-week-day__sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 10px;
}
.app-week-day__sep::before,
.app-week-day__sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--app-border);
}
.app-week-day__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--app-muted);
  white-space: nowrap;
}
.app-week-day.is-today .app-week-day__label { color: var(--app-accent); font-weight: 750; }
.app-week-day__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--app-border) 55%, transparent);
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 600;
}
.app-week-day__empty .bi { font-size: 15px; opacity: .85; }
.app-week-day__cards { display: flex; flex-direction: column; gap: 8px; }
.app-week-day__pending {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #92400e;
  background: #fef3c7;
  border-radius: 10px;
  padding: 8px;
}
.app-week-day__event {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #e8efff;
  color: #1e3a8a;
  font-size: 13px;
}
.app-week-day__event strong {
  font-size: 11px;
  letter-spacing: 0.04em;
}
.app-day-sheet__row--event {
  background: #e8efff;
  border-radius: 8px;
  padding: 8px 10px;
}

.app-planning__title-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.app-planning__cal-toggle {
  color: var(--app-muted);
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
}
.app-planning__cal-toggle:hover { color: var(--app-text); }

.app-day__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding: 0 2px;
}
.app-day__head.is-today .app-day__name strong { color: var(--app-accent); }
.app-day__name { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.app-day__date { font-size: 12px; color: var(--app-muted); font-weight: 600; }
.app-day__shifts { display: flex; flex-direction: column; gap: 8px; }

.app-shift {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: color-mix(in srgb, var(--app-border) 40%, var(--app-surface));
  border: none;
  border-radius: 12px;
  padding: 14px 14px 14px 16px;
  overflow: hidden;
  position: relative;
}
.app-shift::before {
  content: "";
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 3px;
  background: #7c3aed;
  border-radius: 3px;
}
.app-shift__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-left: 4px;
}
.app-shift__when {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--app-text);
}
.app-shift__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 650;
}
.app-shift__project { color: var(--app-text); font-weight: 700; }
.app-shift__duration {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.app-shift__duration .bi { font-size: 13px; }
.app-shift__note {
  padding-left: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--app-muted);
}
.app-shift__time { display: none; }
.app-shift__body { display: none; }
.app-shift__from, .app-shift__to, .app-shift__sep, .app-shift__role, .app-shift__meta { display: none; }

/* Team shift row reuses .app-shift layout with visible body */
.app-shift--team {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}
.app-shift--team .app-shift__time,
.app-shift--team .app-shift__body {
  display: flex;
  flex-direction: column;
}
.app-shift--team .app-shift__from,
.app-shift--team .app-shift__to,
.app-shift--team .app-shift__role,
.app-shift--team .app-shift__meta {
  display: block;
}
.app-shift--team .app-shift__from { font-size: 16px; font-weight: 800; }
.app-shift--team .app-shift__to { font-size: 13px; font-weight: 600; color: var(--app-muted); }
.app-shift--team .app-shift__role { font-size: 14px; font-weight: 700; color: var(--app-text); padding-left: 0; }
.app-shift--team .app-shift__meta { font-size: 12px; color: var(--app-muted); }

.app-empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--app-muted);
  background: var(--app-surface);
  border: 1px dashed var(--app-border);
  border-radius: 16px;
}
.app-empty .bi { font-size: 28px; display: block; margin-bottom: 8px; opacity: .7; }
.app-empty p { margin: 0; font-size: 14px; font-weight: 600; }

.app-cal {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: 12px;
}
.app-cal__cell {
  min-height: 54px;
  border-radius: 10px;
  padding: 4px;
  border: 1px solid transparent;
}
.app-cal__cell.is-today { border-color: var(--app-accent); }
.app-cal__cell.has-shift {
  background: color-mix(in srgb, var(--app-accent) 14%, transparent);
}

.app-planning__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -6px 0 12px;
}
.app-hours-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--app-accent);
  background: color-mix(in srgb, var(--app-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--app-accent) 28%, transparent);
  border-radius: 999px;
  padding: 4px 10px;
}

.app-next-shift {
  position: sticky;
  top: calc(var(--app-safe-top) + 4px);
  z-index: 5;
  margin: 0 0 14px;
  padding: 10px 12px;
  background: var(--app-surface);
  border: 1px solid color-mix(in srgb, var(--app-accent) 35%, var(--app-border));
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .06);
}
.app-next-shift__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--app-muted);
  margin-bottom: 2px;
}
.app-next-shift__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}
.app-next-shift__time { font-size: 16px; }
.app-next-shift__role { font-size: 14px; font-weight: 650; }
.app-next-shift__project { font-size: 12px; color: var(--app-muted); }
.app-next-shift__rel {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--app-accent);
}

.app-requests-inbox { margin-bottom: 16px; }
.app-requests-inbox__list { display: flex; flex-direction: column; gap: 8px; }
.app-requests-inbox__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
}
.app-requests-inbox__main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.app-requests-inbox__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.app-requests-inbox__cancel {
  font-size: 12px;
}
.app-status-chip {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.app-status-chip--pending {
  color: #92400e;
  background: #fef3c7;
  border-color: #fcd34d;
}
.app-status-chip--approved {
  color: #065f46;
  background: #d1fae5;
  border-color: #6ee7b7;
}
.app-status-chip--rejected {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}
.app-status-chip--cancelled {
  color: var(--app-muted);
  background: color-mix(in srgb, var(--app-muted) 12%, transparent);
  border-color: var(--app-border);
}

.app-vacation-balance {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--app-accent);
}

.app-vacation-preview {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--app-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--app-accent) 22%, transparent);
  font-size: 13px;
  font-weight: 650;
  color: var(--app-text);
  line-height: 1.35;
}

/* ---------- request dialog (absence / availability) ---------- */
.app-dialog--request {
  width: min(100vw - 16px, 440px);
  max-height: min(94vh, 820px);
  margin: auto;
  border-radius: 22px;
}
.app-dialog--request .app-dialog__panel,
.app-request {
  padding: 0;
  display: flex;
  flex-direction: column;
  max-height: min(94vh, 820px);
  overflow: hidden;
  border-radius: 22px;
}
.app-request__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 10px;
}
.app-request__eyebrow {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--app-muted);
}
.app-request .app-dialog__title {
  font-size: 20px;
  letter-spacing: -0.02em;
}
.app-request__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 16px 12px;
  padding: 4px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--app-muted) 8%, transparent);
}
.app-request__tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: var(--app-muted);
  border-radius: 11px;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1.2;
}
.app-request__tab .bi { font-size: 18px; }
.app-request__tab.is-active {
  background: var(--app-surface);
  color: var(--app-text);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.app-request__form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.app-request__scroll {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 12px;
  overflow: auto;
  min-height: 0;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.app-request__balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--app-accent) 14%, transparent), color-mix(in srgb, var(--app-accent) 4%, transparent));
  border: 1px solid color-mix(in srgb, var(--app-accent) 22%, transparent);
}
.app-request__balance-label {
  font-size: 12px;
  font-weight: 650;
  color: var(--app-muted);
}
.app-request__balance-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--app-accent);
  letter-spacing: -0.02em;
}
.app-request__section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--app-border);
  border-radius: 16px;
  background: var(--app-surface);
}
.app-request__section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--app-text);
}
.app-request__step {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--app-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.app-request__preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, #16a34a 10%, transparent);
  border: 1px solid color-mix(in srgb, #16a34a 24%, transparent);
}
.app-request__preview-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.app-request__preview-work {
  font-size: 14px;
  font-weight: 800;
  color: var(--app-text);
}
.app-request__preview-rest {
  font-size: 12px;
  font-weight: 650;
  color: var(--app-muted);
}
.app-request__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.app-request__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--app-border);
  background: color-mix(in srgb, var(--app-muted) 5%, var(--app-surface));
  color: var(--app-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}
.app-request__chip input { position: absolute; opacity: 0; pointer-events: none; }
.app-request__chip .bi { font-size: 15px; }
.app-request__chip.is-active {
  border-color: color-mix(in srgb, var(--app-accent) 55%, var(--app-border));
  background: color-mix(in srgb, var(--app-accent) 12%, transparent);
  color: var(--app-text);
}
.app-request__photo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, #ea580c 45%, var(--app-border));
  background: color-mix(in srgb, #ea580c 8%, transparent);
}
.app-request__photo-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.app-request__photo-head .bi {
  font-size: 20px;
  color: #ea580c;
  margin-top: 2px;
}
.app-request__photo-head strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
}
.app-request__photo-head p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--app-muted);
  line-height: 1.35;
}
.app-request__photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid color-mix(in srgb, #ea580c 35%, var(--app-border));
  background: var(--app-surface);
  color: var(--app-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.app-request__photo-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.app-request__photo-name {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  color: #ea580c;
  word-break: break-all;
}
.app-request__hint {
  margin: 0;
  font-size: 12px;
  color: var(--app-muted);
  line-height: 1.4;
}
.app-request__empty { padding: 8px 16px 20px; }
.app-request__footer {
  padding: 12px 16px calc(12px + var(--app-safe-bottom));
  border-top: 1px solid var(--app-border);
  background: var(--app-surface);
  flex-shrink: 0;
}
.app-request__submit { margin: 0; }

.app-shift--absence::before {
  background: var(--app-muted);
}
.app-day__off {
  margin: 0;
  font-size: 13px;
  color: var(--app-muted);
  font-weight: 600;
  padding: 8px 2px;
}

.app-week-timeline {
  margin-bottom: 16px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 16px;
  padding: 10px;
  overflow: hidden;
}
.app-week-timeline__scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.app-week-timeline__hours {
  flex: 0 0 40px;
  position: relative;
  height: calc(var(--tl-hours, 18) * 18px);
  margin-top: 36px;
}
.app-week-timeline__hour-label {
  height: 18px;
  font-size: 10px;
  color: var(--app-muted);
  line-height: 1;
}
.app-week-timeline__days {
  display: flex;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.app-week-timeline__col {
  flex: 1 0 56px;
  min-width: 56px;
}
.app-week-timeline__dow {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  color: var(--app-muted);
}
.app-week-timeline__date {
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 4px;
}
.app-week-timeline__col.is-today .app-week-timeline__date { color: var(--app-accent); }
.app-week-timeline__track {
  position: relative;
  height: calc(var(--tl-hours, 18) * 18px);
  border-radius: 10px;
  background: color-mix(in srgb, var(--app-border) 55%, transparent);
  overflow: hidden;
}
.app-week-timeline__col.is-absence .app-week-timeline__track {
  background: color-mix(in srgb, var(--app-muted) 18%, transparent);
}
.app-week-timeline__absence-bg {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--app-muted) 16%, transparent);
}
.app-week-timeline__bar {
  position: absolute;
  left: 3px;
  right: 3px;
  background: var(--app-accent);
  color: #fff;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 3px;
  overflow: hidden;
  line-height: 1.1;
}

.app-dialog--sheet {
  margin: auto 12px 12px;
  width: min(100vw - 24px, 420px);
  max-height: min(70vh, 520px);
  border-radius: 18px 18px 14px 14px;
}
.app-dialog--sheet::backdrop { background: rgba(15, 23, 42, .45); }
.app-day-sheet {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.app-day-sheet__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
  font-size: 13px;
}
.app-day-sheet__row--absence {
  background: color-mix(in srgb, var(--app-muted) 10%, transparent);
}

/* request link styled above */

.app-dialog {
  border: none;
  border-radius: 18px;
  padding: 0;
  width: min(100vw - 24px, 420px);
  max-height: min(90vh, 720px);
  background: transparent;
}
.app-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.app-dialog__panel {
  background: var(--app-surface);
  color: var(--app-text);
  border-radius: 18px;
  padding: 16px;
  overflow: auto;
  max-height: min(90vh, 720px);
}
.app-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.app-dialog__title { margin: 0; font-size: 18px; font-weight: 800; }
.app-dialog__close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--app-muted);
  cursor: pointer;
}
.app-seg--dialog { margin-bottom: 14px; }
.app-field--row { display: flex; gap: 8px; }
.app-field--row > div { flex: 1; min-width: 0; }
.app-dialog__list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.app-dialog__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--app-border);
  border-radius: 12px;
}
.app-dialog__item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* Customer autocomplete on Admin invoice edit */
.app-autocomplete { position: relative; }
.app-autocomplete__results {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  max-height: 260px;
  overflow-y: auto;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.app-autocomplete__results.d-none { display: none !important; }
.app-autocomplete .list-group-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--app-border);
  background: transparent;
  color: var(--app-text);
  font-size: 14px;
  cursor: pointer;
}
.app-autocomplete .list-group-item:last-child { border-bottom: 0; }
.app-autocomplete .list-group-item:hover,
.app-autocomplete .list-group-item:active {
  background: color-mix(in srgb, var(--app-accent) 14%, transparent);
}
.app-autocomplete .list-group-item.text-primary {
  color: var(--app-accent);
  font-weight: 600;
}
.app-autocomplete mark {
  background: color-mix(in srgb, #f59e0b 45%, transparent);
  color: inherit;
  padding: 0;
}

/* Invoice / document PDF preview in the staff PWA */
.app-pdf-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.app-pdf-actions .app-btn {
  width: 100%;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  color: var(--app-text);
  cursor: pointer;
}
.app-pdf-actions .app-btn--primary {
  background: var(--app-accent);
  border-color: var(--app-accent);
  color: #fff;
}
.app-doc-viewer {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  background: var(--app-border, #e8e8e8);
  border-radius: 12px;
  padding: 8px;
  box-sizing: border-box;
  overflow: hidden;
}
.app-doc-pdf {
  width: 100%;
  max-width: 100%;
  height: calc(100dvh - 260px);
  min-height: 420px;
  border: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  margin: 0 auto;
  display: block;
}
@media (min-width: 520px) {
  .app-pdf-actions { grid-template-columns: repeat(4, 1fr); }
}

/* ------------------------------------------------------------------ admin */
.app-admin-hero {
  margin-bottom: 18px;
  padding: 4px 2px 0;
}
.app-admin-hero__eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--app-muted);
}
.app-admin-hero__title {
  margin: 0;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.app-admin-hero__sub {
  margin: 6px 0 0;
  color: var(--app-muted);
  font-size: 14px;
}
.app-admin-companies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.app-admin-company-chip {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  color: var(--app-muted);
}

.app-admin-attention {
  margin-bottom: 18px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, #f59e0b 35%, var(--app-border));
  background: color-mix(in srgb, #f59e0b 10%, var(--app-surface));
}
.app-admin-attention__title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
}
@media (prefers-color-scheme: dark) {
  .app-admin-attention__title { color: #fbbf24; }
}
.app-admin-attention__list { display: flex; flex-direction: column; gap: 8px; }
.app-admin-attention__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  color: inherit;
  text-decoration: none;
}
.app-admin-attention__item strong { display: block; font-size: 14px; }
.app-admin-attention__item small { color: var(--app-muted); font-size: 12px; }
.app-admin-attention__badge {
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--app-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.app-admin-attention__badge--warn { background: #d97706; }

.app-admin-section { margin-bottom: 22px; }
.app-admin-section__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.app-admin-section__hint {
  margin: 2px 0 10px;
  font-size: 13px;
  color: var(--app-muted);
}
.app-admin-grid { display: flex; flex-direction: column; gap: 8px; }

.app-admin-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  color: inherit;
  text-decoration: none;
  transition: border-color .15s ease, transform .12s ease;
}
.app-admin-tile:active { transform: scale(0.99); }
.app-admin-tile__icon {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--app-accent) 12%, transparent);
  color: var(--app-accent);
  font-size: 20px;
  flex-shrink: 0;
}
.app-admin-tile__icon--pos {
  background: color-mix(in srgb, #059669 14%, transparent);
  color: #059669;
}
.app-admin-tile__dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--app-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--app-surface);
}
.app-admin-tile__dot--warn { background: #d97706; }
.app-admin-tile__body { flex: 1; min-width: 0; }
.app-admin-tile__title {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.25;
}
.app-admin-tile__meta {
  margin-top: 2px;
  font-size: 13px;
  color: var(--app-muted);
  line-height: 1.35;
}
.app-admin-tile__chevron {
  color: var(--app-muted);
  font-size: 16px;
  flex-shrink: 0;
}
.app-admin-tile-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.app-admin-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px dashed var(--app-border);
  background: var(--app-surface);
  color: var(--app-text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.app-admin-mini .bi { font-size: 14px; color: var(--app-accent); }

.app-admin-pagehead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.app-admin-pagehead__title {
  margin: 0;
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.app-admin-pagehead__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--app-muted);
}
.app-admin-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.app-admin-actions .app-btn { margin: 0; }
.app-admin-group {
  margin-top: 18px;
}
.app-admin-group__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}
.app-admin-group__count {
  font-weight: 500;
  color: var(--app-muted);
  font-size: 13px;
}
.app-admin-doc {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 8px;
  border-radius: 14px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  color: inherit;
  text-decoration: none;
}
.app-admin-doc__main { min-width: 0; }
.app-admin-doc__num {
  font-size: 12px;
  font-weight: 600;
  color: var(--app-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.app-admin-doc__client {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 650;
}
.app-admin-doc__meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--app-muted);
}
.app-admin-doc__side {
  text-align: right;
  flex-shrink: 0;
}
.app-admin-doc__amount {
  font-size: 15px;
  font-weight: 700;
}

/* Admin live revenue — compact */
.app-rev-page { margin-bottom: 8px; }
.app-rev-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.app-rev-top__title {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.app-rev-top__date {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--app-muted);
}
.app-rev-refresh {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  color: var(--app-text);
  text-decoration: none;
  flex-shrink: 0;
}
.app-seg--wrap {
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.app-rev-dates {
  margin: 4px 0 12px;
}
.app-rev-dates__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}
.app-rev-dates__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 120px;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--app-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.app-rev-dates__input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  color: var(--app-text);
  font-size: 15px;
  font-weight: 600;
}
.app-rev-dates__btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  background: var(--app-accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}
.app-rev-global-chip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 4px 0 10px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--app-accent) 30%, var(--app-border));
  background: color-mix(in srgb, var(--app-accent) 8%, var(--app-surface));
  color: inherit;
  text-decoration: none;
}
.app-rev-global-chip__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--app-muted);
  width: 100%;
}
.app-rev-global-chip__amount {
  font-size: 16px;
  font-weight: 800;
}
.app-rev-global-chip__meta {
  font-size: 11px;
  color: var(--app-muted);
}
.app-rev-hero {
  margin: 6px 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--app-surface);
  border: 1px solid var(--app-border);
}
.app-rev-hero__label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--app-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.app-rev-hero__amount {
  margin: 2px 0 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.app-rev-hero__meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--app-muted);
}
.app-rev-hero__meta strong { color: var(--app-text); }
.app-rev-hero--full {
  border-color: var(--app-accent, var(--app-border));
  background: var(--app-accent-soft, var(--app-surface));
}
.app-rev-hero--scans {
  border-color: color-mix(in srgb, #0ea5e9 30%, var(--app-border));
}
.app-rev-pos-tag {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  background: var(--app-border);
  color: var(--app-muted);
  vertical-align: middle;
}
.app-rev-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.app-rev-card {
  background: var(--app-surface);
  border: 1px solid var(--app-border);
  border-radius: 12px;
  padding: 10px 12px;
}
.app-rev-card--total {
  border-color: color-mix(in srgb, var(--app-accent) 35%, var(--app-border));
  background: color-mix(in srgb, var(--app-accent) 6%, var(--app-surface));
}
.app-rev-card--open {
  border-color: color-mix(in srgb, #d97706 30%, var(--app-border));
}
.app-rev-card__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.app-rev-card__title {
  font-size: 13px;
  font-weight: 700;
}
.app-rev-card__amount {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.app-rev-card__hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--app-muted);
  line-height: 1.3;
}
.app-rev-card__meta {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--app-muted);
  line-height: 1.35;
}
.app-rev-card__meta strong { color: var(--app-text); font-weight: 700; }
.app-rev-card__dot { opacity: .55; margin: 0 2px; }
.app-rev-break { margin-top: 16px; }
.app-rev-break__title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--app-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.app-rev-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 12px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  color: inherit;
  text-decoration: none;
}
.app-rev-row__name {
  font-size: 14px;
  font-weight: 700;
}
.app-rev-row__meta {
  margin-top: 2px;
  font-size: 11px;
  color: var(--app-muted);
}
.app-rev-row__side {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.app-rev-row__amount {
  font-size: 15px;
  font-weight: 800;
}
.app-rev-row__side-main {
  text-align: right;
}
.app-rev-row__pos {
  margin-top: 1px;
  font-size: 10px;
  color: var(--app-muted);
}
.app-rev-row__scans {
  margin-top: 1px;
  font-size: 10px;
  color: #0ea5e9;
}
.app-rev-row__side .bi {
  color: var(--app-muted);
  font-size: 14px;
}

/* BLOCX Verwaltung launchpad — dense, no heavy chrome */
.app-blocx { margin-bottom: 8px; }
.app-blocx__top { margin-bottom: 10px; }
.app-blocx__title {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.app-blocx__sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--app-muted);
}
.app-blocx__sec { margin-top: 12px; }
.app-blocx__h {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--app-muted);
}
.app-blocx__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.app-blocx__tile {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--app-border);
  background: var(--app-surface);
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
}
.app-blocx__tile .bi {
  font-size: 16px;
  color: var(--app-accent);
  flex-shrink: 0;
}
.app-blocx__tile--in {
  border-color: color-mix(in srgb, #059669 28%, var(--app-border));
}
.app-blocx__tile--in .bi { color: #059669; }
.app-blocx__note {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--app-muted);
  line-height: 1.35;
}

/* BLOCX in-app list screens */
.app-bx-top { margin-bottom: 10px; }
.app-bx-top__title {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.02em;
}
.app-bx-top__sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--app-muted);
}
.app-bx-search { margin: 0 0 10px; }
.app-bx-search .form-control {
  font-size: 14px;
  border-radius: 10px;
}
.app-bx-daynav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}
.app-bx-daynav__btn,
.app-bx-daynav__today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--app-surface, #f3f4f6);
  color: inherit;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.app-bx-hero {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--app-surface, #f3f4f6);
}
.app-bx-hero__label {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--app-muted);
}
.app-bx-hero__amount {
  margin: 2px 0 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.app-bx-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.app-bx-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--app-border, rgba(0,0,0,.06));
}
.app-bx-row__time {
  flex: 0 0 42px;
  font-size: 12px;
  font-weight: 700;
  color: var(--app-muted);
  padding-top: 2px;
}
.app-bx-row__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-bx-row__main strong {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
}
.app-bx-row__meta {
  font-size: 12px;
  color: var(--app-muted);
  line-height: 1.3;
}
.app-bx-row__side {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 650;
  color: var(--app-muted);
  white-space: nowrap;
}
.app-bx-row__side.is-ok { color: #059669; }
.app-bx-note {
  margin: 12px 0 0;
  font-size: 12px;
}
.app-bx-row__link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.app-bx-h {
  margin: 16px 0 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--app-muted);
}
.app-bx-card {
  margin: 0 0 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--app-surface, #f3f4f6);
}
.app-bx-card--tight { padding: 10px 12px; }
.app-bx-kv {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--app-border, rgba(0,0,0,.06));
  font-size: 13px;
}
.app-bx-kv:last-child { border-bottom: 0; }
.app-bx-kv span { color: var(--app-muted); }
.app-bx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.app-bx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  border: 1px solid var(--app-border, rgba(0,0,0,.12));
  background: #fff;
  color: inherit;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.app-bx-btn--primary {
  background: #111827;
  border-color: #111827;
  color: #fff;
}
.app-bx-btn--ok {
  border-color: #059669;
  color: #059669;
}
.app-bx-btn--ok.is-active,
.app-bx-btn--ok.is-on {
  background: #059669;
  color: #fff;
}
.app-bx-btn--danger {
  border-color: #dc2626;
  color: #dc2626;
}
.app-bx-btn--danger.is-active {
  background: #dc2626;
  color: #fff;
}
.app-bx-chip {
  min-width: 48px;
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid var(--app-border, rgba(0,0,0,.12));
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}
.app-bx-chip.is-on {
  background: #059669;
  border-color: #059669;
  color: #fff;
}
.app-bx-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--app-border, rgba(0,0,0,.06));
  font-size: 14px;
}
.app-bx-toggle-row:last-child { border-bottom: 0; }
.app-bx-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.app-bx-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--app-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.app-bx-toolbar {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
}
.app-bx-flash {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
}
.app-bx-flash--ok { background: rgba(5,150,105,.12); color: #047857; }
.app-bx-flash--err { background: rgba(220,38,38,.1); color: #b91c1c; }
.app-bx-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e5e7eb;
}
.app-bx-badge.is-showed_up { background: rgba(5,150,105,.15); color: #047857; }
.app-bx-badge.is-no_show { background: rgba(220,38,38,.12); color: #b91c1c; }
.app-autocomplete { position: relative; margin-bottom: 8px; }
.app-autocomplete__results {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow: auto;
  margin-top: 4px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.app-bx-hero-cta {
  display: grid;
  gap: 8px;
  margin: 10px 0 4px;
}
.app-bx-hero-cta__btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  text-decoration: none;
}
.app-bx-hero-cta__btn--secondary {
  background: var(--app-surface, #f3f4f6);
  color: inherit;
  border: 1px solid var(--app-border, rgba(0,0,0,.08));
}
.app-bx-hero-cta__btn .bi {
  font-size: 22px;
  flex: 0 0 auto;
}
.app-bx-hero-cta__btn span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.app-bx-hero-cta__btn strong {
  font-size: 15px;
  font-weight: 750;
  line-height: 1.2;
}
.app-bx-hero-cta__btn em {
  font-style: normal;
  font-size: 12px;
  opacity: 0.75;
  line-height: 1.3;
}
.app-blocx__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--app-surface, #fff);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--app-border, rgba(0,0,0,.06));
}
.app-blocx__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--app-border, rgba(0,0,0,.06));
}
.app-blocx__row:last-child { border-bottom: 0; }
.app-blocx__row > .bi:first-child {
  font-size: 18px;
  color: #059669;
  flex: 0 0 auto;
}
.app-blocx__row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-blocx__row-body strong {
  font-size: 14px;
  font-weight: 700;
}
.app-blocx__row-body span {
  font-size: 12px;
  color: var(--app-muted);
  line-height: 1.3;
}
.app-blocx__row > .bi:last-child {
  color: var(--app-muted);
  font-size: 14px;
}
.app-bx-opsnav {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 12px;
  padding-bottom: 2px;
}
.app-bx-opsnav__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 64px;
  padding: 8px 6px;
  border-radius: 12px;
  background: var(--app-surface, #f3f4f6);
  color: inherit;
  text-decoration: none;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}
.app-bx-opsnav__item .bi { font-size: 16px; }
.app-bx-opsnav__item.is-active {
  background: #111827;
  color: #fff;
}
.app-bx-sell__member {
  margin: 0 0 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--app-surface, #f3f4f6);
}
.app-bx-sell__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
}
.app-bx-sell__check input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
}
.app-bx-sell__check span {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.app-bx-sell__check em {
  font-style: normal;
  font-size: 12px;
  color: var(--app-muted);
}
.app-bx-sell__ticket {
  margin-top: 8px;
}

/* Ops alert fix-phase badges (list + show, live via Turbo) */
.app-ops-phase {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  padding: .2rem .45rem;
  border-radius: .35rem;
  line-height: 1.2;
  white-space: nowrap;
  background: #e5e7eb;
  color: #374151;
}
.app-ops-phase--problem { background: #fee2e2; color: #b91c1c; }
.app-ops-phase--analysing { background: #dbeafe; color: #1d4ed8; }
.app-ops-phase--fix_approval { background: #fef3c7; color: #b45309; }
.app-ops-phase--applying { background: #e0e7ff; color: #4338ca; }
.app-ops-phase--fixed { background: #d1fae5; color: #047857; }
.app-ops-phase--failed { background: #fecaca; color: #991b1b; }
.app-ops-phase--rejected { background: #f3f4f6; color: #6b7280; }
.app-ops-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .82rem;
  line-height: 1.4;
  background: #1a1a1a;
  color: #e8e8e8;
  padding: .65rem;
  border-radius: .4rem;
}
.app-ops-pre--log {
  font-size: .72rem;
  line-height: 1.3;
  background: #111;
  color: #ccc;
  max-height: 40vh;
  overflow: auto;
}
.app-ops-pre--details {
  font-size: .78rem;
  line-height: 1.35;
  background: #111;
  max-height: 70vh;
  overflow-x: auto;
}

/* Ops chat (phone) */
.app-ops-chat__messages {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin: 1rem 0;
  max-height: 55vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.app-ops-chat__bubble {
  padding: .65rem .75rem;
  border-radius: .75rem;
  max-width: 95%;
}
.app-ops-chat__bubble--user {
  align-self: flex-end;
  background: var(--app-accent, #2563eb);
  color: #fff;
}
.app-ops-chat__bubble--assistant {
  align-self: flex-start;
  background: #111;
  color: #e8e8e8;
}
.app-ops-chat__bubble--failed {
  border: 1px solid #f87171;
}
.app-ops-chat__bubble--queued,
.app-ops-chat__bubble--running {
  opacity: .85;
}
.app-ops-chat__meta {
  display: flex;
  gap: .5rem;
  align-items: center;
  font-size: .7rem;
  opacity: .85;
  margin-bottom: .35rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.app-ops-chat__mode {
  font-weight: 600;
}
.app-ops-chat__pending {
  font-style: italic;
}
.app-ops-chat__body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: .82rem;
  line-height: 1.4;
  font-family: inherit;
  background: transparent;
  color: inherit;
}
.app-ops-chat__composer {
  position: sticky;
  bottom: 0;
  background: var(--app-bg, #fff);
  padding: .5rem 0 .75rem;
  border-top: 1px solid #e5e7eb;
}
.app-ops-chat__input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: .5rem;
  padding: .65rem;
  font-size: 1rem;
  resize: vertical;
  min-height: 4.5rem;
}
.app-ops-chat__actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .5rem;
}
