/* ==========================================================================
   PalaFood Modern UI — Design System

   Zentrales Stylesheet fuer die PalaFood Bestell-App (PWA).
   Definiert Farben, Abstände, Buttons, Formulare, Modals, Kategorien,
   Artikelkarten und responsive Anpassungen.

   Aufbau:
   1. CSS Custom Properties (Farben, Schatten, Radien)
   2. Reset & Grundstile
   3. Materialize-Overrides (Buttons, Inputs, Modals)
   4. Seitenstruktur (Header, Sidebar, Content)
   5. Komponenten (Kategorien, Artikelkarten, Warenkorb, Abschluss)
   6. Responsive Anpassungen
   ========================================================================== */

/* --- CSS Custom Properties (Farbpalette und Design-Tokens) --- */
:root {
    --pf-blue: #1a3a6e;
    --pf-blue-dark: #0f2347;
    --pf-blue-light: #2a4f8a;
    --pf-bg: #D6DEE8;
    --pf-surface: #FFFFFF;
    --pf-border: #E5E7EB;
    --pf-border-strong: #D1D5DB;
    --pf-text: #1A1A1A;
    --pf-text-secondary: #6B7280;
    --pf-text-muted: #9CA3AF;
    --pf-radius-sm: 4px;
    --pf-radius: 6px;
    --pf-radius-md: 8px;
    --pf-radius-lg: 10px;
    --pf-shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --pf-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
    --pf-shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
    --pf-shadow-lg: 0 12px 28px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
    --pf-green: #16A34A;
    --pf-red: #DC2626;
    --pf-blue-btn: #2563EB;
    --pf-orange: #EA580C;
    --pf-amber: #D97706;
    --pf-purple: #7C3AED;
    --pf-teal: #0D9488;
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; }

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    margin: 0;
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    color: var(--pf-text);
    background: var(--pf-bg);
    overscroll-behavior: contain;
    -webkit-user-select: none;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 15px;
    line-height: 1.5;
}

/* Accent strip entfernt — Header direkt am oberen Rand */

main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--pf-text);
}
h4 { font-size: 1.4rem; }
h5 { font-size: 1.15rem; }
h6 { font-size: 1rem; font-weight: 500; }

p { margin-top: 0; margin-bottom: 0.5rem; }

a { color: var(--pf-blue-btn); text-decoration: none; }
a:hover { color: #1D4ED8; }

img { max-width: 100%; height: auto; }
small { font-size: 0.9rem; color: var(--pf-text-secondary); }
button { font-family: inherit; }

table { border-collapse: collapse; width: 100%; }
td, th { padding: 6px 8px; text-align: left; }
.border-none td, .border-none th,
tr.border-none td, tr.border-none th { border: none !important; }


/* --- GRID (Materialize Compatibility) --- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}
.row::after { content: ''; display: table; clear: both; }
.row .col { padding-left: 0.5rem; padding-right: 0.5rem; }

/* Small (default) */
.s1  { width: 8.333%; }  .s2  { width: 16.666%; } .s3  { width: 25%; }
.s4  { width: 33.333%; } .s5  { width: 41.666%; } .s6  { width: 50%; }
.s7  { width: 58.333%; } .s8  { width: 66.666%; } .s9  { width: 75%; }
.s10 { width: 83.333%; } .s11 { width: 91.666%; } .s12 { width: 100%; }

/* Medium (>=601px) */
@media (min-width: 601px) {
    .m1  { width: 8.333%; }  .m2  { width: 16.666%; } .m3  { width: 25%; }
    .m4  { width: 33.333%; } .m5  { width: 41.666%; } .m6  { width: 50%; }
    .m7  { width: 58.333%; } .m8  { width: 66.666%; } .m9  { width: 75%; }
    .m10 { width: 83.333%; } .m11 { width: 91.666%; } .m12 { width: 100%; }
}

/* Large (>=993px) */
@media (min-width: 993px) {
    .l1  { width: 8.333%; }  .l2  { width: 16.666%; } .l3  { width: 25%; }
    .l4  { width: 33.333%; } .l5  { width: 41.666%; } .l6  { width: 50%; }
    .l7  { width: 58.333%; } .l8  { width: 66.666%; } .l9  { width: 75%; }
    .l10 { width: 83.333%; } .l11 { width: 91.666%; } .l12 { width: 100%; }
}

/* XL (>=1201px) */
@media (min-width: 1201px) {
    .xl1  { width: 8.333%; }  .xl2  { width: 16.666%; } .xl3  { width: 25%; }
    .xl4  { width: 33.333%; } .xl5  { width: 41.666%; } .xl6  { width: 50%; }
    .xl7  { width: 58.333%; } .xl8  { width: 66.666%; } .xl9  { width: 75%; }
    .xl10 { width: 83.333%; } .xl11 { width: 91.666%; } .xl12 { width: 100%; }
}


/* --- CONTAINER --- */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}


/* =============================================
   BUTTONS — Clean enterprise style
   ============================================= */

.btn, .btn-large, .btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: none;
    cursor: pointer;
    text-transform: none !important;
    text-decoration: none !important;
    font-family: inherit;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.3;
    background-color: var(--pf-blue);
    gap: 8px;
    position: relative;
    transition: all 0.18s ease;
    box-shadow: var(--pf-shadow-sm);
    -webkit-tap-highlight-color: transparent;
    text-align: center;
}

/* Size: Regular */
.btn {
    padding: 8px 18px;
    min-height: 40px;
    border-radius: var(--pf-radius);
    font-size: 0.93rem;
}

/* Size: Large */
.btn-large {
    padding: 10px 22px;
    min-height: 48px;
    border-radius: var(--pf-radius-md);
    font-size: 1rem;
    gap: 10px;
}

/* Size: Small */
.btn-small {
    padding: 4px 12px;
    min-height: 32px;
    border-radius: var(--pf-radius-sm);
    font-size: 0.85rem;
    gap: 4px;
    font-weight: 500;
    white-space: nowrap;
}

/* Hover */
.btn:hover, .btn-large:hover, .btn-small:hover {
    transform: translateY(-1px);
    box-shadow: var(--pf-shadow-md);
    text-decoration: none !important;
    filter: brightness(1.06);
}

