/* ================================================================
   APPINNOVO PORTAL - site.css
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800&display=swap');

:root {
    --ap-font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ap-radius: 14px;
    --ap-radius-sm: 10px;
    --ap-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
    --ap-shadow-hover: 0 4px 20px rgba(0,0,0,0.10);
    --ap-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --ap-green: #00b894;
    --ap-green-hover: #00a381;
    --ap-blue: #4f6df5;
    --ap-blue-hover: #3d5bd9;
    --ap-red: #e74c5e;
    --ap-amber: #f0a500;
    --ap-surface: #ffffff;
    --ap-surface-hover: #f8fafb;
    --ap-surface-muted: #f1f3f5;
    --ap-border: rgba(0,0,0,0.06);
    --ap-text: #1a1a2e;
    --ap-text-muted: #6b7280;
}

[data-bs-theme="dark"] {
    --ap-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 16px rgba(0,0,0,0.3);
    --ap-shadow-hover: 0 4px 24px rgba(0,0,0,0.4);
    --ap-surface: #33353e;
    --ap-surface-hover: #3b3d46;
    --ap-surface-muted: #25272f;
    --ap-border: rgba(255,255,255,0.08);
    --ap-text: #e8eaed;
    --ap-text-muted: #8b8fa3;
}

body {
    font-family: var(--ap-font);
    background-color: #f5f6f8;
}

/* ================================================================
   GLOBAL DARK MODE FIXES
   ================================================================ */

[data-bs-theme="dark"] body {
    background-color: #2b2d35;
}

/* Navbar */
[data-bs-theme="dark"] .navbar-dark,
[data-bs-theme="dark"] .navbar.bg-dark {
    background-color: #0d0e14 !important;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* Bootstrap Tables - comprehensive dark mode fix */
[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ap-text);
    --bs-table-border-color: rgba(255,255,255,0.06);
}

[data-bs-theme="dark"] .table thead,
[data-bs-theme="dark"] .table thead th,
[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table-light th,
[data-bs-theme="dark"] .table-light td {
    background-color: rgba(255,255,255,0.03) !important;
    color: var(--ap-text-muted) !important;
    border-color: rgba(255,255,255,0.06) !important;
}

[data-bs-theme="dark"] .table > tbody > tr {
    border-color: rgba(255,255,255,0.04);
}

[data-bs-theme="dark"] .table-warning,
[data-bs-theme="dark"] .table-warning td {
    background-color: rgba(240,165,0,0.1) !important;
    color: #f0a500 !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: rgba(255,255,255,0.02);
    color: var(--ap-text);
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(255,255,255,0.04);
    color: var(--ap-text);
}

/* Cards */
[data-bs-theme="dark"] .card {
    background-color: var(--ap-surface);
    border-color: var(--ap-border);
}

[data-bs-theme="dark"] .card-header {
    background-color: rgba(255,255,255,0.02);
    border-color: var(--ap-border);
}

[data-bs-theme="dark"] .card-footer {
    background-color: rgba(255,255,255,0.02);
    border-color: var(--ap-border);
}

/* Form controls */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: var(--ap-text);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: rgba(255,255,255,0.08);
    border-color: var(--ap-blue);
    color: var(--ap-text);
    box-shadow: 0 0 0 3px rgba(79,109,245,0.15);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--ap-text-muted);
}

[data-bs-theme="dark"] .input-group-text {
    background-color: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: var(--ap-text-muted);
}

/* Buttons - outline variants for dark mode */
[data-bs-theme="dark"] .btn-outline-dark {
    color: var(--ap-text) !important;
    border-color: rgba(255,255,255,0.15) !important;
}
[data-bs-theme="dark"] .btn-outline-dark:hover {
    background-color: rgba(255,255,255,0.08) !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .btn-outline-secondary {
    color: var(--ap-text-muted);
    border-color: rgba(255,255,255,0.12);
}
[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: rgba(255,255,255,0.08);
    color: var(--ap-text);
    border-color: rgba(255,255,255,0.2);
}

[data-bs-theme="dark"] .btn-outline-danger {
    border-color: rgba(231,76,94,0.4);
}

[data-bs-theme="dark"] .btn-outline-warning {
    color: var(--ap-amber);
    border-color: rgba(240,165,0,0.4);
}
[data-bs-theme="dark"] .btn-outline-warning:hover {
    background-color: rgba(240,165,0,0.15);
    color: var(--ap-amber);
}

/* Badges */
[data-bs-theme="dark"] .badge.bg-secondary {
    background-color: rgba(255,255,255,0.1) !important;
    color: var(--ap-text-muted);
}

/* Modals */
[data-bs-theme="dark"] .modal-content {
    background-color: #1e2028;
    border-color: rgba(255,255,255,0.06);
}

[data-bs-theme="dark"] .modal-header {
    border-color: rgba(255,255,255,0.06);
}

[data-bs-theme="dark"] .modal-footer {
    border-color: rgba(255,255,255,0.06);
}

/* Alerts */
[data-bs-theme="dark"] .alert-danger {
    background-color: rgba(231,76,94,0.1);
    border-color: rgba(231,76,94,0.2);
    color: #f5929e;
}

/* Dropdowns */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1e2028;
    border-color: rgba(255,255,255,0.08);
    color: var(--ap-text);
}

[data-bs-theme="dark"] .dropdown-item {
    color: var(--ap-text);
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: rgba(255,255,255,0.05);
    color: var(--ap-text);
}

[data-bs-theme="dark"] .dropdown-item.active,
[data-bs-theme="dark"] .dropdown-item:active {
    background-color: var(--ap-blue);
    color: #fff;
}

/* Select options (native dropdown) */
[data-bs-theme="dark"] .form-select option {
    background-color: #1e2028;
    color: var(--ap-text);
}

/* Navbar dropdowns */
[data-bs-theme="dark"] .navbar .dropdown-menu {
    background-color: #1e2028;
}

[data-bs-theme="dark"] .navbar .dropdown-item {
    color: var(--ap-text);
}

[data-bs-theme="dark"] .navbar .dropdown-item:hover {
    background-color: rgba(255,255,255,0.06);
    color: #fff;
}

[data-bs-theme="dark"] .navbar .dropdown-header {
    color: var(--ap-text-muted);
}

[data-bs-theme="dark"] .navbar .dropdown-divider {
    border-color: rgba(255,255,255,0.08);
}

/* Tom Select (autocomplete dropdowns) */
[data-bs-theme="dark"] .ts-wrapper .ts-control {
    background-color: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    color: var(--ap-text);
}

[data-bs-theme="dark"] .ts-wrapper .ts-control input {
    color: var(--ap-text);
}

[data-bs-theme="dark"] .ts-wrapper .ts-control input::placeholder {
    color: var(--ap-text-muted);
}

[data-bs-theme="dark"] .ts-dropdown {
    background-color: #1e2028;
    border-color: rgba(255,255,255,0.08);
    color: var(--ap-text);
}

[data-bs-theme="dark"] .ts-dropdown .option,
[data-bs-theme="dark"] .ts-dropdown .optgroup-header {
    color: var(--ap-text);
}

[data-bs-theme="dark"] .ts-dropdown .option:hover,
[data-bs-theme="dark"] .ts-dropdown .option.active {
    background-color: rgba(255,255,255,0.06);
    color: var(--ap-text);
}

[data-bs-theme="dark"] .ts-dropdown .option.selected {
    background-color: var(--ap-blue);
    color: #fff;
}

[data-bs-theme="dark"] .ts-wrapper.focus .ts-control {
    background-color: rgba(255,255,255,0.08);
    border-color: var(--ap-blue);
    box-shadow: 0 0 0 3px rgba(79,109,245,0.15);
}

[data-bs-theme="dark"] .ts-wrapper .ts-control .item {
    color: var(--ap-text);
}

[data-bs-theme="dark"] .ts-dropdown .no-results {
    color: var(--ap-text-muted);
}

/* Tom Select inside POS checkout */
[data-bs-theme="dark"] .pos-checkout .ts-wrapper .ts-control {
    background: var(--pos-checkout-input-bg);
    border-color: var(--pos-checkout-input-border);
    color: var(--pos-checkout-text);
}

[data-bs-theme="dark"] .pos-checkout .ts-wrapper .ts-control input {
    color: var(--pos-checkout-text);
}

[data-bs-theme="dark"] .pos-checkout .ts-wrapper.focus .ts-control {
    border-color: var(--pos-accent);
    box-shadow: 0 0 0 2px rgba(0,212,170,0.15);
}

/* Text helpers */
[data-bs-theme="dark"] .text-muted {
    color: var(--ap-text-muted) !important;
}

