/* StromIQ – Design „Zählerbuch“ in Navy/Gold (CrewLAN-Farben, wie Kassenblick) */

@font-face { font-family: "Source Serif 4"; font-weight: 600; font-display: swap; src: url("../fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 700; font-display: swap; src: url("../fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --sq-navy: #1B3A6B;
  --sq-navy-d: #14284A;
  --sq-navy-l: #24497F;
  --sq-gold: #F5B333;
  --sq-gold-d: #E0A020;
  --sq-bg: #F4F6FA;
  --sq-line: #DCE2EC;
  --sq-line-2: #B9C4D6;
  --sq-muted: #4A5872;
  --sq-ink: #18233A;
  --sq-side-text: #E6ECF5;
  --sq-side-muted: #B8C4D9;
  --sq-in: #1F6B45;
  --sq-out: #A3361F;
  --sq-open: #8A5300;
  --sq-tile: #FFF6E0;
  --sq-row-alt: #F7F9FC;
  --sq-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sq-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sq-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --bs-body-font-family: var(--sq-sans);
  --bs-body-color: var(--sq-ink);
  --bs-body-bg: var(--sq-bg);
  --bs-border-color: var(--sq-line);
  --bs-link-color: var(--sq-navy);
  --bs-link-color-rgb: 27, 58, 107;
  --bs-link-hover-color: var(--sq-navy-d);
  --bs-focus-ring-color: rgba(245, 179, 51, .45);
}

body { font-family: var(--sq-sans); color: var(--sq-ink); background: var(--sq-bg); font-size: 16px; }
a { color: var(--sq-navy); }
a:hover { color: var(--sq-navy-d); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--sq-gold); box-shadow: 0 0 0 .2rem rgba(245, 179, 51, .35); }
.form-check-input:checked { background-color: var(--sq-navy); border-color: var(--sq-navy); }
.form-label { font-weight: 500; font-size: 15px; }

.sq-muted { color: var(--sq-muted) !important; }
.sq-in { color: var(--sq-in) !important; }
.sq-out { color: var(--sq-out) !important; }
.sq-open { color: var(--sq-open) !important; }
.sq-num, .sq-mono { font-family: var(--sq-mono); font-variant-numeric: tabular-nums; }
.sq-kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--sq-muted); }
.sq-h1 { font-family: var(--sq-serif); font-weight: 700; font-size: 40px; margin: 4px 0 0; line-height: 1.15; }
.sq-h2 { font-family: var(--sq-serif); font-weight: 700; font-size: 26px; margin: 0; }
.sq-h3 { font-family: var(--sq-serif); font-weight: 600; font-size: 20px; margin: 0 0 12px; }