/* Active */
.btn:active, .btn-large:active, .btn-small:active {
    transform: translateY(0) scale(0.98);
    box-shadow: var(--pf-shadow-sm);
    filter: brightness(0.95);
    transition-duration: 0.06s;
}

/* Disabled */
.btn:disabled, .btn-large:disabled, .btn-small:disabled,
.btn.disabled, .btn-large.disabled, .btn-small.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    filter: none !important;
}


/* --- BUTTON COLORS — Modern unified scheme --- */

/* Primary action (Neuer Auftrag etc.) */
.btn.green, .green.btn-large, .green.btn-small { background-color: var(--pf-green) !important; }
.btn.green.darken-3, .green.darken-3.btn-large { background-color: #15803D !important; }
.btn.green.darken-4, .green.darken-4.btn-large { background-color: #166534 !important; }

/* Destructive / Danger */
.btn.red, .red.btn-large, .red.btn-small { background-color: var(--pf-red) !important; }

/* Standard action */
.btn.blue, .blue.btn-large, .blue.btn-small { background-color: var(--pf-blue) !important; }

/* Neutral actions — map to unified slate tones */
.btn.orange, .orange.btn-large, .orange.btn-small { background-color: var(--pf-blue) !important; }
.btn.brown, .brown.btn-large, .brown.btn-small { background-color: #475569 !important; }
.btn.brown.darken-1, .brown.darken-1.btn-large { background-color: #334155 !important; }
.btn.amber, .amber.btn-large, .amber.btn-small { background-color: var(--pf-blue) !important; }
.btn.amber.darken-4, .amber.darken-4.btn-large { background-color: var(--pf-blue-dark) !important; }

/* Feature-Buttons — map to blue variations */
.btn.purple, .purple.btn-large, .purple.btn-small { background-color: var(--pf-blue-light) !important; }
.btn.deep-purple, .deep-purple.btn-large, .deep-purple.btn-small { background-color: var(--pf-blue) !important; }
.btn.deep-purple.lighten-3, .deep-purple.lighten-3.btn-large {
    background-color: var(--pf-blue) !important;
    color: #fff !important;
}
.btn.teal, .teal.btn-large, .teal.btn-small { background-color: var(--pf-blue) !important; }
.btn.indigo, .indigo.btn-large, .indigo.btn-small { background-color: var(--pf-blue) !important; }
.btn.indigo.lighten-3, .indigo.lighten-3.btn-large {
    background-color: var(--pf-blue) !important;
    color: #fff !important;
}

.btn.grey, .grey.btn-large, .grey.btn-small { background-color: #64748B !important; }
.btn.dark, .dark.btn-large { background-color: #334155 !important; }
.btn.dark.darken-1, .dark.darken-1.btn-large { background-color: #1E293B !important; }

/* Hauptmenü buttons — modern card-like appearance */
#menue_hauptmenue .btn-large {
    background: var(--pf-surface) !important;
    color: var(--pf-text) !important;
    border: 1px solid var(--pf-border) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
    font-weight: 500;
    font-size: 0.95rem;
    justify-content: flex-start;
    padding-left: 16px;
    border-radius: 8px;
    min-height: 52px;
    transition: all 0.15s;
}
#menue_hauptmenue .btn-large:hover {
    background: #f8fafc !important;
    border-color: var(--pf-blue) !important;
    box-shadow: 0 2px 8px rgba(26,58,110,0.12) !important;
}
#menue_hauptmenue .btn-large:active {
    background: #f1f5f9 !important;
    transform: scale(0.99);
}
#menue_hauptmenue .btn-large i.material-icons {
    color: var(--pf-blue) !important;
    font-size: 22px;
    width: 28px;
    text-align: center;
}
/* Highlight: primary action green */
#menue_hauptmenue .btn-large.green,
#menue_hauptmenue .green.btn-large {
    background: var(--pf-green) !important;
    color: #fff !important;
    border-color: var(--pf-green) !important;
}
#menue_hauptmenue .btn-large.green i.material-icons,
#menue_hauptmenue .green.btn-large i.material-icons {
    color: #fff !important;
}


/* Material Icons in Buttons */
.btn i.material-icons,
.btn-large i.material-icons,
.btn-small i.material-icons {
    font-size: 1.2em;
    vertical-align: middle;
    line-height: 1;
}
.btn i.material-icons.left,
.btn-large i.material-icons.left,
.btn-small i.material-icons.left { margin-right: 4px; }
.btn i.material-icons.right,
.btn-large i.material-icons.right,
.btn-small i.material-icons.right { margin-left: 4px; }


/* --- FLOATING ACTION BUTTON --- */
.btn-floating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    background-color: var(--pf-blue);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: var(--pf-shadow-md);
    transition: all 0.18s ease;
}
.btn-floating:hover {
    transform: translateY(-1px);
    box-shadow: var(--pf-shadow-lg);
    filter: brightness(1.06);
}
.btn-floating.btn-large { width: 56px; height: 56px; }
.btn-floating.green { background-color: var(--pf-green) !important; }
.btn-floating.red { background-color: var(--pf-red) !important; }
.btn-floating.blue { background-color: var(--pf-blue-btn) !important; }
.btn-floating i.material-icons { line-height: 1; }


/* --- TEXT TRANSFORM --- */
.lowercase  { text-transform: lowercase !important; }
.uppercase  { text-transform: uppercase !important; }
.capitalize { text-transform: capitalize !important; }