/* Table semantic variants */
[data-bs-theme="dark"] .table-danger,
[data-bs-theme="dark"] .table-danger td { background-color: rgba(231,76,94,0.1) !important; color: #f5929e !important; }
[data-bs-theme="dark"] .table-success,
[data-bs-theme="dark"] .table-success td { background-color: rgba(0,184,148,0.1) !important; color: #5edfc6 !important; }
[data-bs-theme="dark"] .table-secondary,
[data-bs-theme="dark"] .table-secondary td { background-color: rgba(255,255,255,0.04) !important; color: var(--ap-text-muted) !important; }
[data-bs-theme="dark"] .table-info,
[data-bs-theme="dark"] .table-info td { background-color: rgba(13,202,240,0.1) !important; color: #6ee7f7 !important; }

/* List groups */
[data-bs-theme="dark"] .list-group-item { background-color: var(--ap-surface); color: var(--ap-text); border-color: var(--ap-border); }
[data-bs-theme="dark"] .list-group-item-action:hover { background-color: var(--ap-surface-hover); }

/* Alerts */
[data-bs-theme="dark"] .alert-warning { background-color: rgba(240,165,0,0.1); border-color: rgba(240,165,0,0.2); color: #f0c050; }
[data-bs-theme="dark"] .alert-success { background-color: rgba(0,184,148,0.1); border-color: rgba(0,184,148,0.2); color: #5edfc6; }
[data-bs-theme="dark"] .alert-info { background-color: rgba(13,202,240,0.1); border-color: rgba(13,202,240,0.2); color: #6ee7f7; }

/* bg-light / text-dark Override */
[data-bs-theme="dark"] .bg-light { background-color: rgba(255,255,255,0.05) !important; }
[data-bs-theme="dark"] .text-dark { color: var(--ap-text) !important; }

/* Cards mit border-* — Text-Farben fixieren */
[data-bs-theme="dark"] .card .text-success { color: #5edfc6 !important; }
[data-bs-theme="dark"] .card .text-danger { color: #f5929e !important; }
[data-bs-theme="dark"] .card .text-info { color: #6ee7f7 !important; }
[data-bs-theme="dark"] .card .text-warning { color: #f0c050 !important; }
[data-bs-theme="dark"] .card .text-primary { color: #8ba0f8 !important; }

/* Pagination */
[data-bs-theme="dark"] .page-link { background-color: var(--ap-surface); color: var(--ap-text); border-color: var(--ap-border); }
[data-bs-theme="dark"] .page-item.active .page-link { background-color: var(--ap-blue); border-color: var(--ap-blue); }
[data-bs-theme="dark"] .page-item.disabled .page-link { background-color: rgba(255,255,255,0.03); color: var(--ap-text-muted); }

/* Form-check / switches */
[data-bs-theme="dark"] .form-check-label { color: var(--ap-text); }

/* Nav tabs/pills */
[data-bs-theme="dark"] .nav-tabs .nav-link { color: var(--ap-text-muted); }
[data-bs-theme="dark"] .nav-tabs .nav-link.active { color: var(--ap-text); background-color: var(--ap-surface); border-color: var(--ap-border); }

/* Definition lists */
[data-bs-theme="dark"] dt { color: var(--ap-text-muted); }
[data-bs-theme="dark"] dd { color: var(--ap-text); }

/* Witz des Tages */
.card-witz { background-color: #fff9e6; border-color: #ffc107; }
[data-bs-theme="dark"] .card-witz { background-color: rgba(255,193,7,0.08); border-color: rgba(255,193,7,0.3); }
[data-bs-theme="dark"] .card-witz .card-text { color: var(--ap-text); }

/* ================================================================
   GENERAL COMPONENTS
   ================================================================ */

.card-stats {
    transition: transform var(--ap-transition);
}

.card-stats:hover {
    transform: translateY(-2px);
    box-shadow: var(--ap-shadow-hover);
}

.health-ok {
    color: var(--ap-green);
}

.health-error {
    color: var(--ap-red);
}

.badge-kin {
    font-family: 'DM Sans', monospace;
    font-size: 0.9em;
    font-weight: 600;
}

.login-container {
    max-width: 420px;
    margin: 80px auto;
}

[data-bs-theme="dark"] .login-container .card {
    background-color: var(--ap-surface);
    border-color: var(--ap-border);
    box-shadow: var(--ap-shadow);
}

.table-belege td {
    vertical-align: middle;
}

.qr-cell {
    max-width: 200px;
    word-break: break-all;
    font-size: 0.8em;
    font-family: monospace;
}

.navbar .nav-link.active {
    font-weight: 600;
}

/* ================================================================
   BELEGVORSCHAU (Bon-Stil)
   ================================================================ */

.beleg-bon {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.85rem;
    padding: 1rem;
    background: #fffef8;
    line-height: 1.4;
}

.bon-header { text-align: center; margin-bottom: 6px; }
.bon-firma { font-weight: 700; font-size: 0.95rem; }
.bon-divider { border-top: 1px dashed #999; margin: 8px 0; }
.bon-divider-double { border-top: 3px double #333; margin: 8px 0; }
.bon-info { margin: 4px 0; }
.bon-positionen { margin: 4px 0; }
.bon-pos { margin-bottom: 6px; }
.bon-pos-name { font-weight: 400; }
.bon-summe { font-size: 0.95rem; font-weight: 700; margin: 4px 0; }
.bon-zahlung { margin: 4px 0; }
.bon-mwst { margin: 4px 0; }
.bon-mwst-header { border-bottom: 1px solid #ccc; margin-bottom: 2px; padding-bottom: 2px; }
.bon-qr-data { font-size: 0.65rem; word-break: break-all; display: block; background: #f5f5f0; padding: 4px; border-radius: 2px; }
.bon-zusatz { font-style: italic; }

.beleg-vorschau-card {
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

.beleg-row.table-active {
    background-color: #cfe2ff !important;
}

[data-bs-theme="dark"] .beleg-bon {
    background: #1e2028;
    color: #d0d2d6;
}

[data-bs-theme="dark"] .bon-qr-data {
    background: #16171d;
    color: #8b8fa3;
}

[data-bs-theme="dark"] .bon-divider { border-color: #3a3d48; }
[data-bs-theme="dark"] .bon-divider-double { border-color: #4a4d58; }
[data-bs-theme="dark"] .bon-mwst-header { border-color: #3a3d48; }

[data-bs-theme="dark"] .beleg-row.table-active {
    background-color: rgba(79,109,245,0.1) !important;
}

/* ================================================================
   API-SEITEN SIDEBAR
   ================================================================ */

.api-sidebar {
    width: 230px;
    min-height: calc(100vh - 80px);
    border-right: 1px solid #dee2e6;
    background: #fff;
    position: sticky;
    top: 0;
    align-self: flex-start;
}

.api-sidebar-inner { padding: 1rem 0; }

.api-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    transition: background-color 0.15s, border-color 0.15s;
}

.api-nav-link:hover { background-color: #f0f4ff; color: var(--ap-blue); }
.api-nav-link.active { background-color: #e7f0ff; color: var(--ap-blue); font-weight: 600; border-left-color: var(--ap-blue); }
.api-nav-link i { width: 1.2em; text-align: center; flex-shrink: 0; }

.api-nav-group {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #adb5bd;
    padding: 0.75rem 1rem 0.25rem;
    margin-top: 0.25rem;
}

.api-content { min-width: 0; padding: 0 1rem; }

[data-bs-theme="dark"] .api-sidebar { background: var(--ap-surface-muted); border-color: var(--ap-border); }
[data-bs-theme="dark"] .api-nav-link { color: var(--ap-text-muted); }
[data-bs-theme="dark"] .api-nav-link:hover { background-color: rgba(79,109,245,0.06); color: var(--ap-blue); }
[data-bs-theme="dark"] .api-nav-link.active { background-color: rgba(79,109,245,0.1); color: var(--ap-blue); border-left-color: var(--ap-blue); }

/* ================================================================
   KASSE - POS TERMINAL
   ================================================================ */

/* POS Variables */
.pos {
    --pos-accent: #00d4aa;
    --pos-accent-hover: #00b894;
    --pos-accent-blue: #5b7fff;
    --pos-accent-red: #ff6b6b;
    --pos-accent-amber: #ffb347;
    --pos-checkout-bg: #f5f6f8;
    --pos-checkout-text: #212529;
    --pos-checkout-muted: rgba(0,0,0,0.4);
    --pos-checkout-border: rgba(0,0,0,0.08);
    --pos-checkout-input-bg: rgba(0,0,0,0.04);
    --pos-checkout-input-border: rgba(0,0,0,0.12);
    --pos-checkout-hover: rgba(0,0,0,0.08);
    --pos-tile-bg: var(--ap-surface);
    --pos-tile-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

[data-bs-theme="dark"] .pos {
    --pos-checkout-bg: #2b2d35;
    --pos-checkout-text: #e8eaed;
    --pos-checkout-muted: rgba(255,255,255,0.4);
    --pos-checkout-border: rgba(255,255,255,0.06);
    --pos-checkout-input-bg: rgba(255,255,255,0.06);
    --pos-checkout-input-border: rgba(255,255,255,0.1);
    --pos-checkout-hover: rgba(255,255,255,0.08);
    --pos-tile-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

/* Entrance */
@keyframes posFadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Terminal Layout */
body:has(.pos) { overflow: hidden; }
@media (max-width: 991.98px) { body:has(.pos) { overflow: auto; } }

.pos {
    display: flex;
    gap: 0;
    height: calc(100vh - 56px);
    margin: -1rem -0.75rem;
    font-family: var(--ap-font);
    overflow: hidden;
}

/* Layout swap */
.pos.pos-reversed { flex-direction: row-reverse; }
.pos.pos-reversed .pos-checkout { border-left: none; border-right: 2px solid var(--pos-accent); box-shadow: -4px 0 24px rgba(0,212,170,0.08); }

.pos-products {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 1.25rem;
    animation: posFadeUp 0.35s ease-out;
}

.pos-checkout {
    width: 550px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--pos-checkout-bg);
    color: var(--pos-checkout-text);
    border-left: 2px solid var(--pos-accent);
    box-shadow: 4px 0 24px rgba(0,212,170,0.08);
    animation: posFadeUp 0.35s ease-out 0.06s both;
    transition: width 0.25s ease;
}
.pos-checkout.pos-checkout-compact { width: 440px; }

/* ---- Schnellaktionen Strip ---- */
.pos-quickactions {
    width: 52px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--pos-checkout-bg);
    border-left: 2px solid var(--pos-accent);
    transition: width 0.2s ease;
    overflow: hidden;
    z-index: 2;
}
.pos-quickactions.expanded { width: 210px; }

.pos-qa-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 9px;
    border-bottom: 1px solid var(--ap-border);
    min-height: 44px;
}
.pos-qa-toggle {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: none;
    background: var(--pos-accent);
    color: #fff;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.pos-qa-toggle:hover { background: var(--pos-accent-hover, #00b89e); }

.pos-qa-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pos-checkout-text, var(--ap-text));
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s;
}
.pos-quickactions.expanded .pos-qa-title { opacity: 1; }

.pos-qa-pin {
    margin-left: auto;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--ap-text-muted);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}
.pos-quickactions.expanded .pos-qa-pin { opacity: 1; }
.pos-qa-pin:hover { background: var(--ap-surface-muted); }
.pos-qa-pin.active { color: var(--pos-accent); }

.pos-qa-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    flex: 1;
}
.pos-qa-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: none;
    background: transparent;
    color: var(--pos-checkout-text, var(--ap-text));
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.pos-qa-btn:hover { background: rgba(0,212,170,0.12); }
.pos-qa-bon-laden { position: relative; }
.pos-qa-bon-laden .parkBonBadge {
    position: absolute;
    top: 2px;
    left: 30px;
    font-size: 0.6rem;
    min-width: 16px;
    padding: 2px 5px;
    z-index: 1;
}
.pos-qa-btn i {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
    color: var(--pos-accent);
}
.pos-qa-btn span:not(.parkBonBadge) {
    opacity: 0;
    transition: opacity 0.15s;
}
.pos-quickactions.expanded .pos-qa-header { padding: 8px 6px; }
.pos-quickactions.expanded .pos-qa-body { padding: 8px 6px; }
.pos-quickactions.expanded .pos-qa-btn { padding: 8px; }
.pos-quickactions.expanded .pos-qa-btn span:not(.parkBonBadge) { opacity: 1; }

.pos.pos-reversed .pos-quickactions {
    border-left: none;
    border-right: 2px solid var(--pos-accent);
}

/* ---- Search Bar ---- */
.pos-search {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.pos-search-field {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--ap-surface);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 0 1rem;
    gap: 0.6rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pos-search-field:focus-within {
    border-color: var(--pos-accent);
    box-shadow: 0 0 0 3px rgba(0,212,170,0.12);
}

.pos-search-field i {
    color: var(--ap-text-muted);
    font-size: 1.1rem;
}

.pos-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.65rem 0;
    font-size: 0.95rem;
    color: var(--ap-text);
    outline: none;
    font-family: var(--ap-font);
}

.pos-search-input::placeholder {
    color: var(--ap-text-muted);
}

/* ---- Grid ---- */
.pos-grid-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.pos-section { margin-bottom: 1.25rem; }
.pos-section-single { margin-bottom: 1rem; }

.pos-section-label {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ap-text);
    margin-bottom: 0.7rem;
    padding-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--ap-border);
}

.pos-section-label::after {
    content: '';
    flex: 1;
    height: 0;
}

.pos-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.65rem;
}

.pos-section-label-colored {
    border-radius: 10px 10px 0 0;
    padding: 0.35rem 0.75rem;
    border-bottom: none;
    margin-bottom: 0;
}

.pos-tiles-colored {
    border-radius: 0 0 14px 14px;
    padding: 0.75rem;
    margin-top: 0;
    border-top: none !important;
}

/* ---- Tile ---- */
.pos-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 88px;
    padding: 0.7rem 0.75rem;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-family: var(--ap-font);
    transition: transform 0.12s ease, box-shadow 0.18s ease;
    box-shadow: var(--pos-tile-shadow), 0 0 0 1px rgba(0,0,0,0.03);
    overflow: hidden;
    text-align: left;
    background: var(--pos-tile-bg);
    color: var(--ap-text);
}

.pos-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--pos-accent);
    border-radius: 14px 14px 0 0;
}

.pos-tile:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 28px rgba(0,0,0,0.10), 0 0 0 1px rgba(0,0,0,0.03);
}

.pos-tile:active {
    transform: scale(0.96);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    transition-duration: 0.06s;
}

.pos-tile img {
    max-width: 40px;
    max-height: 40px;
    display: block;
    margin: 0 auto 4px;
}

.pos-tile-name {
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    word-break: break-word;
}

.pos-tile-price {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pos-accent);
    margin-top: auto;
    padding-top: 2px;
}

/* Tiles mit Custom-Farbe: Text immer lesbar */
.pos-tile[style] .pos-tile-price { color: currentColor; opacity: 0.75; }
.pos-tile[style]::before { background: currentColor; opacity: 0.2; }

/* Belegzahlung */
.pos-tile-belegzahlung {
    border: 2px dashed rgba(91,127,255,0.35) !important;
    background: rgba(91,127,255,0.03);
    color: var(--pos-accent-blue);
    box-shadow: none;
}

.pos-tile-belegzahlung::before { background: var(--pos-accent-blue); }

.pos-tile-belegzahlung .pos-tile-price {
    color: var(--pos-accent-blue);
    opacity: 0.5;
}

.pos-tile-belegzahlung:hover {
    border-color: var(--pos-accent-blue) !important;
    background: rgba(91,127,255,0.07);
    box-shadow: 0 4px 16px rgba(91,127,255,0.12);
}

/* ---- Checkout Panel ---- */
.pos-checkout-head {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--pos-checkout-border);
}

.pos-checkout-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pos-checkout-title i { color: var(--pos-checkout-text); }

.pos-checkout-meta {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Cart */
.pos-cart {
    flex: 1;
    overflow-y: auto;
    min-height: 180px;
}

.pos-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.pos-cart-table thead th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pos-checkout-muted);
    padding: 0.55rem 0.5rem;
    border-bottom: 1px solid var(--pos-checkout-border);
    position: sticky;
    top: 0;
    background: var(--pos-checkout-bg);
    z-index: 1;
}

.pos-cart-table td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--pos-checkout-border);
    font-size: 0.95rem;
    vertical-align: middle;
    color: var(--pos-checkout-text);
}

.pos-cart-table .text-end { text-align: right; color: #212529; }
[data-bs-theme="dark"] .pos-cart-table .text-end { color: #e8eaed; }
.pos-cart-table .text-center { text-align: center; }

.pos-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--pos-checkout-muted);
    opacity: 0.4;
    gap: 0.75rem;
}

.pos-cart-empty i { font-size: 2.5rem; }
.pos-cart-empty span { font-size: 0.85rem; font-weight: 500; }

/* Footer */
.pos-checkout-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--pos-checkout-border);
    background: rgba(0,0,0,0.03);
}
[data-bs-theme="dark"] .pos-checkout-footer {
    background: rgba(0,0,0,0.15);
}

/* Rabatt */
.pos-rabatt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    color: var(--pos-checkout-muted);
}

.pos-rabatt-input {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.pos-rabatt-input input {
    width: 65px;
    text-align: right;
    background: var(--pos-checkout-input-bg);
    border: 1px solid var(--pos-checkout-input-border);
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
    color: var(--pos-checkout-text);
    outline: none;
    font-family: var(--ap-font);
}

.pos-rabatt-input input:focus {
    border-color: var(--pos-accent);
    box-shadow: 0 0 0 2px rgba(0,212,170,0.15);
}

.pos-rabatt-input > span {
    color: var(--pos-checkout-muted);
    font-weight: 600;
}

/* Total */
.pos-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,212,170,0.06);
    border: 1px solid rgba(0,212,170,0.12);
    border-radius: 14px;
    padding: 0.9rem 1.15rem;
    margin-bottom: 0.85rem;
}

.pos-total-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--pos-checkout-text);
    opacity: 0.6;
}

