:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #64748b;
    --accent: #10b981;
    --background: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border: #2d3a4f;
    --glass-bg: #0f172a;
    --glass-border: #1e293b;

    --success-color: var(--accent);
    --danger-color: #ef4444;
    --warning-color: #f59e0b;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -1px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 17.6px;
    background: var(--background);
    color: white;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    user-select: none;
    /* Deaktiviert Textmarkierung */
}

/* Fix für Select Optionen */
select {
    background: var(--card-bg);
    color: white;
}

select option {
    background: #1e293b;
    color: white;
    padding: 8px 10px;
    /* Mehr Abstand */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Trennlinie */
    cursor: pointer;
}

select option:checked {
    background: var(--primary);
    color: white;
}

.dashboard-container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    animation: fadeIn 0.8s ease-out;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 4rem;
}

.dashboard-header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(to right, #60a5fa, #34d399);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 1.25rem;
}

.grid-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.menu-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.menu-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    background: #253247;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.5);
}

.menu-card:hover::before {
    transform: translateX(100%);
}

.icon-wrapper {
    width: 64px;
    height: 64px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

.menu-card:hover .icon-wrapper {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.menu-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.menu-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Modul-Seiten Styling */
.module-page {
    background: var(--background);
    display: block;
    padding: 0;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 40px;
    background: #0f172a;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: padding 0.3s ease;
    /* Fix GPU/redrawing scroll flicker */
    transform: translate3d(0, 0, 0);
    will-change: transform, padding;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.back-link {
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary-hover);
}

.page-title {
    font-size: 1.15rem;
    font-weight: 800;
    transition: font-size 0.3s ease, opacity 0.3s ease;
}

/* Compact nav on scroll */
.top-nav.scrolled {
    padding: 0 2rem;
}

.top-nav.scrolled .page-title {
    font-size: 1.1rem;
}

.top-nav.scrolled .back-link {
    font-size: 0.8rem;
}

.top-nav.scrolled .user-info {
    font-size: 0.8rem;
}

.content-container {
    max-width: 1500px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.search-wrapper {
    position: relative;
    width: 300px;
}

.search-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: white;
}

/* Tabellen */
.table-container {
    overflow-x: auto;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    background: #1a2538;
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* ═══════════════════════════════════════════
   M3 BUTTONS – Material Design 3 Inspired
   ═══════════════════════════════════════════ */

/* M3 Filled Button (Primary action) */
.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0 24px;
    height: 40px;
    border-radius: 20px;
    border: none;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: white;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.btn-primary:hover::after {
    opacity: 0.08;
}

.btn-primary:active::after {
    opacity: 0.12;
}

.btn-primary:hover {
    box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* M3 Tonal Button (Secondary action) */
.btn-secondary {
    background: rgba(59, 130, 246, 0.12);
    color: #93bbfc;
    padding: 0 24px;
    height: 40px;
    border-radius: 20px;
    border: none;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    overflow: hidden;
}

.btn-secondary::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #93bbfc;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.btn-secondary:hover::after {
    opacity: 0.08;
}

.btn-secondary:active::after {
    opacity: 0.12;
}

.btn-secondary:hover {
    color: #bbd4fd;
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* M3 Outlined Button */
.btn-outlined {
    background: transparent;
    color: var(--primary);
    padding: 0 24px;
    height: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    overflow: hidden;
}

.btn-outlined::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.btn-outlined:hover::after {
    opacity: 0.08;
}

.btn-outlined:active::after {
    opacity: 0.12;
}

.btn-outlined:active {
    transform: scale(0.98);
}

/* M3 Error / Danger Button */
.btn-red {
    background: #dc3545;
    color: white;
    padding: 0 24px;
    height: 40px;
    border-radius: 20px;
    border: none;
    font-weight: 500;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-red::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: white;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.btn-red:hover::after {
    opacity: 0.08;
}

.btn-red:active::after {
    opacity: 0.12;
}

.btn-red:active {
    transform: scale(0.98);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.btn-icon:hover {
    color: var(--primary);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: flex-start;
    /* Changed from center to prevent jumping */
    padding-top: 2rem;
    /* Added offset from top */
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 95%;
    max-width: 1400px;
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    background: #0f172a;
    animation: slideUp 0.3s ease-out;
    max-height: 96vh;
    overflow-y: auto;
}

.modal-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.table-container.mini {
    max-height: 200px;
    margin-top: 1rem;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.form-group.span-3 {
    grid-column: span 3;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
    /* Prevent flex child blowout */
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    padding: 1rem;
    /* Increased from 0.75rem */
    background: #1a2538;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: white;
    width: 100%;
    /* Ensure full width */
    font-size: 1rem;
    /* Slightly larger text */
}

/* ... */
.form-group.full-width,
.form-group.span-2 {
    /* Added alias */
    grid-column: span 2;
}

.form-section-title {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    color: var(--primary);
}

.history-list {
    margin-top: 1.5rem;
}

.history-list h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.sub-table {
    font-size: 0.85rem;
}

.sub-table th {
    padding: 0.5rem;
}

.sub-table td {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#api-prices-table th, #api-prices-table td {
    padding: 0.75rem 1.5rem !important;
}

.multi-select {
    min-height: 80px;
}

.modal-footer,
.modal-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-footer .btn-secondary,
.modal-footer .btn-primary {
    font-size: 0.95rem;
    /* Standardgröße für Footer Buttons */
}

/* Spezial-Layout für EK-Preise */
.input-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.input-row .form-group {
    flex: 1;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.modal-header .close-modal {
    font-size: 1.5rem;
}

.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stat-change.positive {
    color: var(--accent);
}

.stat-change.negative {
    color: #ef4444;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
}

.badge-blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.badge-red {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.delivery-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.delivery-card {
    background: #141e30;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 768px) {
    .dashboard-header h1 {
        font-size: 2rem;
    }

    .grid-menu {
        grid-template-columns: 1fr;
    }
}

/* Search Results Dropdown - Generated via Task 100 */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 800px;
    /* Much Wider */
    max-height: 500px;
    /* Much Taller */
    overflow-y: auto;
    background: #1e293b;
    /* Hex for card-bg opacity 1 */
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.5);
    z-index: 9999;
    margin-top: 0.5rem;
    padding: 0.5rem;
}

.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

@media print {
    body * {
        visibility: hidden;
    }

    .dashboard-container,
    .top-nav,
    .modal,
    .modal-overlay {
        display: none !important;
    }

    #print-area,
    #print-area * {
        visibility: visible;
    }

    #print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        display: block !important;
        background: white;
        color: black;
    }

    body {
        background: white;
        margin: 0;
        padding: 0;
    }
}

/* --- TOAST NOTIFICATIONS --- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    transform: translateX(100%);
    animation: slideIn 0.3s forwards, fadeOut 0.5s 3s forwards;
    pointer-events: auto;
    font-size: 0.9em;
}

.toast.success {
    border-left: 4px solid var(--accent);
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid var(--primary);
}

@keyframes slideIn {
    to {
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        pointer-events: none;
    }
}

/* ═══════════════════════════════════════════
   ARTICLE PICKER (Disambiguation Dialog)
   ═══════════════════════════════════════════ */
.article-picker-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.article-picker-overlay.show {
    opacity: 1;
}

.article-picker-modal {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid #f59e0b;
    border-radius: 1.5rem;
    padding: 2rem 2.5rem;
    width: 90%;
    max-width: 1100px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.3), 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: pickerSlideIn 0.3s ease-out;
}

@keyframes pickerSlideIn {
    from {
        transform: scale(0.9) translateY(30px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.picker-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.picker-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: pickerPulse 1s ease-in-out infinite alternate;
}

@keyframes pickerPulse {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.15);
    }
}

.picker-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #f59e0b;
    margin-bottom: 0.3rem;
}

.picker-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.picker-table-wrap {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.picker-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.picker-table thead th {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
}

.picker-row {
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.picker-row:hover {
    background: rgba(245, 158, 11, 0.15) !important;
    transform: scale(1.005);
}

.picker-row td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
}

.picker-name {
    font-size: 1rem;
}

.picker-artnr {
    font-family: monospace;
    color: #93c5fd;
    font-weight: 600;
}

.picker-sup-artnr {
    font-size: 0.85rem;
}

.sup-nr {
    font-family: monospace;
    color: #fbbf24;
    font-weight: 600;
}

.sup-name {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.picker-price {
    font-family: monospace;
    font-weight: 700;
    color: #10b981;
    font-size: 1.05rem;
    text-align: right;
}

.picker-cat {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.picker-stock {
    text-align: center;
    font-weight: 600;
}

.picker-footer {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.picker-cancel-btn {
    padding: 0.7rem 2.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.picker-cancel-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

/* POS Card Keyboard Navigation Highlight */
.pos-card-highlighted {
    outline: 2px solid var(--primary) !important;
    background: rgba(59, 130, 246, 0.15) !important;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.3);
    transform: scale(1.02);
    transition: all 0.12s ease;
}

/* ═══════════════════════════════════════════
   POS FLOATING NUMPAD (Touchscreen)
   ═══════════════════════════════════════════ */
.pos-numpad-float {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 9000;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    width: 380px;
    user-select: none;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.pos-numpad-float.qty-active {
    border-color: #f59e0b;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.3), 0 8px 32px rgba(0, 0, 0, 0.5);
}

.numpad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: grab;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.numpad-header:active {
    cursor: grabbing;
}

.numpad-qty-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #f59e0b;
    font-family: monospace;
    min-width: 2ch;
    text-align: right;
}

.pos-numpad-float.qty-active .numpad-qty-value {
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

.numpad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    padding: 0.5rem;
}

.numpad-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    padding: 1rem 0;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.2, 0, 0, 1);
    touch-action: manipulation;
    position: relative;
    overflow: hidden;
}

.numpad-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: white;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.numpad-btn:hover::after {
    opacity: 0.08;
}

.numpad-btn:hover {
    transform: scale(1.03);
}

.numpad-btn:active {
    background: rgba(59, 130, 246, 0.25);
    transform: scale(0.95);
}

.numpad-clear {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #f87171 !important;
    font-weight: 700;
}

.numpad-clear:hover {
    background: rgba(239, 68, 68, 0.25) !important;
}

.numpad-multiply {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #fbbf24 !important;
    font-weight: 700;
    font-size: 1.3rem;
}

.numpad-multiply:hover {
    background: rgba(245, 158, 11, 0.25) !important;
}

/* Action Buttons (÷10%, ÷20%, Karton, Komma) */
.numpad-action {
    background: rgba(99, 102, 241, 0.12) !important;
    border-color: rgba(99, 102, 241, 0.25) !important;
    color: #a5b4fc !important;
    font-size: 0.72rem !important;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.numpad-action:hover {
    background: rgba(99, 102, 241, 0.22) !important;
}

.numpad-karton {
    background: rgba(20, 184, 166, 0.12) !important;
    border-color: rgba(20, 184, 166, 0.25) !important;
    color: #5eead4 !important;
    font-size: 0.72rem !important;
}

.numpad-karton:hover {
    background: rgba(20, 184, 166, 0.22) !important;
}

.numpad-enter {
    background: rgba(16, 185, 129, 0.18) !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
    color: #6ee7b7 !important;
    font-size: 0.85rem !important;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.6rem 0 !important;
}

.numpad-enter:hover {
    background: rgba(16, 185, 129, 0.3) !important;
}

.numpad-enter-only {
    background: rgba(59, 130, 246, 0.18) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
    color: #93c5fd !important;
    font-size: 0.85rem !important;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.5rem 0 !important;
}

.numpad-enter-only:hover {
    background: rgba(59, 130, 246, 0.3) !important;
}

/* Numpad Toggle Button */
.numpad-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 800;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    line-height: 1;
}

.numpad-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Numpad Minimized State */
.pos-numpad-float.numpad-minimized .numpad-grid {
    display: none;
}

.pos-numpad-float.numpad-minimized {
    width: auto;
    min-width: 120px;
    cursor: pointer;
}

.pos-numpad-float.numpad-minimized .numpad-header {
    border-bottom: none;
}

.pos-numpad-float.numpad-minimized .numpad-toggle-btn {
    display: none;
}

/* Also hide alphabet grid when minimized */
.pos-numpad-float.numpad-minimized .numpad-alpha-grid {
    display: none !important;
}

/* ═══════════════════════════════════════════
   ALPHABET KEYBOARD (inside floating numpad)
   ═══════════════════════════════════════════ */
.numpad-alpha-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    padding: 0.5rem;
}

.alpha-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    height: 42px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.1s ease;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alpha-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
}

.alpha-btn:active {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0.95);
}

/* Backspace */
.alpha-backspace {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-size: 1rem;
}

.alpha-backspace:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* 123 retour button */
.alpha-retour {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
    font-weight: 700;
    font-size: 0.9rem;
}

.alpha-retour:hover {
    background: rgba(59, 130, 246, 0.3);
}

/* Space bar */
.alpha-space {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    font-size: 0.8rem;
}

/* Clear */
.alpha-clear {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    font-weight: 700;
}

.alpha-clear:hover {
    background: rgba(239, 68, 68, 0.25);
}

/* Enter */
.alpha-enter {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    color: #4ade80;
    font-weight: 700;
    font-size: 0.8rem;
}

.alpha-enter:hover {
    background: rgba(34, 197, 94, 0.3);
}

/* Wider container when alpha keyboard is visible */
.pos-numpad-float.alpha-mode {
    width: 420px;
}

/* ═══════════════════════════════════════════
   POS Category Quick-Select – M3 Filter Chips
   ═══════════════════════════════════════════ */
.cat-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 32px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.cat-quick-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: white;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.cat-quick-btn:hover::after {
    opacity: 0.08;
}

.cat-quick-btn:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.25);
}