/* --- DARK VARIANTS --- */
.card.dark, .card.dark.darken-1 {
    background-color: #1E293B !important;
    color: #F1F5F9 !important;
}
.card.dark .card-title { color: #F1F5F9; }
.card.dark .card-action { border-top-color: #334155; }
.card.dark .card-action a { color: #93C5FD !important; }
.card.dark p { color: #CBD5E1; }
.dark { background-color: #334155 !important; color: #F1F5F9 !important; }
.dark.darken-1 { background-color: #1E293B !important; }


/* =============================================
   CARDS — Border-defined, clean
   ============================================= */
.card {
    background: var(--pf-surface);
    border-radius: var(--pf-radius-lg);
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: var(--pf-shadow-md);
    margin: 0.5rem 0 !important;
    overflow: hidden;
}

.card-content {
    padding: 16px;
}

.card-panel {
    background: var(--pf-surface);
    border-radius: var(--pf-radius-lg);
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: var(--pf-shadow);
    padding: 16px;
    margin: 0.5rem 0;
}

.card-action {
    border-top: 1px solid var(--pf-border);
    padding: 12px 16px;
}
.card-action a {
    color: var(--pf-blue-btn) !important;
    font-weight: 500;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--pf-text);
}

.card-image {
    max-width: 100%;
    max-height: 45px;
}

.hoverable {
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.hoverable:hover {
    box-shadow: var(--pf-shadow-md);
    border-color: var(--pf-border-strong);
    transform: translateY(-1px);
}


/* =============================================
   MODALS
   ============================================= */
.pf-modal {
    position: fixed;
    top: 48px; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    background: #E8ECF1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.pf-modal.hidden {
    display: none !important;
}
.pf-modal .modal-content {
    padding: 12px !important;
    min-height: calc(100% - 48px);
}
.pf-modal .modal-footer {
    position: sticky;
    bottom: 0;
    background: var(--pf-surface);
    border-top: 1px solid var(--pf-border);
    padding: 8px 12px;
    z-index: 10;
}

/* =============================================
   KAMERA-SCANNER
   ============================================= */
.scan-mode-btn {
    text-transform: none;
    font-size: 14px;
    height: 36px;
    line-height: 36px;
    padding: 0 16px;
    background-color: #90a4ae;
}
.scan-mode-btn.active {
    background-color: var(--pf-primary, #1a3a6e);
}
.scan-mode-btn i.material-icons {
    font-size: 18px;
    line-height: 36px;
}
#cameraScannerViewfinder {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    min-height: 250px;
}
#cameraScannerViewfinder video {
    border-radius: 8px;
}
#cameraScannerSelect {
    background: var(--pf-surface, #fff);
    border: 1px solid var(--pf-border, #ccc);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    height: 36px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: block;
}
#cameraScannerStatus {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-top: 8px;
}


/* =============================================
   FORMS
   ============================================= */
.input-field {
    position: relative;
    margin-bottom: 0.75rem;
}

.input-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--pf-text-secondary);
    margin-bottom: 4px;
}
.input-field label.active {
    color: var(--pf-blue);
}

.input-field input[type="text"],
.input-field input[type="number"],
.input-field input[type="email"],
.input-field input[type="tel"],
.input-field input[type="date"],
.input-field input[type="password"],
.input-field input[type="search"],
.input-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--pf-border-strong);
    border-radius: var(--pf-radius);
    font-size: 1rem;
    color: var(--pf-text);
    background: var(--pf-surface);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    margin: 0;
    height: auto;
    font-family: inherit;
}
.input-field input:focus,
.input-field textarea:focus {
    border-color: var(--pf-blue-btn);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.input-field i.prefix,
.input-field i.material-icons.prefix {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pf-text-muted);
    font-size: 1.5rem;
}
.input-field i.prefix ~ input,
.input-field i.prefix ~ label {
    margin-left: 2.5rem;
    width: calc(100% - 2.5rem);
}

/* Textarea */
.input-field textarea.materialize-textarea {
    min-height: 60px;
    resize: vertical;
}

/* Select */
.input-field select,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--pf-border-strong);
    border-radius: var(--pf-radius);
    font-size: 1rem;
    color: var(--pf-text);
    background: var(--pf-surface);
    appearance: auto;
    outline: none;
    font-family: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input-field select:focus,
select:focus {
    border-color: var(--pf-blue-btn);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Standalone inputs (not in .input-field) */
.pretitel,
input.pretitel {
    padding: 6px 10px;
    border: 1.5px solid var(--pf-border-strong);
    border-radius: var(--pf-radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
}
.pretitel:focus {
    border-color: var(--pf-blue-btn);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}


/* --- CHECKBOX --- */
[type='checkbox'] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
[type='checkbox'] + span {
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    display: inline-block;
    line-height: 1.5;
    font-size: 1rem;
}
[type='checkbox'] + span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--pf-border-strong);
    border-radius: 5px;
    background: var(--pf-surface);
    transition: all 0.18s ease;
}
[type='checkbox']:checked + span::before {
    background: var(--pf-blue-btn);
    border-color: var(--pf-blue-btn);
}
[type='checkbox']:checked + span::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 5px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.input-correct [type='checkbox']:checked + span:not(.lever):before,
.input-correct [type='checkbox'] + span:not(.lever):before {
    top: 11px;
}


/* --- SWITCH (Toggle) --- */
.switch label { cursor: pointer; display: inline-flex; align-items: center; }
.switch label input { display: none; }
.switch label .lever {
    display: inline-block;
    width: 40px;
    height: 22px;
    background: #CBD5E1;
    border-radius: 11px;
    position: relative;
    vertical-align: middle;
    margin: 0 8px;
    transition: background 0.2s ease;
}
.switch label .lever::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
    transition: left 0.2s ease;
}
.switch label input:checked + .lever { background: var(--pf-blue-btn); }
.switch label input:checked + .lever::after { left: 20px; }


/* --- PROGRESS BAR --- */
.progress {
    position: relative;
    height: 3px;
    display: block;
    width: 100%;
    background-color: var(--pf-border);
    overflow: hidden;
    z-index: 10000;
    margin: 0;
}
.progress .indeterminate {
    background: var(--pf-blue-btn);
    position: absolute;
    top: 0; left: 0; bottom: 0;
    will-change: left, right;
    animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}
.progress .indeterminate::after {
    content: '';
    position: absolute;
    background-color: inherit;
    top: 0; left: 0; bottom: 0;
    will-change: left, right;
    animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
    animation-delay: 1.15s;
}
@keyframes indeterminate {
    0%   { left: -35%; right: 100%; }
    60%  { left: 100%; right: -90%; }
    100% { left: 100%; right: -90%; }
}
@keyframes indeterminate-short {
    0%   { left: -200%; right: 100%; }
    60%  { left: 107%; right: -8%; }
    100% { left: 107%; right: -8%; }
}