.pos-total-amount {
    font-family: var(--ap-font);
    font-size: 2.4rem;
    font-weight: 800;
    color: #212529;
    letter-spacing: -1px;
    line-height: 1;
}
[data-bs-theme="dark"] .pos-total-amount { color: #e8eaed; }

/* Payment */
.pos-pay {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.pos-pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    border-radius: 12px;
    font-family: var(--ap-font);
    font-size: 1.05rem;
    font-weight: 700;
    min-height: 56px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #fff;
}

.pos-pay-bar {
    flex: 1;
    background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
    box-shadow: 0 4px 16px rgba(0,212,170,0.3);
}

.pos-pay-bar:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,212,170,0.4);
}

.pos-pay-bar:disabled { opacity: 0.2; box-shadow: none; cursor: default; }

.pos-pay-karte {
    flex: 1;
    background: linear-gradient(135deg, #5b7fff 0%, #4f6df5 100%);
    box-shadow: 0 4px 16px rgba(91,127,255,0.3);
}

.pos-pay-karte:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(91,127,255,0.4);
}

.pos-pay-karte:disabled { opacity: 0.2; box-shadow: none; cursor: default; }

.pos-pay-gemischt {
    flex: 1;
    background: linear-gradient(135deg, #ff9f43 0%, #ee5a24 100%);
    box-shadow: 0 4px 16px rgba(255,159,67,0.3);
}

.pos-pay-gemischt:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,159,67,0.4);
}

.pos-pay-gemischt:disabled { opacity: 0.2; box-shadow: none; cursor: default; }

.pos-pay-clear {
    width: 56px;
    flex-shrink: 0;
    background: transparent;
    border: 2px solid rgba(255,107,107,0.35);
    color: var(--pos-accent-red);
}

.pos-pay-clear:hover {
    background: var(--pos-accent-red);
    border-color: var(--pos-accent-red);
    color: #fff;
}

/* Retourgeld Numpad */
.retourgeld-numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 280px;
    margin: 0 auto;
}

.retourgeld-numpad button {
    height: 56px;
    font-size: 1.3rem;
    font-weight: 600;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s;
}

.retourgeld-numpad button:hover,
.retourgeld-numpad button:active {
    background: var(--bs-secondary-bg);
}

/* Euro-Schein Schnelltasten */
.euro-scheine {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
}

