/* ═════════════════════════════════════════════════════════════════════════════
   GLOBAL STYLES & RESET
   ═════════════════════════════════════════════════════════════════════════════ */

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html, body {
	height: 100%;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
	background: #f5f7fa;
	color: #37474f;
}

/* ═════════════════════════════════════════════════════════════════════════════
   BUTTONS & INTERACTIVE ELEMENTS
   ═════════════════════════════════════════════════════════════════════════════ */

button {
	background-color: #1e88e5;
	border: none;
	color: #fff;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 500;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
}

button:hover {
	background-color: #1565c0;
	box-shadow: 0 2px 8px rgba(30, 136, 229, 0.3);
}

button:active {
	transform: scale(0.98);
}

.btn-primary {
	background-color: #1e88e5;
	color: white;
}

.btn-primary:hover {
	background-color: #1565c0;
}

.btn-secondary {
	background-color: #757575;
	color: white;
}

.btn-secondary:hover {
	background-color: #616161;
}

/* ═════════════════════════════════════════════════════════════════════════════
   HEADER SECTION
   ═════════════════════════════════════════════════════════════════════════════ */

.site-header {
	width: 100%;
	background: linear-gradient(135deg, #263238 0%, #37474f 100%);
	color: #eceff1;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-title {
	font-size: 20px;
	font-weight: 600;
	margin: 0;
	flex-shrink: 0;
}

.header-controls {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	flex: 1;
	justify-content: flex-end;
	flex-wrap: nowrap;
	overflow: hidden;
}

.control-group {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.control-label {
	font-size: 13px;
	font-weight: 500;
	color: #cfd8dc;
	white-space: nowrap;
}

.algorithm-selector {
	background: #455a64;
	border: 1px solid #607d8b;
	color: #eceff1;
	padding: 6px 12px;
	border-radius: 4px;
	font-size: 13px;
	cursor: pointer;
	transition: all 0.2s ease;
	min-width: 200px;
}

.algorithm-selector:hover:not(:disabled) {
	background: #546e7a;
	border-color: #90caf9;
}

.algorithm-selector:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.algorithm-selector option {
	background: #37474f;
	color: #eceff1;
}

.uml-zoom-controls {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	background: rgba(0, 0, 0, 0.2);
	padding: 0.25rem;
	border-radius: 4px;
}

.zoom-label {
	font-size: 12px;
	color: #cfd8dc;
	margin-right: 0.5rem;
	margin-left: 0.5rem;
	font-weight: 500;
}

.zoom-btn {
	background: #455a64;
	border: 1px solid #607d8b;
	color: #eceff1;
	padding: 4px 10px;
	font-size: 12px;
	border-radius: 3px;
	min-width: 36px;
}

.zoom-btn:hover {
	background: #546e7a;
}

.controls {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;
	padding: 0.75rem 1.5rem;
}

.file-upload-group {
	display: flex;
	gap: 1.5rem;
	align-items: center;
	flex-wrap: wrap;
}

.file-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: #eceff1;
	font-weight: 500;
	cursor: pointer;
	font-size: 13px;
}

.file-label span {
	min-width: 60px;
}

.file-label input[type="file"] {
	padding: 4px 8px;
	border: 1px solid #546e7a;
	border-radius: 4px;
	background: #37474f;
	color: #eceff1;
	cursor: pointer;
	font-size: 12px;
}

.file-label input[type="file"]::-webkit-file-upload-button {
	background: #546e7a;
	border: none;
	padding: 4px 8px;
	border-radius: 4px;
	color: #eceff1;
	cursor: pointer;
	font-weight: 500;
}

.file-label input[type="file"]::-webkit-file-upload-button:hover {
	background: #607d8b;
}

.file-size-info {
	min-width: 0 !important;
	color: #b0bec5;
	font-weight: 400;
	font-size: 11px;
	white-space: nowrap;
}

.button-group {
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

.upload-hint {
	color: #b0bec5;
	font-size: 12px;
	font-style: italic;
	white-space: nowrap;
}

/* ═════════════════════════════════════════════════════════════════════════════
   MAIN CONTAINER & LAYOUT
   ═════════════════════════════════════════════════════════════════════════════ */

.main-container {
	display: flex;
	flex-direction: column;
	height: calc(100vh - 120px);
	gap: 0.5rem;
	padding: 0.5rem;
	background: #f5f7fa;
	overflow-y: auto;
}

.graph-container {
	display: flex;
	gap: 0.5rem;
	height: 39%;
	min-height: 325px;
	flex-shrink: 0;
}

.density-chart {
	width: 40%;
	height: 100%;
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem;
	flex-shrink: 0;
}

.density-chart canvas {
	width: 100% !important;
	height: 100% !important;
	max-width: 100%;
	max-height: 100%;
	display: block;
}

.plant-uml-container {
	flex: 1;
	width: 60%;
	overflow-x: auto;
	overflow-y: auto;
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	background: #fff;
	padding: 0.75rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	scrollbar-width: thin;
	scrollbar-color: #90caf9 #f5f7fa;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	min-width: 0;
}

.plant-uml-container svg {
	transform: scale(1.1);
	transform-origin: top left;
}

.plant-uml-container::-webkit-scrollbar {
	height: 8px;
}

.plant-uml-container::-webkit-scrollbar-track {
	background: #f5f7fa;
	border-radius: 4px;
}

.plant-uml-container::-webkit-scrollbar-thumb {
	background: #90caf9;
	border-radius: 4px;
}

.plant-uml-container::-webkit-scrollbar-thumb:hover {
	background: #64b5f6;
}

/* ═════════════════════════════════════════════════════════════════════════════
   DTW PARAMETERS PANEL
   ═════════════════════════════════════════════════════════════════════════════ */

.dtw-params-panel {
	background: #fff;
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
	max-height: 400px;
	overflow-y: auto;
}

.dtw-params-panel > details > summary {
	cursor: pointer;
	user-select: none;
	list-style: none;
	color: #37474f;
	font-size: 14px;
	font-weight: 600;
	padding: 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: #f5f7fa;
	border-bottom: 1px solid #eceff1;
}

.dtw-params-panel > details > summary::-webkit-details-marker {
	display: none;
}

.dtw-params-panel > details > summary::before {
	content: "▶";
	font-size: 10px;
	color: #90a4ae;
	transition: transform 0.2s;
	flex-shrink: 0;
}

.dtw-params-panel > details[open] > summary::before {
	transform: rotate(90deg);
}

.dtw-params-body {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 1rem 1.5rem;
	padding: 1rem;
}

.dtw-param-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.dtw-param-group--wide {
	grid-column: 1 / -1;
}

.dtw-param-label {
	font-size: 11px;
	font-weight: 700;
	color: #90a4ae;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.param-hint {
	font-size: 10px;
	font-weight: 400;
	color: #b0bec5;
	text-transform: none;
}

.dtw-param-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	font-size: 13px;
	color: #37474f;
}

.dtw-param-controls input[type="text"],
.dtw-param-controls input[type="number"],
.dtw-param-controls select,
.condition-row input[type="text"],
.condition-row select {
	background: #f5f7fa;
	border: 1px solid #b0bec5;
	border-radius: 5px;
	color: #37474f;
	padding: 6px 10px;
	font-size: 13px;
	transition: all 0.15s;
}

.dtw-param-controls input:focus,
.dtw-param-controls select:focus,
.condition-row input:focus,
.condition-row select:focus {
	outline: none;
	border-color: #1e88e5;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

/* Segmented tabs */
.seg-tabs {
	display: inline-flex;
	border: 1px solid #cfd8dc;
	border-radius: 6px;
	overflow: hidden;
}

.seg-tab {
	padding: 6px 13px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 500;
	color: #607d8b;
	background: #f5f7fa;
	border-right: 1px solid #cfd8dc;
	display: flex;
	align-items: center;
	gap: 4px;
	user-select: none;
	transition: all 0.15s;
}

.seg-tab:last-child {
	border-right: none;
}

.seg-tab input {
	display: none;
}

.seg-tab:has(input:checked) {
	background: #e3f2fd;
	color: #1565c0;
	font-weight: 600;
}

.seg-tabs--logic .seg-tab:has(input:checked) {
	background: #e8f5e9;
	color: #2e7d32;
}

/* IP inputs */
.ip-inputs {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	align-items: center;
}

.ip-inputs input {
	min-width: 150px;
}

/* Column pills */
.col-pill {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border: 1px solid #cfd8dc;
	border-radius: 20px;
	cursor: pointer;
	font-size: 12px;
	color: #607d8b;
	background: #f5f7fa;
	user-select: none;
	transition: all 0.15s;
}

.col-pill:hover {
	background: #eceff1;
	border-color: #b0bec5;
}

.col-pill input {
	display: none;
}

.col-pill:has(input:checked) {
	background: #e3f2fd;
	border-color: #1e88e5;
	color: #1565c0;
	font-weight: 600;
}

/* Score fields */
.score-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 11px;
	font-weight: 700;
	color: #90a4ae;
	text-transform: uppercase;
}

.score-field input {
	width: 100px;
}

/* Filter toolbar */
.filter-toolbar {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	width: 100%;
}

#addConditionBtn {
	background: #f5f7fa;
	border: 1px solid #b0bec5;
	border-radius: 5px;
	color: #1e88e5;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s;
}