/* --- COLOR UTILITIES --- */
.red-text     { color: var(--pf-red) !important; }
.green-text   { color: var(--pf-green) !important; }
.blue-text    { color: var(--pf-blue-btn) !important; }
.orange-text  { color: var(--pf-orange) !important; }
.black-text   { color: var(--pf-text) !important; }
.white-text   { color: #fff !important; }
.grey-text    { color: var(--pf-text-secondary) !important; }
.purple-text  { color: var(--pf-purple) !important; }

.light-green.lighten-2  { background-color: #DCFCE7 !important; }
.card-panel.light-green.lighten-2 { border-color: #DCFCE7 !important; }
.indigo.lighten-5       { background-color: #EEF2FF !important; }
.red.lighten-5          { background-color: #FEF2F2 !important; }
.grey.lighten-4         { background-color: #F3F4F6 !important; }
.grey.lighten-5         { background-color: var(--pf-bg) !important; }


/* --- RESPONSIVE VISIBILITY --- */
.hide { display: none !important; }
.hidden { display: none !important; }

@media (max-width: 600px) {
    .hide-on-small-only { display: none !important; }

    /* Forms: all fields full-width on mobile */
    .input-field.col {
        width: 100% !important;
        flex-basis: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Labels above input, not overlapping */
    .input-field label {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        font-size: 0.8rem;
    }

    /* Kassenbestand: Logo kleiner, Tabelle kompakt */
    #main-content-sub img[src*="logo"] {
        width: 35% !important;
    }
    #main-content-sub h5 {
        font-size: 1.1rem;
        margin: 4px 0 8px;
    }
}
@media (min-width: 601px) {
    .hide-on-med-and-up { display: none !important; }
}
@media (min-width: 601px) and (max-width: 992px) {
    .hide-on-med-only { display: none !important; }
}


/* --- LAYOUT UTILITIES --- */
.center       { text-align: center; }
.center-align { text-align: center; }
.left         { float: left !important; }
.right        { float: right !important; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-left    { text-align: left; }
.bold         { font-weight: 700; }

.no-padding-lr { padding-left: 0 !important; padding-right: 0 !important; }
.no-padding-l  { padding-left: 0 !important; }
.no-padding-r  { padding-right: 0 !important; }
.pl-0 { padding-left: 0 !important; }
.pr-0 { padding-right: 0 !important; }

.m-0   { margin: 0 !important; }
.m-2   { margin: 0.5rem !important; }
.mt-1  { margin-top: 0.25rem !important; }
.mt-2  { margin-top: 0.5rem !important; }
.mb-1  { margin-bottom: 0.25rem !important; }
.mb-2  { margin-bottom: 0.5rem !important; }
.mb-3  { margin-bottom: 0.75rem !important; }
.mb-5  { margin-bottom: 1.25rem !important; }
.mb-10 { margin-bottom: 2.5rem !important; }
.p-5   { padding: 5px; }
.p-5-l { padding: 5px 5px 5px 0; }
.p-5-r { padding: 5px 0 5px 5px; }

.vcenter { vertical-align: middle; }
.pointer { cursor: pointer; }
.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.responsive-img { max-width: 100%; height: auto; }

.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* --- FONT SIZES --- */
.big     { font-size: 1.3rem !important; }
.big-2   { font-size: 1.2rem; }
.big-icon { font-size: 3rem; }


/* --- MATERIAL ICONS --- */
i.material-icons { vertical-align: middle; }
i.material-icons.tiny  { font-size: 1rem; }
i.material-icons.small { font-size: 1.5rem; }


/* --- SCALE TRANSITION --- */
.scale-transition {
    transition: transform 0.3s cubic-bezier(0.53, 0.01, 0.36, 1.22);
}


/* =============================================
   HEADER — Branded breadcrumb bar
   ============================================= */
.pf-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(135deg, var(--pf-blue) 0%, var(--pf-blue-dark) 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    -webkit-user-select: none;
    user-select: none;
    overflow: visible;
}

.pf-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: 48px;
    max-width: 1280px;
    margin: 0 auto;
    overflow: visible;
}

.pf-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    white-space: nowrap;
    flex: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.pf-breadcrumbs::-webkit-scrollbar { display: none; }

.pf-breadcrumb-home {
    color: rgba(255,255,255,0.85) !important;
    display: flex;
    align-items: center;
    padding: 4px 8px 4px 0;
    text-decoration: none !important;
    transition: color 0.15s;
}
.pf-breadcrumb-home:hover { color: #fff !important; }

.pf-breadcrumb-sep {
    color: rgba(255,255,255,0.4);
    font-size: 18px;
    margin: 0 4px;
    line-height: 1;
}

.pf-breadcrumb-item {
    color: rgba(255,255,255,0.75) !important;
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none !important;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.15s;
    cursor: pointer;
}
.pf-breadcrumb-item:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.1);
}
.pf-breadcrumb-item.active {
    color: #fff !important;
    font-weight: 600;
    cursor: default;
}
.pf-breadcrumb-item.active:hover {
    background: none;
}

.pf-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 12px;
    position: relative;
}

.pf-header-info {
    color: rgba(255,255,255,0.85) !important;
    font-size: 0.82rem;
    font-weight: 400;
    text-decoration: none !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}
.pf-header-info:hover {
    background: rgba(255,255,255,0.12);
}

/* --- User Dropdown Menu --- */
.pf-user-menu,
#pf-user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    min-width: 220px;
    background: var(--pf-surface);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
    z-index: 10010;
    overflow: visible;
    animation: pf-dropdown-in 0.15s ease-out;
}
@keyframes pf-dropdown-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.pf-user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--pf-text) !important;
    font-size: 0.9rem;
    font-weight: 400;
    text-decoration: none !important;
    transition: background 0.12s;
    cursor: pointer;
    white-space: nowrap;
}
.pf-user-menu-item:hover {
    background: #f0f2f5;
}
.pf-user-menu-item i.material-icons {
    font-size: 20px;
    color: var(--pf-text-secondary);
    width: 24px;
    text-align: center;
}
.pf-user-menu-divider {
    height: 1px;
    background: var(--pf-border);
    margin: 4px 0;
}
.pf-user-menu-logout {
    color: var(--pf-red) !important;
}
.pf-user-menu-logout i.material-icons {
    color: var(--pf-red) !important;
}


/* =============================================
   PAGE BACKGROUND — Branded, with depth
   ============================================= */
.main-bg {
    background: linear-gradient(180deg, #C9D5E3 0%, var(--pf-bg) 30%, #DCE3EC 100%);
    min-height: 100vh;
    padding-top: 56px;
    top: 0;
}

/* Flat layout — no card wrapper around main content */
#main-content {
    padding: 8px 0;
}


