/* Reset und Basis */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #38bdf8;
    --primary-hover: #0ea5e9;
    --secondary-color: #475569;
    --secondary-hover: #334155;
    --success-color: #22c55e;
    --success-hover: #16a34a;
    --danger-color: #f87171;
    --danger-hover: #ef4444;
    --warning-color: #fbbf24;
    --info-color: #38bdf8;
    
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --bg-tertiary: #273449;
    --bg-quaternary: #334155;
    
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5f5;
    --text-muted: #94a3b8;
    
    --border-color: #1e293b;
    --border-light: #334155;
    --shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
    --shadow-lg: 0 25px 50px -12px rgba(15, 23, 42, 0.65);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
   background: radial-gradient(circle at top, #1e293b 0%, #101c33 45%, #050b1a 100%);
   color: var(--text-primary);
   line-height: 1.6;
}

.text-muted {
    color: var(--text-muted);
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background-color: var(--bg-primary);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 100;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.navbar-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.navbar-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.navbar-menu a:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.navbar-menu a.active {
    background-color: var(--primary-color);
    color: white;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.alert-overlay {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4000;
    pointer-events: none;
    animation: alert-pop 0.35s ease;
}

.alert-overlay .alert {
    min-width: 280px;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
}

@keyframes alert-pop {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Main Content */
.content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: var(--success-hover);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-hover);
}

.btn-logout {
    background-color: transparent;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.btn-logout:hover {
    background-color: var(--danger-color);
    color: white;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Forms - Basic styles */

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    border-radius: 0 0 0.75rem 0.75rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.form-grid.two-column {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.25rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.4;
}

.form-group textarea {
    min-height: 140px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: var(--bg-primary);
}

.form-group small {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.form-feedback {
    display: none;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.form-feedback.show {
    display: block;
}

.form-feedback.error {
    background-color: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
    color: var(--danger-color);
}

.form-feedback.success {
    background-color: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
    color: var(--success-color);
}

.group-assign-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.5rem;
    align-items: end;
    margin-top: 1.25rem;
}

.group-assign-form select[multiple] {
    min-height: 180px;
}

.required-groups-wrapper {
    display: grid;
    gap: 1.5rem;
}

.required-group-create {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.required-group-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.required-group-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.required-group-summary h3 {
    margin: 0;
}

.required-group-summary-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.required-group-summary-meta .btn {
    flex: 0 0 auto;
}

.required-group-body {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.required-groups-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.required-group-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.required-group-card .required-group-body,
.required-group-card .required-options-block {
    display: none;
}

.required-group-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.required-assignment-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background-color: var(--bg-secondary);
}

.required-assignment-section h3 {
    margin: 0 0 1rem 0;
}

.required-options-block {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.required-options-block h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.required-option-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-top: 0.6rem;
    padding: 0.6rem 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
}

.required-option-form input[type="text"] {
    flex: 1 1 200px;
    min-width: 160px;
}

.required-option-actions {
    display: flex;
    gap: 0.5rem;
}

.required-option-form .checkbox-inline,
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.required-option-form-add {
    background-color: rgba(56, 189, 248, 0.08);
    border-style: dashed;
}

#extrasModal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

#extrasModal #extrasContent {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.5rem 1rem;
}

#extrasModal .form-actions {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.9) 60%, rgba(15,23,42,1) 100%);
    margin-top: 0;
}

.group-assign-action {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

.group-assign-action .btn {
    width: 100%;
}

input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-light);
    border-radius: 0.35rem;
    background-color: var(--bg-secondary);
    position: relative;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

input[type="checkbox"]:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
}

input[type="checkbox"]:checked {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
}

input[type="checkbox"]:checked::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #f8fafc;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    cursor: pointer;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
}

.table tr:hover {
    background-color: var(--bg-tertiary);
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-box {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.login-box h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-box h2 {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 2rem;
}

/* Dashboard */
.dashboard-page {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 0;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    justify-items: stretch;
    align-items: stretch;
    width: 100%;
    margin: 0;
}

.dashboard-page .page-header {
    margin-bottom: 1.5rem;
}

.dashboard-card {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(148, 163, 184, 0.18);
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.dashboard-card h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.dashboard-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-dismissible {
    transition: opacity 0.3s;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

.badge-admin {
    background-color: var(--primary-color);
    color: white;
}

.badge-kassierer {
    background-color: var(--success-color);
    color: white;
}

.badge-manager {
    background-color: var(--warning-color);
    color: white;
}

.badge-info {
    background-color: var(--info-color);
    color: white;
}

.badge-cash {
    background-color: var(--success-color);
    color: white;
}

.badge-card {
    background-color: var(--info-color);
    color: white;
}

/* Status */
.status-active {
    color: var(--success-color);
    font-weight: 500;
}

.status-inactive {
    color: var(--danger-color);
    font-weight: 500;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--bg-primary);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    margin: 2rem;
}

.modal-small {
    max-width: 400px;
}

.modal-large {
    max-width: 800px;
}

.modal-receipt {
    max-width: 520px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

#receiptContent {
    padding: 1.5rem;
    background: radial-gradient(circle at top, rgba(255,255,255,0.06) 0%, rgba(15,23,42,0.35) 65%, rgba(8,12,24,0.65) 100%);
    border-radius: 0.75rem;
}

.receipt-loading {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.receipt-loading::after {
    content: '';
    display: block;
    width: 32px;
    height: 32px;
    margin: 1rem auto 0;
    border-radius: 50%;
    border: 3px solid rgba(148, 163, 184, 0.2);
    border-top-color: var(--primary-color);
    animation: receipt-spin 0.8s linear infinite;
}

.receipt-preview-frame {
    width: 100%;
    min-height: 65vh;
    border: none;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25), 0 20px 45px rgba(8, 12, 24, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.receipt-preview-frame.loaded {
    opacity: 1;
}

.receipt-error {
    text-align: center;
    color: var(--danger-color);
    font-weight: 500;
}

.modal-receipt .form-actions {
    display: none;
}

@keyframes receipt-spin {
    to { transform: rotate(360deg); }
}

.receipt-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 2rem 1.5rem;
}

.receipt-modal-scroll {
    min-height: 100%;
}

.receipt-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.75);
    border-radius: 0 0 0.75rem 0.75rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
}

.modal-subtitle {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.close {
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
}

.close:hover {
    color: var(--text-primary);
}

.modal-content form {
    padding: 2rem;
}

.modal-body {
    padding: 2rem;
}

/* POS Layout */
.pos-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 2rem;
    padding: 1.5rem 0 2rem;
    min-height: calc(100vh - 120px);
}

.pos-products {
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(100vh - 220px);
}

.pos-cart {
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.products-header h2 {
    margin: 0;
}

.product-search {
    width: 250px;
}

.product-search input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.category-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-light);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.category-tab:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.category-tab.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    aspect-ratio: 1 / 1;
    min-height: 190px;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background-color: var(--bg-tertiary);
}

.product-card h3 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card .price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.product-card .btn {
    margin-top: auto;
    width: 100%;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.customer-select {
    margin-top: 1rem;
}

.customer-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.customer-select-header label {
    font-weight: 600;
}

.customer-select-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.selected-customer {
    flex: 1;
    padding: 0.75rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
}

.selected-customer span {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.customer-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.customer-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}

.customer-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.5rem 1.5rem;
}

.customer-search-section {
    padding: 1rem 1.5rem 0.5rem;
}

.customer-search-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.customer-search-input {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0 0.75rem;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.customer-search-input:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.customer-search-input input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.95rem;
    padding: 0.75rem 0;
}

.customer-search-input input::placeholder {
    color: var(--text-muted);
}

.customer-search-input input:focus {
    outline: none;
}

.search-icon {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.customer-option-modal {
    padding: 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: var(--bg-secondary);
}

.customer-company {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.customer-line {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.customer-empty {
    margin-top: 1rem;
    padding: 1.25rem;
    text-align: center;
    border-radius: 0.75rem;
    border: 1px dashed var(--border-light);
    background-color: var(--bg-secondary);
    color: var(--text-muted);
}

.customer-option-modal:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.customer-option-modal:hover {
    background-color: var(--bg-tertiary);
    transform: translateX(4px);
}

.customer-option-modal.selected {
    background-color: var(--primary-color);
    color: white;
}

.customer-option-modal.selected .customer-company,
.customer-option-modal.selected .customer-line {
    color: rgba(255, 255, 255, 0.9);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    padding-bottom: 140px;
}

.cart-actions-fixed {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.95) 55%, rgba(15,23,42,1) 100%);
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.empty-cart {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: flex-start;
    gap: 0.5rem 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-main {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cart-item-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.item-quantity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    background-color: var(--bg-tertiary);
    color: var(--primary-color);
}

.cart-item-name {
    flex: 1;
    color: var(--text-primary);
}

.cart-item-price {
    font-weight: 600;
    min-width: 90px;
    text-align: right;
    font-size: 0.95rem;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border-radius: 0.5rem;
}

.cart-item-extra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-left: 1.5rem;
    margin: 0.2rem 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
}

.cart-item-extra-removed {
    color: #ef4444;
}

.cart-item-extra .cart-extra-name {
    flex: 1;
}

.cart-item-extra .cart-extra-price {
    font-style: normal;
    color: var(--text-secondary);
}

.cart-item-extra .cart-extra-price:empty {
    display: none;
}

.cart-item-required-option {
    font-style: normal;
    font-weight: 600;
    color: var(--text-secondary);
}

.cart-vat-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
}

.cart-vat-summary h4 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.vat-line {
    display: flex;
    justify-content: space-between;
    margin: 0.25rem 0;
    color: var(--text-muted);
}

.cart-vat-display {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.vat-breakdown-small {
    font-size: 0.75rem;
}

.vat-line-small {
    display: flex;
    justify-content: space-between;
    margin: 0.25rem 0;
    color: var(--text-muted);
}

.discount-section {
    margin: 1rem 0;
}

.discount-applied {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-tertiary);
    padding: 0.5rem;
    border-radius: 0.375rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.note-section {
    margin: 1rem 0;
}

.note-section textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.75rem;
    resize: vertical;
    min-height: 70px;
}

.note-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(56,189,248,0.1);
}

.note-section label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.driver-address .driver-name,
.driver-address .driver-company {
    font-size: 18px;
    font-weight: 700;
}

.driver-address .driver-phone,
.driver-address .driver-address-line {
    font-size: 16px;
    font-weight: 600;
}

.discount-type-selection {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
}

.discount-type-selection label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.edit-extra-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: var(--bg-secondary);
    border-radius: 0.375rem;
    margin: 0.25rem 0;
}

.edit-required-option {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.products-header {
    margin-bottom: 1.5rem;
}

.products-header h2 {
    margin: 0;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    margin-bottom: 1rem;
}

.cart-total h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-method {
    display: flex;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.payment-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
    font-weight: 500;
}

.payment-option:hover {
    border-color: rgba(56, 189, 248, 0.35);
}

.payment-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-option-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.5);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.payment-option-check::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.2s ease;
}