#addConditionBtn:hover {
	background: #e3f2fd;
	border-color: #1e88e5;
}

#dtwConditions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	margin-top: 0.5rem;
}

.condition-row {
	display: flex;
	gap: 8px;
	align-items: center;
}


.condition-row input[type="text"] {
	flex: 1;
	min-width: 120px;
}

.condition-row input[readonly] {
	cursor: pointer;
	flex: 0 0 auto;
}

.remove-cond {
	background: #ffebee !important;
	border: 1px solid #ffcdd2 !important;
	color: #e57373 !important;
	padding: 4px 9px !important;
	font-size: 12px !important;
	flex-shrink: 0;
}

.remove-cond:hover {
	background: #ffcdd2 !important;
}

/* ═════════════════════════════════════════════════════════════════════════════
   DTW CONTAINER & PANELS
   ═════════════════════════════════════════════════════════════════════════════ */

.dtw-warping-container {
	display: flex;
	gap: 0.5rem;
	flex: 1;
	min-height: 320px;
	flex-shrink: 0;
}

/* ─── Forecast section ───────────────────────────────────────────────────────── */

.forecast-container {
	flex-shrink: 0;
}

.forecast-panel {
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	padding: 0.75rem;
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

/* Params on the left, chart on the right — the host list can get tall
   (large captures → many hosts), which read as unbalanced when everything
   was stacked in a single top bar above a wide chart. */
.forecast-params-col {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	width: 280px;
	flex-shrink: 0;
}

.forecast-chart-col {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex: 1;
	min-width: 0;
}

.forecast-panel-header {
	margin-bottom: 0.25rem;
}

.forecast-panel-header h3 {
	margin: 0 0 0.15rem 0;
	font-size: 12px;
	font-weight: 600;
}

.forecast-panel-header p {
	color: #90a4ae;
	font-size: 10px;
	margin: 0;
}

.forecast-file-row {
	flex-wrap: nowrap;
}

.forecast-file-select {
	padding: 6px 10px;
	border: 1px solid #cfd8dc;
	border-radius: 6px;
	font-size: 13px;
	background: #fff;
	color: #37474f;
	min-width: 0;
	flex: 1;
	cursor: pointer;
}

/* Host filter — mirrors the packet-filter theme: uppercase label, pill
   checkboxes, and a search box in the same style as the combo inputs. */
.forecast-ip-filter {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.forecast-ip-toolbar {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.forecast-ip-toolbar input[type="text"] {
	flex: 1;
	min-width: 0;
	background: #f5f7fa;
	border: 1px solid #b0bec5;
	border-radius: 5px;
	color: #37474f;
	padding: 6px 10px;
	font-size: 12px;
	transition: all 0.15s;
}

.forecast-ip-toolbar input[type="text"]:focus {
	outline: none;
	border-color: #1e88e5;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.link-btn {
	border: none;
	background: none;
	color: #1e88e5;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 2px;
}

.link-btn:hover {
	text-decoration: underline;
}

.link-btn:disabled {
	color: #b0bec5;
	cursor: not-allowed;
	text-decoration: none;
}

/* Virtualized list: the container is the fixed-height scrollport; a
   zero-content spacer sized to (host count * row height) gives it the
   correct scrollbar range, and only the rows actually in view (plus a
   small overscan buffer) are ever real DOM nodes — so the full host list
   scrolls smoothly no matter how many thousands of hosts a file has,
   without rendering them all as checkboxes at once. */
.forecast-ip-list {
	position: relative;
	max-height: 260px;
	overflow-y: auto;
	padding: 4px 8px;
	border: 1px solid #cfd8dc;
	border-radius: 6px;
	background: #f9fafb;
}

.forecast-ip-spacer {
	position: relative;
	width: 1px;
}

.forecast-ip-row {
	position: absolute;
	left: 0;
	right: 0;
	height: 24px;
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: #37474f;
	cursor: pointer;
	user-select: none;
	padding: 0 2px;
	border-radius: 4px;
}

.forecast-ip-row:hover {
	background: #eceff1;
}

.forecast-ip-row span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.forecast-ip-placeholder,
.forecast-ip-empty {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: #90a4ae;
	font-style: italic;
	padding: 4px 2px;
}

.mini-spinner {
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 2px solid #cfd8dc;
	border-top: 2px solid #1e88e5;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	flex-shrink: 0;
}

.forecast-ip-summary {
	font-size: 11px;
	color: #607d8b;
}

.forecast-ip-tip {
	font-size: 11px;
	color: #90a4ae;
	margin: 0;
}

.forecast-run-btn {
	align-self: stretch;
}

.forecast-convert-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.forecast-convert-row button {
	flex: 1;
	min-width: 0;
	font-size: 11px;
	padding: 6px 8px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.forecast-convert-status {
	font-size: 11px;
	color: #90a4ae;
	margin: 4px 0 0 0;
	min-height: 1.2em;
}

.forecast-convert-progress-wrap {
	margin-top: 4px;
}

.forecast-convert-progress-wrap .loading-progress-track {
	background: #e0e4e8;
}

.forecast-status {
	font-size: 12px;
	color: #546e7a;
	min-height: 1.2em;
}

.forecast-plot-wrap {
	position: relative;
}

.forecast-plot {
	min-height: 420px;
}

/* Scoped equivalent of #loadingOverlay — darkens only the forecast chart
   area while it's computing, instead of blocking the whole page, so the
   rest of the app stays usable while a forecast run is in flight. Kept
   translucent (not solid) and non-blocking to clicks so the chart keeps
   being visible/legible as pages render live underneath it. */
.section-loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 10;
	background-color: rgba(20, 30, 40, 0.28);
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border-radius: 6px;
	pointer-events: none;
}

.section-loading-text {
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
	background: rgba(0, 0, 0, 0.35);
	padding: 4px 10px;
	border-radius: 12px;
}

.forecast-view-note {
	margin-top: 8px;
	font-size: 12px;
	color: #90a4ae;
	font-style: italic;
	min-height: 1.2em;
}

.dtw-panel,
.dtw-details-panel {
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	padding: 0.5rem;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.dtw-panel {
	flex: 2.5;
	min-width: 400px;
}

.dtw-details-panel {
	flex: 1;
	min-width: 240px;
}

.dtw-panel-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	flex-wrap: wrap;
}

.dtw-panel-header h3,
.dtw-details-panel h3 {
	margin: 0 0 0.15rem 0;
	font-size: 12px;
	font-weight: 600;
}

.dtw-panel-header p {
	color: #90a4ae;
	font-size: 10px;
	margin: 0;
}

.dtw-plot {
	flex: 1;
	min-height: 250px;
	overflow: auto;
	width: 100%;
}

.dtw-plot > div {
	width: 100% !important;
	height: 100% !important;
}

.dtw-details-panel pre {
	flex: 1;
	overflow: auto;
	background: #f5f7fa;
	padding: 8px;
	border-radius: 4px;
	margin: 0;
	font-size: 10px;
	font-family: 'Courier New', monospace;
	white-space: pre-wrap;
	word-break: break-word;
}

/* ═════════════════════════════════════════════════════════════════════════════
   PACKET PREVIEW SECTION
   ═════════════════════════════════════════════════════════════════════════════ */

.packetpreview-container {
	display: flex;
	gap: 0.5rem;
	flex: 3;
	min-height: 475px;
	flex-shrink: 0;
}

.packet-preview-controller {
	display: flex;
	flex-direction: column;
	width: 50%;
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	padding: 0.5rem;
	gap: 0.4rem;
	min-width: 0;
}

.packetmeta-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	color: #37474f;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.packet-filter-container,
.view-toggle {
	display: flex;
	gap: 0.75rem;
	flex-wrap: wrap;
	align-items: center;
}

.packet-filter-container input {
	padding: 6px 10px;
	border: 1px solid #b0bec5;
	border-radius: 4px;
	background: #eceff1;
	color: #37474f;
	font-size: 12px;
	transition: all 0.15s;
}

.packet-filter-container input[readonly] {
	cursor: pointer;
}

.packet-filter-container input:focus {
	outline: none;
	background: #fff;
	border-color: #1e88e5;
	box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.btn-toggle {
	background: #eceff1;
	color: #37474f;
	border: 1px solid #b0bec5;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 500;
}

.btn-toggle:hover {
	background: #e0e0e0;
	box-shadow: none;
}

.btn-toggle.active {
	background: #1e88e5;
	color: #fff;
	border-color: #1e88e5;
}

.packetList-container {
	flex: 1;
	overflow-y: auto;
	border: 1px solid #eceff1;
	border-radius: 4px;
	background: #fafafa;
}

#conversationList {
	display: none;
}

#conversationList.active {
	display: flex;
}

/* ═════════════════════════════════════════════════════════════════════════════
   TABLE STYLING
   ═════════════════════════════════════════════════════════════════════════════ */

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

th,
td {
	padding: 8px 10px;
	border: 1px solid #eceff1;
	text-align: left;
}

thead th {
	background: #f5f7fa;
	font-weight: 600;
	color: #37474f;
	position: sticky;
	top: 0;
	z-index: 10;
}

tbody tr {
	transition: background 0.1s;
}

tbody tr:nth-child(even) {
	background: #f9f9f9;
}

tbody tr:hover {
	background: #e3f2fd;
	cursor: pointer;
}

.empty {
	text-align: center;
	color: #90a4ae;
	font-style: italic;
	padding: 20px;
}

#paginationControls {
	display: flex;
	gap: 0.5rem;
	align-items: center;
}

#paginationControls button {
	background: #eceff1;
	color: #37474f;
	border: 1px solid #b0bec5;
	padding: 4px 12px;
	font-size: 12px;
}