/* --- FOOTER — Dark branded bar --- */
.footer-static {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--pf-blue) 0%, var(--pf-blue-dark) 100%) !important;
    color: #fff !important;
    border-top: none !important;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.15) !important;
}
.footer-static a {
    color: #fff !important;
}
.footer-static span {
    color: rgba(255,255,255,0.85) !important;
}


/* --- BADGES --- */
.badge {
    display: inline-block;
    border-radius: 9999px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    background: var(--pf-blue);
    color: #fff;
}


/* =============================================
   "NUR AN LAGER" FILTER TOGGLE
   ============================================= */
.pf-lager-filter {
    padding: 6px 8px;
    margin-bottom: 4px;
    font-size: 12px;
}
.pf-lager-filter label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--pf-text);
    cursor: pointer;
}
.pf-lager-filter .lever {
    margin: 0 !important;
}

/* =============================================
   CATEGORY MENUS — Minimal changes (Vorsicht!)
   ============================================= */
.kat_menues {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    margin: 0;
    border: none;
    border-left: 3px solid var(--pf-blue);
    border-radius: 4px;
    background: #EEF2FF;
    color: var(--pf-blue);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    min-height: 34px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.kat_menues:hover, .kat_menues:focus {
    background: #DBEAFE;
    border-left-color: var(--pf-blue-btn);
    color: var(--pf-blue);
    text-decoration: none;
}
.kat_menues.green,
.kat_menues.zum_warenkorb {
    background: var(--pf-green) !important;
    color: #fff !important;
    border-left: 3px solid #15803D !important;
    font-size: 13px;
    min-height: 44px;
    margin-top: 6px;
    border-radius: 6px;
}
.kat_menues.green:hover,
.kat_menues.zum_warenkorb:hover {
    background: #15803D !important;
}
.kat_menues.green i,
.kat_menues.zum_warenkorb i {
    color: #fff !important;
    margin-right: 6px;
}
.kat_menues.red,
.kat_menues.wopen_menue_artikel {
    background: #fff !important;
    color: var(--pf-blue) !important;
    border: 1px solid var(--pf-border-strong) !important;
    border-left: 3px solid var(--pf-blue) !important;
    font-size: 13px;
    min-height: 44px;
    margin-top: 6px;
    border-radius: 6px;
}
.kat_menues.red:hover,
.kat_menues.wopen_menue_artikel:hover {
    background: #F8FAFC !important;
}
.kat_menues.red i,
.kat_menues.wopen_menue_artikel i {
    color: var(--pf-blue) !important;
    margin-right: 6px;
}
.kat_menues .badge {
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    margin-top: 2px;
    margin-left: 0;
    background: var(--pf-blue) !important;
    color: #fff;
}
#artikelkategorien {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 4px;
}
@media (min-width: 601px) {
    #artikelkategorien {
        grid-template-columns: 1fr;
        gap: 3px;
    }
    .kat_menues {
        flex-direction: row;
        justify-content: space-between;
        padding: 1px 6px;
        font-size: 11px;
        min-height: auto;
    }
    .kat_menues .badge {
        margin-top: 0;
        margin-left: 4px;
    }
    .kat_menues.green,
    .kat_menues.zum_warenkorb,
    .kat_menues.red,
    .kat_menues.wopen_menue_artikel {
        flex-direction: row;
        justify-content: center;
        padding: 6px 10px;
        font-size: 13px;
        min-height: auto;
    }
}


/* =============================================
   STICKY CATEGORY SIDEBAR (Artikel-Navigation)
   ============================================= */
@media (min-width: 601px) {
    #artikelkategorien_menue {
        position: sticky !important;
        top: 0 !important;
        align-self: flex-start;
        max-height: calc(100vh - 48px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }
}


/* =============================================
   ABSCHLUSS (Checkout Completion)
   ============================================= */
.abschluss-kunde-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: var(--pf-blue, #0d47a1);
    color: #fff;
    border-radius: var(--pf-radius-md);
    font-size: 0.95rem;
    font-weight: 600;
}
.abschluss-kunde-header i {
    font-size: 20px;
    opacity: 0.8;
}
.abschluss-kunde-header small {
    margin-left: auto;
    font-weight: 400;
    font-size: 0.75rem;
    opacity: 0.7;
}
.abschluss-section {
    background: var(--pf-surface);
    border-radius: var(--pf-radius-md);
    box-shadow: var(--pf-shadow-sm);
    padding: 16px;
    margin-bottom: 12px;
    overflow: hidden;
}
.abschluss-section .row {
    margin-left: 0;
    margin-right: 0;
}
.abschluss-section .input-field {
    padding-left: 0;
    padding-right: 0;
}
.abschluss-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pf-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--pf-border);
    display: flex;
    align-items: center;
}
.abschluss-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 16px;
}
.abschluss-buttons .btn,
.abschluss-buttons .btn-large {
    width: 100%;
    margin: 0;
}