.euro-scheine button {
    flex: 1 1 auto;
    min-width: 48px;
    height: 40px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.euro-scheine button:hover,
.euro-scheine button:active {
    background: var(--bs-secondary-bg);
}

/* Nullbeleg */
.pos-nullbeleg-btn {
    width: 100%;
    background: transparent;
    border: 1px dashed var(--pos-checkout-border);
    border-radius: 8px;
    color: var(--pos-checkout-muted);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.45rem;
    cursor: pointer;
    font-family: var(--ap-font);
    transition: all 0.15s ease;
}

.pos-nullbeleg-btn:hover {
    border-color: var(--pos-accent-amber);
    color: var(--pos-accent-amber);
}

/* ---- Checkout inner overrides ---- */
.pos-checkout .menge-btn {
    min-width: 30px;
    min-height: 30px;
    font-size: 1rem;
    font-weight: 700;
    padding: 0;
    line-height: 1;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pos-checkout-input-bg);
    border: 1px solid var(--pos-checkout-input-border);
    color: var(--pos-checkout-text);
    cursor: pointer;
    transition: background 0.1s;
}

.pos-checkout .menge-btn:hover {
    background: var(--pos-checkout-hover);
    border-color: var(--pos-accent);
}

.pos-checkout .kasse-rabatt-row {
    background: rgba(255,179,71,0.08) !important;
}

.pos-checkout .kasse-rabatt-row td {
    color: var(--pos-accent-amber) !important;
}

.pos-checkout .badge.bg-secondary {
    background: var(--pos-checkout-input-bg) !important;
    color: var(--pos-checkout-muted);
}

.pos-checkout .btn-outline-danger {
    border-color: rgba(255,107,107,0.3);
    color: var(--pos-accent-red);
    background: transparent;
}

.pos-checkout .btn-outline-danger:hover {
    background: rgba(255,107,107,0.15);
}

.pos-checkout .btn-outline-secondary {
    border-color: var(--pos-checkout-input-border);
    color: var(--pos-checkout-muted);
    background: transparent;
}

.pos-checkout .btn-outline-secondary:hover {
    background: var(--pos-checkout-hover);
    color: var(--pos-checkout-text);
}

.pos-checkout .form-control,
.pos-checkout .form-select {
    background: var(--pos-checkout-input-bg);
    border-color: var(--pos-checkout-input-border);
    color: var(--pos-checkout-text);
    font-size: 0.82rem;
}

.pos-checkout .form-control:focus,
.pos-checkout .form-select:focus {
    background: var(--pos-checkout-hover);
    border-color: var(--pos-accent);
    box-shadow: 0 0 0 2px rgba(0,212,170,0.15);
    color: var(--pos-checkout-text);
}

.pos-checkout .form-control::placeholder {
    color: var(--pos-checkout-muted);
}

.pos-checkout .form-select option {
    background: var(--pos-checkout-bg);
    color: var(--pos-checkout-text);
}

.pos-checkout .text-muted {
    color: var(--pos-checkout-muted) !important;
}

/* Navbar Bediener-Link (klickbar zum Ändern) */
.nav-bediener-link {
    cursor: pointer;
    transition: opacity 0.2s;
}
.nav-bediener-link:hover {
    opacity: 0.8;
}

/* Settings dropdown */
.pos-settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 2px solid transparent;
    background: var(--ap-surface);
    color: var(--ap-text-muted);
    cursor: pointer;
    font-size: 1.15rem;
    transition: border-color 0.2s, box-shadow 0.2s, color 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.pos-settings-btn:hover,
.pos-settings-btn.show {
    border-color: var(--pos-accent);
    box-shadow: 0 0 0 3px rgba(0,212,170,0.12);
    color: var(--pos-accent);
}
.pos-settings-menu {
    min-width: 260px;
    padding: 0.75rem;
    border-radius: 14px;
    border: 1px solid var(--ap-border);
    background: var(--ap-surface);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}
.pos-settings-menu .form-check-label {
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
}
.pos-settings-menu .form-check-input:checked {
    background-color: var(--pos-accent);
    border-color: var(--pos-accent);
}

/* Clear button for light mode */
.pos-pay-clear {
    border: 2px solid rgba(255,107,107,0.35);
    color: var(--pos-accent-red);
}

/* POS Responsive */
@media (max-width: 991.98px) {
    .pos, .pos.pos-reversed {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    .pos-checkout { width: 100%; border-left: none; border-right: none; border-top: 2px solid var(--pos-accent); box-shadow: 0 -4px 24px rgba(0,212,170,0.08); }
    .pos.pos-reversed .pos-checkout { border-left: none; border-right: none; border-top: 2px solid var(--pos-accent); box-shadow: 0 -4px 24px rgba(0,212,170,0.08); }
    .pos-products { max-height: 50vh; }
    .pos-quickactions { width: 100%; flex-direction: row; border-left: none; border-top: 1px solid var(--pos-accent); }
    .pos-quickactions.expanded { width: 100%; }
    .pos-qa-header { border-bottom: none; border-right: 1px solid var(--ap-border); }
    .pos-qa-body { flex-direction: row; overflow-x: auto; }
    .pos.pos-reversed .pos-quickactions { border-right: none; border-top: 1px solid var(--pos-accent); }
    .pos-total-amount { font-size: 1.8rem; }
    .pos-tiles {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}

@media (max-width: 575px) {
    .pos-pay { flex-wrap: wrap; }
    .pos-pay-gemischt { flex-basis: 100%; order: -1; }
}

@media (pointer: coarse) {
    .pos-tile {
        min-height: 92px;
        font-size: 0.9rem;
    }
    .pos-pay-btn {
        min-height: 60px;
        font-size: 1.1rem;
    }
    .pos-search-input {
        padding: 0.75rem 0;
        font-size: 1rem;
    }
    .pos-checkout .menge-btn {
        min-width: 38px;
        min-height: 38px;
        font-size: 1.1rem;
    }
}

/* ================================================================
   SUNMI-MODUS (720x1440 Portrait)
   ================================================================ */

/* Kompakte Navbar */
body.sunmi-device .navbar {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
    min-height: 40px;
}
body.sunmi-device .navbar .navbar-brand { font-size: 0.85rem; }
body.sunmi-device .navbar .nav-link { font-size: 0.8rem; padding: 0.25rem 0.5rem; }

/* Tab-Leiste */
.pos-sunmi-tabs {
    display: flex;
    background: var(--pos-checkout-bg);
    border-bottom: 2px solid var(--pos-accent);
    padding: 0 0.5rem;
}

.pos-sunmi-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem;
    border: none;
    background: transparent;
    color: var(--pos-checkout-muted);
    font-size: 1.9rem;
    font-weight: 600;
    font-family: var(--ap-font);
    cursor: pointer;
    position: relative;
    transition: color 0.15s;
}

.pos-sunmi-tab.active {
    color: var(--pos-accent);
}

.pos-sunmi-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--pos-accent);
    border-radius: 3px 3px 0 0;
}

.pos-sunmi-tab-badge {
    background: var(--pos-accent-red);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* POS-Container im Sunmi-Modus */
.pos-sunmi {
    flex-direction: column;
    height: calc(100vh - 40px - 44px);
}

.pos-sunmi .pos-products {
    flex: 1;
    max-height: none;
    padding: 0.75rem;
    position: relative;
}

.pos-sunmi .pos-checkout {
    width: 100%;
    flex: 1;
    border-left: none;
    border-top: none;
    box-shadow: none;
}

/* EAN-Scanner ausblenden */
.pos-sunmi .pos-search .pos-search-field:first-child { display: none; }

/* Groessere Tiles fuer 720px Breite */
.pos-sunmi .pos-tiles {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.6rem;
}

.pos-sunmi .pos-tile {
    min-height: 140px;
    padding: 0.8rem 0.75rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 0.3rem;
}

.pos-sunmi .pos-tile::before { height: 3px; }
.pos-sunmi .pos-tile-name { font-size: 1.6rem; }
.pos-sunmi .pos-tile-price { font-size: 1.5rem; margin-top: 0 !important; }

/* Kompaktere Suche */
.pos-sunmi .pos-search { margin-bottom: 0.5rem; }
.pos-sunmi .pos-search-input { padding: 0.45rem 0; font-size: 0.88rem; }

/* Kompaktere Sections */
.pos-sunmi .pos-section { margin-bottom: 0.6rem; }
.pos-sunmi .pos-section-label { font-size: 1.3rem; margin-bottom: 0.5rem; }

/* Quick Actions verstecken */
.pos-sunmi .pos-quickactions { display: none; }

/* Checkout kompakter */
.pos-sunmi .pos-checkout-head { padding: 0.6rem 0.85rem; }
.pos-sunmi .pos-checkout-title { font-size: 1.9rem; margin-bottom: 0.3rem; }
.pos-sunmi .pos-cart-table td { font-size: 1.7rem; padding: 0.6rem 0.5rem; }
.pos-sunmi .pos-checkout-footer { padding: 0.6rem 0.85rem; }
.pos-sunmi .pos-total { padding: 0.6rem 0.85rem; }
.pos-sunmi .pos-total-amount { font-size: 3.6rem; }
.pos-sunmi .pos-pay-btn { min-height: 64px; font-size: 1.9rem; }

/* ================================================================
   HANDY-ANPASSUNGEN fuer Sunmi-Layout (< 768px)
   Tabs, Tiles, Floating-Bar fuer kleine Screens optimiert
   ================================================================ */

@media (max-width: 767.98px) {
    /* Container: kein horizontales Scrollen */
    .pos-sunmi { overflow: hidden; }

    /* Tabs: kompakt, klar als Buttons erkennbar, kein Abschneiden */
    .pos-sunmi-tabs { padding: 0; overflow: hidden; }
    .pos-sunmi-tab {
        font-size: 1rem; padding: 0.6rem 0.4rem; gap: 0.3rem;
        overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    }
    .pos-sunmi-tab i { font-size: 1.1rem; }
    .pos-sunmi-tab-badge { font-size: 0.65rem; min-width: 16px; height: 16px; }

    /* POS-Hoehe: Navbar + Tabs + Floating-Bar beruecksichtigen */
    .pos-sunmi { height: calc(100vh - 56px - 42px); }

    /* Tiles: fuer Handy-Breite */
    .pos-sunmi .pos-tiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.4rem; }
    .pos-sunmi .pos-tile { min-height: 80px; padding: 0.5rem; border-radius: 10px; }
    .pos-sunmi .pos-tile-name { font-size: 0.9rem; }
    .pos-sunmi .pos-tile-price { font-size: 0.85rem; }

    /* Sektionen */
    .pos-sunmi .pos-section { margin-bottom: 0.4rem; }
    .pos-sunmi .pos-section-label { font-size: 0.9rem; margin-bottom: 0.3rem; }

    /* Checkout: kompakt damit Buttons sichtbar sind ohne Scrollen */
    .pos-sunmi .pos-checkout-head { padding: 0.4rem 0.75rem; }
    .pos-sunmi .pos-checkout-title { font-size: 1.1rem; margin-bottom: 0.2rem; }
    .pos-sunmi .pos-cart-table td { font-size: 0.9rem; padding: 0.4rem 0.35rem; }
    .pos-sunmi .pos-checkout-footer { padding: 0.4rem 0.75rem; }
    .pos-sunmi .pos-total { padding: 0.5rem 0.75rem; }
    .pos-sunmi .pos-total-amount { font-size: 1.8rem; }
    .pos-sunmi .pos-pay-btn { min-height: 48px; font-size: 1.1rem; }
    .pos-sunmi .pos-pay { gap: 0.4rem; }

    /* Floating-Bar: ueber der Bottom-Nav positionieren */
    .pos-sunmi-floating { bottom: 0; padding: 0.6rem 0.75rem; }
    .pos-sunmi-floating-info span:first-child { font-size: 0.8rem; }
    .pos-sunmi-floating-info span:last-child { font-size: 1.3rem; }
    .pos-sunmi-floating-btn { font-size: 0.95rem; padding: 0.6rem 0.9rem; border-radius: 10px; }
    .pos-sunmi-floating-actions { gap: 0.4rem; }

    /* Products-Bereich: Platz fuer Floating-Bar unten lassen */
    .pos-sunmi .pos-products { padding-bottom: 70px; }

    /* Suche: kompakter */
    .pos-sunmi .pos-search { margin-bottom: 0.3rem; }
    .pos-sunmi .pos-search-input { padding: 0.35rem 0; font-size: 0.85rem; }
}