.payment-option input:checked + .payment-option-check {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.payment-option input:checked + .payment-option-check::after {
    background: var(--primary-color);
}

.payment-option input:checked + .payment-option-check + .payment-option-text {
    color: #f8fafc;
}

.payment-option-text {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.payment-option input:focus-visible + .payment-option-check {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.3);
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Search & Filter */
.search-box,
.filter-box {
    background-color: var(--bg-primary);
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box input[type="text"],
.filter-box input[type="date"],
.filter-box select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-info {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Reports */
.report-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.report-section {
    margin-bottom: 2rem;
}

.report-section h2 {
    margin-bottom: 1rem;
}

/* Extras */
.extra-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-tertiary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.extra-item input[type="text"] {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.extra-item input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

.required-option-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.required-option-item input[type="text"] {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.required-option-item input[type="text"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Extras Auswahl für Kassensystem */
.extras-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
    padding: 0.5rem 0.5rem 1rem;
    max-height: 280px;
    overflow-y: auto;
}

.required-options {
    margin: 0 0 1rem 0;
    padding: 0.5rem 0;
}

.required-options-title {
    margin: 0 0 0.5rem 0;
    text-align: center;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.required-options-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 0 0 1rem 0;
    padding: 0 0.5rem;
}

.required-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    background-color: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.required-option input[type="radio"] {
    transform: scale(1.1);
}

.required-option:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-tertiary);
}

.required-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(56, 189, 248, 0.15);
}

.required-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: var(--primary-color);
}

.choice-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    margin: 0.15rem;
    border-radius: 999px;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
}

.choice-badge-inactive {
    opacity: 0.6;
}

.extras-hint {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.extras-validation {
    margin-top: 0.75rem;
    color: var(--danger-color);
    font-weight: 600;
    text-align: center;
}

.extras-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.extra-option {
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.2rem 1.4rem;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.extra-option:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-tertiary);
}

.extra-option.selected-add {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

.extra-option.selected-remove {
    border-color: #f97316;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.extra-option-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.extra-option-name {
    font-weight: 600;
    font-size: 1rem;
}

.extra-option-price {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.extra-option-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.extra-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.35);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.88rem;
}

.extra-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.extra-toggle span::before {
    margin-right: 0.35rem;
    font-weight: 700;
}

.extra-toggle.extra-toggle-add span::before {
    content: '+';
    color: var(--primary-color);
}

.extra-toggle.extra-toggle-remove span::before {
    content: '−';
    color: #f97316;
}

.extra-option.selected-add .extra-toggle.extra-toggle-add {
    border-color: var(--primary-color);
    background: rgba(56, 189, 248, 0.15);
}

.extra-option.selected-remove .extra-toggle.extra-toggle-remove {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.15);
}