.cat-quick-btn.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: #818cf8;
    color: #c7d2fe;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.3);
}

.cat-quick-btn.active::after {
    opacity: 0;
}

.cat-quick-btn .cat-emoji {
    font-size: 1.1rem;
}

/* ═══════════════════════════════════════════════════════
   POS BUTTON VIEW – Tile Grid (Artikel-Kacheln)
   ═══════════════════════════════════════════════════════ */

/* Segmented Toggle (Liste | Button) */
.pos-view-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
}

.pos-view-toggle button {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 5px 14px;
    border-radius: 18px;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pos-view-toggle button.active {
    background: rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Tile Grid Container */
.pos-tile-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px 0;
}

/* Category Tile */
.pos-cat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    overflow: hidden;
    min-height: 110px;
}

.pos-cat-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: white;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.pos-cat-tile:hover::after {
    opacity: 0.06;
}

.pos-cat-tile:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.pos-cat-tile:active {
    transform: scale(0.97);
}

.pos-cat-tile.pos-cat-tile-add {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.15);
    background: transparent;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.pos-cat-tile.pos-cat-tile-add:hover {
    opacity: 1;
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.08);
}

.pos-cat-tile .tile-emoji {
    font-size: 2.5rem;
    line-height: 1;
}

.pos-cat-tile .tile-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    text-align: center;
}