/* Abschluss: Artikelliste */
.abschluss-artikel-liste {
    padding: 0;
}
.abschluss-artikel-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px solid var(--pf-border-light, #f0f0f0);
    gap: 8px;
}
.abschluss-artikel-row:last-child {
    border-bottom: none;
}
.abschluss-artikel-name {
    font-size: 0.88rem;
    color: var(--pf-text, #333);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}
.abschluss-artikel-detail {
    font-size: 0.82rem;
    color: var(--pf-text-secondary, #777);
    white-space: nowrap;
    flex-shrink: 0;
}
.abschluss-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0 2px;
    margin-top: 2px;
    border-top: 2px solid var(--pf-border, #ddd);
    font-weight: 700;
    font-size: 1rem;
}

/* Abschluss: Signatur-Pad */
.signatur-container {
    position: relative;
    overflow: hidden;
}
#signatur-canvas {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    border: 2px dashed var(--pf-border, #ccc);
    border-radius: var(--pf-radius-md, 8px);
    background: #fafafa;
    cursor: crosshair;
    touch-action: none;
}
#signatur-canvas:active {
    border-color: var(--pf-blue, #26a69a);
}
.signatur-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}
.signatur-loeschen {
    color: var(--pf-text-secondary, #777) !important;
    font-size: 0.8rem !important;
    padding: 0 8px !important;
    height: 30px !important;
    line-height: 30px !important;
}
.signatur-loeschen i {
    font-size: 16px !important;
}

/* Abschluss: Desktop */
@media (min-width: 601px) {
    .abschluss-buttons {
        flex-direction: row;
    }
    .abschluss-buttons .btn,
    .abschluss-buttons .btn-large {
        width: auto;
        flex: 1;
    }
}

/* =============================================
   KUNDENBEWEGUNGEN / LIEFERSCHEINE
   ============================================= */
.lieferschein-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.lieferschein-toolbar h6 {
    margin: 0;
    font-weight: 600;
    color: var(--pf-blue-dark);
    flex: 1;
    min-width: 150px;
}
.bewegung-filter {
    background-color: #fff !important;
    color: #333 !important;
    border: 1px solid #ccc;
}
.bewegung-filter.active {
    background-color: #00695c !important;
    color: #fff !important;
    border-color: #00695c;
}

/* --- Lieferschein Card --- */
.ls-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
    margin-bottom: 14px;
    overflow: hidden;
    border-left: 5px solid var(--pf-blue);
    transition: box-shadow .2s, transform .2s;
}
.ls-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    transform: translateY(-1px);
}
.ls-card--offen { border-left-color: #e53935; }
.ls-card--bezahlt { border-left-color: #43a047; }

/* Header */
.ls-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 14px 16px 10px;
    gap: 12px;
}
.ls-card__header-left { flex: 1; min-width: 0; }
.ls-card__header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.ls-card__title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.ls-card__type-icon {
    font-size: 20px;
    color: var(--pf-blue-dark);
    opacity: .7;
}
.ls-card__number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pf-blue-dark);
    letter-spacing: -.01em;
}
.ls-card__subtitle {
    font-size: .82rem;
    color: #78909c;
    margin-top: 2px;
}
.ls-card__amount-wrap { text-align: right; }
.ls-card__amount {
    font-size: 1.15rem;
    font-weight: 700;
    color: #263238;
}
.ls-card__offen-text {
    font-size: .78rem;
    color: #e53935;
    font-weight: 500;
    margin-top: 1px;
}
.ls-card__offen-text:empty { display: none; }

/* Status Badge */
.ls-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ls-card__badge--offen {
    background: #ffebee;
    color: #c62828;
}
.ls-card__badge--bezahlt {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Meta (Abholer, Beschreibung) */
.ls-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    padding: 0 16px 10px;
}
.ls-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .85rem;
    color: #546e7a;
}
.ls-card__meta-item i {
    font-size: 17px;
    color: #90a4ae;
}

/* Products toggle */
.ls-card__products {
    border-top: 1px solid #eceff1;
}
.ls-card__products-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: .84rem;
    font-weight: 500;
    color: var(--pf-blue-dark);
    user-select: none;
    transition: background .15s;
}
.ls-card__products-toggle:hover {
    background: #f5f7fa;
}
.ls-card__toggle-icon {
    font-size: 20px;
    transition: transform .25s;
    color: #90a4ae;
}
.ls-card__products-toggle.open .ls-card__toggle-icon {
    transform: rotate(180deg);
}

/* Products list */
.ls-card__products-list {
    padding: 0 16px 10px;
}
.ls-card__products-list table {
    width: 100%;
    border-collapse: collapse;
}
.ls-card__products-list table tr {
    border-bottom: 1px solid #f0f2f5;
}
.ls-card__products-list table tr:last-child {
    border-bottom: none;
}
.ls-card__products-list table td {
    padding: 5px 0;
    font-size: .84rem;
    color: #455a64;
    border: none;
    vertical-align: middle;
}
.ls-card__products-list table td:last-child {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
    color: #37474f;
}
.ls-card__products-list .ls-prod-qty {
    display: inline-block;
    min-width: 32px;
    font-weight: 600;
    color: var(--pf-blue-dark);
}
.ls-prod-img-cell {
    width: 32px;
    padding-right: 6px !important;
}
.ls-prod-thumb {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    object-fit: cover;
    background: #f0f2f5;
}
.ls-prod-thumb--empty {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: #eceff1;
}

/* Button-Gruppe (Bezahlen + Nachbestellen) */
.ls-card__btn-group {
    display: flex;
    gap: 6px;
    align-items: center;
}
.ls-card__pay-btn {
    background: #00695c !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: .82rem !important;
    height: 30px;
    line-height: 30px;
    padding: 0 14px !important;
}
.ls-card__pay-btn.hide { display: none !important; }
.ls-card__pay-btn:hover {
    background: #004d40 !important;
}
.ls-card__pay-btn i.material-icons {
    font-size: 16px;
    margin-right: 3px;
}
.ls-card__reorder-btn {
    background: #1565c0 !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: .82rem !important;
    height: 30px;
    line-height: 30px;
    padding: 0 14px !important;
}
.ls-card__reorder-btn:hover {
    background: #0d47a1 !important;
}
.ls-card__reorder-btn i.material-icons {
    font-size: 16px;
    margin-right: 3px;
}

/* Responsive */
@media (max-width: 600px) {
    .ls-card__header { flex-direction: column; gap: 8px; }
    .ls-card__header-right { flex-wrap: wrap; }
    .ls-card__amount { font-size: 1.05rem; }
}

/* =============================================
   WARENKORB BADGE im Header
   ============================================= */
.pf-header-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-right: 12px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.15s;
}
.pf-header-cart:hover {
    background: rgba(255,255,255,0.15);
}
.pf-header-cart .cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--pf-red);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    padding: 0 4px;
    display: none;
}
.pf-header-cart .cart-badge.has-items {
    display: block;
}

/* =============================================
   KUNDENSUCHE (Customer Search)
   ============================================= */
.kundensuche-container {
    max-width: 800px;
    margin: 0 auto;
}
.kundensuche-container .input-field input[type="text"] {
    font-size: 1.1rem;
}
.kundensuche-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.kundensuche-actions .btn,
.kundensuche-actions .btn-large {
    flex: 1;
    min-width: 180px;
}


/* =============================================
   PWA INSTALL BANNER
   ============================================= */