/* Receipt Styles */
.receipt {
    padding: 1rem;
    font-family: 'Courier New', monospace;
    background-color: white;
    color: #000;
    max-width: 80mm;
    margin: 0 auto;
    font-size: 12px;
    line-height: 1.3;
}

.receipt-header {
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 1px dashed #000;
    margin-bottom: 8px;
}

.receipt-header h3 {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 4px 0;
    color: #000;
}

.receipt-header p {
    margin: 2px 0;
    font-size: 11px;
    color: #000;
}

.receipt-meta {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 10px;
    border-bottom: 1px dashed #000;
    padding-bottom: 4px;
}

.receipt-items {
    margin: 8px 0;
}

.receipt-item {
    margin: 3px 0;
    font-size: 11px;
}

.receipt-item-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.receipt-item-name {
    flex: 1;
    margin-right: 8px;
    font-weight: bold;
}

.receipt-item-details {
    font-size: 10px;
    color: #666;
    margin-left: 4px;
    font-style: italic;
}

.receipt-item-price {
    min-width: 60px;
    text-align: right;
    font-weight: bold;
}

.receipt-qty-price {
    font-size: 10px;
    color: #666;
    text-align: right;
    margin-top: 2px;
}

.receipt-extra {
    margin: 2px 0;
    font-size: 10px;
    color: #666;
    font-style: italic;
}