/* Floating Bar */
.pos-sunmi-floating {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    background: var(--pos-checkout-bg);
    border-top: 3px solid var(--pos-accent);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
    z-index: 10;
}

.pos-sunmi-floating-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.pos-sunmi-floating-info span:first-child {
    font-size: 1.1rem;
    color: var(--pos-checkout-muted);
}

.pos-sunmi-floating-info span:last-child {
    font-size: 2rem;
    font-weight: 800;
    color: var(--pos-checkout-text);
}

.pos-sunmi-floating-actions {
    display: flex;
    gap: 0.6rem;
}

.pos-sunmi-floating-btn {
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ================================================================
   FARB-SWATCHES (Artikelformular)
   ================================================================ */
.farb-swatch {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 2px solid rgba(0,0,0,0.12);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.1s, box-shadow 0.1s;
}
.farb-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.farb-swatch-active {
    border-color: var(--bs-primary, #0d6efd) !important;
    box-shadow: 0 0 0 2px var(--bs-primary, #0d6efd);
}
[data-bs-theme="dark"] .farb-swatch {
    border-color: rgba(255,255,255,0.2);
}

/* ================================================================
   NUMPAD POPUP
   ================================================================ */

.numpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 260px;
    margin: 0 auto;
}

.numpad-btn {
    width: 100%;
    height: 58px;
    font-family: var(--ap-font);
    font-size: 1.35rem;
    font-weight: 700;
    border-radius: var(--ap-radius-sm);
    border: 1px solid var(--ap-border);
    background: var(--ap-surface);
    color: var(--ap-text);
    transition: all 0.1s ease;
}

.numpad-btn:hover {
    background: var(--ap-surface-hover);
    border-color: var(--ap-blue);
    color: var(--ap-blue);
}

.numpad-btn:active {
    transform: scale(0.95);
    background: var(--ap-surface-muted);
}

.numpad-btn-delete {
    background: transparent;
    border-color: rgba(231,76,94,0.3);
    color: var(--ap-red);
}

.numpad-btn-delete:hover {
    background: rgba(231,76,94,0.06);
    border-color: var(--ap-red);
}

/* Numpad Display */
.numpad-display {
    font-family: var(--ap-font);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: right;
    border: 2px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    padding: 0.6rem 1rem;
    background: var(--ap-surface-muted);
    color: var(--ap-text);
    letter-spacing: -0.5px;
    transition: border-color var(--ap-transition);
}

.numpad-display:focus {
    border-color: var(--ap-blue);
    background: var(--ap-surface);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79,109,245,0.12);
}

/* Numpad Modal */
.numpad-modal .modal-content {
    border-radius: var(--ap-radius);
    border: 1px solid var(--ap-border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.numpad-modal .modal-header {
    border: none;
    padding: 1rem 1.2rem 0;
}

.numpad-modal .modal-body {
    padding: 0.8rem 1.2rem;
}

.numpad-modal .modal-footer {
    border: none;
    padding: 0 1.2rem 1rem;
    gap: 0.5rem;
}

.numpad-modal .modal-footer .btn {
    border-radius: var(--ap-radius-sm);
    font-weight: 600;
    flex: 1;
    padding: 0.6rem;
}

.numpad-confirm-btn {
    background: var(--ap-blue);
    border: none;
    color: #fff;
}

.numpad-confirm-btn:hover {
    background: var(--ap-blue-hover);
    color: #fff;
}

.numpad-grid-sm {
    max-width: 180px;
}

.numpad-grid-sm .numpad-btn {
    height: 42px;
    font-size: 1.1rem;
}

/* ================================================================
   VIRTUELLE TASTATUR
   ================================================================ */

.vkb-display {
    font-family: var(--ap-font);
    font-size: 1.4rem;
    font-weight: 600;
    border: 2px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    padding: 0.6rem 1rem;
    background: var(--ap-surface-muted);
    color: var(--ap-text);
    transition: border-color var(--ap-transition);
}

.vkb-display:focus {
    border-color: var(--ap-blue);
    background: var(--ap-surface);
    outline: none;
    box-shadow: 0 0 0 3px rgba(79,109,245,0.12);
}

.vkb-keys {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 680px;
    margin: 0 auto;
}

.vkb-row {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.vkb-key {
    flex: 1;
    max-width: 56px;
    height: 50px;
    font-family: var(--ap-font);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid var(--ap-border);
    background: var(--ap-surface);
    color: var(--ap-text);
    transition: all 0.08s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vkb-key:hover {
    background: var(--ap-surface-hover);
    border-color: var(--ap-blue);
    color: var(--ap-blue);
}

.vkb-key:active {
    transform: scale(0.93);
    background: var(--ap-surface-muted);
}

.vkb-key-space {
    flex: 4;
    max-width: 240px;
}

.vkb-key-action {
    flex: 1.3;
    max-width: 72px;
    font-size: 1rem;
    background: var(--ap-surface-muted);
}

.vkb-key-action.active {
    background: var(--ap-blue);
    color: #fff;
    border-color: var(--ap-blue);
}

.vkb-key-ok {
    flex: 1.5;
    max-width: 80px;
    background: var(--ap-blue);
    color: #fff;
    border-color: var(--ap-blue);
    font-weight: 700;
}

.vkb-key-ok:hover {
    background: var(--ap-blue-hover);
    color: #fff;
}

#vkbModal .modal-content {
    border-radius: var(--ap-radius);
    border: 1px solid var(--ap-border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

#vkbModal .modal-header { border: none; padding: 1rem 1.2rem 0; }
#vkbModal .modal-body { padding: 0.8rem 1.2rem; }
#vkbModal .modal-footer { border: none; padding: 0 1.2rem 1rem; gap: 0.5rem; }
#vkbModal .modal-footer .btn { border-radius: var(--ap-radius-sm); font-weight: 600; flex: 1; padding: 0.6rem; }

/* ================================================================
   TOUCH-PANEL (Fixed-Position — außerhalb Modal-Flow)
   ================================================================ */

/* Wrapper: position:fixed → kein Reflow, kein Scrollbalken-Flicker */
.touch-panel-wrapper {
    position: fixed;
    z-index: 1060;
    /* width / left / top / bottom werden per JS inline gesetzt */
}

/* Panel-Basis */
.touch-panel {
    background: var(--ap-surface-muted);
    border-top: 2px solid var(--ap-blue);
    padding: 0.5rem 0 0.75rem;
}

/* ---- Side-Mode: Tastatur rechts neben dem Modal ---- */
.touch-panel-wrapper.side-mode .touch-panel {
    transform: translateX(40px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--ap-radius-sm);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.touch-panel-wrapper.side-mode.open .touch-panel {
    transform: translateX(0);
    opacity: 1;
}

/* ---- Below-Mode: Fallback — Tastatur am unteren Viewport-Rand ---- */
.touch-panel-wrapper.below-mode .touch-panel {
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.touch-panel-wrapper.below-mode.open .touch-panel {
    transform: translateY(0);
}

.touch-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0.75rem 0.4rem;
}

.touch-panel-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.touch-panel-close {
    background: none;
    border: none;
    color: var(--bs-secondary-color, #6c757d);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.15rem 0.4rem;
    border-radius: var(--ap-radius-sm);
    transition: all 0.15s;
    line-height: 1;
}

.touch-panel-close:hover {
    background: var(--ap-surface-hover);
    color: var(--ap-red);
}

.touch-panel-display {
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: right;
    border: 2px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    padding: 0.4rem 0.7rem;
    background: var(--ap-surface);
    color: var(--bs-body-color, #212529);
    width: 100%;
    margin-bottom: 0.5rem;
    transition: border-color 0.2s;
    outline: none;
}

.touch-panel-display:focus {
    border-color: var(--ap-blue);
    box-shadow: 0 0 0 3px rgba(79,109,245,0.12);
}

.touch-panel .numpad-grid {
    max-width: 100%;
    gap: 6px;
    padding: 0 0.5rem;
}

.touch-panel .numpad-btn {
    height: 68px;
    font-size: 1.5rem;
}

.touch-panel .vkb-keys {
    max-width: 100%;
    padding: 0 0.5rem;
}

.touch-panel .vkb-key {
    height: 50px;
    font-size: 1.05rem;
}

.touch-panel-ok {
    width: calc(100% - 1rem);
    margin: 0.4rem 0.5rem 0;
    padding: 0.55rem;
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--ap-radius-sm);
    background: var(--ap-blue);
    border: 2px solid var(--ap-blue);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}

.touch-panel-ok:hover {
    background: var(--ap-blue-hover);
    border-color: var(--ap-blue-hover);
}

/* ================================================================
   TOUCH/TABLET OPTIMIERUNG
   ================================================================ */

@media (pointer: coarse) {

    .touch-btn {
        min-height: 50px;
        padding: 0.6rem 1rem;
        font-size: 1rem;
    }

    .touch-btn-sm {
        min-height: 40px;
        min-width: 40px;
        padding: 0.4rem 0.6rem;
    }

    .touch-input {
        min-height: 46px;
        font-size: 1rem;
    }

    .numpad-grid-sm .numpad-btn {
        height: 50px;
        font-size: 1.25rem;
    }

    .menge-btn {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.4rem;
    }

    .navbar-nav .nav-link {
        padding: 0.6rem 0.8rem;
    }

    .btn-sm {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }

    .form-control, .form-select {
        min-height: 46px;
    }

    .table td, .table th {
        padding: 0.6rem 0.5rem;
    }
}



/* ================================================================
   PORTAL POPUP (Alert/Confirm)
   ================================================================ */

#portalPopup .modal-content {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--ap-border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}

.portal-popup-header {
    border-bottom-width: 3px;
    border-bottom-style: solid;
    padding: 1rem 1.25rem;
}

.portal-popup-header .modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}

#portalPopupIcon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

#portalPopupMessage {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--ap-text);
}

#portalPopupFooter {
    border-top: 1px solid var(--ap-border);
    padding: 0.75rem 1.25rem;
    gap: 0.5rem;
}

.portal-popup-btn {
    border-radius: var(--ap-radius-sm);
    font-weight: 600;
    padding: 0.55rem 1.5rem;
    min-width: 100px;
    font-family: var(--ap-font);
}

@media (pointer: coarse) {
    .portal-popup-btn {
        min-height: 48px;
        font-size: 1rem;
        padding: 0.65rem 1.5rem;
    }
}

/* ================================================================
   PRINT STYLES
   ================================================================ */

.bon-print-wrapper {
    display: none;
}

@media print {
    body.printing-bon {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    body.printing-bon > *:not(.bon-print-wrapper) {
        display: none !important;
    }

    body.printing-bon .bon-print-wrapper {
        display: block !important;
        width: 80mm;
        padding: 0;
        margin: 0;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        font-weight: 700;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color: #000;
    }

    body.printing-bon .bon-print-wrapper .bon-header { text-align: center; margin-bottom: 8px; }
    body.printing-bon .bon-print-wrapper .bon-firma { font-weight: 900; font-size: 18px; }
    body.printing-bon .bon-print-wrapper .bon-divider { border-top: 2px dashed #000; margin: 6px 0; }
    body.printing-bon .bon-print-wrapper .bon-divider-double { border-top: 3px double #000; margin: 6px 0; }
    body.printing-bon .bon-print-wrapper .bon-pos-name { font-weight: 900; }
    body.printing-bon .bon-print-wrapper .bon-summe { font-size: 16px; font-weight: 900; }
    body.printing-bon .bon-print-wrapper .d-flex { display: flex !important; }
    body.printing-bon .bon-print-wrapper .justify-content-between { justify-content: space-between; }
    body.printing-bon .bon-print-wrapper .text-center { text-align: center; }
    body.printing-bon .bon-print-wrapper .small { font-size: 12px; }
    body.printing-bon .bon-print-wrapper .bon-mwst-header { border-bottom: 1px solid #000; }
    body.printing-bon .bon-print-wrapper .bon-qr-data { font-size: 12px; word-break: break-all; }
    body.printing-bon .bon-print-wrapper .text-muted { color: #000 !important; }
    body.printing-bon .bon-print-wrapper .d-none { display: none !important; }
    body.printing-bon .bon-print-wrapper img { display: block; margin: 0 auto; }
    body.printing-bon .bon-print-wrapper .bon-zusatz { font-size: 12px; font-weight: 700; word-wrap: break-word; overflow-wrap: break-word; }
}

/* ================================================================
   ONLINE-TERMINBUCHUNG
   ================================================================ */

.booking-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.booking-header {
    text-align: center;
    margin-bottom: 2rem;
}

.booking-header h1 {
    font-weight: 700;
    font-size: 1.8rem;
}

.terminart-card {
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    border-radius: var(--ap-radius-sm);
}

.terminart-card:hover {
    border-color: var(--ap-blue);
    transform: translateY(-2px);
    box-shadow: var(--ap-shadow-hover);
}

.terminart-card.selected {
    border-color: var(--ap-blue);
    background: rgba(79,109,245,0.05);
}

.slot-btn {
    min-width: 100px;
    margin: 4px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.15s;
}

.slot-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.slot-btn.selected {
    background: var(--ap-blue) !important;
    color: #fff !important;
    border-color: var(--ap-blue) !important;
}

.slot-btn:disabled {
    opacity: 0.35;
}

/* ================================================================
   WOCHENKALENDER
   ================================================================ */

.week-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.week-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.week-day-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    overflow: hidden;
    background: var(--ap-surface);
}

.week-day-column.week-day-past {
    opacity: 0.4;
    pointer-events: none;
}

.week-day-column.week-day-today {
    border-color: var(--ap-blue);
    box-shadow: 0 0 0 1px var(--ap-blue);
}

.week-day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 0.25rem;
    background: var(--ap-surface-muted);
    border-bottom: 1px solid var(--ap-border);
    gap: 2px;
}

.week-day-header.today {
    background: rgba(79,109,245,0.08);
}

.week-day-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--ap-text);
}

.week-day-date {
    font-size: 0.75rem;
    color: var(--ap-text-muted);
}

.week-day-slots {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.4rem 0.25rem;
    gap: 4px;
    min-height: 60px;
}

.week-day-closed {
    font-size: 0.78rem;
    color: var(--ap-text-muted);
    text-align: center;
    padding: 0.75rem 0;
}

.slot-btn-week {
    min-width: unset;
    width: 100%;
    margin: 0;
    font-size: 0.8rem;
    padding: 0.3rem 0.25rem;
}

/* Mobile week calendar */
.week-calendar-mobile {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.week-mobile-day {
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    overflow: hidden;
    background: var(--ap-surface);
}

.week-mobile-day.week-day-today {
    border-color: var(--ap-blue);
}

.week-mobile-day.week-mobile-closed {
    opacity: 0.6;
}

.week-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.75rem;
    cursor: pointer;
    transition: background 0.15s;
}

.week-mobile-header:hover {
    background: var(--ap-surface-hover);
}

.week-mobile-closed .week-mobile-header {
    cursor: default;
}

.week-mobile-slots {
    display: flex;
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem 0.75rem;
    gap: 4px;
    border-top: 1px solid var(--ap-border);
}

/* ================================================================
   TAGESANSICHT
   ================================================================ */

.day-view-container {
    max-width: 600px;
    margin: 0 auto;
}

/* ================================================================
   ADMIN WOCHENKALENDER – Terminkarten
   ================================================================ */

.admin-week-termin {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border-radius: var(--ap-radius-sm);
    border-left: 3px solid var(--ap-border);
    background: var(--ap-surface);
    cursor: pointer;
    transition: box-shadow 0.15s;
    font-size: 0.8rem;
}

.admin-week-termin:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.admin-week-termin .awt-time {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--ap-text);
}

.admin-week-termin .awt-kunde {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--ap-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-week-termin .awt-badge {
    margin-top: 2px;
}

.admin-week-termin .awt-detail {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--ap-border);
}

.admin-week-termin .awt-actions {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.awt-chevron {
    font-size: 0.7rem;
    color: var(--ap-text-muted);
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.awt-chevron-open {
    transform: rotate(180deg);
}

/* Status-Farben auf Terminkarten */
.awt-status-offen {
    border-left-color: #ffc107;
    background: rgba(255,193,7,0.12);
}

.awt-status-bestaetigt {
    border-left-color: #198754;
    background: rgba(25,135,84,0.10);
}

.awt-status-storniert {
    border-left-color: #dc3545;
    opacity: 0.6;
    background: rgba(220,53,69,0.08);
}

.awt-status-abgeschlossen {
    border-left-color: #6c757d;
    opacity: 0.7;
    background: rgba(108,117,125,0.08);
}

/* ================================================================
   TERMIN STATISTIK – Kompakte Inline-Chips
   ================================================================ */

.termin-stat-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    background: var(--ap-surface);
    font-size: 0.85rem;
}

.termin-stat-value {
    font-weight: 700;
    font-size: 1rem;
}

.termin-stat-label {
    color: var(--ap-text-muted);
    font-size: 0.8rem;
}

.termin-stat-link {
    text-decoration: none;
    color: var(--ap-text);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.termin-stat-link:hover {
    border-color: var(--ap-blue);
    box-shadow: 0 0 0 1px var(--ap-blue);
    color: var(--ap-text);
}

/* ================================================================
   ZEITSTRAHL – Tages- und Wochenansicht
   ================================================================ */

.zeitstrahl-scroll {
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    background: var(--ap-surface);
}

.zeitstrahl-container {
    position: relative;
    margin-left: 52px;
}

.zeitstrahl-hour {
    position: absolute;
    left: -52px;
    right: 0;
    height: 0;
    border-top: 1px solid var(--ap-border);
}

.zeitstrahl-hour-label {
    position: absolute;
    left: 0;
    top: -9px;
    font-size: 0.7rem;
    color: var(--ap-text-muted);
    width: 46px;
    text-align: right;
    padding-right: 6px;
    user-select: none;
}

.zeitstrahl-half-hour {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px dashed rgba(0,0,0,0.06);
}

.zeitstrahl-pause {
    position: absolute;
    left: 0;
    right: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 4px,
        rgba(0,0,0,0.04) 4px,
        rgba(0,0,0,0.04) 8px
    );
    z-index: 1;
    pointer-events: none;
    border-radius: 2px;
}

.zeitstrahl-now {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #dc3545;
    z-index: 10;
    pointer-events: none;
}

.zeitstrahl-now::before {
    content: '';
    position: absolute;
    left: -4px;
    top: -3px;
    width: 8px;
    height: 8px;
    background: #dc3545;
    border-radius: 50%;
}

.zeitstrahl-termin {
    position: absolute;
    left: 4px;
    right: 4px;
    z-index: 5;
    overflow: hidden;
    min-height: 24px;
    box-sizing: border-box;
}

.zeitstrahl-termin.zeitstrahl-expanded {
    overflow: visible;
    height: auto !important;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 1 !important;
    background: var(--ap-surface);
}

.zeitstrahl-termin-compact {
    padding: 2px 6px;
    font-size: 0.72rem;
}

.zeitstrahl-termin-compact .awt-time {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zeitstrahl-termin-compact .awt-chevron {
    position: absolute;
    top: 2px;
    right: 3px;
    font-size: 0.6rem;
}

.zeitstrahl-termin-compact .awt-kunde {
    font-size: 0.72rem;
}

.zeitstrahl-closed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: var(--ap-text-muted);
    font-size: 1rem;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    background: var(--ap-surface-muted);
}

/* Wochenansicht Zeitstrahl */

.week-zeitstrahl-scroll {
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    background: var(--ap-surface);
}

.week-zeitstrahl-wrapper {
    display: flex;
    min-width: 0;
}

.zeitstrahl-gutter {
    position: sticky;
    left: 0;
    width: 46px;
    min-width: 46px;
    flex-shrink: 0;
    background: var(--ap-surface);
    border-right: 1px solid var(--ap-border);
    z-index: 12;
    display: flex;
    flex-direction: column;
}

.zeitstrahl-gutter-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.4rem 0.2rem;
    background: var(--ap-surface);
    border-bottom: 1px solid var(--ap-border);
    position: sticky;
    top: 0;
    z-index: 12;
}

.zeitstrahl-gutter-body {
    position: relative;
}

.zeitstrahl-gutter-label {
    position: absolute;
    right: 6px;
    font-size: 0.68rem;
    color: var(--ap-text-muted);
    transform: translateY(-50%);
    user-select: none;
}

.week-zeitstrahl-columns {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    flex: 1;
    min-width: 0;
}

.week-zeitstrahl-col {
    border-right: 1px solid var(--ap-border);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.week-zeitstrahl-col:last-child {
    border-right: none;
}

.week-zeitstrahl-col.week-day-past {
    opacity: 0.4;
}

.week-zeitstrahl-col.week-day-today {
    background: rgba(79,109,245,0.02);
}

.week-zeitstrahl-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.4rem 0.2rem;
    background: var(--ap-surface-muted);
    border-bottom: 1px solid var(--ap-border);
    position: sticky;
    top: 0;
    z-index: 11;
}

.week-zeitstrahl-header.today {
    background: rgba(79,109,245,0.08);
}

.zeitstrahl-day-body {
    position: relative;
    min-width: 0;
}

.zeitstrahl-hour-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 0;
    border-top: 1px solid rgba(0,0,0,0.06);
    pointer-events: none;
}

.zeitstrahl-closed-overlay {
    position: absolute;
    inset: 0;
    background: var(--ap-surface-muted);
    opacity: 0.6;
    z-index: 1;
}

.zeitstrahl-outside {
    position: absolute;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.03);
    pointer-events: none;
    z-index: 1;
}

/* Mobile: Wochenansicht untereinander */
@@media (max-width: 767.98px) {
    .week-zeitstrahl-columns {
        grid-template-columns: 1fr;
    }

    .week-zeitstrahl-col {
        border-right: none;
        border-bottom: 1px solid var(--ap-border);
    }

    .zeitstrahl-gutter {
        display: none;
    }

    .day-view-container {
        max-width: none;
    }
}

/* ================================================================
   INFO-CENTER (Offcanvas)
   ================================================================ */

#infoPanel .offcanvas-header {
    background: var(--ap-surface-muted);
}

#infoPanel .nav-tabs {
    border-bottom: none;
}

#infoPanel .nav-tabs .nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--ap-text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.5rem 0.75rem;
}