#pwa-install-banner {
    position: fixed;
    bottom: -80px;
    left: 0;
    right: 0;
    z-index: 99999;
    transition: bottom 0.4s ease;
    pointer-events: none;
}
#pwa-install-banner.pwa-install-visible {
    bottom: 0;
    pointer-events: auto;
}
.pwa-install-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto 12px;
    background: var(--pf-surface);
    border-radius: var(--pf-radius-lg);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.15);
    padding: 12px 16px;
    border: 1px solid var(--pf-border);
}
.pwa-install-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
}
.pwa-install-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pwa-install-text strong {
    font-size: 0.95rem;
    color: var(--pf-blue-dark);
}
.pwa-install-text span {
    font-size: 0.8rem;
    color: var(--pf-text-secondary);
}
.pwa-install-btn {
    background: var(--pf-blue);
    color: #fff;
    border: none;
    border-radius: var(--pf-radius);
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.pwa-install-btn:hover {
    background: var(--pf-blue-dark);
}
.pwa-install-close {
    background: none;
    border: none;
    color: var(--pf-text-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
}
.pwa-install-close:hover {
    color: var(--pf-text);
}

/* =============================================
   APP-SPECIFIC STYLES
   ============================================= */

#main {
    min-height: 100% !important;
    padding-left: 0 !important;
    overscroll-behavior: none;
}

#dataWedgeInput {
    position: absolute;
    top: -100px;
    left: -100px;
    width: 10px;
}

/* =============================================
   WARENKORB (Cart) — Table-like list layout
   ============================================= */

/* CRITICAL: Article rows must be full-width, not side-by-side */
#warenkorb_uebersicht > .row {
    width: 100% !important;
    flex-basis: 100% !important;
    background: transparent;
    border-bottom: 1px solid var(--pf-border);
    padding: 6px 4px;
    margin-bottom: 0 !important;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
}

/* First article row — top border */
#warenkorb_uebersicht > .row:first-of-type {
    border-top: 1px solid var(--pf-border);
}

/* The outer container itself — NO card styles */
#warenkorb_uebersicht.row {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0 !important;
}

/*
 * Warenkorb article row layout uses nth-child selectors:
 * child(1) = col s12 (title, usually empty)
 * child(2) = col s3 m2 (image + edit + delete)
 * child(3) = col s6 m7 (article info)
 * child(4) = col s3 m3 (quantity controls + price)
 * child(5) = col s12 (expandable details)
 */

/* Action column (child 2): compact */
#warenkorb_uebersicht > .row > .col:nth-child(2) {
    width: 60px !important;
    flex: 0 0 60px !important;
    padding: 0 2px !important;
    display: flex !important;
    align-items: center;
    gap: 1px;
    flex-wrap: nowrap;
    font-size: 0; /* hide &nbsp; spacers */
}
#warenkorb_uebersicht > .row > .col:nth-child(2) * {
    font-size: 1rem;
}
#warenkorb_uebersicht > .row > .col:nth-child(2) > div {
    float: none !important;
    margin: 0 !important;
    flex-shrink: 0;
}
#warenkorb_uebersicht > .row > .col:nth-child(2) a {
    float: none !important;
    display: inline-flex;
    align-items: center;
    padding: 2px;
    flex-shrink: 0;
}

/* Content column (child 3): flex-grow */
#warenkorb_uebersicht > .row > .col:nth-child(3) {
    flex: 1 1 0% !important;
    width: auto !important;
    min-width: 0;
    padding-left: 4px !important;
    padding-right: 4px !important;
}

/* Quantity column (child 4): fixed right-aligned */
#warenkorb_uebersicht > .row > .col:nth-child(4) {
    width: auto !important;
    flex: 0 0 auto !important;
    white-space: nowrap;
    text-align: right !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
}

/* Product thumbnail in cart — small */
#warenkorb_uebersicht .fotobox-thumbnail {
    max-width: 24px !important;
    max-height: 28px !important;
    border-radius: 3px;
    object-fit: cover;
}

/* Delete and Edit icons — compact */
#warenkorb_uebersicht i.prefix {
    font-size: 1.1rem;
    cursor: pointer;
    transition: opacity 0.15s;
    vertical-align: middle;
}
#warenkorb_uebersicht i.prefix:hover {
    opacity: 0.7;
}

/* Expand arrow */
#warenkorb_uebersicht .expand_artikel {
    color: var(--pf-text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    vertical-align: middle;
}

/* Product quantity input */
.produkt_menge {
    margin: 0 2px !important;
    padding: 0 !important;
    height: 32px !important;
    width: 36px !important;
    text-align: center;
    border: 1.5px solid var(--pf-border-strong) !important;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
    font-weight: 600;
    color: var(--pf-text);
    background: var(--pf-surface);
    display: inline-block !important;
    vertical-align: middle;
}

/* +/- Buttons in cart */
.change_click {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--pf-border-strong);
    height: 32px !important;
    width: 32px;
    min-width: 32px;
    text-align: center;
    margin: 0 !important;
    padding: 0 !important;
    background-color: var(--pf-surface);
    color: var(--pf-text) !important;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none !important;
    box-sizing: border-box;
    border-radius: 6px;
    transition: all 0.15s;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
}
.change_click:hover {
    background-color: var(--pf-border);
    border-color: var(--pf-text-secondary);
}

/* Summary table — clean, no heavy line */
#warenkorb_uebersicht > .col > table {
    border-top: none;
    margin-top: 8px;
    padding-top: 4px;
}

/* Expanded article details */
#warenkorb_uebersicht [id^="Target_"] table,
#warenkorb_uebersicht [id^="target_"] table {
    font-size: 0.9rem;
}

/* Mobile warenkorb tweaks */
@media (max-width: 600px) {
    /* Hide product image on mobile — saves space */
    #warenkorb_uebersicht > .row > .col:nth-child(2) > div {
        display: none !important;
    }
    #warenkorb_uebersicht > .row > .col:nth-child(2) {
        width: 44px !important;
        flex: 0 0 44px !important;
    }
    /* Smaller +/- buttons on mobile */
    #warenkorb_uebersicht .change_click {
        height: 28px !important;
        width: 28px;
        min-width: 28px;
        font-size: 1rem;
    }
    #warenkorb_uebersicht .produkt_menge {
        height: 28px !important;
        width: 32px !important;
        font-size: 0.9rem;
    }
    /* Price text smaller on mobile */
    #warenkorb_uebersicht > .row > .col:nth-child(4) {
        font-size: 0.9rem !important;
    }
}