/* Buttons */
.btn { border-radius: 6px; font-weight: 500; }
.sq-btn-gold { background: var(--sq-gold); color: var(--sq-navy); border: 0; font-weight: 600; }
.sq-btn-gold:hover, .sq-btn-gold:focus { background: var(--sq-gold-d); color: var(--sq-navy-d); }
.sq-btn-navy { background: var(--sq-navy); color: #fff; border: 0; }
.sq-btn-navy:hover, .sq-btn-navy:focus { background: var(--sq-navy-d); color: #fff; }
.sq-btn-line { background: #fff; color: var(--sq-ink); border: 1px solid var(--sq-line-2); }
.sq-btn-line:hover { background: var(--sq-row-alt); color: var(--sq-ink); border-color: var(--sq-muted); }
.sq-btn-danger { background: #fff; color: var(--sq-out); border: 1px solid #E3B5AA; }
.sq-btn-danger:hover { background: #FBEDEA; color: #7E2715; }

/* Grundlayout */
.sq-shell { display: flex; min-height: 100vh; }
.sq-side {
  background: var(--sq-navy); color: var(--sq-side-text);
  width: 260px; flex: 0 0 260px; padding: 22px 16px; display: flex; flex-direction: column; gap: 12px;
}
/* Desktop: kein eigener Scrollbalken. Passt die Leiste nicht in die Fensterhöhe,
   scrollt sie mit der Seite mit und bleibt dann unten stehen (top wird per JS gesetzt). */
@media (min-width: 992px) {
  .sq-side.offcanvas-lg {
    position: sticky; top: 0; align-self: flex-start; height: auto; min-height: 100vh; overflow: visible;
    background-color: var(--sq-navy) !important; padding: 22px 16px;
  }
}
@media (max-width: 991.98px) {
  .sq-side.offcanvas-lg { --bs-offcanvas-width: 290px; --bs-offcanvas-bg: var(--sq-navy); color: var(--sq-side-text); padding: 22px 16px; }
}
.sq-brand { font-family: var(--sq-serif); font-size: 28px; font-weight: 700; color: #fff; line-height: 1.1; text-decoration: none; display: block; }
.sq-brand:hover { color: #fff; }
.sq-brand-sub { font-size: 14px; color: var(--sq-side-muted); margin-top: 2px; }
.sq-side a, .sq-side button.sq-side-link { color: var(--sq-side-text); text-decoration: none; }
.sq-side-link {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  font: inherit; font-size: 15px; padding: 7px 10px; border: 0; border-radius: 6px; background: transparent;
}
.sq-side-link:hover, .sq-side-link:focus-visible { background: rgba(255, 255, 255, .1); color: #fff; }
.sq-side-link.active { background: var(--sq-gold); color: var(--sq-navy) !important; font-weight: 600; }
.sq-side-sep { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 10px; display: flex; flex-direction: column; gap: 1px; }
.sq-side-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--sq-side-muted); padding: 10px 10px 4px; }
.sq-side-toggle .sq-chev { margin-left: auto; transition: transform .15s; font-size: 12px; }
.sq-side-toggle[aria-expanded="true"] .sq-chev { transform: rotate(180deg); }
.sq-side-sub .sq-side-link { padding-left: 36px; font-size: 14px; }
.sq-side-foot { display: flex; align-items: center; gap: 4px; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 6px; padding-top: 6px; }
.sq-side-foot .sq-side-link { flex: 1 1 auto; min-width: 0; }
.sq-side-foot .sq-side-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-side-foot form .sq-side-link { width: 40px; justify-content: center; padding: 7px 0; }
.sq-yearnav { display: flex; align-items: center; gap: 8px; }
.sq-yearnav a, .sq-yearnav span.disabled {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .35);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.sq-yearnav a:hover { background: rgba(255, 255, 255, .1); }
.sq-yearnav .sq-year { font-family: var(--sq-serif); font-size: 22px; font-weight: 600; color: #fff; flex-grow: 1; text-align: center; }
.sq-months { display: flex; flex-direction: column; gap: 1px; }
.sq-month {
  display: flex; justify-content: space-between; align-items: center; font-size: 15px;
  padding: 4px 10px; border-radius: 6px; color: var(--sq-side-text) !important; text-decoration: none;
}
.sq-month:hover { background: rgba(255, 255, 255, .1); }
.sq-month .sq-mono { font-size: 13px; color: var(--sq-side-muted); }
.sq-month.empty { color: #8C9CBA !important; }
.sq-month.active { background: var(--sq-gold); color: var(--sq-navy) !important; font-weight: 600; }
.sq-month.active .sq-mono { color: var(--sq-navy); }
.sq-bookpick .dropdown-toggle {
  width: 100%; text-align: left; background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .25);
  padding: 9px 12px; font-size: 15px; border-radius: 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.sq-bookpick .dropdown-menu { width: 100%; }
.sq-bookpick .dropdown-item { color: var(--sq-navy) !important; font-weight: 500; padding: 8px 14px; white-space: normal; }
.sq-bookpick .dropdown-item:hover, .sq-bookpick .dropdown-item:focus { background: #E9EEF6; color: var(--sq-navy) !important; }
.sq-bookpick .dropdown-item.active, .sq-bookpick .dropdown-item:active { background: var(--sq-navy); color: #fff !important; }
.sq-bookpick .dropdown-item .sq-muted { color: #5E6B82 !important; }
.sq-bookpick .dropdown-item.active .sq-muted { color: #C9D4E6 !important; }

.sq-main { flex: 1 1 auto; min-width: 0; padding: 32px 40px 48px; max-width: 1760px; }
.sq-topbar { display: none; }
@media (max-width: 991.98px) {
  .sq-shell { display: block; }
  .sq-main { padding: 18px 14px 110px; }
  .sq-topbar {
    display: flex; align-items: center; gap: 10px; background: var(--sq-navy); color: #fff;
    padding: 10px 12px; position: sticky; top: 0; z-index: 1020;
  }
  .sq-topbar .sq-brand { font-size: 21px; flex-grow: 1; }
  .sq-topbar button { width: 44px; height: 44px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; font-size: 22px; }
  .sq-h1 { font-size: 30px; }
}

.sq-card { background: #fff; border: 1px solid var(--sq-line); border-radius: 8px; }
.sq-pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; border-bottom: 1px solid var(--sq-line); padding-bottom: 18px; margin-bottom: 22px; }
.sq-pagehead > .sq-grow { flex-grow: 1; }

/* Kennzahlen */
.sq-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--sq-line); background: #fff; margin-bottom: 22px; border-radius: 8px; overflow: hidden; }
.sq-tile { padding: 16px 18px; border-right: 1px solid var(--sq-line); }
.sq-tile:last-child { border-right: 0; background: var(--sq-tile); }
.sq-tile .sq-label { font-size: 13px; color: var(--sq-muted); }
.sq-tile .sq-value { font-family: var(--sq-mono); font-size: 22px; margin-top: 6px; font-weight: 500; }
.sq-tile .sq-sub { font-size: 12px; color: var(--sq-muted); margin-top: 3px; }
@media (max-width: 767.98px) {
  .sq-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sq-tile:nth-child(2) { border-right: 0; }
  .sq-tile:nth-child(-n+2) { border-bottom: 1px solid var(--sq-line); }
}

/* Tabelle */
.sq-tablewrap { position: relative; background: #fff; border: 1px solid var(--sq-line); border-radius: 8px; overflow-x: auto; overflow-y: hidden; }
/* Nur waagerecht scrollen (Handy) – nie ein senkrechter Scrollbalken in Tabellen */
.sq-scrollx { position: relative; overflow-x: auto; overflow-y: hidden; }
.sq-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.sq-table th, .sq-table td { padding: 12px 14px; border-bottom: 1px solid var(--sq-line); text-align: left; white-space: nowrap; vertical-align: middle; }
.sq-table th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--sq-muted); font-weight: 600; border-bottom: 2px solid var(--sq-gold); background: #fff; }
.sq-table td.sq-r, .sq-table th.sq-r { text-align: right; }
.sq-table td.sq-m { font-family: var(--sq-mono); font-size: 15px; }
.sq-table td.sq-title { white-space: normal; min-width: 200px; }
.sq-table tr.sq-carry td { background: var(--sq-row-alt); color: var(--sq-muted); }
.sq-table tbody tr.sq-row:hover td { background: #FBFCFE; }
.sq-table tr.sq-row.sq-editable { cursor: pointer; }
.sq-table tfoot td { font-weight: 600; background: var(--sq-row-alt); border-bottom: 0; }
.sq-badge-fix { font-size: 12px; color: var(--sq-muted); border: 1px solid var(--sq-line-2); border-radius: 4px; padding: 1px 6px; margin-left: 8px; white-space: nowrap; }
.sq-note { display: block; font-size: 13px; color: var(--sq-muted); }
.sq-badge-res { font-size: 12px; color: #6B4A00; background: var(--sq-tile); border: 1px solid #EBCB82; border-radius: 4px; padding: 1px 6px; margin-left: 8px; white-space: nowrap; }
.sq-tile .sq-free { color: var(--sq-ink); font-weight: 600; font-size: 13px; }
.sq-table-sm { font-size: 15px; }
.sq-table-sm th, .sq-table-sm td { padding: 10px 12px; }
.sq-reserves .sq-tablewrap { border-left: 0; border-right: 0; border-bottom: 0; }

.sq-status {
  font: inherit; font-size: 14px; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid transparent; background: transparent; padding: 4px 8px; border-radius: 6px; white-space: nowrap;
}
button.sq-status:hover { border-color: var(--sq-line-2); background: #fff; }
.sq-status.is-cleared { color: var(--sq-in); }
.sq-status.is-open { color: var(--sq-open); }
.sq-status[disabled] { opacity: 1; }

/* Handy-Liste */
.sq-mobile { display: none; }
@media (max-width: 991.98px) {
  .sq-desktop { display: none !important; }
  .sq-mobile { display: block; }
}
.sq-mhead { background: var(--sq-navy); color: #fff; margin: -18px -14px 0; padding: 14px 16px 16px; }
.sq-mhead .sq-mnav { display: flex; align-items: center; gap: 8px; }
.sq-mhead .sq-mnav a { width: 44px; height: 44px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .35); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; text-decoration: none; }
.sq-mhead .sq-mtitle { flex-grow: 1; text-align: center; }
.sq-mhead .sq-mkicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--sq-side-muted); }
.sq-mhead .sq-mmonth { font-family: var(--sq-serif); font-size: 28px; font-weight: 700; }
.sq-mstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: rgba(255, 255, 255, .1); border-radius: 8px; margin-top: 14px; }
.sq-mstats > div { padding: 10px 6px; text-align: center; }
.sq-mstats > div + div { border-left: 1px solid rgba(255, 255, 255, .2); }
.sq-mstats .l { font-size: 12px; color: var(--sq-side-muted); }
.sq-mstats .v { font-family: var(--sq-mono); font-size: 15px; }
.sq-mlist { background: #fff; margin: 0 -14px; }
.sq-mlist-head, .sq-mrow { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; padding: 11px 16px; align-items: center; }
.sq-mlist-head { border-bottom: 2px solid var(--sq-gold); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--sq-muted); }
.sq-mrow { border-bottom: 1px solid var(--sq-line); }
.sq-mrow .d { font-family: var(--sq-mono); font-size: 14px; color: var(--sq-muted); }
.sq-mrow .t { font-size: 16px; font-weight: 500; word-break: break-word; }
.sq-mrow .sq-status { padding: 2px 0; font-size: 13px; }
.sq-mrow .a { font-family: var(--sq-mono); font-size: 15px; text-align: right; }
.sq-mrow .b { font-family: var(--sq-mono); font-size: 12px; color: #5E6B82; text-align: right; }
.sq-mrow-main { background: none; border: 0; padding: 0; text-align: left; font: inherit; color: inherit; width: 100%; }
.sq-mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; background: var(--sq-bg); border-top: 1px solid var(--sq-line);
  padding: 10px calc(14px + var(--sar)) var(--sq-bottom-pad) calc(14px + var(--sal)); display: flex; gap: 10px;
}
.sq-mbar .btn { padding: 12px 14px; font-size: 16px; }

/* Fixkosten-Vorschau */
.sq-upcoming { margin-top: 22px; }
.sq-upcoming li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--sq-line); }
.sq-upcoming li:last-child { border-bottom: 0; }

/* Modals */
.modal-content { border-radius: 10px; border: 0; }
.modal-header { border-bottom: 2px solid var(--sq-gold); }
.modal-title { font-family: var(--sq-serif); font-weight: 700; }
.sq-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--sq-line-2); border-radius: 6px; overflow: hidden; }
.sq-seg input { position: absolute; opacity: 0; pointer-events: none; }
.sq-seg label { padding: 11px 10px; text-align: center; cursor: pointer; font-weight: 500; margin: 0; background: #fff; }
.sq-seg label + input + label, .sq-seg input + label + input + label { border-left: 1px solid var(--sq-line-2); }
.sq-seg input:checked + label.out { background: #FBEDEA; color: var(--sq-out); }
.sq-seg input:checked + label.in { background: #E7F3EC; color: var(--sq-in); }
.sq-seg input:focus-visible + label { outline: 3px solid rgba(245, 179, 51, .6); outline-offset: -3px; }
.sq-amount { font-family: var(--sq-mono); font-size: 22px; }

/* Listen/Verwaltung */
.sq-list { width: 100%; border-collapse: collapse; }
.sq-list th, .sq-list td { padding: 11px 14px; border-bottom: 1px solid var(--sq-line); vertical-align: middle; }
.sq-list th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--sq-muted); font-weight: 600; border-bottom: 2px solid var(--sq-gold); }
.sq-list tr:last-child td { border-bottom: 0; }
.sq-pill { display: inline-block; font-size: 12px; border-radius: 999px; padding: 2px 10px; border: 1px solid var(--sq-line-2); color: var(--sq-muted); white-space: nowrap; }
.sq-pill.gold { background: var(--sq-tile); border-color: #EBCB82; color: #6B4A00; }
.sq-pill.navy { background: #E6ECF5; border-color: #B8C4D9; color: var(--sq-navy); }
.sq-pill.off { background: #F1F1F1; }
.sq-access { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--sq-line-2); border-radius: 6px; overflow: hidden; width: max-content; max-width: 100%; }
.sq-access input { position: absolute; opacity: 0; pointer-events: none; }
.sq-access label { padding: 8px 12px; cursor: pointer; margin: 0; font-size: 14px; background: #fff; border-left: 1px solid var(--sq-line-2); }
.sq-access label:first-of-type { border-left: 0; }
.sq-access input:checked + label { background: var(--sq-navy); color: #fff; }
.sq-access input:focus-visible + label { outline: 3px solid rgba(245, 179, 51, .6); outline-offset: -3px; }
.sq-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-family: var(--sq-mono); font-size: 17px; }
.sq-codes span { background: var(--sq-row-alt); border: 1px solid var(--sq-line); border-radius: 6px; padding: 8px 10px; text-align: center; }
.sq-qr { width: 220px; height: 220px; background: #fff; border: 1px solid var(--sq-line); border-radius: 8px; padding: 10px; }
.sq-qr img, .sq-qr svg { width: 100%; height: 100%; }

/* Gast-Seiten (Login, Installer) */
.sq-guest { background: var(--sq-bg); }
.sq-guest-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 14px; }
.sq-guest-box { width: 100%; max-width: 420px; }
.sq-guest-brand { font-family: var(--sq-serif); font-weight: 700; font-size: 32px; color: var(--sq-navy); display: flex; align-items: center; gap: 12px; justify-content: center; margin-bottom: 20px; }
.sq-logo-mark { width: 46px; height: 46px; border-radius: 10px; background: var(--sq-navy); color: var(--sq-gold); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; }
.sq-install { max-width: 860px; margin: 0 auto; padding: 32px 14px; }
.sq-install .sq-guest-brand { justify-content: flex-start; }

.alert { border-radius: 8px; }
.alert-success { background: #E7F3EC; border-color: #BFDCCB; color: #154D31; }
.alert-danger { background: #FBEDEA; border-color: #EDC4BA; color: #7E2715; }
.alert-warning { background: var(--sq-tile); border-color: #EBCB82; color: #5C3F00; }

/* Druck */
@media print {
  .sq-side, .sq-topbar, .sq-mbar, .sq-noprint, .sq-mobile, .alert { display: none !important; }
  .sq-desktop { display: block !important; }
  .sq-shell { display: block; }
  .sq-main { padding: 0; max-width: none; }
  body { background: #fff; font-size: 12pt; }
  .sq-tablewrap, .sq-tiles { border-color: #999; }
  .sq-table th, .sq-table td { padding: 6px 8px; }
  .sq-status { padding: 0; }
  a { text-decoration: none; color: inherit; }
}

/* Statistik */
.sq-segnav { display: flex; border: 1px solid var(--sq-line-2); border-radius: 6px; overflow: hidden; background: #fff; }
.sq-segnav a { padding: 9px 14px; font-size: 14px; color: var(--sq-ink); text-decoration: none; }
.sq-segnav a + a { border-left: 1px solid var(--sq-line-2); }
.sq-segnav a.active { background: var(--sq-navy); color: #fff; }
.sq-stepper { display: flex; gap: 6px; }
.sq-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--sq-muted); }
.sq-legend .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sq-legend .sw.line { height: 3px; width: 16px; background: var(--sq-gold); border-radius: 2px; }
.sq-chart svg { width: 100%; height: 240px; display: block; }
.sq-chart-x { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); text-align: center; font-size: 12px; color: var(--sq-muted); padding-top: 6px; }
.sq-chart-x .future { color: #8C9CBA; }
.sq-hbar { height: 10px; background: #EEF1F6; border-radius: 5px; overflow: hidden; margin-top: 4px; }
.sq-hbar span { display: block; height: 100%; background: var(--sq-navy); border-radius: 5px; }
.sq-split { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: #EEF1F6; }
.sq-dl li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed var(--sq-line); }
.sq-dl li:last-child { border-bottom: 0; }
.sq-list-tight th, .sq-list-tight td { padding: 8px 10px; font-size: 14px; }
.sq-hl { background: var(--sq-tile); }
details summary { cursor: pointer; color: var(--sq-navy); font-weight: 500; }
.sq-info { background: var(--sq-tile); border: 1px solid #EBCB82; border-radius: 6px; padding: 10px 12px; font-size: 14px; line-height: 1.45; }
.sq-info:empty { display: none; }
@media (max-width: 767.98px) { .sq-chart svg { height: 180px; } .sq-segnav a { padding: 9px 10px; } }
@media print { .sq-chart svg { height: 200px; } details { display: block; } details > * { display: block; } }

/* Import */
.sq-steps { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 0 0 22px; }
.sq-steps li { display: flex; align-items: center; gap: 8px; color: var(--sq-muted); font-size: 15px; }
.sq-step-no { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--sq-line-2); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; background: #fff; }
.sq-steps li.is-active { color: var(--sq-ink); font-weight: 600; }
.sq-steps li.is-active .sq-step-no { background: var(--sq-gold); border-color: var(--sq-gold); color: var(--sq-navy); }
.sq-steps li.is-done .sq-step-no { background: var(--sq-navy); border-color: var(--sq-navy); color: #fff; }
.sq-sheetlist { max-height: 260px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; }
.sq-rawwrap { overflow: auto; max-height: 520px; border-top: 1px solid var(--sq-line); }
.sq-raw { border-collapse: collapse; font-size: 13px; width: max-content; min-width: 100%; }
.sq-raw th, .sq-raw td { border: 1px solid var(--sq-line); padding: 5px 8px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.sq-raw thead th { background: var(--sq-row-alt); position: sticky; top: 0; font-weight: 600; color: var(--sq-muted); text-align: left; }
.sq-raw .sq-raw-n { background: var(--sq-row-alt); color: var(--sq-muted); font-weight: 500; text-align: right; }
.sq-raw .sq-raw-head td { background: var(--sq-tile); font-weight: 600; }
.sq-raw-tag { display: block; font-size: 11px; font-weight: 600; color: #fff; background: var(--sq-navy); border-radius: 4px; padding: 1px 6px; margin-top: 3px; width: max-content; }
.sq-imp td { vertical-align: top; }
.sq-imp tr.is-error td { background: #FDF3F1; }
.sq-imp tr.is-dup td { background: #FFF8E8; }
.sq-imp tr.is-warn td { background: #FFFBF0; }
.sq-imp tr.is-carry td { background: var(--sq-row-alt); color: var(--sq-muted); }
.sq-imp .sq-checks { font-size: 13px; margin-top: 4px; }
.sq-imp .sq-checks:empty { display: none; }
.sq-imp { font-size: 14px; }
.sq-imp th, .sq-imp td { padding: 9px 10px; }
.sq-imp td.sq-m { font-size: 14px; }
.sq-imp td.sq-title { min-width: 220px; white-space: normal; }
.sq-imp td.sq-line { white-space: normal; min-width: 70px; }
.sq-imp td.sq-line .sq-note { font-size: 12px; line-height: 1.2; }
.sq-imp .form-check-input { width: 1.3em; height: 1.3em; }
.sq-imp.only-issues tr[data-issue="0"] { display: none; }
.sq-impbar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; background: var(--sq-bg); border-top: 1px solid var(--sq-line); padding: 14px 0; margin-top: 16px; }
.sq-impbar > span { margin-right: auto; }
@media (max-width: 991.98px) { .sq-impbar { bottom: 0; padding-bottom: calc(6px + var(--sq-bottom-pad)); } }

/* Übertrag bestätigen */
.sq-carrybox .btn { white-space: nowrap; }
.sq-tile .btn-link.sq-sub { color: var(--sq-muted); text-decoration: underline; }
.sq-carryoff { background: #EEF1F6; border: 1px solid var(--sq-line-2); color: var(--sq-ink); padding: 10px 14px; }
.sq-tile .btn-link.sq-sub, .sq-tile form .btn-link { color: var(--sq-muted); text-decoration: underline; font-size: 12px; }
.sq-month .sq-cstate { font-size: 11px; margin-left: 4px; color: var(--sq-gold); }
.sq-month.active .sq-cstate { color: var(--sq-navy); }

/* ===== Sparkonten & Umbuchungen (1.7.0) ===== */
:root { --sq-xfer: #2A5DA8; }
.sq-xfer { color: var(--sq-xfer) !important; }
.sq-badge-xfer { font-size: 12px; color: var(--sq-xfer); background: #EAF1FB; border: 1px solid #C4D6EF; border-radius: 4px; padding: 1px 6px; margin-left: 8px; white-space: nowrap; }
td > .sq-badge-xfer:first-child { margin-left: 0; }
.sq-xferrow td { background: #F6F9FE; }
.sq-xfersum td { font-weight: 500; color: var(--sq-xfer); }
.sq-tiles-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1199.98px) and (min-width: 768px) { .sq-tiles-5 .sq-tile .sq-value { font-size: 19px; } }
.sq-tiles:has(.sq-tile-hl) .sq-tile:last-child { background: #fff; }
.sq-tile.sq-tile-hl { background: var(--sq-tile); }
.sq-savgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.sq-savcard { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.sq-savicon { width: 40px; height: 40px; border-radius: 10px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 19px; flex: 0 0 40px; }
.sq-savbal { font-size: 26px; font-weight: 500; }
.sq-legend span { display: inline-flex; align-items: center; gap: 5px; margin-right: 10px; }
.sq-legend span i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sq-legend { flex-wrap: wrap; }
svg.sq-chart { width: 100%; height: auto; display: block; }
@media (min-width: 768px) { svg.sq-chart { min-width: 640px; } }
/* Navy-Streifen hinter der Seitenleiste, falls die Seite länger ist als die Leiste */
@media (min-width: 992px) { .sq-shell { background: linear-gradient(to right, var(--sq-navy) 260px, transparent 260px); } }
.sq-segnav > span { border-left: 1px solid var(--sq-line-2); border-right: 1px solid var(--sq-line-2); }
.sq-mpill { display: inline-block; font-size: 12px; border-radius: 999px; padding: 1px 9px; border: 1px solid; white-space: nowrap; }
.sq-pill-in { color: var(--sq-in); border-color: #A9D3BC; background: #EEF8F2; }
.sq-pill-out { color: var(--sq-out); border-color: #E3B5AA; background: #FBEDEA; }
.sq-pill-int { color: #6B4A00; border-color: #EBCB82; background: var(--sq-tile); }
.sq-xfer-after { background: #F6F9FE; border: 1px solid #C4D6EF; border-radius: 6px; padding: 10px 12px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.sq-xfer-after:empty { display: none; }

/* ===== Tabellen filtern & sortieren (1.7.1) ===== */
.sq-tbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.sq-tbar-search { position: relative; flex: 0 1 340px; min-width: 200px; }
.sq-tbar-search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--sq-muted); font-size: 13px; pointer-events: none; }
.sq-tbar-search input { padding-left: 30px; background: #fff; }
.sq-sortbtn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; white-space: nowrap; }
.sq-sortbtn:focus-visible { outline: 2px solid var(--sq-gold); outline-offset: 2px; border-radius: 3px; }
.sq-sortbtn i { font-size: 11px; opacity: .45; }
th[aria-sort="ascending"] .sq-sortbtn i, th[aria-sort="descending"] .sq-sortbtn i { opacity: 1; color: var(--sq-navy); }
.sq-r .sq-sortbtn, th.text-end .sq-sortbtn { justify-content: flex-end; }
@media print { .sq-tbar { display: none !important; } }

/* ===== Mehrfachauswahl im Kassenbuch (1.7.2) ===== */
.sq-selcell { width: 38px; padding-right: 0 !important; }
.sq-selcell .form-check-input { width: 1.15em; height: 1.15em; margin: 0; cursor: pointer; }
tr.sq-selected td { background: #FFF3D6 !important; }
.sq-bulkbar { position: sticky; top: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--sq-navy); color: #fff;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; box-shadow: 0 4px 14px rgba(20, 40, 74, .18); }
.sq-bulkbar.d-none { display: none !important; }
.sq-bulkcount { margin-right: 6px; }
.sq-bulkbar .sq-out { color: #FFD3C8 !important; }
@media print { form.sq-bulkbar, .sq-selcell { display: none !important; } }


/* ===== 1.7.4 – Handy als installierte App: „Himmel“ und „Erde“ (sichere Bildschirmränder) =====
   iOS gibt der App vom Home-Bildschirm den ganzen Bildschirm (Uhrzeit, Dynamic Island, Home-Balken).
   Die Werte kommen aus env(); über die Variablen lassen sie sich im Test simulieren. */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  /* Unten: etwas Luft über dem Home-Balken, aber nicht den vollen Abstand obendrauf */
  --sq-bottom-pad: max(10px, calc(var(--sab) - 10px));
}
@media (max-width: 991.98px) {
  /* Himmel: Kopfzeile beginnt unter Uhrzeit/Insel und deckt den Bereich beim Scrollen navy ab */
  .sq-topbar { padding: calc(8px + var(--sat)) calc(12px + var(--sar)) 8px calc(12px + var(--sal)); }
  .sq-main { padding-left: calc(14px + var(--sal)); padding-right: calc(14px + var(--sar)); padding-bottom: calc(86px + var(--sq-bottom-pad)); }
  .sq-mhead { margin-left: calc(-14px - var(--sal)); margin-right: calc(-14px - var(--sar)); }
  .sq-mlist { margin-left: calc(-14px - var(--sal)); margin-right: calc(-14px - var(--sar)); }
  /* Navigation (aufklappbares Menü) – nur hier scrollbar, mit Platz für Uhrzeit und Home-Balken */
  .sq-side.offcanvas-lg {
    padding: calc(18px + var(--sat)) 16px calc(16px + var(--sab)) calc(16px + var(--sal));
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  }
  .sq-side.offcanvas-lg > * { flex-shrink: 0; }
}
/* Vollbild-Fenster auf dem Handy (Buchung, Umbuchen …) */
@media (max-width: 575.98px) {
  /* navy Streifen hinter der (weißen) Uhrzeit, Fenster beginnt darunter */
  .modal-fullscreen-sm-down .modal-content { border-top: var(--sat) solid var(--sq-navy) !important; }
  .modal-fullscreen-sm-down .modal-footer { padding-bottom: calc(.75rem + var(--sab)); }
  .modal-fullscreen-sm-down .modal-content { padding-left: var(--sal); padding-right: var(--sar); }
}
/* Anmeldung / Installation */
.sq-guest-wrap { padding-top: calc(24px + var(--sat)); padding-bottom: calc(24px + var(--sab)); }


/* ===== 1.7.5 – Handy: Navigationsleiste unten (wie Arztrechnungen), kein seitliches Verschieben ===== */
.sq-bottom { display: none; }
.sq-topbar-book { display: none; }
@media (max-width: 991.98px) {
  /* Seite lässt sich nicht mehr nach links/rechts ziehen */
  html, body { overflow-x: clip; }
  @supports not (overflow-x: clip) { html, body { overflow-x: hidden; } }
  .sq-topbar { min-height: calc(52px + var(--sat)); }
  .sq-topbar .sq-brand { flex-grow: 0; }
  .sq-topbar-book { display: block; margin-left: auto; font-size: 13px; color: var(--sq-side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
  .sq-bottom {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--sq-line);
    padding: 6px calc(4px + var(--sar)) var(--sq-bottom-pad) calc(4px + var(--sal));
  }
  .sq-bottom.sq-bottom-4 { grid-template-columns: repeat(4, 1fr); }
  .sq-bottom > a, .sq-bottom > .dropup > button {
    display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%;
    color: #5E6B82; text-decoration: none; font-size: 11px; background: none; border: 0; padding: 2px 0; font-family: var(--sq-sans);
  }
  .sq-bottom i { font-size: 21px; line-height: 1.1; }
  .sq-bottom .is-active { color: var(--sq-navy); font-weight: 600; }
  .sq-bottom .is-active i { color: var(--sq-navy); }
  .sq-bottom .dropup { display: flex; }
  .sq-bottom-add { display: flex; justify-content: center; background: none; border: 0; padding: 0; }
  .sq-bottom-add span {
    display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
    background: var(--sq-gold); color: var(--sq-navy); margin-top: -22px; box-shadow: 0 4px 14px rgba(27, 58, 107, .3);
  }
  .sq-bottom-add span i { font-size: 24px; }
  .sq-moremenu {
    min-width: 250px; max-height: calc(100vh - 120px - var(--sat) - var(--sq-bottom-pad)); overflow-y: auto; overscroll-behavior: contain;
    border: 1px solid var(--sq-line); border-radius: 10px; box-shadow: 0 10px 30px rgba(16, 24, 40, .15); padding: 6px;
  }
  .sq-moremenu .dropdown-item { border-radius: 6px; padding: 9px 10px; display: flex; align-items: center; gap: 10px; font-size: 15px; }
  .sq-moremenu .dropdown-item > i { color: #8A94A3; width: 1.1rem; }
  .sq-moremenu .dropdown-item.active, .sq-moremenu .dropdown-item:active { background: var(--sq-navy); color: #fff; }
  .sq-moremenu .dropdown-item.active > i { color: var(--sq-gold); }
  .sq-moremenu .dropdown-header { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #8A94A3; }
  .sq-main { padding-bottom: calc(84px + var(--sq-bottom-pad)); }
  .sq-impbar { bottom: calc(62px + var(--sq-bottom-pad)); }
}
@media print { .sq-bottom { display: none !important; } }


/* ===== 1.7.6 – Handy: App-Optik oben/unten in den Größenverhältnissen wie MiniMe ===== */
@media (max-width: 991.98px) {
  /* Oben: 64 px hohe Kopfzeile unter Uhrzeit/Insel, App-Symbol + Name links, runder Knopf rechts */
  .sq-topbar {
    min-height: calc(64px + var(--sat)); padding: var(--sat) calc(16px + var(--sar)) 0 calc(16px + var(--sal));
    gap: 12px; box-shadow: 0 1px 0 rgba(255, 255, 255, .08), 0 2px 10px rgba(16, 32, 64, .12);
  }
  .sq-topbar-home { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 auto; color: #fff; text-decoration: none; }
  .sq-applogo { width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }
  .sq-topbar-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
  .sq-topbar .sq-brand { font-size: 22px; flex-grow: 0; }
  .sq-topbar-book { display: block; margin: 2px 0 0; max-width: none; font-size: 12.5px; color: var(--sq-side-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sq-topbar-btn {
    width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .28);
    display: grid; place-items: center; text-decoration: none;
  }
  .sq-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--sq-gold); color: var(--sq-navy); font-weight: 700; font-size: 14px; display: grid; place-items: center; }

  /* Unten: höhere Leiste, größere Symbole, Beschriftung bis knapp über den Home-Balken */
  .sq-bottom {
    padding: 12px calc(6px + var(--sar)) max(10px, calc(var(--sab) - 20px)) calc(6px + var(--sal));
    background: rgba(255, 255, 255, .97); border-top: 1px solid #E3E7EE; box-shadow: 0 -4px 18px rgba(16, 32, 64, .06);
  }
  .sq-bottom > a, .sq-bottom > .dropup > button { gap: 4px; font-size: 12.5px; color: #6B7689; padding: 0; }
  .sq-bottom > a i, .sq-bottom > .dropup > button i {
    font-size: 23px; line-height: 1; height: 30px; display: grid; place-items: center; min-width: 54px; border-radius: 999px; transition: background .15s;
  }
  /* Aktiver Punkt: Symbol in heller „Pille“ wie bei MiniMe */
  .sq-bottom .is-active { color: var(--sq-navy); font-weight: 600; }
  .sq-bottom .is-active i { background: #DCE3EE; color: var(--sq-navy); }
  /* Großer runder Plus-Knopf mit weißem Ring, ragt über die Leiste */
  .sq-bottom-add { align-self: start; }
  .sq-bottom-add span {
    width: 62px; height: 62px; margin-top: -38px; border-radius: 50%;
    background: linear-gradient(160deg, #24497F 0%, var(--sq-navy) 100%); color: #fff;
    box-shadow: 0 0 0 6px #fff, 0 8px 20px rgba(27, 58, 107, .35);
  }
  .sq-bottom-add span i { font-size: 28px; }
  .sq-main { padding-bottom: calc(96px + var(--sab)); }
  .sq-impbar { bottom: calc(70px + max(10px, calc(var(--sab) - 20px))); }
}

/* 1.7.7 – drei Kacheln (Sparkonten) */
.sq-tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 767.98px) { .sq-tiles-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sq-tiles-3 .sq-tile:first-child { grid-column: span 2; } }
@media (max-width: 767.98px) { .sq-tiles-3 .sq-tile:nth-child(2) { border-right: 1px solid var(--sq-line); border-bottom: 0; } .sq-tiles-3 .sq-tile:first-child { border-right: 0; } }

/* ===== 1.7.7 – Seite „Bezeichnungen“ ===== */
.sq-titlebar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.sq-titlebar .sq-tbar-search { flex: 1 1 280px; max-width: 420px; }
.sq-titles { display: flex; flex-direction: column; gap: 8px; max-width: 1100px; }
.sq-titleitem { background: #fff; border: 1px solid var(--sq-line); border-radius: 8px; }
.sq-titleitem > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.sq-titleitem > summary::-webkit-details-marker { display: none; }
.sq-titleitem > summary:focus-visible { outline: 2px solid var(--sq-navy); outline-offset: -2px; border-radius: 8px; }
.sq-titlename { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.sq-titlemeta { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.sq-titlecount { background: var(--sq-tile); border-radius: 999px; padding: 1px 9px; font-size: 13px; font-weight: 600; color: var(--sq-navy); }
.sq-titlechev { transition: transform .15s; color: var(--sq-muted); }
.sq-titleitem[open] > summary { border-bottom: 1px solid var(--sq-line); }
.sq-titleitem[open] .sq-titlechev { transform: rotate(180deg); }
.sq-titlebody { padding: 4px 0 6px; }
.sq-titlefix { display: flex; flex-direction: column; gap: 4px; padding: 8px 16px; }
.sq-titlefix a { font-size: 14px; }
.sq-titleitem .sq-list td, .sq-titleitem .sq-list th { padding-left: 16px; }
@media (max-width: 575.98px) { .sq-titlemeta .sq-mono { display: none; } }
/* Zielbuchung beim Sprung aus „Bezeichnungen“ / Fixposten-Anker */
@keyframes sqFlash { 0%, 60% { background: #E2E8F2; } 100% { background: transparent; } }
.sq-flash, .sq-flash td { animation: sqFlash 2.4s ease-out; }
tr:target td { animation: sqFlash 2.4s ease-out; }

/* ===== 1.9.0 – Budgets, Auslagen, Monatsabschluss, Verlauf, Preisänderungen ===== */
.sq-budgetgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px 22px; }
.sq-budget .d-flex strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sq-budget .d-flex .sq-mono { white-space: nowrap; }
.sq-budget { display: flex; flex-direction: column; gap: 4px; }
td .sq-budget { flex-direction: row; align-items: center; gap: 8px; }
td .sq-budget .sq-budget-bar { flex: 1 1 auto; min-width: 60px; }
.sq-budget-bar { height: 8px; border-radius: 999px; background: #E6EAF1; overflow: hidden; }
.sq-budget-bar > span { display: block; height: 100%; border-radius: 999px; }
.sq-budget-ok .sq-budget-bar > span { background: #2F7D5B; }
.sq-budget-warn .sq-budget-bar > span { background: #E0A020; }
.sq-budget-over .sq-budget-bar > span { background: #B3261E; }
.sq-budget-ok .sq-budget-txt { color: #2F7D5B; }
.sq-budget-warn .sq-budget-txt { color: #8A5300; }
.sq-budget-over .sq-budget-txt { color: #B3261E; font-weight: 600; }
.sq-badge-share { font-size: 12px; color: #7A4B00; background: #FFF3D6; border: 1px solid #EBCB82; border-radius: 4px; padding: 1px 6px; margin-left: 8px; white-space: nowrap; }
.sq-badge-share.done { color: #2F7D5B; background: #EEF8F2; border-color: #A9D3BC; }
td > .sq-badge-share:first-child { margin-left: 0; }
.sq-lockbox { background: #EEF2F8; border: 1px solid #C9D4E6; color: var(--sq-navy); }
.sq-histbox summary { cursor: pointer; color: var(--sq-navy); }
.sq-histlist { list-style: none; padding: 6px 0 0; margin: 0; display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; }
.sq-histlist > li { border-left: 3px solid #C9D4E6; padding-left: 8px; }
.sq-histlist ul { margin: 2px 0 0; padding-left: 16px; font-size: 13px; color: #3A4659; }
.sq-histpage { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; max-width: 1000px; }
.sq-histpage > li { padding: 10px 14px; border-left: 4px solid #C9D4E6; }
.sq-histpage > li.sq-hist-create { border-left-color: #2F7D5B; }
.sq-histpage > li.sq-hist-delete { border-left-color: #B3261E; }
.sq-histpage > li.sq-hist-status { border-left-color: #E0A020; }
.sq-histpage ul { margin: 4px 0; padding-left: 20px; }
.sq-histaction { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--sq-muted); }
.sq-pricehist { display: flex; flex-direction: column; gap: 4px; }
.sq-pricerow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 10px; background: #F4F6FA; border-radius: 6px; }
.sq-pricerow > span:first-child { flex: 1 1 auto; }
.sq-sharefoot { border-top: 1px solid var(--sq-line); }

/* ===== 1.9.1 – Handy: Statusleiste abgesetzt (wie MiniMe), Plus-Knopf ragt weniger heraus ===== */
@media (max-width: 991.98px) {
  /* Bereich hinter Uhrzeit/Insel hell wie der Seitenhintergrund, darunter beginnt die Kopfzeile mit klarer Kante */
  .sq-topbar {
    background: linear-gradient(to bottom, var(--sq-bg) 0, var(--sq-bg) var(--sat), var(--sq-navy) var(--sat), var(--sq-navy) 100%);
    box-shadow: 0 1px 0 rgba(16, 32, 64, .10), 0 4px 12px rgba(16, 32, 64, .10);
  }
  /* Plus-Knopf: 60 px, schmaler weißer Ring, ragt nur ca. 12 px über die Leiste */
  .sq-bottom-add span {
    width: 60px; height: 60px; margin-top: -22px;
    box-shadow: 0 0 0 5px #fff, 0 6px 16px rgba(27, 58, 107, .30);
  }
  .sq-bottom-add span i { font-size: 27px; }
}

/* ===== 1.9.2 – Handy: helle Kopfzeile wie MiniMe =====
   iOS legt bei Apps vom Home-Bildschirm einen milchig-weißen Unschärfe-Verlauf über den oberen Rand
   (Uhrzeit-Bereich und ein Stück darunter). Auf dunklem Blau wirkt das „milchig“, auf hellem Grund
   ist es unsichtbar – deshalb ist die Kopfzeile auf dem Handy jetzt hell (wie bei MiniMe). */
@media (max-width: 991.98px) {
  .sq-topbar {
    background: linear-gradient(to bottom, var(--sq-bg) 0, var(--sq-bg) var(--sat), #fff var(--sat), #fff 100%);
    color: var(--sq-navy);
    border-bottom: 1px solid #E1E6EE;
    box-shadow: 0 2px 10px rgba(16, 32, 64, .05);
  }
  .sq-topbar-home { color: var(--sq-navy); }
  .sq-topbar .sq-brand { color: var(--sq-navy); }
  .sq-topbar-book { color: #5E6B82; }
  .sq-applogo { box-shadow: 0 0 0 1px #E1E6EE; }
  .sq-topbar-btn { border-color: #D9DFE8; background: #fff; }
}

/* ===== 1.9.4 – Kategorien aufgeräumt, Navigationsgruppe „Kassenzentrale“ ===== */
#sqToolsNav .sq-side-link { padding-left: 26px; }
.sq-cattable .sq-catname { display: block; font-weight: 600; white-space: normal; }
.sq-cattable .sq-note { display: block; white-space: normal; }
.sq-cattable td.sq-catbudget { min-width: 150px; }
.sq-catdel { background: #FBEDEC; border: 1px solid #F0C9C5; border-radius: 8px; padding: 14px; }
.sq-cattable thead th { white-space: nowrap; }
@media (max-width: 767.98px) {
  .sq-cattable td.sq-catbudget { min-width: 0; width: 34%; }
  .sq-cattable td.sq-catbudget .sq-budget-bar { min-width: 40px; }
  .sq-cattable th, .sq-cattable td { padding-left: 12px; padding-right: 8px; }
}

/* ===== 1.9.5 – iPhone: Statusleiste ohne milchigen Schleier =====
   iOS/Safari 26 färbt den Bereich hinter Uhrzeit & Akku anhand der HINTERGRUNDFARBE der Kopfzeile ein.
   Ein Farbverlauf (background-image) zählt dabei nicht – dann zeichnet iOS einen milchigen Unschärfe-Schleier.
   Deshalb: Kopfzeile mit einer festen, einfarbigen Hintergrundfarbe (wie bei MiniMe). */
html { background-color: #F4F6FA; }
@media (max-width: 991.98px) {
  .sq-topbar { background: #fff; background-image: none; }
}


/* =====================================================================
   StromIQ 1.0 – eigene Bausteine
   ===================================================================== */
.sq-iq { color: var(--sq-gold); }
.sq-brand-side { display: flex; align-items: center; gap: 10px; }
.sq-brandmark { width: 36px; height: 36px; border-radius: 9px; background: var(--sq-gold); color: var(--sq-navy); display: inline-flex; align-items: center; justify-content: center; font-size: 19px; flex: 0 0 36px; }
.sq-topbar .sq-brand .sq-iq { color: #D9961A; }
.sq-guest-brand .sq-iq { color: #D9961A; }
.sq-ymark { font-size: 11px; color: var(--sq-side-muted); margin-left: 4px; }
.sq-month.active .sq-ymark { color: var(--sq-navy); }
.sq-side .sq-side-label { padding: 4px 10px 0; }
.sq-bookpick .dropdown-toggle[disabled] { opacity: 1; }
.sq-bookpick .dropdown-toggle[disabled]::after { display: none; }
.sq-bookpick .dropdown-header { color: #5E6B82; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

/* Plus/Minus: Guthaben grün, Nachzahlung rot (unterscheiden sich auch in der Helligkeit) */
.sq-pos { color: var(--sq-in) !important; }
.sq-neg { color: var(--sq-out) !important; }
.sq-gold { color: #6B4A00 !important; }
.sq-mstats .v.sq-pos { color: #9FE0BC !important; }
.sq-mstats .v.sq-neg { color: #FFC2B3 !important; }
.sq-tile .sq-value { font-size: 24px; }
.sq-tile .sq-sub.sq-open { color: var(--sq-open); }

.sq-table tfoot td.sq-gold { color: #6B4A00; }
.sq-table tr.sq-subrow td { color: var(--sq-muted); background: #FBFCFE; font-size: 15px; }
.sq-badge-start { font-size: 12px; color: var(--sq-navy); background: #E6ECF5; border: 1px solid #B8C4D9; border-radius: 4px; padding: 2px 8px; white-space: nowrap; }
.sq-mrow .d small { display: block; font-size: 11px; color: #7F90AE; }
.sq-mrow .t { font-family: var(--sq-mono); }
.sq-mrow-carry { background: var(--sq-row-alt); }
.sq-mfoot { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--sq-muted); padding: 10px 2px 0; }

.sq-card-hl { background: var(--sq-tile); border-color: #EBCB82; }
.sq-big { font-family: var(--sq-mono); font-size: 32px; font-weight: 500; line-height: 1.1; margin-bottom: 6px; }
.sq-dl li { gap: 12px; }
.sq-firststeps { border-left: 4px solid var(--sq-gold); }

/* Live-Vorschau im Eingabefenster */
.sq-preview { font-size: 14px; border-radius: 6px; padding: 10px 12px; background: var(--sq-row-alt); border: 1px solid var(--sq-line); color: var(--sq-muted); min-height: 42px; }
.sq-preview:empty { display: none; }
.sq-preview.is-ok { background: #EEF5FF; border-color: #C4D6EF; color: var(--sq-navy); font-weight: 500; }
.sq-preview.is-warn { background: #FFF3E8; border-color: #F0C79B; color: #7A3E00; }

/* Rechte */
.sq-rights { border: 1px solid var(--sq-line); border-radius: 8px; padding: 12px 14px; }
.sq-rights legend { float: none; width: auto; padding: 0 6px; margin-left: -6px; }
.sq-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sq-presets .btn { padding: 2px 8px; font-size: 13px; }
.sq-permgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; }
.sq-permgrid-sm { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); font-size: 14px; }
@media (max-width: 575.98px) { .sq-permgrid { grid-template-columns: 1fr; } }
.sq-meterperm { background: var(--sq-row-alt); border-radius: 6px; padding: 8px 10px; }
fieldset[disabled] .btn { pointer-events: none; }

.sq-dangerzone { border-color: #EDC4BA; background: #FFF9F7; }
.sq-sample { background: var(--sq-row-alt); border: 1px solid var(--sq-line); border-radius: 6px; padding: 10px; white-space: pre; overflow-x: auto; }
.sq-legend .sw.sq-sw-proj { background: repeating-linear-gradient(45deg, #E6ECF5 0 3px, #B8C4D9 3px 5px); border: 1px dashed #7F90AE; }
.sq-chart-x small { font-size: 10.5px; color: var(--sq-muted); }
.sq-hist-create { border-left-color: #2F7D5B !important; }
.sq-imp tr.is-ok td:first-child { border-left: 3px solid #A9D3BC; }
@media print { .sq-preview { display: none; } }

/* ===== 1.1: Jahresabrechnungen & Sonderposten ===== */
.sq-h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--sq-navy); font-weight: 700; margin: 6px 0 10px; }
.sq-billres { text-align: right; line-height: 1.1; margin-right: 6px; }
.sq-billres strong { display: block; font-family: var(--sq-mono); font-size: 22px; font-weight: 500; }
.sq-cmp th[scope=row] { font-weight: 600; color: var(--sq-ink); }
.sq-cmp td .sq-note { display: block; }
.sq-cmp tr.sq-cmp-sub td, .sq-cmp tr.sq-cmp-sub th { padding-top: 0; color: var(--sq-muted); font-size: 13px; border-top: 0; }
.sq-cmp tr.sq-cmp-total th, .sq-cmp tr.sq-cmp-total td { border-top: 2px solid var(--sq-gold); font-weight: 600; }
.sq-hint { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; border-radius: 6px; padding: 8px 12px; margin-top: 6px; }
.sq-hint .bi { margin-top: 2px; }
.sq-hint-warn { background: #FFF6E0; border: 1px solid #EBCB82; color: #5C4200; }
.sq-hint-info { background: #EEF5FF; border: 1px solid #C4D6EF; color: #1B3A6B; }
.sq-hint-ok { background: #EAF6EF; border: 1px solid #A9D3BC; color: #1D5E3F; }
.sq-kindgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; }
@media (max-width: 575.98px) { .sq-kindgrid { grid-template-columns: 1fr; } }
.sq-kind { border: 1px solid var(--sq-line); border-radius: 6px; padding: 8px 10px 8px 34px; margin: 0; }
.sq-kind .form-check-input { margin-left: -24px; }
.sq-list tbody th[scope=row] { font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--sq-ink); border-bottom: 1px solid var(--sq-line); }
.sq-cmp tbody th[scope=row] { font-weight: 600; }
.sq-cmp tbody th.fw-normal { font-weight: 400; }
.sq-cmp tr.sq-cmp-sub th[scope=row] { font-size: 13px; color: var(--sq-muted); border-bottom: 1px solid var(--sq-line); }
.sq-cmp tr.sq-cmp-total th[scope=row] { border-bottom: 0; }

/* ===== 1.2: Empfehlung, Ziel-Ampel, Haushaltsvergleich, Übersicht ===== */
.sq-rec-label { font-size: 13px; color: var(--sq-muted); }
.sq-rec-val { font-size: 22px; color: var(--sq-navy); }
.sq-rec-compact .sq-rec-val { font-size: 18px; }
.sq-rec ul li { margin-bottom: 2px; }
.sq-ampel { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 2px 10px 2px 6px; border: 1px solid; white-space: nowrap; }
.sq-ampel .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.sq-ampel-green { color: #1D5E3F; background: #EAF6EF; border-color: #A9D3BC; }
.sq-ampel-green .dot { background: #2F8A5B; }
.sq-ampel-yellow { color: #6B4A00; background: #FFF6E0; border-color: #EBCB82; }
.sq-ampel-yellow .dot { background: #E0A21A; }
.sq-ampel-red { color: #8A1F12; background: #FDECE8; border-color: #EDB4A8; }
.sq-ampel-red .dot { background: #C43A26; }
.sq-ampel-sm { font-size: 12px; font-weight: 500; padding: 0 8px 0 5px; }
.sq-ampel-sm .dot { width: 8px; height: 8px; }
.sq-goalbar { position: relative; height: 8px; border-radius: 4px; background: #E6ECF5; margin: 4px 0; overflow: visible; }
.sq-goalbar span { display: block; height: 100%; border-radius: 4px; }
.sq-goalbar-green span { background: #2F8A5B; }
.sq-goalbar-yellow span { background: #E0A21A; }
.sq-goalbar-red span { background: #C43A26; }
.sq-goalbar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--sq-navy); }
.sq-class { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: 6px; font-weight: 800; color: #fff; font-size: 14px; line-height: 1; }
.sq-class-A { background: #1E7B4F; } .sq-class-B { background: #3E9A55; } .sq-class-C { background: #8DB33A; color: #18233A; }
.sq-class-D { background: #E0C21A; color: #18233A; } .sq-class-E { background: #E89A2A; color: #18233A; } .sq-class-F { background: #D9622B; } .sq-class-G { background: #B42318; }
.sq-scale { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.sq-scale .sq-class { height: 46px; opacity: .45; }
.sq-scale .sq-class small { font-size: 10px; font-weight: 500; margin-top: 3px; }
.sq-scale .sq-class.is-me { opacity: 1; outline: 3px solid var(--sq-navy); outline-offset: 2px; transform: scale(1.06); }
.sq-ovbar { position: relative; height: 10px; border-radius: 5px; background: #E6ECF5; margin: 2px 0 3px; }
.sq-ovbar .c { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: var(--sq-navy); }
.sq-ovbar .c.over { background: #D9822B; }
.sq-ovbar .p { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; background: var(--sq-gold); border-radius: 2px; }
.sq-ov td { vertical-align: top; }
.sq-ov td.sq-mono, .sq-ov .sq-mono { white-space: nowrap; }
.sq-ov td:first-child { min-width: 170px; }
.sq-ov td.small { white-space: nowrap; }
.sq-list td.sq-mono { white-space: nowrap; }
.sq-list td.sq-mono .sq-note { white-space: normal; }