#paginationControls button:hover {
	background: #e0e0e0;
}

/* ═════════════════════════════════════════════════════════════════════════════
   PACKET DETAILS SECTION
   ═════════════════════════════════════════════════════════════════════════════ */

.packet-details-container {
	display: flex;
	flex-direction: row;
	gap: 0.75rem;
	width: 50%;
	height: 100%;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #cfd8dc;
	border-radius: 8px;
	padding: 0.5rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	font-size: 11px;
	min-width: 0;
}

.details-search-panel {
	flex: 0 0 180px;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.details-search-panel h3 {
	font-size: 11px;
	font-weight: 600;
	margin: 0;
}

.granular-search-fields {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.granular-search-fields input {
	padding: 6px 10px;
	border: 1px solid #b0bec5;
	border-radius: 4px;
	background: #eceff1;
	color: #37474f;
	font-size: 12px;
	transition: all 0.15s;
}

.granular-search-fields input:focus {
	outline: none;
	background: #fff;
	border-color: #1e88e5;
}

.granular-search-fields button {
	align-self: flex-start;
	margin-top: 0.5rem;
}

.hidden-field {
	display: none !important;
}

.details-info-panel {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	min-width: 0;
}

.details-info-panel h3 {
	font-size: 11px;
	font-weight: 600;
	margin: 0;
}

.details-info-panel pre {
	flex: 1;
	overflow: auto;
	background: #f5f7fa;
	padding: 8px;
	border-radius: 4px;
	margin: 0;
	font-size: 10px;
	font-family: 'Courier New', monospace;
	white-space: pre-wrap;
	word-break: break-word;
	border: 1px solid #eceff1;
}

/* ═════════════════════════════════════════════════════════════════════════════
   LOADING OVERLAY
   ═════════════════════════════════════════════════════════════════════════════ */

#loadingOverlay {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 9999;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	display: none;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
}

#loadingOverlay.active {
	display: flex;
}