.receipt-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 12px;
    margin: 4px 0;
    gap: 12px;
    width: 100%;
}

.receipt-line-name {
    font-weight: 600;
    flex: 1 1 auto;
}

.receipt-line-price {
    flex: 0 0 auto;
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

.receipt-line-vat {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.receipt-line-right {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 80px;
    justify-content: flex-end;
}



.items-section {
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    padding: 6px 0;
    margin: 10px 0;
}

.receipt-extra-line {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #4b5563;
    margin-left: 16px;
    font-style: italic;
}

.receipt-required-option {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #4b5563;
    margin-left: 16px;
    font-style: italic;
}

.receipt-note {
    font-size: 11px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px dashed rgba(56, 189, 248, 0.4);
    padding: 6px 8px;
    border-radius: 6px;
    line-height: 1.4;
}

.receipt-vat-breakdown {
    border-top: 1px dashed #000;
    padding-top: 4px;
    margin: 8px 0;
    font-size: 10px;
}

.receipt-vat-breakdown h4 {
    font-size: 11px;
    font-weight: bold;
    margin: 0 0 4px 0;
    color: #000;
}

.receipt-vat-line {
    display: flex;
    justify-content: space-between;
    margin: 2px 0;
}

.receipt-subtotal {
    border-top: 1px dashed #000;
    padding-top: 4px;
    margin-top: 8px;
}

.totals {
    margin: 10px 0;
    font-size: 11px;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    margin: 2px 0;
}

.totals-row.total {
    font-weight: 700;
    font-size: 13px;
}

.totals-row.discount-row span:last-child {
    color: inherit;
}

.receipt-total {
    border-top: 1px solid #000;
    border-bottom: 1px solid #000;
    padding: 6px 0;
    margin: 8px 0;
    font-weight: bold;
    font-size: 14px;
}

.receipt-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.receipt-payment {
    margin: 8px 0;
    font-size: 11px;
    text-align: center;
}

.receipt-footer {
    text-align: center;
    padding-top: 8px;
    border-top: 1px dashed #000;
    margin-top: 8px;
    font-size: 10px;
}

.receipt-footer p {
    margin: 2px 0;
}

.receipt-thank-you {
    font-weight: bold;
    margin-top: 8px;
}

/* Print Styles für Bondrucker */
@media print {
    body * {
        visibility: hidden;
    }
    
    .receipt, .receipt * {
        visibility: visible;
    }
    
    .receipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        margin: 0;
        padding: 0;
        background: white !important;
        box-shadow: none !important;
        border: none !important;
    }
    
    .modal, .modal-content, .form-actions, .modal-header {
        display: none !important;
    }
    
    @page {
        size: 80mm auto;
        margin: 0;
    }
}

/* Error Page */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.error-container {
    text-align: center;
    padding: 2rem;
}

.error-container h1 {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.error-container h2 {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.error-container p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Settings Page */
.settings-layout {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    max-width: 1100px;
    margin: 0 auto;
}

.settings-section {
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.settings-section h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.import-card {
    background-color: var(--bg-primary);
    border-radius: 0.5rem;
    padding: 1.75rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.import-card h2 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.import-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.import-card code {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.1rem 0.4rem;
    border-radius: 0.35rem;
    font-size: 0.8rem;
}

.import-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.import-form input[type="file"] {
    flex: 1 1 260px;
    padding: 0.75rem;
    border: 1px dashed var(--border-light);
    border-radius: 0.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.import-hint {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    margin: 0;
}

.settings-form {
    max-width: 900px;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.postal-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
}

.postal-code-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background-color: var(--bg-secondary);
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
}

.postal-code-item span {
    flex: 1;
}

/* Available extras for adding to existing items */
.toggle-switch {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.switch-root {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    width: 50px;
    height: 28px;
}

.switch-root input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-pill {
    width: 100%;
    height: 100%;
    background: rgba(148, 163, 184, 0.55);
    border-radius: 999px;
    position: relative;
    transition: background 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.45);
}

.switch-pill::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.3);
    transition: transform 0.2s ease;
}

.switch-root input:checked + .switch-pill {
    background: var(--success-color);
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.5);
}

.switch-root input:checked + .switch-pill::after {
    transform: translateX(22px);
}

.switch-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: block;
    margin-top: 0.1rem;
    flex: 1;
}

.delivery-fee-section {
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.65rem;
    background: rgba(30, 41, 59, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.delivery-fee-section.is-auto {
    border-color: rgba(148, 163, 184, 0.35);
}

.delivery-fee-toggle {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
    position: relative;
    font-size: 0.93rem;
    color: var(--text-primary);
}

.delivery-fee-section.is-auto .delivery-fee-toggle {
    cursor: default;
}

.delivery-fee-toggle.is-disabled {
    opacity: 0.9;
}

.delivery-fee-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.delivery-fee-check {
    width: 24px;
    height: 24px;
    border-radius: 0.55rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid rgba(148, 163, 184, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.delivery-fee-check::after {
    content: '✓';
    color: #fff;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.delivery-fee-toggle input:checked + .delivery-fee-check {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: none;
}

.delivery-fee-toggle input:checked + .delivery-fee-check::after {
    transform: scale(1);
}

.delivery-fee-text {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.delivery-fee-title {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.delivery-fee-amount {
    font-size: 0.83rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.delivery-fee-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.35);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: help;
    position: relative;
    pointer-events: auto;
    transition: background 0.2s ease, color 0.2s ease;
}

.delivery-fee-info:hover,
.delivery-fee-info:focus-visible {
    background: var(--primary-color);
    color: #fff;
}

.delivery-fee-info:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28);
}

.delivery-fee-info::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translate(-50%, 4px);
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    padding: 0.45rem 0.65rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.32);
    font-size: 0.72rem;
    line-height: 1.3;
    width: max-content;
    max-width: 220px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: normal;
    text-align: center;
}

.delivery-fee-info::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(15, 23, 42, 0.92) transparent transparent transparent;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.delivery-fee-info:hover::after,
.delivery-fee-info:hover::before,
.delivery-fee-info:focus-visible::after,
.delivery-fee-info:focus-visible::before {
    opacity: 1;
    transform: translate(-50%, 0);
}


.delivery-fee-section.is-auto .delivery-fee-check {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
}

.available-extra-item {
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 0.5rem 0;
    cursor: pointer;
    transition: all 0.2s;
}

.available-extra-item:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-tertiary);
    transform: translateX(4px);
}