#infoPanel .nav-tabs .nav-link.active {
    color: var(--ap-blue);
    border-bottom-color: var(--ap-blue);
    background: transparent;
}

.info-card {
    background: var(--ap-surface);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    padding: 0.85rem;
    transition: box-shadow var(--ap-transition);
}

.info-card:hover {
    box-shadow: var(--ap-shadow);
}

.info-card h6 {
    font-weight: 600;
    font-size: 0.9rem;
}

.info-card p {
    font-size: 0.82rem;
    line-height: 1.45;
}

.info-feedback-form textarea {
    border-radius: var(--ap-radius-sm);
}

#infoCenterBtn {
    position: relative;
}

#infoBadge {
    font-size: 0.5rem !important;
    padding: 0.2em 0.4em;
}

/* ================================================================
   HILFE-CENTER
   ================================================================ */

.hilfe-sidebar {
    width: 250px;
    min-height: calc(100vh - 80px);
    border-right: 1px solid #dee2e6;
    background: #fff;
    position: sticky;
    top: 0;
    align-self: flex-start;
}

.hilfe-sidebar-inner { padding: 1rem 0; }

.hilfe-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #495057;
    text-decoration: none;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    transition: background-color 0.15s, border-color 0.15s;
}

.hilfe-nav-link:hover { background-color: #f0f4ff; color: var(--ap-blue); }
.hilfe-nav-link.active { background-color: #e7f0ff; color: var(--ap-blue); font-weight: 600; border-left-color: var(--ap-blue); }
.hilfe-nav-link i { width: 1.2em; text-align: center; flex-shrink: 0; }

.hilfe-nav-group {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #adb5bd;
    padding: 0.75rem 1rem 0.25rem;
    margin-top: 0.25rem;
}

.hilfe-content { min-width: 0; padding: 0 1rem; }

.hilfe-search .input-group-text {
    background: var(--ap-surface);
    border-right: none;
}

.hilfe-search .form-control {
    border-left: none;
}

.hilfe-search .form-control:focus {
    box-shadow: none;
    border-color: var(--ap-blue);
}

.hilfe-search .form-control:focus + .btn,
.hilfe-search .form-control:focus ~ .input-group-text {
    border-color: var(--ap-blue);
}

.hilfe-kategorie-card {
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    transition: transform var(--ap-transition), box-shadow var(--ap-transition);
    cursor: pointer;
    background: var(--ap-surface);
}

.hilfe-kategorie-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ap-shadow-hover);
    border-color: var(--ap-blue);
}

