/* ==========================================================================
   dxpack Frontend PWA - Custom Styles
   ========================================================================== */

:root {
	--color-bg: #0b1a2a;
	--color-bg-light: #112233;
	--color-surface: #1a3350;
	--color-surface-hover: #214060;
	--color-accent: #64c8ff;
	--color-accent-light: #90d8ff;
	--color-text: #ffffff;
	--color-text-muted: #a8c0d8;
	--color-border: rgba(255, 255, 255, 0.18);
	--color-success: #4caf50;
	--color-warning: #f49d16;
	--color-danger: #ef5350;
	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 16px;
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
	--shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
	--transition: 0.2s ease;
	--font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Typography */
body, .card, .btn, .btn-large, input, textarea, select {
	font-family: var(--font-stack) !important;
}

/* Text helpers */
.textRechts { text-align: right; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.lowercase { text-transform: none !important; }
button { text-transform: none !important; }

/* No-select */
.noselect {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
}

/* Main container */
#main {
	padding-left: 0px !important;
	overscroll-behavior: none;
	min-height: 100% !important;
}

/* Version info */
.versioninfobox {
	position: absolute;
	bottom: 50px;
	right: 13px;
	text-align: right;
	z-index: 0;
	color: var(--color-text-muted);
	font-size: 0.75rem;
	opacity: 0.6;
}

/* Tables */
td, th { padding: 4px 4px; }

/* Footer icons */
.footerIcon { margin-top: 4px !important; }
.footerIcon.left { margin-right: 5px; }
.footerIcon.right { margin-left: 5px; }

/* Pulse animation */
.pulsePfeil {
	transform: scale(1);
	animation: pulse 1s infinite;
}
@keyframes pulse {
	0%   { box-shadow: 0 0 0 0 rgba(244, 157, 22, 0.4); }
	70%  { box-shadow: 0 0 0 10px rgba(244, 157, 22, 0); }
	100% { box-shadow: 0 0 0 0 rgba(244, 157, 22, 0); }
}

small {
	font-size: 1rem;
	color: black;
}

.pointer { cursor: pointer; }

/* Footer fix */
.footer-static {
	position: fixed;
	bottom: 0;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
}

/* Scale transition */
.scale-transition {
	transition: transform 0.3s cubic-bezier(0.53, 0.01, 0.36, 1.22) !important;
}

/* Background */
.main-bg {
	background-image: url(../../../images/site/bg.jpg);
	background-repeat: no-repeat;
	background-size: cover;
	background-attachment: fixed;
}

/* ==========================================================================
   Cards - Modern rounded style
   ========================================================================== */
/* Main content wrapper card — fully transparent */
.card.background {
	background: transparent !important;
	box-shadow: none !important;
	border: none !important;
	border-radius: 0 !important;
	margin: 0 !important;
}

.card {
	margin: 0.5rem 0 !important;
	border-radius: var(--radius-md) !important;
	box-shadow: var(--shadow-sm) !important;
	transition: box-shadow var(--transition);
}
.card:hover {
	box-shadow: var(--shadow-md) !important;
}
.card .card-content .card-title {
	margin-bottom: 0;
	font-weight: 600;
}
.card-image {
	max-width: 100%;
	max-height: 45px;
}
.card .card-content {
	padding: 16px !important;
}

/* ==========================================================================
   Buttons - Modern style
   ========================================================================== */
.btn, .btn-large, .btn-small {
	border-radius: 26px !important;
	font-weight: 600;
	letter-spacing: 0.03em;
	transition: all 0.25s ease;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
	border: none;
	text-transform: none;
}
.btn-large {
	font-size: 1.15rem;
	padding: 0 2rem;
	height: 54px;
	line-height: 54px;
}
.btn:active, .btn-large:active {
	transform: scale(0.97);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
/* Green action buttons */
.btn.green, .btn-large.green {
	background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%) !important;
	box-shadow: 0 4px 14px rgba(46, 125, 50, 0.4);
}
/* Red back buttons */
.btn.red, .btn-large.red {
	background: linear-gradient(135deg, #ef5350 0%, #c62828 100%) !important;
	box-shadow: 0 4px 14px rgba(198, 40, 40, 0.35);
}
/* Blue buttons */
.btn.blue, .btn-large.blue {
	background: linear-gradient(135deg, #42a5f5 0%, #1565c0 100%) !important;
	box-shadow: 0 4px 14px rgba(21, 101, 192, 0.35);
}
/* Orange buttons */
.btn.orange, .btn-large.orange {
	background: linear-gradient(135deg, #ffa726 0%, #e65100 100%) !important;
	box-shadow: 0 4px 14px rgba(230, 81, 0, 0.35);
}
/* Purple buttons */
.btn.purple, .btn-large.purple {
	background: linear-gradient(135deg, #ab47bc 0%, #6a1b9a 100%) !important;
	box-shadow: 0 4px 14px rgba(106, 27, 154, 0.35);
}

/* ==========================================================================
   Inputs - Cleaner style
   ========================================================================== */
input:not([type]), input[type=text], input[type=password], input[type=email],
input[type=url], input[type=time], input[type=date], input[type=datetime-local],
input[type=tel], input[type=number], input[type=search], textarea {
	border-radius: 0;
	transition: border-color var(--transition);
}

input.swal2-input {
	min-width: 100% !important;
	border-radius: var(--radius-sm) !important;
}

/* ==========================================================================
   Navigation & Breadcrumbs
   ========================================================================== */
.navbar .header-search-wrapper i {
	left: 0;
	position: relative;
}
.breadcrumb_wrapper {
	display: none;
	float: left;
}
.breadcrumb_item {
	color: black !important;
	display: inline-block;
	line-height: 43px;
	margin-right: 26px;
	vertical-align: top;
}
.step_breadcrumb {
	color: black !important;
}

/* Info elements */
.info-icons {
	height: 50px;
	line-height: 50px;
}
.info-liste {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

/* SweetAlert2 fixes */
body > div.swal2-container.swal2-center.swal2-backdrop-show > div > div.swal2-content > div.select-wrapper {
	display: none;
}
.swal2-popup {
	border-radius: var(--radius-lg) !important;
	background: var(--color-surface) !important;
	color: var(--color-text) !important;
	border: 1px solid var(--color-border) !important;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}
.swal2-title {
	color: var(--color-text) !important;
}
.swal2-html-container, .swal2-content {
	color: var(--color-text-muted) !important;
}
.swal2-html-container h1, .swal2-html-container h2, .swal2-html-container h3,
.swal2-html-container h4, .swal2-html-container h5, .swal2-html-container h6 {
	color: var(--color-text) !important;
}
.swal2-input, .swal2-textarea, .swal2-select {
	background: var(--color-surface) !important;
	color: var(--color-text) !important;
	border-color: var(--color-border) !important;
}
.swal2-validation-message {
	background: var(--color-surface) !important;
	color: var(--color-danger, #ff6b6b) !important;
}

/* Spacing helpers */
.m-0 { margin: 0; }
.p-5 { padding: 5px; }
.p-5-l { padding: 5px 5px 5px 0; }
.p-5-r { padding: 5px 0 5px 5px; }

/* ==========================================================================
   Full-screen modals
   ========================================================================== */
#anzahlModal, #anzahlModalDiverseArtikel, #adressModal, #scanmodal, #artikelsucheModal, #lagerbestandmodal {
	width: 100%;
	top: 0% !important;
	min-height: 100% !important;
	height: 100% !important;
	border-radius: 0 !important;
}
#adressModal > div > div > div.input-field {
	margin-bottom: 0.5rem !important;
}

/* Checkbox alignment */
.input-correct [type='checkbox']:checked + span:not(.lever):before,
.input-correct [type='checkbox'] + span:not(.lever):before, [type='checkbox']:not(.filled-in) + span:not(.lever):after {
	top: 11px;
}
#main-content > div > div:nth-child(5) > div > p > label > span {
	height: 50px;
}

/* Size utilities */
.big-2 { font-size: 1.2rem; }
.big { font-size: 1.3rem !important; }
.big-icon { font-size: 3rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
/* ==========================================================================
   Page Headers
   ========================================================================== */
.page-title {
	color: #ffffff;
	margin-top: 0;
	margin-bottom: 0;
	font-weight: 700;
	letter-spacing: 0.01em;
}
.page-title.text-center {
	text-align: center;
}

/* ==========================================================================
   Submenu Cards (lagerverwaltung, etc.)
   ========================================================================== */
.submenu-card {
	display: flex;
	align-items: center;
	background: var(--color-surface);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--radius-md);
	padding: 16px 16px;
	margin-bottom: 10px;
	cursor: pointer;
	transition: all var(--transition);
	width: 100%;
	text-align: left;
	color: #ffffff;
	font-size: 1.15rem;
	font-weight: 600;
}
.submenu-card:hover {
	background: var(--color-surface-hover);
	box-shadow: var(--shadow-md);
	transform: translateY(-1px);
}
.submenu-card .material-icons {
	margin-right: 12px;
	font-size: 1.5rem;
	color: var(--color-accent);
}
.submenu-card .submenu-arrow {
	margin-left: auto;
	color: var(--color-text-muted);
	font-size: 1.2rem;
}

/* ==========================================================================
   Seller/Customer Selection Cards
   ========================================================================== */
.selection-btn {
	width: 100%;
	border-radius: var(--radius-md) !important;
	padding: 14px 20px !important;
	height: auto !important;
	line-height: 1.4 !important;
	font-size: 1.15rem;
	font-weight: 500;
	letter-spacing: 0;
}

/* ==========================================================================
   Search Bar (dark theme compatible)
   ========================================================================== */
.search-bar {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--radius-md);
	padding: 4px 10px;
	margin: 0.3rem 0 0.5rem;
}
.search-bar input {
	color: #ffffff !important;
	border-bottom: none !important;
	margin-bottom: 0 !important;
	font-size: 1.1rem;
}
.search-bar input::placeholder {
	color: rgba(255, 255, 255, 0.5) !important;
}

/* ==========================================================================
   Order/Item List Cards
   ========================================================================== */
.order-card {
	background: var(--color-surface);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: var(--radius-md);
	margin-bottom: 10px;
	border-left: 5px solid var(--color-border);
}
/* Status left-border colors */
.order-card.order-green { border-left-color: #66bb6a; }
.order-card.order-blue { border-left-color: var(--color-accent); }
.order-card.order-orange { border-left-color: #ffa726; }
.order-card.order-grey { border-left-color: #aaa; }

.order-card-header {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 3.5rem;
	padding: 10px 14px;
	font-size: 1.15rem;
	color: #ffffff !important;
	background: transparent !important;
}
.order-card-header span {
	color: #ffffff !important;
}
.order-card-header b {
	color: #ffffff !important;
	font-weight: 700;
	font-size: 1.1em;
}
/* Checkboxes inside order cards */
.order-card [type='checkbox'].filled-in:not(:checked) + span:not(.lever):after {
	border-color: rgba(255, 255, 255, 0.5);
	border-width: 2px;
}
.order-card-expand {
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.08);
	min-width: 48px;
	cursor: pointer;
}
.order-card-expand .material-icons {
	color: rgba(255, 255, 255, 0.6);
	font-size: 2rem;
}
.order-card-body {
	border-top: 1px solid var(--color-border);
	padding: 12px 16px;
}
.order-card-body table {
	width: 100%;
	table-layout: fixed;
}
.order-card-body td {
	color: #ffffff;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
	padding: 8px 4px;
	font-size: 1rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.order-card-body td b {
	color: var(--color-text-muted);
	font-weight: 600;
}

/* ==========================================================================
   Status Badges
   ========================================================================== */
.status-badge {
	display: inline-block;
	padding: 5px 10px;
	border-radius: 12px;
	font-size: 0.85rem;
	font-weight: 600;
	text-align: center;
}
.status-badge.green { background: rgba(76, 175, 80, 0.3); color: #81c784; border: 1px solid rgba(76, 175, 80, 0.5); }
.status-badge.blue { background: rgba(100, 200, 255, 0.2); color: #90d8ff; border: 1px solid rgba(100, 200, 255, 0.4); }
.status-badge.grey { background: rgba(255, 255, 255, 0.12); color: #ccc; border: 1px solid rgba(255, 255, 255, 0.2); }

/* ==========================================================================
   Back Button & Sticky Bottom Bar
   ========================================================================== */
.btn-back {
	width: 100%;
}

/* Full-height layout: scrollable content + bottom buttons */
.page-layout {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.page-scroll {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	min-height: 0;
	padding: 0 0.75rem;
}
.page-bottom {
	flex-shrink: 0;
	padding: 12px 0 0;
}
.page-bottom .row {
	margin-bottom: 8px;
}

/* ==========================================================================
   Filter Checkboxes (dark theme)
   ========================================================================== */
.filter-row span {
	color: #ffffff !important;
	font-size: 1rem;
}
.filter-row [type='checkbox'].filled-in:not(:checked) + span:not(.lever):after {
	border-color: rgba(255, 255, 255, 0.5);
	border-width: 2px;
}

/* ==========================================================================
   Article Result Cards
   ========================================================================== */
.article-card {
	background: var(--color-surface) !important;
	border: 1px solid rgba(255, 255, 255, 0.2);
}
.article-card .card-content {
	color: #ffffff;
}
.article-card .card-content h6 {
	color: #ffffff;
	font-weight: 600;
}

/* ==========================================================================
   Customer Cards
   ========================================================================== */
.customer-card {
	background: var(--color-surface) !important;
	border: 1px solid rgba(255, 255, 255, 0.2);
}
.customer-card .card-content {
	color: #ffffff;
}
.customer-card .card-content h5 {
	color: #ffffff;
	font-size: 1.2rem;
	font-weight: 600;
}
.customer-card .card-content small {
	color: var(--color-text-muted);
	font-size: 0.95rem;
}

/* ==========================================================================
   Info/Help Text
   ========================================================================== */
.info-hint {
	color: var(--color-text-muted);
	font-size: 0.95rem;
	padding: 12px 16px;
}
.info-hint .material-icons {
	vertical-align: middle;
	margin-right: 4px;
	color: var(--color-accent);
}
.info-hint b {
	color: var(--color-text);
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.empty-state {
	color: var(--color-text-muted);
	text-align: center;
	padding: 20px 0;
}

/* ==========================================================================
   Collapsible Overrides (dark theme, scoped to order-card)
   ========================================================================== */
.order-card .collapsible,
.order-card.collapsible {
	border: none !important;
	box-shadow: none !important;
	margin: 0;
}
.order-card .collapsible-header {
	background: transparent !important;
	border: none !important;
	color: var(--color-text);
	padding: 10px 16px;
	min-height: 3.5rem;
	align-items: center;
}
.order-card .collapsible-body {
	border: none !important;
	background: transparent;
	padding: 0;
}
.order-card .collapsible > li {
	border: none;
}

/* ==========================================================================
   Select2 Dark Theme
   ========================================================================== */
.select2-container--default .select2-selection--single {
	background: var(--color-surface) !important;
	border: 1px solid var(--color-border) !important;
	border-radius: var(--radius-sm) !important;
	color: var(--color-text);
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
	color: var(--color-text);
}
.select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: var(--color-text-muted);
}
.select2-dropdown {
	background: var(--color-surface) !important;
	border: 1px solid var(--color-border) !important;
	border-radius: var(--radius-sm) !important;
}
.select2-results__option {
	color: var(--color-text);
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
	background: var(--color-accent) !important;
}

/* ==========================================================================
   Table in dark theme
   ========================================================================== */
.table-dark td, .table-dark th {
	color: var(--color-text);
	border-bottom-color: var(--color-border) !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 480px) {
	.btnload { width: 100%; }
	.info-click, .info-inner { height: 56px; }
	.info-auswahl { position: relative; top: 3px; }
}

/* ==========================================================================
   Shared Modal Styles
   ========================================================================== */

/* Full-screen modal base */
.modal-fullscreen {
	top: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	right: 0 !important;
	max-height: 100% !important;
	height: 100% !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	border-radius: 0 !important;
	overflow-y: auto;
}

/* Modal content padding */
.modal .modal-body {
	padding: 1.2rem 1.2rem 0;
}

/* Modal title */
.modal .modal-title {
	color: var(--color-text);
	text-align: center;
	margin: 0 0 1rem;
	font-weight: 600;
	font-size: 1.25rem;
}

/* Info card inside modal */
.modal .modal-info-card {
	background: var(--color-surface);
	border-radius: var(--radius-md);
	padding: 0.8rem 1rem;
	margin-bottom: 1.2rem;
}
.modal .modal-info-card .info-title {
	font-size: 1rem;
	color: var(--color-text);
	font-weight: 500;
}
.modal .modal-info-card .info-subtitle {
	font-size: 0.85rem;
	color: var(--color-text-muted);
	margin-top: 0.2rem;
}
.modal .modal-info-card .info-detail {
	font-size: 0.85rem;
	color: var(--color-text-muted);
	margin-top: 0.15rem;
	display: none;
}

/* Field group inside modal */
.modal .modal-field {
	background: var(--color-surface);
	border-radius: var(--radius-md);
	padding: 0.7rem 0.8rem;
	margin-bottom: 1rem;
}

/* Field label */
.modal .modal-label {
	color: var(--color-text-muted);
	font-size: 0.85rem;
	display: flex;
	align-items: center;
	gap: 0.4rem;
}
.modal .modal-label i {
	font-size: 1rem;
	color: var(--color-accent);
}

/* Text inputs inside modals */
.modal .modal-input {
	color: var(--color-text) !important;
	border-bottom: 1px solid var(--color-border);
	font-size: 1.1rem;
}
.modal .modal-body input[type="text"],
.modal .modal-body input[type="number"],
.modal .modal-body input[type="search"],
.modal .modal-body .input-field input {
	color: var(--color-text) !important;
}
.modal .modal-body .input-field label,
.modal .modal-body .input-field .prefix {
	color: var(--color-text-muted) !important;
}
/* Materialize select dropdown triggers inside modals */
.modal .modal-body .select-dropdown.dropdown-trigger,
.modal .modal-body .select-wrapper input.select-dropdown {
	color: var(--color-text) !important;
	border-bottom-color: var(--color-border) !important;
}

/* Button row at bottom */
.modal .modal-btn-row {
	display: flex;
	gap: 0.6rem;
	margin-top: 1.5rem;
	padding-bottom: 1.2rem;
}

/* Scan prompt header */
.modal .modal-scan-header {
	color: var(--color-text);
	text-align: center;
	font-size: 1.2rem;
	font-weight: 500;
	padding: 1.2rem 1rem 0.5rem;
	margin: 0;
}
.modal .modal-scan-header i {
	display: block;
	font-size: 3rem;
	color: var(--color-accent);
	margin-bottom: 0.5rem;
}

/* Hint text */
.modal .modal-hint {
	font-size: 0.75rem;
	color: var(--color-text-muted);
	margin: 0.4rem 0 0;
}
.modal .modal-hint i {
	font-size: 0.75rem;
	vertical-align: middle;
}

/* Footer override */
.modal .modal-footer {
	background-color: var(--color-bg) !important;
	padding: 0.5rem 1rem 1rem;
}

/* Pulsing scan badge */
.scan-badge {
	font-size: 0.7rem;
	background: var(--color-accent);
	color: #000;
	padding: 0.1rem 0.5rem;
	border-radius: 10px;
	animation: scanPulse 1.5s ease-in-out infinite;
}
@keyframes scanPulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}

/* Lagerumbuchung specific */
#lagerplatzModal .umbuchung-field {
	background: var(--color-surface);
	border-radius: var(--radius-md);
	padding: 0.7rem 0.8rem;
}

/* Legacy ID-based full-screen rules removed — all modals now use .modal-fullscreen */