.available-extra-item span {
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .pos-layout {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 1rem 0 4rem;
    }
    
    .pos-cart {
        position: sticky;
        bottom: 0;
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .navbar-menu {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .navbar-user {
        order: 2;
    }

    .dashboard-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        justify-items: center;
    }
    
    .report-sections {
        grid-template-columns: 1fr;
    }
    
    .postal-codes-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
.pos-page .container {
    max-width: 100%;
    width: 100%;
}

.pos-page .pos-layout {
    padding: 1.5rem 2.5rem 2rem;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 1.75rem;
    align-items: flex-start;
}

.pos-page .pos-products,
.pos-page .pos-cart {
    max-height: calc(100vh - 190px);
    overflow-y: auto;
}

.pos-page .pos-products {
    padding: 1.75rem;
}

.pos-page .pos-cart {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    padding: 1.5rem;
}
#createCustomerModal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 95vh;
}

#createCustomerModal .customer-create-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 1.5rem 1.5rem;
    display: grid;
    gap: 1.5rem;
}

.customer-form-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.customer-form-section .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.25rem;
}

.sticky-actions {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.9) 60%, rgba(15,23,42,1) 100%);
    margin-top: 0;
}
.customer-form-section {
    background: var(--bg-primary);
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.customer-form-section + .customer-form-section {
    margin-top: 0.5rem;
}
.customer-form-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.customer-form-section .form-row .form-group {
    display: flex;
    flex-direction: column;
}

.customer-form-section .form-row input,
.customer-form-section .form-row select {
    width: 100%;
}
#customerModal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 95vh;
}

#customerModal .customer-modal-content {
    flex: 1;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    padding-bottom: 0;
}

#customerModal .customer-list {
    overflow-y: auto;
    padding: 0 1.5rem 1.5rem;
}

#customerModal .form-actions {
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.9) 60%, rgba(15,23,42,1) 100%);
    margin-top: 0;
}