.hilfe-kat-icon {
    font-size: 2rem;
    color: var(--ap-blue);
}

.hilfe-artikel-item {
    border-radius: var(--ap-radius-sm) !important;
    margin-bottom: 0.25rem;
    transition: background-color 0.15s;
}

.hilfe-artikel-inhalt {
    font-size: 0.95rem;
    line-height: 1.7;
}

.hilfe-artikel-inhalt h1,
.hilfe-artikel-inhalt h2,
.hilfe-artikel-inhalt h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.hilfe-artikel-inhalt img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ap-radius-sm);
    margin: 1rem 0;
}

.hilfe-artikel-inhalt code {
    background: var(--ap-surface-muted);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.88em;
}

.hilfe-artikel-inhalt pre {
    background: var(--ap-surface-muted);
    padding: 1rem;
    border-radius: var(--ap-radius-sm);
    overflow-x: auto;
}

.hilfe-artikel-inhalt table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.hilfe-artikel-inhalt table th,
.hilfe-artikel-inhalt table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--ap-border);
}

.hilfe-artikel-inhalt table th {
    background: var(--ap-surface-muted);
    font-weight: 600;
}

.hilfe-lang-toggle .btn {
    font-weight: 600;
    font-size: 0.8rem;
}

[data-bs-theme="dark"] .hilfe-sidebar { background: var(--ap-surface-muted); border-color: var(--ap-border); }
[data-bs-theme="dark"] .hilfe-nav-link { color: var(--ap-text-muted); }
[data-bs-theme="dark"] .hilfe-nav-link:hover { background-color: rgba(79,109,245,0.06); color: var(--ap-blue); }
[data-bs-theme="dark"] .hilfe-nav-link.active { background-color: rgba(79,109,245,0.1); color: var(--ap-blue); border-left-color: var(--ap-blue); }

/* ================================================================
   HILFE-SIDEBAR (Offcanvas)
   ================================================================ */