/* =============================================
   ARTIKEL-CARDS (Produktgruppen-Ansicht)
   ============================================= */

/* Equal-height columns */
.artikelpage > .col {
    display: flex;
    min-height: 0 !important;
}

/* Card itself — equal height via flex */
.artikelcard {
    text-align: center;
    padding: 8px 8px 4px;
    margin: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Bottom row: article number left, +/- right — always at bottom */
.artikelcard > .row:last-child {
    margin-top: auto !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
}

/* Article number block — left side */
.artikelcard > .row:last-child > .col.left {
    float: none !important;
    flex-shrink: 1;
    white-space: nowrap;
    font-size: 0.82rem;
    padding-top: 0 !important;
    padding-left: 0 !important;
}

/* Quantity controls — right side, always aligned right */
.artikelcard > .row:last-child > .col.right {
    float: none !important;
    flex-shrink: 0;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1px;
    white-space: nowrap;
    height: auto !important;
    padding: 2px !important;
}

/* Compact +/- buttons in article cards */
.artikelcard .change_click {
    height: 28px !important;
    width: 28px;
    min-width: 28px;
    font-size: 1rem;
    border-radius: 4px;
}

/* Minus button in article cards — red */
.artikelcard .minus-box {
    background-color: var(--pf-red) !important;
    color: #fff !important;
    border-color: var(--pf-red) !important;
}

/* Plus button in article cards */
.artikelcard .plus-box {
    background-color: var(--pf-surface);
    border: 1.5px solid var(--pf-border-strong);
    color: var(--pf-text) !important;
}

/* Compact quantity input in article cards */
.artikelcard .produkt_menge {
    height: 28px !important;
    width: 28px !important;
    font-size: 0.9rem;
    border-radius: 4px;
}

.referenzauswahl_element,
.abholerauswahl_element {
    overflow: hidden;
    height: auto !important;
}

.info-icons {
    height: 50px;
    line-height: 50px;
}

.info-liste {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.step_breadcrumb {
    color: var(--pf-text) !important;
}

.breadcrumb_wrapper {
    display: none;
    float: left;
}

.breadcrumb_item {
    color: var(--pf-text) !important;
    display: inline-block;
    line-height: 43px;
    margin-right: 26px;
    vertical-align: top;
}

/* =============================================
   ARTIKEL-DETAIL MODAL
   ============================================= */
.artikel-detail-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.artikel-detail-img {
    flex: 0 0 auto;
    text-align: center;
}
.artikel-detail-img img {
    max-width: 160px;
    max-height: 200px;
    border-radius: 6px;
    object-fit: contain;
}
.artikel-detail-info {
    flex: 1;
    min-width: 0;
}
.artikel-detail-name {
    font-weight: 700 !important;
    color: var(--pf-blue-dark) !important;
    font-size: 1.15rem !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.3;
}
.artikel-detail-order {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fb;
    border-radius: 8px;
    border: 1px solid var(--pf-border);
}
.artikel-detail-anzahl-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.artikel-detail-anzahl-row label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--pf-text);
    white-space: nowrap;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
}
.artikel-detail-anzahl-input {
    width: 100px !important;
    max-width: 100px;
    text-align: right !important;
    font-size: 1.2rem !important;
    font-weight: 600;
    color: var(--pf-text) !important;
    height: 36px !important;
    border: 2px solid var(--pf-blue) !important;
    border-radius: 6px;
    padding: 0 8px !important;
    margin: 0 !important;
    box-sizing: border-box;
}
.artikel-detail-preis-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 1rem;
}
.artikel-detail-preis-row strong {
    font-size: 1.1rem;
}

@media (max-width: 480px) {
    .artikel-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .artikel-detail-img img {
        max-width: 120px;
        max-height: 150px;
    }
}

/* Responsive Table */
.responsive-table {
    width: 100%;
    border-collapse: collapse;
}
.responsive-table th,
.responsive-table td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--pf-border);
    vertical-align: top;
}
.responsive-table th {
    font-weight: 600;
    color: var(--pf-blue-dark);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.responsive-table tr:last-child td {
    font-weight: 600;
    border-top: 2px solid var(--pf-blue);
}

/* SweetAlert2 */
.swal2-container .select-wrapper { display: none; }
input.swal2-input { min-width: 100% !important; }

/* Pulsing Arrow */
.pulsePfeil {
    transform: scale(1);
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    70%  { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* Medium-Zoom */
.medium-zoom-overlay {
    position: fixed;
    inset: 0;
    background-color: #fff !important;
    opacity: 0.3;
    transition: opacity 300ms;
    z-index: 999999;
}
.medium-zoom-overlay,
.medium-zoom-image--opened {
    z-index: 999999;
}

/* Error box */
#neuladen {
    margin: 30px;
    padding: 30px;
    background-color: #FEF2F2;
    color: var(--pf-text);
    border-radius: 12px;
    border: 1px solid #FECACA;
    box-shadow: var(--pf-shadow-md);
}

/* Logo area — slightly branded background tint */
.appscreen img[src*="logo"] {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}

/* Select2 compat */
.select2-selection__rendered { font-size: 18px; }

/* Topbuttons */
.topbuttons { top: 3%; }

/* Loader */
.fixed-action-btn { z-index: 10000; }

/* Waves compat (no-op) */
.waves-effect, .waves-light { }

/* Hide old back buttons — replaced by breadcrumb navigation */
.open_menue_artikel,
.load_menue_hauptmenue {
    display: none !important;
}

/* Responsive */
@media screen and (max-width: 480px) {
    .btnload { width: 100%; }
    .info-click, .info-inner { height: 56px; }
    .info-auswahl { position: relative; top: 3px; }
}

/* Address modal input spacing */
#adressModal .input-field {
    margin-bottom: 0.5rem !important;
}

/* Selectonclick inputs */
input.selectonclick {
    text-align: center;
    font-size: 1.2rem !important;
    font-weight: 600;
}

/* Warenkorb summary table */
#warenkorb_uebersicht table {
    margin-bottom: 0;
}
#warenkorb_uebersicht h6 {
    margin: 0;
}

/* Warenkorb action buttons spacing */
#warenkorb_uebersicht > .col > .btn-large,
#warenkorb_uebersicht .warenkorb_buttons .btn-large {
    margin-bottom: 4px;
}