.pos-cat-tile .tile-count {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Product Tile */
.pos-product-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 6px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    min-height: 160px;
}

.pos-product-tile::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: white;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.pos-product-tile:hover::after {
    opacity: 0.06;
}

.pos-product-tile:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.pos-product-tile:active {
    transform: scale(0.96);
}

.pos-product-tile .tile-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.06);
}

.pos-product-tile .tile-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.pos-product-tile .tile-price {
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 600;
    margin-top: 4px;
}

/* Button View Back Button */
.pos-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: var(--text-secondary);
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pos-back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Admin Gear Button */
.pos-admin-gear {
    position: absolute;
    top: 4px;
    right: 4px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 2px;
    font-size: 0.75rem;
    z-index: 2;
    transition: color 0.15s ease;
}

.pos-admin-gear:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Admin Modal */
.pos-admin-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.pos-admin-modal.show {
    display: flex;
}

.pos-admin-modal .modal-body {
    background: var(--secondary-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 520px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.pos-admin-modal .modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-admin-modal .modal-header h3 {
    margin: 0;
    font-size: 1rem;
}

.pos-admin-modal .modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.pos-admin-modal .admin-product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.pos-admin-modal .admin-product-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.pos-admin-modal .admin-search-box {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.pos-admin-modal .admin-search-results {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

/* ═══════════════════════════════════════════
   Searchable Combobox Component
   ═══════════════════════════════════════════ */
.combo-box { position: relative; display: inline-block; }
.combo-box .combo-btn {
    display: flex; align-items: center; justify-content: space-between;
    gap: 6px; cursor: pointer; padding: 0.35rem 0.55rem;
    background: var(--card-bg, #1e1e2e); border: 1px solid var(--border, #3b3b4f);
    border-radius: 8px; color: var(--text-primary, #e0e0e0); font-size: 0.78rem;
    min-width: 150px; white-space: nowrap; transition: border-color 0.15s;
}
.combo-box .combo-btn:hover, .combo-box.open .combo-btn, .combo-box .combo-btn:focus { border-color: var(--primary, #3b82f6); outline: none; }
.combo-box .combo-btn .combo-arrow { font-size: 0.55rem; opacity: 0.5; transition: transform 0.2s; }
.combo-box.open .combo-btn .combo-arrow { transform: rotate(180deg); }
.combo-box .combo-drop {
    display: none; position: absolute; top: calc(100% + 4px); left: 0;
    min-width: 100%; max-height: 260px; z-index: 999;
    background: var(--card-bg, #1e1e2e); border: 1px solid var(--border, #3b3b4f);
    border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    flex-direction: column; overflow: hidden;
}
.combo-box.open .combo-drop { display: flex; }
.combo-box .combo-search {
    padding: 0.4rem 0.5rem; border: none; border-bottom: 1px solid var(--border, #3b3b4f);
    background: transparent; color: var(--text-primary, #e0e0e0); font-size: 0.78rem;
    outline: none;
}
.combo-box .combo-search::placeholder { color: var(--text-secondary, #888); }
.combo-box .combo-list { overflow-y: auto; max-height: 220px; padding: 4px 0; }
.combo-box .combo-opt {
    padding: 0.35rem 0.6rem; cursor: pointer; font-size: 0.78rem;
    color: var(--text-primary, #e0e0e0); white-space: nowrap; transition: background 0.1s;
}
.combo-box .combo-opt:hover, .combo-box .combo-opt.highlight { background: var(--primary, #3b82f6); color: #fff; }
.combo-box .combo-opt.active { background: rgba(59,130,246,0.2); }
.combo-box .combo-empty { padding: 0.5rem; font-size: 0.72rem; color: var(--text-secondary, #888); text-align: center; }
.combo-box .combo-btn .combo-clear {
    margin-left: 2px; opacity: 0.4; cursor: pointer; font-size: 0.7rem;
}
.combo-box .combo-btn .combo-clear:hover { opacity: 1; color: #f66; }

/* ═══════════════════════════════════════════════════════════
   Global In-App Toast Notifications (alle Admin-Seiten)
   ═══════════════════════════════════════════════════════════ */
#globalToastContainer {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.global-toast {
    background: #1e293b;
    border-left: 4px solid #FF6B35;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
    color: white;
    padding: 14px 18px;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.global-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.global-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 800;
    color: #FF6B35;
}

.global-toast-body {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.global-toast-time {
    font-size: 0.65rem;
    color: var(--text-secondary);
}