#hilfePanel .offcanvas-header { background: var(--ap-surface-muted); }
#hilfePanel .hilfe-artikel-inhalt h3 { font-size: 1.1rem; margin-top: 1.5rem; }
#hilfePanel .hilfe-artikel-inhalt ul,
#hilfePanel .hilfe-artikel-inhalt ol { padding-left: 1.25rem; }
#hilfePanel .hilfe-artikel-inhalt p { font-size: 0.92rem; line-height: 1.6; }
#hilfePinBtn { transition: all 0.15s; }

/* ================================================================
   SLOT-GRID (Neuer Termin Modal – Wochenansicht)
   ================================================================ */

.slot-grid {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
}

.slot-grid-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    min-width: 0;
}

.slot-grid-day {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-right: 1px solid var(--ap-border);
}

.slot-grid-day:last-child {
    border-right: none;
}

.slot-grid-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.4rem 0.2rem;
    background: var(--ap-surface-muted);
    border-bottom: 1px solid var(--ap-border);
    font-size: 0.78rem;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.slot-grid-header .slot-grid-date {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--ap-text-muted);
}

.slot-grid-header.today {
    background: rgba(79,109,245,0.1);
}

.slot-grid-slots {
    display: flex;
    flex-direction: column;
    padding: 2px;
    gap: 1px;
}

.slot-btn {
    display: block;
    width: 100%;
    border: none;
    padding: 0.15rem 0.2rem;
    font-size: 0.72rem;
    text-align: center;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    line-height: 1.3;
}

.slot-btn.available {
    background: rgba(25,135,84,0.08);
    color: var(--ap-text);
}

.slot-btn.available:hover {
    background: rgba(25,135,84,0.2);
}

.slot-btn.unavailable {
    background: transparent;
    color: var(--ap-text-muted);
    opacity: 0.35;
    cursor: default;
    text-decoration: line-through;
}

.slot-btn.selected {
    background: var(--ap-blue) !important;
    color: #fff !important;
    font-weight: 600;
    opacity: 1;
}

.slot-grid-closed {
    font-size: 0.72rem;
    color: var(--ap-text-muted);
    text-align: center;
    padding: 1rem 0.25rem;
}

.slot-grid-past .slot-grid-slots {
    opacity: 0.3;
    pointer-events: none;
}

.slot-grid-past .slot-grid-header {
    opacity: 1;
}

/* Kundensuche Autocomplete */
.kunde-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    background: var(--ap-surface);
    border: 1px solid var(--ap-border);
    border-top: none;
    border-radius: 0 0 var(--ap-radius-sm) var(--ap-radius-sm);
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.kunde-search-item {
    padding: 0.45rem 0.75rem;
    cursor: pointer;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--ap-border);
    transition: background 0.1s;
}

.kunde-search-item:last-child {
    border-bottom: none;
}

.kunde-search-item:hover {
    background: var(--ap-surface-hover);
}

.kunde-search-item .kunde-detail {
    font-size: 0.75rem;
    color: var(--ap-text-muted);
}

/* Paket-Badge Farben */
.bg-brown { background-color: #8B4513 !important; color: white; }
.bg-orange { background-color: #e67e22 !important; color: white; }

/* ================================================================
   MOBILE / PHONE RESPONSIVE
   Touch-First Ansatz inspiriert vom Sunmi-Modus:
   Grosse Fonts, grosse Touch-Targets, strategisches Spacing
   ================================================================ */

@media (max-width: 991.98px) {

    /* --- Layout: volle Breite nutzen --- */
    .container, .container-fluid { padding-left: 0.75rem; padding-right: 0.75rem; }
    main { padding: 0.75rem !important; }
    .api-sidebar { display: none !important; }

    /* --- Spalten: einspaltig auf Mobil --- */
    .row > .col-md-6,
    .row > .col-md-4,
    .row > .col-md-3,
    .row.g-2 > .col-auto,
    .row.g-3 > .col-auto { flex: 0 0 100%; max-width: 100%; }

    /* --- Typographie: lesbar, nicht winzig --- */
    h1, .h1 { font-size: 1.5rem; }
    h2, .h2 { font-size: 1.3rem; }
    h3, .h3 { font-size: 1.15rem; }

    /* --- Cards: Touch-freundlich --- */
    .card { border-radius: 12px; margin-bottom: 0.75rem; }
    .card-header { padding: 0.75rem 1rem; font-size: 1rem; font-weight: 600; }
    .card-body { padding: 1rem; }

    /* --- Tabellen: horizontal scrollbar, lesbar --- */
    .card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table:not(.pos-cart-table) { font-size: 0.95rem; }
    .table:not(.pos-cart-table) th { white-space: nowrap; font-size: 0.85rem; }
    .table:not(.pos-cart-table) td, .table:not(.pos-cart-table) th { padding: 0.6rem 0.5rem; }

    /* --- Buttons: grosse Touch-Targets (min 48px, wie Sunmi) --- */
    .btn { min-height: 44px; font-size: 1rem; padding: 0.5rem 1rem; }
    .btn-sm { min-height: 38px; font-size: 0.9rem; padding: 0.35rem 0.75rem; }
    .d-flex.gap-2 { flex-wrap: wrap; gap: 0.5rem !important; }
    .d-flex.gap-2 > .btn, .d-flex.gap-2 > a.btn { flex: 1 1 auto; text-align: center; }

    /* --- Formulare: Touch-freundliche Inputs (min 48px Hoehe) --- */
    .form-control, .form-select { min-height: 48px; font-size: 1rem; }
    .form-label { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.35rem; }
    .form-check-label { font-size: 0.95rem; }
    .form-check-input[type="checkbox"] { width: 2.5em; height: 1.25em; }
    .form-text { font-size: 0.85rem; }

    /* --- Submit-Buttons: prominent, volle Breite --- */
    form > button[type="submit"]:last-of-type,
    form > .btn-primary:last-of-type {
        width: 100%; min-height: 52px; font-size: 1.1rem; font-weight: 600;
        border-radius: 10px; margin-top: 0.5rem;
    }

    /* --- Dropdowns: fingerfreundlich --- */
    .dropdown-item { padding: 0.65rem 1rem; font-size: 1rem; }
    .dropdown-menu { border-radius: 12px; }

    /* --- Navbar: kompakt aber lesbar --- */
    .navbar { padding: 0.4rem 0.75rem; }
    .navbar-brand { font-size: 1rem !important; }
    .navbar-collapse { padding: 0.5rem 0; }
    .navbar-nav .nav-link { padding: 0.65rem 0.5rem; font-size: 1rem; }

    /* --- Alerts: lesbar --- */
    .alert { padding: 0.75rem 1rem; font-size: 0.95rem; border-radius: 10px; }

    /* --- Badges: lesbar --- */
    .badge { font-size: 0.8rem; padding: 0.35em 0.6em; }

    /* --- Offcanvas: volle Breite --- */
    .offcanvas { width: 100% !important; max-width: 100% !important; }
    #infoPanel, #hilfePanel { width: 100% !important; }

    /* --- Tabs: scrollbar, Touch-freundlich --- */
    .nav-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 0; }
    .nav-tabs .nav-link { white-space: nowrap; font-size: 1rem; padding: 0.6rem 1rem; min-height: 44px; }

    /* --- Pagination: Touch-Targets --- */
    .pagination .page-link { padding: 0.5rem 0.75rem; font-size: 0.95rem; min-width: 40px; text-align: center; }

    /* --- Modals: Bottom-Sheet Style --- */
    .modal-dialog:not(.modal-fullscreen) {
        margin: 0; max-width: 100%;
        position: fixed; bottom: 0; left: 0; right: 0;
    }
    .modal-dialog:not(.modal-fullscreen) .modal-content {
        border-radius: 16px 16px 0 0; border-bottom: none;
        max-height: 85vh; overflow-y: auto;
    }
    .modal.fade .modal-dialog:not(.modal-fullscreen) { transform: translateY(100%); transition: transform 0.3s ease; }
    .modal.show .modal-dialog:not(.modal-fullscreen) { transform: translateY(0); }
    .modal-header { padding: 1rem 1.25rem; }
    .modal-body { padding: 1rem 1.25rem; }
    .modal-footer { padding: 0.75rem 1.25rem; }
    .modal-footer .btn { min-height: 48px; flex: 1; font-size: 1rem; }

    /* --- Code-Tags --- */
    code { font-size: 0.85rem; }

    /* --- Body: Platz fuer Bottom-Nav (nur wenn vorhanden) --- */
    body:has(.bottom-nav) { padding-bottom: 60px; }
}

/* ================================================================
   BOTTOM NAVIGATION (Mobile App-Style)
   ================================================================ */

.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1040;
    display: flex;
    background: var(--ap-bg, #fff);
    border-top: 1px solid var(--ap-border, #dee2e6);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

[data-bs-theme="dark"] .bottom-nav {
    background: #1e1e2e;
    border-top-color: #2a2a3e;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.bottom-nav-item {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 6px 4px 8px;
    text-decoration: none;
    color: var(--ap-text-muted, #6c757d);
    font-size: 0.7rem; font-weight: 500;
    transition: color 0.15s, transform 0.15s;
    gap: 2px;
    min-height: 56px;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item i { font-size: 1.4rem; line-height: 1; }

.bottom-nav-item.active {
    color: var(--ap-primary, #0ea5a0);
    font-weight: 700;
    transform: translateY(-1px);
}

.bottom-nav-item.active i { font-size: 1.5rem; }

.bottom-nav-item:active { transform: scale(0.92); }

/* Desktop: Bottom-Nav ausblenden */
@media (min-width: 992px) {
    .bottom-nav { display: none !important; }
}

/* Kasse: Bottom-Nav ausblenden (hat Floating-Bar) */
body.sunmi-device .bottom-nav { display: none !important; }
body.sunmi-device { padding-bottom: 0 !important; }
