:root{--bg:#F8EADC;--olive:#6D712E;--olive-dark:#565a23;--ink:#28251c;--muted:#736d60;--line:#e7ddcc;--surface:#fffaf2;--white:#fff;--soft:#f2e8d7;--shadow:0 10px 38px rgba(80,63,39,.07);--radius:17px}*{box-sizing:border-box}html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px;color:var(--ink);background:var(--bg)}body{margin:0;min-height:100vh}a{color:var(--olive-dark);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3{font-family:Georgia,"Times New Roman",serif;font-weight:600;letter-spacing:-.02em}h1{font-size:clamp(2rem,3.7vw,3.15rem);line-height:1.11;margin:0 0 12px}h2{font-size:1.37rem;line-height:1.2;margin:0 0 12px}h3{font-size:1.15rem;margin:18px 0 8px}p{margin:0 0 14px;line-height:1.6}.muted{color:var(--muted)}.fine{font-size:.84rem;line-height:1.55;color:var(--muted)}.eyebrow{text-transform:uppercase;letter-spacing:.17em;font-weight:700;font-size:.71rem;color:var(--olive);margin:0 0 11px}.shell{width:min(1140px,calc(100% - 44px));margin:0 auto}.topbar{background:rgba(255,250,242,.85);border-bottom:1px solid var(--line)}.top-inner{min-height:83px;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{display:flex;align-items:center;gap:12px;color:var(--ink);font-family:Georgia,serif;font-size:1.5rem;line-height:1;white-space:nowrap;font-weight:700}.brand:hover{text-decoration:none}.brand-sub{display:block;font-family:ui-sans-serif,system-ui,sans-serif;text-transform:uppercase;letter-spacing:.15em;font-size:.58rem;color:var(--olive);margin-top:5px;font-weight:700}.brand-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:var(--olive);color:white;font-size:1.8rem}.brand-logo{max-width:124px;height:48px;object-fit:contain}.nav{display:flex;align-items:center;gap:22px;flex-wrap:wrap;font-size:.89rem}.nav a{color:var(--ink)}.nav-form{margin:0}.text-btn{border:0;background:transparent;padding:0;color:var(--olive-dark);cursor:pointer;font:inherit}.content{padding:48px 0 64px}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:30px}.page-heading h1{margin-bottom:7px}.page-heading p:not(.eyebrow){color:var(--muted);margin:0}.pill{border:1px solid #dcd1bc;color:var(--olive-dark);background:#f4eddc;border-radius:100px;padding:9px 14px;font-size:.78rem;font-weight:700;white-space:nowrap}.pill-green{background:#e4ead7;border-color:#bccb99}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:20px;align-items:start}.side-stack{display:grid;gap:20px}.panel{background:var(--surface);border:1px solid rgba(117,107,86,.13);border-radius:var(--radius);padding:27px;box-shadow:var(--shadow);min-width:0}.panel h2+.muted{margin-top:-6px}.panel-title{display:flex;justify-content:space-between;align-items:center;gap:15px}.mini-seal{background:#eaebdb;border-radius:50%;width:45px;height:45px;display:grid;place-items:center;color:var(--olive);font-size:1.6rem}.balance-head{display:flex;align-items:center;justify-content:space-between;margin:24px 0 12px}.balance-head>strong{font-family:Georgia,serif;font-size:1.75rem}.balance-head>strong small{font-family:ui-sans-serif,system-ui,sans-serif;font-size:.88rem;font-weight:400}.balance-head>span{color:var(--olive);font-weight:700}.progress{background:#e9e0d0;height:12px;border-radius:99px;overflow:hidden}.progress>div{height:100%;border-radius:99px;background:linear-gradient(90deg,var(--olive),#a3a67b)}.stamps{display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));gap:13px;max-width:440px;margin:31px auto}.stamp{display:flex;align-items:center;justify-content:center;aspect-ratio:1;max-width:69px;width:100%;margin:auto;border-radius:50%;border:1.5px dashed #c2b9a5;color:#b2a996;background:#fcf8f0;font-size:1rem}.stamp.filled{border:3px double #fff;background:var(--olive);outline:1px solid var(--olive);color:#fff;font-size:1.4rem;box-shadow:0 3px 9px rgba(65,70,18,.14)}.reward-banner{display:flex;align-items:flex-start;gap:15px;padding:17px;background:var(--soft);border-radius:12px;margin-top:16px}.reward-banner>span{font-size:1.75rem;line-height:1}.reward-banner strong{display:block;font-size:.97rem;margin-bottom:4px}.reward-banner small{display:block;color:var(--muted);line-height:1.5}.reward-banner.ready{background:#e6edda;border:1px solid #cad6af}.qr-panel .muted{margin-bottom:14px}.qr-frame{border:1px solid var(--line);border-radius:14px;padding:20px;margin:16px auto 10px;background:#fff;width:fit-content;max-width:100%}.qr-frame img,.qr-frame canvas{max-width:100%;height:auto!important}.qr-error{max-width:220px;color:#b33}.card-id{text-align:center;color:var(--muted);font-size:.87rem}.card-id strong{display:block;color:var(--ink);font-size:1.1rem;margin:5px}.qr-panel .fine{text-align:center;margin:13px 0 0}.history{display:flex;flex-direction:column}.history-row{display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}.history-row:last-child{border-bottom:0}.history-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#f0eadb;color:var(--olive);flex:0 0 auto}.history-copy{flex:1;min-width:0}.history-copy strong{display:block;font-size:.89rem}.history-copy small{display:block;color:var(--muted);font-size:.76rem;margin-top:3px}.history-row time{font-size:.73rem;color:var(--muted);white-space:nowrap}.auth-wrap{min-height:calc(100vh - 165px);display:flex;justify-content:center;align-items:flex-start;padding:56px 18px 60px}.auth-card{background:var(--surface);border:1px solid rgba(117,107,86,.15);border-radius:22px;box-shadow:0 17px 60px rgba(87,72,47,.11);padding:clamp(25px,5vw,48px);width:min(100%,510px)}.auth-card h1{font-size:clamp(1.95rem,4vw,2.6rem)}.auth-card hr{border:0;border-top:1px solid var(--line);margin:24px 0}.auth-card details summary{cursor:pointer;font-weight:600;color:var(--olive)}.auth-card details[open] summary{margin-bottom:16px}.form-stack{display:flex;flex-direction:column;gap:17px;margin-top:21px}.form-stack.compact{gap:10px}label{display:block;font-size:.88rem;font-weight:650;color:#4d493e}input:not([type=checkbox]):not([type=hidden]),select{display:block;width:100%;min-width:0;padding:13px 13px;margin-top:7px;color:var(--ink);background:white;border:1px solid #d9cebb;border-radius:9px;font-size:1rem;font-family:inherit;outline:none}input:focus-visible,button:focus-visible,a:focus-visible{outline:3px solid #acb15d;outline-offset:2px}input:focus{border-color:var(--olive)}input[type=file]{font-size:.88rem!important}.two-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--olive);border:1px solid var(--olive);color:white!important;padding:13px 19px;border-radius:9px;font-size:.91rem;font-weight:700;font-family:inherit;cursor:pointer;line-height:1.2;text-align:center}.btn:hover{background:var(--olive-dark);text-decoration:none}.btn:disabled{opacity:.5;cursor:not-allowed}.btn.full{width:100%}.btn-secondary{color:var(--olive-dark)!important;background:#f7f3e8}.btn-secondary:hover{background:#e8e5d4}.btn-danger{background:#ad3931;border-color:#ad3931}.btn-danger:hover{background:#8c241f}.split-links{display:flex;justify-content:space-between;gap:16px;margin-top:18px;font-size:.87rem}.form-bottom{margin:22px 0 0;text-align:center;color:var(--muted)}.account-values{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.account-values small{display:block;color:var(--muted);margin-bottom:6px}.account-values strong{overflow-wrap:anywhere}.narrow{max-width:735px}.narrow .panel{margin-bottom:19px}.danger-panel{border:1px solid #eab5ab}.danger-panel h2{color:#91362d}.checkline{display:flex;align-items:center;gap:10px;padding:12px;background:var(--soft);border-radius:9px;cursor:pointer}.checkline input{width:20px;height:20px;accent-color:var(--olive)}.notice{max-width:1140px;margin:19px auto 0;padding:15px 20px;border-radius:11px;border:1px solid #c6d5a9;background:#e6efdd;color:#3d5c2b;font-weight:600;font-size:.91rem}.notice.error{background:#fbe8e0;color:#89392b;border-color:#ecc5b5}.stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:20px}.stat{border:1px solid rgba(117,107,86,.12);background:var(--surface);padding:20px 23px;border-radius:var(--radius);box-shadow:var(--shadow)}.stat span{display:block;color:var(--muted);font-size:.82rem}.stat strong{font-family:Georgia,serif;color:var(--olive);display:block;font-size:2.25rem;margin-top:5px}.stat strong small{font-size:.84rem;font-family:system-ui}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px;align-items:start}.admin-lower{grid-template-columns:.7fr 1.3fr}.reader{width:100%;margin:16px 0;border-radius:11px;overflow:hidden}.reader[hidden]{display:none}.reader video{max-width:100%}.customer-list{display:grid;gap:1px}.customer-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:15px 10px;border-bottom:1px solid var(--line)}.customer-row:last-child{border-bottom:0}.customer-row:hover{background:var(--soft);text-decoration:none}.customer-row span strong,.customer-row span small{display:block}.customer-row small{color:var(--muted);margin-top:5px}.customer-row b{color:var(--olive);white-space:nowrap;font-size:.85rem}.preview-stamps{display:flex;justify-content:space-between;gap:10px;padding:14px;background:#f1efd9;border-radius:9px}.preview-stamps strong{color:var(--olive);font-size:1.12rem}.logo-preview{display:flex;align-items:center;justify-content:center;background:white;border:1px solid var(--line);border-radius:12px;min-height:130px}.logo-preview img{max-width:240px;max-height:115px;object-fit:contain}.footer{border-top:1px solid rgba(117,107,86,.2);padding:22px 0 30px;color:var(--muted);font-size:.76rem;display:flex;justify-content:space-between;gap:15px}.footer span{text-align:right}code{background:#f0e7da;padding:2px 5px;border-radius:4px}@media(max-width:800px){.shell{width:calc(100% - 28px)}.top-inner{align-items:flex-start;flex-direction:column;padding:15px 0;gap:13px}.brand{font-size:1.25rem}.brand-logo{max-width:100px;height:42px}.nav{gap:14px;font-size:.82rem}.content{padding:30px 0 48px}.dashboard-grid,.admin-grid,.admin-lower{grid-template-columns:1fr}.stat-grid{gap:8px}.stat{padding:15px}.stat strong{font-size:1.7rem}.page-heading{align-items:flex-start;flex-direction:column}.panel{padding:21px}.auth-wrap{padding-top:28px}.history-row time{font-size:.67rem}.account-values{grid-template-columns:1fr}.footer{flex-direction:column}.footer span{text-align:left}}@media(max-width:400px){.stamp{font-size:.8rem}.stamp.filled{font-size:1.15rem}.stamps{gap:9px}.two-fields{grid-template-columns:1fr}.history-row{gap:8px}.history-icon{display:none}.history-row time{max-width:90px;white-space:normal;text-align:right}.stat span{font-size:.74rem}.stat strong{font-size:1.55rem}}

/* Würzig-Kundenkarte v0.2: Kundenverwaltung und Footer */
.footer{align-items:center;flex-wrap:wrap;justify-content:flex-start;column-gap:20px;row-gap:8px}
.footer span{text-align:left}
.footer .footer-links{display:inline-flex;align-items:center;gap:18px;flex-wrap:wrap}
.footer-links a{color:var(--olive-dark);text-decoration:underline;text-underline-offset:3px}
.customer-filters{display:grid;grid-template-columns:minmax(190px,2fr) minmax(170px,1fr) auto auto;gap:12px;align-items:end;margin:0 0 20px}
.customer-filters .btn{white-space:nowrap;min-height:47px}
.customer-table-wrap{overflow-x:auto;max-width:100%;border:1px solid var(--line);border-radius:12px}
.customer-table{width:100%;border-collapse:collapse;min-width:850px;font-size:.88rem}
.customer-table th{text-align:left;font-size:.76rem;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);background:var(--soft);padding:13px 12px;white-space:nowrap}
.customer-table td{padding:13px 12px;border-top:1px solid var(--line);vertical-align:middle}
.customer-table td:first-child strong{display:block;white-space:nowrap}
.customer-table td small{display:block;color:var(--muted);margin-top:3px}
.customer-table tr:hover td{background:rgba(109,113,46,.04)}
.customer-table .email-cell{max-width:210px;overflow-wrap:anywhere}
.customer-table .customer-actions{white-space:nowrap}
.customer-actions a{font-weight:700;margin-right:12px}
.status-label{display:inline-block;background:#e6efdf;color:#43572b;border-radius:999px;padding:6px 9px;font-size:.76rem;white-space:nowrap}
.status-full{background:#e5eacd;color:#434e1e}
.status-pending{background:#fae8d1;color:#805927}
.pagination{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:18px;flex-wrap:wrap}
.pagination>div{display:flex;gap:9px}
.danger-zone{border-color:#e6b8a9}
.danger-zone h2{color:#943c30}
@media(max-width:1000px){.customer-filters{grid-template-columns:minmax(190px,1fr) minmax(180px,1fr)}.customer-filters .btn{width:100%}}
@media(max-width:560px){.customer-filters{grid-template-columns:1fr}.pagination .btn{padding:10px 13px}.footer{font-size:.79rem}}

/* v0.3: Versandaktion direkt in Kundenliste */
.customer-actions .inline-action{display:inline-block;margin:4px 0 0}
.customer-actions .inline-action .text-btn{font-size:.82rem;text-decoration:underline;text-underline-offset:3px;white-space:nowrap}

/* v0.4: Das eigene Logo ersetzt das Sternsymbol auf der Kundenkarte und den Stempeln. */
.mini-seal{overflow:hidden;flex:0 0 45px}
.card-seal-logo{width:100%;height:100%;object-fit:contain;padding:4px;display:block}
.stamp.filled.with-logo{background:#fffaf2;border:2px solid var(--olive);overflow:hidden;padding:5px}
.stamp-logo{display:block;width:100%;height:100%;object-fit:contain;max-width:100%;max-height:100%}
.adjustment-panel{margin-bottom:20px}
.adjustment-panel .two-fields input:disabled{background:#f0e9dc;color:#776f5f}

/* v0.4.1 – Geschäftslogo sicher innerhalb des runden Stempelfelds skalieren.
   Absolute Positionierung verhindert, dass die Originalabmessungen des
   hochgeladenen Bildes die Kreishöhe oder das Grid beeinflussen. */
.stamp.filled.with-logo {
  position: relative;
  overflow: hidden;
  padding: 0;
  min-width: 0;
  min-height: 0;
}
.stamp.filled.with-logo > .stamp-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: 82%;
  height: 82%;
  max-width: 82%;
  max-height: 82%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}


/* v0.4.2: Mobilansicht der Kundenverwaltung ohne breite Tabelle / Seiten-Scroll. */
.customer-mobile-list { display: none; }
@media (max-width: 800px) {
  .customer-management { min-width: 0; }
  .customer-management .customer-table-wrap { display: none; }
  .customer-mobile-list { display: grid; gap: 14px; min-width: 0; }
  .customer-mobile-card {
    min-width: 0;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fffdf8;
    box-shadow: 0 3px 13px rgba(80,63,39,.045);
    overflow-wrap: anywhere;
  }
  .customer-mobile-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; min-width: 0; }
  .customer-mobile-name { min-width: 0; }
  .customer-mobile-name strong { display: block; font-size: 1rem; line-height: 1.35; }
  .customer-mobile-name small { display: block; color: var(--muted); margin-top: 5px; font-size: .8rem; }
  .customer-mobile-header .status-label { flex: 0 0 auto; }
  .customer-mobile-balance { margin: 17px 0 15px; padding: 11px 12px; border-radius: 9px; background: #f5f0e3; }
  .customer-mobile-balance-label { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .82rem; }
  .customer-mobile-balance-label span { color: var(--muted); }
  .customer-mobile-balance-label strong { color: var(--olive-dark); font-size: .95rem; }
  .customer-mobile-balance .progress { height: 8px; }
  .customer-mobile-details { display: grid; gap: 11px; margin: 0; padding: 0 1px 14px; }
  .customer-mobile-details div { min-width: 0; }
  .customer-mobile-details dt { color: var(--muted); font-size: .72rem; line-height: 1.45; margin-bottom: 2px; }
  .customer-mobile-details dd { margin: 0; font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere; word-break: normal; }
  .customer-mobile-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .customer-mobile-actions .btn { min-width: 0; padding: 12px 8px; }
  .customer-mobile-verify { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 13px; }
  .customer-mobile-verify .text-btn { font-weight: 650; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
  .customer-management .pagination { align-items: flex-start; }
}
@media (max-width: 390px) {
  .customer-mobile-card { padding: 13px; }
  .customer-mobile-header { flex-wrap: wrap; }
  .customer-mobile-actions .btn { font-size: .85rem; padding: 11px 6px; }
}


/* v0.4.3 – Auch die Buchungshistorie zeigt das Geschäftslogo bei Stempelgutschriften. */
.history-icon.history-logo { overflow: hidden; }
.history-icon.history-logo .history-logo-img {
  display: block;
  width: 76%;
  height: 76%;
  max-width: 76%;
  max-height: 76%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
/* Auf kleinen Handys ist das Logo ebenfalls sichtbar, andere Verlaufs-Icons bleiben unverändert. */
@media (max-width: 400px) {
  .history-icon.history-logo { display: grid; width: 30px; height: 30px; }
}