.loading-text {
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	max-width: 420px;
	padding: 0 16px;
}

.loading-progress-wrap {
	width: 280px;
}

.loading-progress-track {
	width: 100%;
	height: 8px;
	background: rgba(255, 255, 255, 0.25);
	border-radius: 4px;
	overflow: hidden;
}

.loading-progress-bar {
	height: 100%;
	width: 0%;
	background: #1e88e5;
	transition: width 0.15s ease-out;
}

.spinner {
	border: 4px solid #f3f3f3;
	border-top: 4px solid #1e88e5;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* ═════════════════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1600px) {
	.dtw-params-body {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 1200px) {
	.graph-container {
		flex-direction: column;
		height: auto;
		max-height: 50%;
	}

	.density-chart,
	.plant-uml-container {
		width: 100%;
	}

	.packetpreview-container,
	.packet-preview-controller,
	.packet-details-container {
		flex-direction: column;
		width: 100%;
	}

	.dtw-warping-container {
		max-height: 400px;
	}
}

@media (max-width: 768px) {
	.header-top {
		flex-direction: column;
		gap: 1rem;
		align-items: flex-start;
	}

	.header-controls {
		width: 100%;
		justify-content: space-between;
	}

	.controls {
		flex-direction: column;
		gap: 1rem;
	}

	.file-upload-group {
		width: 100%;
	}

	.main-container {
		height: auto;
	}

	.packet-details-container {
		min-width: 0;
		max-width: 100%;
	}
}

/* ═════════════════════════════════════════════════════════════════════════════
   COMBO-BOX DROPDOWN
   ═════════════════════════════════════════════════════════════════════════════ */

.combo-dropdown {
	position: absolute;
	display: none;
	background: #fff;
	border: 1px solid #1e88e5;
	border-top: none;
	border-radius: 0 0 5px 5px;
	z-index: 9000;
	max-height: 200px;
	overflow-y: auto;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.combo-option {
	padding: 6px 10px;
	font-size: 13px;
	color: #37474f;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.combo-option:hover {
	background: #e3f2fd;
	color: #1565c0;
}

.combo-more {
	padding: 5px 10px;
	font-size: 11px;
	color: #90a4ae;
	font-style: italic;
	border-top: 1px solid #eceff1;
	text-align: center;
	cursor: default;
}

/* ═════════════════════════════════════════════════════════════════════════════
   CUSTOM SCROLLBARS
   ═════════════════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: #f5f7fa;
}

::-webkit-scrollbar-thumb {
	background: #90caf9;
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: #64b5f6;
}
