/* Packing Station standalone page shell. */
html.ps-pre-dark body {
	background: #121212 !important;
}

body {
	margin: 0;
	padding: 0;
	font-family: system-ui, -apple-system, Arial, sans-serif;
	background: #fff;
	color: #333;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	transition: background .2s ease, color .2s ease;
}

html,
body {
	max-width: 100%;
	overflow-x: hidden;
}

#ps-header {
	background: #2c3e50;
	color: #fff;
	width: 100%;
	max-width: 100vw;
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

#ps-header-inner {
	display: flex;
	align-items: center;
	padding: 0 16px;
	height: 56px;
	width: 100%;
	max-width: 540px;
	margin: 0 auto;
	box-sizing: border-box;
	min-width: 0;
}

#ps-menu-toggle {
	background: none;
	border: none;
	color: #fff;
	font-size: 26px;
	cursor: pointer;
	padding: 8px;
	margin-right: 12px;
	line-height: 1;
	flex: 0 0 auto;
}

#ps-page-title {
	font-size: 18px;
	font-weight: 500;
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#ps-header-right {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-left: 12px;
	flex: 0 1 auto;
	min-width: 0;
	max-width: 55%;
}

#ps-user-name {
	font-size: 13px;
	color: #bdc3c7;
	display: block;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 120px;
}

#ps-connection-status {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: 12px;
	flex-shrink: 0;
}

#ps-connection-dot {
	margin-right: 2px;
	width: 25px;
	height: 25px;
	border-radius: 50%;
	background: #7f8c8d;
	flex-shrink: 0;
	transition: background .3s ease;
}

#ps-connection-status.online #ps-connection-dot {
	background: #2ecc71;
}

#ps-connection-status.offline #ps-connection-dot {
	background: #e74c3c;
}

#ps-connection-label {
	font-size: 11px;
	color: #95a5a6;
	white-space: nowrap;
	transition: color .3s ease;
}

#ps-connection-status.online #ps-connection-label {
	color: #bdc3c7;
}

#ps-connection-status.offline #ps-connection-label {
	color: #e74c3c;
}

#ps-dark-toggle {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px 6px;
	font-size: 18px;
	line-height: 1;
	border-radius: 6px;
	transition: background .15s ease;
	-webkit-tap-highlight-color: transparent;
	flex: 0 0 auto;
}

#ps-sidebar-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.45);
	z-index: 1500;
	opacity: 0;
	visibility: hidden;
	transition: opacity .3s ease, visibility .3s ease;
}

#ps-sidebar-overlay.open {
	opacity: 1;
	visibility: visible;
}

#ps-sidebar {
	position: fixed;
	top: 0;
	left: -280px;
	width: 280px;
	height: 100%;
	background: #1a252f;
	color: #ecf0f1;
	z-index: 2000;
	transition: left .3s ease;
	display: flex;
	flex-direction: column;
	box-shadow: 2px 0 8px rgba(0,0,0,0.3);
}

#ps-sidebar.open {
	left: 0;
}

@media (min-width: 572px) {
	#ps-sidebar.open {
		left: calc(50% - 270px);
	}
}

#ps-sidebar-header {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	padding: 6px 8px;
	border-bottom: 1px solid rgba(255,255,255,0.08);
}

#ps-sidebar-close {
	background: none;
	border: none;
	color: #7f8c8d;
	font-size: 26px;
	cursor: pointer;
	padding: 0 4px;
	line-height: 1;
	transition: color .2s ease;
}

#ps-sidebar-close:hover {
	color: #ecf0f1;
}

#ps-sidebar-menu {
	list-style: none;
	margin: 0;
	padding: 6px 12px;
	flex: 0 0 auto;
}

#ps-sidebar-menu li a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 12px;
	color: #8e9baa;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	border-radius: 8px;
	transition: background .2s ease, color .2s ease;
}

#ps-sidebar-menu li a:hover {
	background: rgba(255,255,255,0.06);
	color: #ecf0f1;
}

#ps-sidebar-menu li.active a {
	background: rgba(52,152,219,0.15);
	color: #fff;
	border-left: none;
	padding-left: 14px;
}

.ps-menu-icon {
	width: 24px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.ps-menu-icon svg {
	display: block;
}

#ps-sidebar-menu li.active .ps-menu-icon svg {
	stroke: #3498db;
}

#ps-sidebar-footer {
	padding: 8px 12px;
	border-top: 1px solid rgba(255,255,255,0.08);
}

#ps-sidebar-footer a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	color: #8e9baa;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	border-radius: 8px;
	transition: background .2s ease, color .2s ease;
}

#ps-sidebar-footer a:hover {
	background: rgba(231,76,60,0.12);
	color: #e74c3c;
}

#ps-sidebar-footer a:hover .ps-menu-icon svg {
	stroke: #e74c3c;
}

.ps-login-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: calc(100vh - 56px);
	background: #ecf0f1;
	padding: 20px;
}

#ps-main {
	flex: 1;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	padding-bottom: 32px;
	box-sizing: border-box;
}

@media (max-width: 430px) {
	#ps-header-inner {
		padding: 0 10px;
	}

	#ps-menu-toggle {
		margin-right: 8px;
	}

	#ps-page-title {
		font-size: 16px;
	}

	#ps-header-right {
		gap: 8px;
		margin-left: 8px;
		max-width: 46%;
	}

	#ps-user-name {
		max-width: 74px;
		font-size: 11px;
	}

	#ps-connection-status {
		margin-left: 0;
	}

	#ps-connection-label {
		display: none;
	}

	#ps-connection-dot {
		width: 22px;
		height: 22px;
	}
}

@media (max-width: 380px) {
	#ps-header-right {
		max-width: none;
		flex: 0 0 auto;
	}

	#ps-user-name {
		display: none;
	}
}

.ps-footer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: #2c3e50;
	color: #7f8c8d;
	text-align: center;
	padding: 6px 16px;
	font-size: 11px;
	letter-spacing: .02em;
	z-index: 900;
}

#ps-sidebar-filters {
	padding: 10px 16px 12px;
	border-top: 1px solid #2c3e50;
	overflow-y: auto;
	flex: 1;
	min-height: 0;
}

.ps-filter-section {
	margin-bottom: 10px;
}

.ps-filter-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: #7f8c8d;
	margin-bottom: 5px;
	font-weight: 600;
}

.ps-filter-checkboxes {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ps-filter-checkboxes label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #bdc3c7;
	cursor: pointer;
}

.ps-filter-checkboxes input[type="checkbox"] {
	accent-color: #3498db;
	width: 16px;
	height: 16px;
	margin: 0;
}

.ps-filter-apply {
	width: 100%;
	padding: 9px;
	background: #3498db;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease;
	margin-top: 6px;
}

.ps-filter-apply:hover {
	background: #2980b9;
}
